‎2007 Jan 26 7:32 AM
Hi all!
Has anyone used the interface 'i_oi_word_processor_document' and its methods
'insert_table' or 'insert_table2'? Could you please give me some simple example how to use it cause I've created the table in word document then filled necessary tables to be exported using that interface and there is nothing inserted in the table in Word...
My code is here:
* Creating data_table
DATA gt_test TYPE TABLE OF string WITH HEADER LINE.
gt_test = 'text1'.
APPEND gt_test.
gt_test = 'text2'.
APPEND gt_test.
* Creating info_table
DATA gt_infotab TYPE soi_cols_table WITH HEADER LINE.
gt_infotab-colindex = 1.
APPEND gt_infotab.
gt_infotab-colindex = 1.
APPEND gt_infotab.
CALL METHOD i_wp->insert_table
EXPORTING
data_table = gt_test[]
info_table = gt_infotab[]
lowerbound = 1
upperbound = 2
doctable_number = 1 "number of table in the word document
clearoption = 0
startrow = 1
varsize = 'X'.Thanks in advance.
Regards,
Pavel
‎2007 Jan 26 8:39 AM
It is odd but the problem was in the declaration of the test table. Here is the solution:
DATA: BEGIN OF gt_test OCCURS 0,
string(132),
END OF gt_test.