Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with deleting a table in Word.

former_member775332
Discoverer

Hi all,

I have a problem in my implementation with opening Word documents in SAP. I will provide details below. I created a method responsible for opening Word documents. The documents are opened in containers:

CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = lo_control
CALL METHOD lo_control->init_control
EXPORTING
r3_application_name = lv_name "#EC NOTEXT
inplace_enabled = 'X'
inplace_scroll_documents = 'X'
parent = lo_container
register_on_custom_event = 'X'
no_flush = 'X'.
CALL METHOD lo_control->get_document_proxy
EXPORTING
document_type = 'Word.Document'
no_flush = 'X'
IMPORTING
document_proxy = lo_document_control.
lo_document_control->open_document(
document_title = 'TEST'
open_inplace = 'X'
document_url = lv_url ).
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.

I load the documents at the beginning of the program:

IF lo_first_doc IS INITIAL.
lo_first_doc = NEW zcl_read_write( ).
lo_first_doc->run( ).
ENDIF.
IF lo_second_doc IS INITIAL.
lo_second_doc = NEW zcl_read_write( ).
lo_second_doc->run( ).
ENDIF.

Documents display correctly and are editable, but when I create for example a table from a word standard:

I selected some of the columns and clicked 'Delete' button. I can't delete those rows. After clicking 'Ok' button nothing happens. I wonder if there is something missing in implementation or I can't do such operations with 2 open documents. Unfortunately, I have no idea. Does anyone have a similar problem?

EDIT: In addition, if it does not delete the rows in the table, it deletes content in the second document.

BR.

1 REPLY 1

former_member775332
Discoverer
0 Kudos

Any ideas? If more information is needed then please let me know.