<?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 Excel upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174899#M1372309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OrderType	Product Type  Material Num       Source	Target	Slocation	5/14/2009	5/15/2009&lt;/P&gt;&lt;P&gt;R	SIMULATION	 PALM100HK	        408415	1052	FIH1	2902	2349&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above the excel file date i am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5/14/2009 is delivery date and 2902 is Quantity .Now how can i read the delivery date and Quanity separately , delivery date is in the header .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Oct 2009 11:37:23 GMT</pubDate>
    <dc:creator>balakrishna_vegi2</dc:creator>
    <dc:date>2009-10-07T11:37:23Z</dc:date>
    <item>
      <title>Excel upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174899#M1372309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OrderType	Product Type  Material Num       Source	Target	Slocation	5/14/2009	5/15/2009&lt;/P&gt;&lt;P&gt;R	SIMULATION	 PALM100HK	        408415	1052	FIH1	2902	2349&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above the excel file date i am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5/14/2009 is delivery date and 2902 is Quantity .Now how can i read the delivery date and Quanity separately , delivery date is in the header .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 11:37:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174899#M1372309</guid>
      <dc:creator>balakrishna_vegi2</dc:creator>
      <dc:date>2009-10-07T11:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174900#M1372310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_path
.......
TABLES
intern = Itab.
read table itab with key row = 1 col = 7. " &amp;lt;= delivery date
if sy-subrc = 0.
  del_date = itab-value.
endif.
read table itab with key row = 2 col = 7. " &amp;lt;= quantity
if sy-subrc = 0.
  quantity = itab-value.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 12:01:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174900#M1372310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T12:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174901#M1372311</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;Try using Function Module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_raw TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;Function module called to upload xls data into an internal table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_field_seperator    = 'X'&lt;/P&gt;&lt;P&gt;      i_line_header        = 'X'&lt;/P&gt;&lt;P&gt;      i_tab_raw_data       = it_raw&lt;/P&gt;&lt;P&gt;      i_filename           = p_file                 "file path browsed&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data = it_upload[]            "int table populated having struc same as files data&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed    = 1                      "browsed file's data&lt;/P&gt;&lt;P&gt;      OTHERS               = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 13:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174901#M1372311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174902#M1372312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE  TEXT-001.
PARAMETERS:    P_FILE LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.


At selection-screen on value-request for P_FILE.
    perform get_file_name.


FORM get_file_name.

        CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
* EXPORTING
*   PROGRAM_NAME        = SYST-REPID
*   DYNPRO_NUMBER       = SYST-DYNNR
*   FIELD_NAME          = ' '
*   STATIC              = ' '
*   MASK                = ' '
  CHANGING
    file_name           = P_FILE
* EXCEPTIONS
*   MASK_TOO_LONG       = 1
*   OTHERS              = 2
          .
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.


START-OF-SELECTION.


PERFORM upload_file TABLES itab
                      USING p_file.

FORM upload_file  TABLES   p_it_tab  USING    p_file.

  FIELD-SYMBOLS : &amp;lt;fs&amp;gt;.
*BREAK DEVELOPER.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_file
      i_begin_col             = '1'
      i_begin_row             = '2'
      i_end_col               = '256'
      i_end_row               = '10000'
    TABLES
      intern                  = l_intern
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc NE 0.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED.
    WRITE : / 'File Error'.
    EXIT.
  ENDIF.

  IF l_intern[] IS INITIAL.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED.
    WRITE : / 'No Data Uploaded'.
    EXIT.
  ELSE.
    SORT l_intern BY row col.
    LOOP AT l_intern.
      MOVE l_intern-col TO l_index.
      ASSIGN COMPONENT l_index OF STRUCTURE p_it_tab TO  &amp;lt;fs&amp;gt;.
      MOVE l_intern-value TO &amp;lt;fs&amp;gt;.
      AT END OF row.
        APPEND p_it_tab.
        CLEAR p_it_tab.
      ENDAT.
    ENDLOOP.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: krupa jani on Oct 12, 2009 1:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2009 11:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174902#M1372312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-12T11:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Excel upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174903#M1372313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Resolved myself&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jun 2010 16:35:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-upload/m-p/6174903#M1372313</guid>
      <dc:creator>balakrishna_vegi2</dc:creator>
      <dc:date>2010-06-10T16:35:28Z</dc:date>
    </item>
  </channel>
</rss>

