<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use the DOI METHOD(Insert_table and Insert_table) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-the-doi-method-insert-table-and-insert-table/m-p/7407171#M1547581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please give me some comments for this question, anything.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Nov 2010 01:42:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-01T01:42:17Z</dc:date>
    <item>
      <title>How to use the DOI METHOD(Insert_table and Insert_table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-the-doi-method-insert-table-and-insert-table/m-p/7407170#M1547580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I want insert some data into MS Office word.(The word template has some table)&lt;/P&gt;&lt;P&gt;(I know the DOI function is good solution.)&lt;/P&gt;&lt;P&gt;I have use the METHOD search to get the area.then use the METHOD insert_table can add data to MS Office Word.&lt;/P&gt;&lt;P&gt;The METHOD search can get right area. But the METHOD insert_table can not add data into the MS office word.&lt;/P&gt;&lt;P&gt;Code as below:&lt;/P&gt;&lt;P&gt;***********************************************************************************************************&lt;/P&gt;&lt;P&gt;*Get the area&lt;/P&gt;&lt;P&gt;CALL METHOD ref_word_document-&amp;gt;search&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;search_string = '&amp;lt;Search1&amp;gt;'&lt;/P&gt;&lt;P&gt;pos = '0'&lt;/P&gt;&lt;P&gt;flag = space&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;retcode = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lw_info-colindex = 0.&lt;/P&gt;&lt;P&gt;APPEND lw_info TO lt_info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Insert tabel to current area.&lt;/P&gt;&lt;P&gt;TYPES:BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;lv_char TYPE char20,&lt;/P&gt;&lt;P&gt;END OF ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lw_data TYPE ty_data.&lt;/P&gt;&lt;P&gt;DATA: lt_data TYPE TABLE OF ty_data.&lt;/P&gt;&lt;P&gt;lw_data-lv_char = 'test the insert data to word'.&lt;/P&gt;&lt;P&gt;APPEND lw_data TO lt_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Insert above data to Word file.&lt;/P&gt;&lt;P&gt;  CALL METHOD ref_word_document-&amp;gt;insert_table&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      data_table             = p_lt_data[]&lt;/P&gt;&lt;P&gt;      info_table              = p_lt_info[]&lt;/P&gt;&lt;P&gt;      lowerbound          = 0  " propose 1&lt;/P&gt;&lt;P&gt;      upperbound          = 0  " table rows to be counted first but review parameter wholetable&lt;/P&gt;&lt;P&gt;      doctable_number  = 1  " to be figured out what is table number logic in WORD&lt;/P&gt;&lt;P&gt;      clearoption            = 1  " I would leave 1&lt;/P&gt;&lt;P&gt;      startrow                = 1  " I would leave 1&lt;/P&gt;&lt;P&gt;      varsize                  = 'X'&lt;/P&gt;&lt;P&gt;      no_flush                = 'X'&lt;/P&gt;&lt;P&gt;      wholetable            = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      retcode                 = g_retcode&lt;/P&gt;&lt;P&gt;      error                     = g_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************************************&lt;/P&gt;&lt;P&gt;the g_retcode value is  "CONTROL_INTERNAL_ERROR".&lt;/P&gt;&lt;P&gt;Can you give me a example about how to use the Call METHOD I_OI_WORD_PROCESSOR_DOCUMENT-&amp;gt;insert_table?&lt;/P&gt;&lt;P&gt;I have refer to the SAP help,But it still can not add data to Word.&lt;/P&gt;&lt;P&gt;(MS Office 2003 and 2007 Version,SAP Version:7200.1.0.1050,Windows Version:Windows 7 and XP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Roy Cai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 02:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-the-doi-method-insert-table-and-insert-table/m-p/7407170#M1547580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-28T02:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the DOI METHOD(Insert_table and Insert_table)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-the-doi-method-insert-table-and-insert-table/m-p/7407171#M1547581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please give me some comments for this question, anything.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 01:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-the-doi-method-insert-table-and-insert-table/m-p/7407171#M1547581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-01T01:42:17Z</dc:date>
    </item>
  </channel>
</rss>

