<?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 Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102865#M736358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try by changing the excel sheet column format to TEXT.&lt;/P&gt;&lt;P&gt;it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2007 14:19:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-26T14:19:57Z</dc:date>
    <item>
      <title>Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102864#M736357</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 am facing a peculiar problem in uploading the data in excel sheet to internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The excel file contains material number and product hierarchy number. The product hierarchy number for some material is downloaded as 5.73101E&lt;EM&gt;17 for the value 573100910115782000. Though I expand the sheet the display is the same 5.73101E&lt;/EM&gt;17. When i upload the sheet using the f'n module "ALSM_EXCEL_TO_INTERNAL_TABLE" the value is taken as it is (5.73101E+17) into the internal table which is wrong. I tried to change the data type to type n. Then the value is uploaded as 5731011700000000. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please propose a solution to this without having to change the format of the column from general to "number without decimals"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 13:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102864#M736357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T13:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102865#M736358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try by changing the excel sheet column format to TEXT.&lt;/P&gt;&lt;P&gt;it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 14:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102865#M736358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T14:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102866#M736359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;select the required field in the excel.right click.then click on format cells.select special and on the right side you will find type.click zip code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 14:24:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102866#M736359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T14:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102867#M736360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jyothi &amp;amp; Raghu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not want to make any changes in the format of the excel sheet columns. Is there any way that i make the changes in the program itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 14:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102867#M736360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T14:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102868#M736361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Samson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u try this one FM's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per u r requirement delcare the Internal table (ITAB).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : FILE TYPE &amp;lt;b&amp;gt;TRUXS_T_TEXT_DATA&amp;lt;/b&amp;gt;,&lt;/P&gt;&lt;P&gt;       FNAME TYPE RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_NAME        = SYST-REPID&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATIC              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    file_name           = FNAME&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK_TOO_LONG       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS              = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;lt;b&amp;gt;'TEXT_CONVERT_XLS_TO_SAP'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_FIELD_SEPERATOR          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    i_tab_raw_data             = DATA&lt;/P&gt;&lt;P&gt;    i_filename                 = FNAME&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    i_tab_converted_data       = ITAB[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_FAILED          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 05:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102868#M736361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-27T05:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102869#M736362</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;see this example code which EXCEL TO INTERNAL TABLE AND THEN TO APPLICATION&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; Report  ZSD_EXCEL_INT_APP&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;&lt;/P&gt;&lt;P&gt;*&amp;amp;&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;REPORT  ZSD_EXCEL_INT_APP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: file_nm type localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of it_tab1,&lt;/P&gt;&lt;P&gt;        f1(20),&lt;/P&gt;&lt;P&gt;        f2(40),&lt;/P&gt;&lt;P&gt;        f3(20),&lt;/P&gt;&lt;P&gt;       end of it_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_tab type table of ALSMEX_TABLINE with header line,&lt;/P&gt;&lt;P&gt;       file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_tab2 type it_tab1 occurs 1,&lt;/P&gt;&lt;P&gt;       wa_tab2 type it_tab1,&lt;/P&gt;&lt;P&gt;       w_message(100)  TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_NAME        = SYST-REPID&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   STATIC              = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;   file_name           = file_nm&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   MASK_TOO_LONG       = 1&lt;/P&gt;&lt;P&gt;   OTHERS              = 2&lt;/P&gt;&lt;P&gt;          .&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;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh it_tab2[].clear wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file = file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = file&lt;/P&gt;&lt;P&gt;    i_begin_col                   = '1'&lt;/P&gt;&lt;P&gt;    i_begin_row                   =  '1'&lt;/P&gt;&lt;P&gt;    i_end_col                     = '10'&lt;/P&gt;&lt;P&gt;    i_end_row                     = '35'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    intern                        = it_tab&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INCONSISTENT_PARAMETERS       = 1&lt;/P&gt;&lt;P&gt;   UPLOAD_OLE                    = 2&lt;/P&gt;&lt;P&gt;   OTHERS                        = 3&lt;/P&gt;&lt;P&gt;          .&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;loop at it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case it_tab-col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   when '002'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f1 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   when '004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f2 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  when '008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f3 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; at end of row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append wa_tab2 to it_tab2.&lt;/P&gt;&lt;P&gt; clear wa_tab2.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : p_file TYPE  rlgrap-filename value 'TEST3.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;*--- Display error messages if any.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e001(zsd_mes).&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Data is downloaded to the application server file path&lt;/P&gt;&lt;P&gt;    LOOP AT it_tab2 INTO wa_tab2.&lt;/P&gt;&lt;P&gt;      TRANSFER wa_tab2 TO p_file.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Close the Application server file (Mandatory).&lt;/P&gt;&lt;P&gt;  CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at it_tab2 into wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 05:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102869#M736362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-27T05:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Upload data from Excel to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102870#M736363</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;P&gt;I have tried to use the two function modules earlier, but the problem still persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 09:13:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-data-from-excel-to-internal-table/m-p/3102870#M736363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-27T09:13:48Z</dc:date>
    </item>
  </channel>
</rss>

