<?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: Read internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202731#M1376322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried below code. But it is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF it_data_sub OCCURS 0,
    dno(3),
    lno(3),
    char(10),
    value(10),
    END OF it_data_sub.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF it_data2[] IS NOT INITIAL.
   LOOP AT it_data2 INTO it_data_wa2.

     MOVE it_data_wa2-value TO it_data_sub-value.
       APPEND it_data_sub.
       CLEAR  it_data_sub.
   ENDLOOP.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone help me pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Oct 2009 07:23:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-14T07:23:30Z</dc:date>
    <item>
      <title>Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202729#M1376320</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 uploading data from excel to internal table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is my excel data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Dno	Lno	KNDNR	ARTNR	FKART	KAUFN	KDPOS	

1	1		12345			10&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Itab structure is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ROW   COL   VALUE
0001   0001   Dno                                                        
0001 0002     Lno                                                             
0001 0003     KNDNR                                                           
0001 0000     ARTNR                                                           
0001 0005     FKART                                                           
0001 0006     KAUFN                                                           
0001 0007    KDPOS     
0002 0001      1                                                                
0002 0002      1                                                                
0002 0004     12345                                                                
0002 0007     10&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to modify the internal table structure like below&lt;/P&gt;&lt;P&gt;                                                              &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Dno           Lno     char        value
  1             1         ARTNR   12345
  1             1         KDPOS    10&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to achieve this. pls help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 07:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202729#M1376320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T07:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202730#M1376321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the code with what you have tried for any suggestions. Dont expect others to do your work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 07:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202730#M1376321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T07:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202731#M1376322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried below code. But it is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF it_data_sub OCCURS 0,
    dno(3),
    lno(3),
    char(10),
    value(10),
    END OF it_data_sub.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF it_data2[] IS NOT INITIAL.
   LOOP AT it_data2 INTO it_data_wa2.

     MOVE it_data_wa2-value TO it_data_sub-value.
       APPEND it_data_sub.
       CLEAR  it_data_sub.
   ENDLOOP.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone help me pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 07:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202731#M1376322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T07:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202732#M1376323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just format your excel data according to the output format and then upload it into itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 08:16:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202732#M1376323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T08:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202733#M1376324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using &lt;STRONG&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/STRONG&gt;  it would be quite code intensive to get the format you require. Better use GUI_UPLOAD to upload the excel file as it will be comparitively easier to format the internal table as per your requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 08:18:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202733#M1376324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T08:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202734#M1376325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am required to read multiple excel  sheets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am processing sheet2. I already processed sheet1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE   and GUI_UPLOAD  wont support multiple excel. So I cant use this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 08:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202734#M1376325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T08:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202735#M1376326</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 doing like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_raw TYPE truxs_t_text_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;internal table declared to be passed in the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;function module used to convert data from xls to sap&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp;Function module called to upload xls data into an internal table&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&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&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 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;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, 14 Oct 2009 10:01:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202735#M1376326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-14T10:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202736#M1376327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for so late answering. Mey be u don't need already it. But your problem had interested me and i decided to test myself in generic programming a little)). So, this is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of initialize method u should insert your own to fill mt_table. And at the end of main method u recieve new generic table table with values from initial table. But it is one mandatory condition - names of columns must be in a first row and they must be called as data elements from ABAP dictionary. Anyway i got&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Petr.Plenkov on Oct 16, 2009 2:07 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Petr.Plenkov on Oct 16, 2009 2:07 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Oct 16, 2009 9:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 12:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202736#M1376327</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2009-10-16T12:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Read internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202737#M1376328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar! Sorry for so late answering. May be u don't need already it. But your problem had interested me and i decided to test myself in generic programming a little)).  Instead of initialize method u should insert your own to fill mt_table. And at the end of main method u recieve new generic table table with values from initial table. But it is one mandatory condition - names of columns must be in a first row and they must be called as data elements from ABAP dictionary. So, this is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Petr.Plenkov on Oct 16, 2009 2:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 12:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-internal-table/m-p/6202737#M1376328</guid>
      <dc:creator>Petr_Plenkov</dc:creator>
      <dc:date>2009-10-16T12:11:34Z</dc:date>
    </item>
  </channel>
</rss>

