<?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: Table Control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796868#M652945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Aug 2007 10:35:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-30T10:35:41Z</dc:date>
    <item>
      <title>Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796867#M652944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   How to download the displayed data from table control to local excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function  module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new for module pool so send step by step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 10:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796867#M652944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-30T10:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796868#M652945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 10:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796868#M652945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-30T10:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796869#M652946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you send breifly if you have model code send it also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sudhakaran-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 10:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796869#M652946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-30T10:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796870#M652947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;For every table control we have an internal table related to it, look at the PBO and PAI, you come to know which internal table is using to fill this table control, then use the GUI_DOWNLOAD function moduel to download this internal table data into Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its a simple way to do what is required&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILE_NAME                       = 'C:\test\yourfile.xls'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CREATE_PIVOT                    = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA_SHEET_NAME                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PIVOT_SHEET_NAME                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD_OPTION                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PIVOT_FIELD_TAB                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   DATA_TAB                        = itab " internal table to be passed&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELDNAMES                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FILE_NOT_EXIST                  = 1&lt;/P&gt;&lt;P&gt;   FILENAME_EXPECTED               = 2&lt;/P&gt;&lt;P&gt;   COMMUNICATION_ERROR             = 3&lt;/P&gt;&lt;P&gt;   OLE_OBJECT_METHOD_ERROR         = 4&lt;/P&gt;&lt;P&gt;   OLE_OBJECT_PROPERTY_ERROR       = 5&lt;/P&gt;&lt;P&gt;   INVALID_PIVOT_FIELDS            = 6&lt;/P&gt;&lt;P&gt;   DOWNLOAD_PROBLEM                = 7&lt;/P&gt;&lt;P&gt;   OTHERS                          = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 10:41:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796870#M652947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-30T10:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796871#M652948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First create a command button(FCT Code - 'WRITE') on the layout. then in the PAI of the layout write the code: &amp;amp; read the data from the tabe control or you can use the same internal table to download the data, used for displaying the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: v_file type string.

Case sy-ucomm.
When 'WRITE'.

v_file = c:text.xls

CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename = v_file
      write_field_separator = 'X'
    TABLES
      data_tab                = itab
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 22.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following func. module:&lt;/P&gt;&lt;P&gt;If you are working on 4.7 or later version the try GUI_'GUI_DOWNLOAD' Or if you are working on 4.6 or lower version then try 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Asvhender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 10:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2796871#M652948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-30T10:48:45Z</dc:date>
    </item>
  </channel>
</rss>

