Application Development and Automation 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: 
Read only

Interface i_oi_word_processor_document

Former Member
0 Likes
495

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

1 REPLY 1
Read only

Former Member
0 Likes
343

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.