<?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: upload data from excel to screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193672#M1002435</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;Let say your table control contains the internal table (ITAB) fields. In PBO upload the data From desktop to the ITAB using FM 'GUI_UPLOAD'  specifying the loaction , file name and type and in tables ITAB .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2008 11:14:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-28T11:14:58Z</dc:date>
    <item>
      <title>upload data from excel to screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193670#M1002433</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;I have created one Table Maintanence Generator with only one screen (Table control ). Here i have to upload data from excel to table control. How to upload data from excel to table control.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193670#M1002433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: upload data from excel to screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193671#M1002434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here's a prg. to load data (formatted for SAP!) in customer tables &lt;A href="http://www.a-saph.de/etc/ZLOADZTABLE.txt" target="test_blank"&gt;http://www.a-saph.de/etc/ZLOADZTABLE.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 11:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193671#M1002434</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2008-07-28T11:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: upload data from excel to screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193672#M1002435</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;Let say your table control contains the internal table (ITAB) fields. In PBO upload the data From desktop to the ITAB using FM 'GUI_UPLOAD'  specifying the loaction , file name and type and in tables ITAB .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 11:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193672#M1002435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T11:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: upload data from excel to screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193673#M1002436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Upload the excel data to the internal table using  Function Module 'GUI_UPLOAD' and than transfer this internal table to the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this answer help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khushbu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 11:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193673#M1002436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T11:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: upload data from excel to screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193674#M1002437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use this code to get data from excel to internal table. Later put the logic in PBO of the screen to fill the table control from internal table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS: po_file TYPE rlgrap-filename DEFAULT 'E:test.xls'.
TYPES: BEGIN OF t_final,
          empno(10) TYPE c,
          name(30) TYPE c,
          state(25) TYPE c,
       END OF t_final.
PARAMETERS: po_file TYPE rlgrap-filename.
DATA: i_tab    TYPE STANDARD TABLE OF alsmex_tabline,
      i_final  TYPE STANDARD TABLE OF t_final,
      wa_tab   TYPE alsmex_tabline,
      wa_final TYPE t_final.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR po_file.
PERFORM open_folder.

START-OF-SELECTION.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
     EXPORTING
          filename                = po_file
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 3
          i_end_row               = 65256
     TABLES
          intern                  = i_tab
     EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.

CHECK NOT i_tab[] IS INITIAL.

LOOP AT i_tab INTO wa_tab.
  CASE wa_tab-col.
    WHEN 1.
      wa_final-empno = wa_tab-value.
    WHEN 2.
      wa_final-name = wa_tab-value.
    WHEN 3.
      wa_final-state = wa_tab-value.
  ENDCASE.
  AT END OF row.
    APPEND wa_final TO i_final.
    CLEAR wa_final.
  ENDAT.
ENDLOOP.
*
FORM open_folder .
  DATA: li_file  TYPE TABLE OF sdokpath,
        lwa_file TYPE sdokpath.
  CLEAR: p_fname, lwa_file.
  REFRESH li_file[].
  CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
       TABLES
            file_table = li_file
       EXCEPTIONS
            cntl_error = 1
            OTHERS     = 2.
  IF sy-subrc IS INITIAL.
    READ TABLE li_file INTO lwa_file INDEX 1.
    IF sy-subrc IS INITIAL.
     p_fname = lwa_file-pathname.
    ENDIF.
  ENDIF.
ENDFORM.                    " open_folder
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Reddy Vemuru on Jul 28, 2008 4:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 11:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-screen/m-p/4193674#M1002437</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-07-28T11:19:21Z</dc:date>
    </item>
  </channel>
</rss>

