<?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 internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170231#M122872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in a progrm,it will get the data form a file. in that file the fields are like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;name1	name2	altkn	bukrs	ekorg	ktokk	stras	pfach	ort01 .....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then i'm adding some more data to that and i'll have to output that data into another file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output file data should  be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;mandt	usnam	tcode	lifnr	bukrs	ekorg	ktokk	anred	name1	name2	name3	name4	sortl	stras	pfach	ort01	pstlz	land1 .....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that i have created two internal tables like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st itab:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;begin of t_Data occurs 0,&lt;/P&gt;&lt;P&gt;        name1 like lfa1-name1,           &lt;/P&gt;&lt;P&gt;        name2 like lfa1-name2,           &lt;/P&gt;&lt;P&gt;        altkn like lfb1-altkn,           &lt;/P&gt;&lt;P&gt;        bukrs like lfb1-bukrs,           &lt;/P&gt;&lt;P&gt;        ekorg like lfm1-ekorg,           &lt;/P&gt;&lt;P&gt;        ktokk like lfa1-ktokk,           &lt;/P&gt;&lt;P&gt;        stras like lfa1-stras,           &lt;/P&gt;&lt;P&gt;        pfach like lfa1-pfach,           &lt;/P&gt;&lt;P&gt;        ort01 like lfa1-ort01,           &lt;/P&gt;&lt;P&gt;        regio like lfa1-regio,&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;        .......................           &lt;/P&gt;&lt;P&gt;end of t_Data.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd itab:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: begin of t_file occurs 0,&lt;/P&gt;&lt;P&gt;        mandt like bgr00-mandt,&lt;/P&gt;&lt;P&gt;        usnam like bgr00-usnam,&lt;/P&gt;&lt;P&gt;        tcode like blf00-tcode,&lt;/P&gt;&lt;P&gt;        lifnr like blf00-lifnr,&lt;/P&gt;&lt;P&gt;        bukrs like blf00-bukrs,&lt;/P&gt;&lt;P&gt;        ekorg like blf00-ekorg,&lt;/P&gt;&lt;P&gt;        ktokk like blf00-ktokk,&lt;/P&gt;&lt;P&gt;        anred like blfa1-anred,&lt;/P&gt;&lt;P&gt;        name1 like blfa1-name1,&lt;/P&gt;&lt;P&gt;        name2 like blfa1-name2,&lt;/P&gt;&lt;P&gt;        name3 like blfa1-name3,&lt;/P&gt;&lt;P&gt;        name4 like blfa1-name4,&lt;/P&gt;&lt;P&gt;        sortl like blfa1-sortl,&lt;/P&gt;&lt;P&gt;        stras like blfa1-stras,&lt;/P&gt;&lt;P&gt;        pfach like blfa1-pfach,&lt;/P&gt;&lt;P&gt;        ort01 like blfa1-ort01,&lt;/P&gt;&lt;P&gt;        pstlz like blfa1-pstlz,&lt;/P&gt;&lt;P&gt;        ort02 like blfa1-ort02,&lt;/P&gt;&lt;P&gt;        pstl2 like blfa1-pstl2,&lt;/P&gt;&lt;P&gt;        land1 like blfa1-land1,&lt;/P&gt;&lt;P&gt;        regio like blfa1-regio,&lt;/P&gt;&lt;P&gt;        spras like blfa1-spras,&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;end of t_file.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the order of the fields are diffrent in the 2 files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to out the data in that prescribed format(the order in  the output file) how can i accomplish that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx much,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2006 15:38:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-15T15:38:49Z</dc:date>
    <item>
      <title>internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170231#M122872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in a progrm,it will get the data form a file. in that file the fields are like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;name1	name2	altkn	bukrs	ekorg	ktokk	stras	pfach	ort01 .....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then i'm adding some more data to that and i'll have to output that data into another file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output file data should  be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;mandt	usnam	tcode	lifnr	bukrs	ekorg	ktokk	anred	name1	name2	name3	name4	sortl	stras	pfach	ort01	pstlz	land1 .....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that i have created two internal tables like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st itab:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;begin of t_Data occurs 0,&lt;/P&gt;&lt;P&gt;        name1 like lfa1-name1,           &lt;/P&gt;&lt;P&gt;        name2 like lfa1-name2,           &lt;/P&gt;&lt;P&gt;        altkn like lfb1-altkn,           &lt;/P&gt;&lt;P&gt;        bukrs like lfb1-bukrs,           &lt;/P&gt;&lt;P&gt;        ekorg like lfm1-ekorg,           &lt;/P&gt;&lt;P&gt;        ktokk like lfa1-ktokk,           &lt;/P&gt;&lt;P&gt;        stras like lfa1-stras,           &lt;/P&gt;&lt;P&gt;        pfach like lfa1-pfach,           &lt;/P&gt;&lt;P&gt;        ort01 like lfa1-ort01,           &lt;/P&gt;&lt;P&gt;        regio like lfa1-regio,&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;        .......................           &lt;/P&gt;&lt;P&gt;end of t_Data.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd itab:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data: begin of t_file occurs 0,&lt;/P&gt;&lt;P&gt;        mandt like bgr00-mandt,&lt;/P&gt;&lt;P&gt;        usnam like bgr00-usnam,&lt;/P&gt;&lt;P&gt;        tcode like blf00-tcode,&lt;/P&gt;&lt;P&gt;        lifnr like blf00-lifnr,&lt;/P&gt;&lt;P&gt;        bukrs like blf00-bukrs,&lt;/P&gt;&lt;P&gt;        ekorg like blf00-ekorg,&lt;/P&gt;&lt;P&gt;        ktokk like blf00-ktokk,&lt;/P&gt;&lt;P&gt;        anred like blfa1-anred,&lt;/P&gt;&lt;P&gt;        name1 like blfa1-name1,&lt;/P&gt;&lt;P&gt;        name2 like blfa1-name2,&lt;/P&gt;&lt;P&gt;        name3 like blfa1-name3,&lt;/P&gt;&lt;P&gt;        name4 like blfa1-name4,&lt;/P&gt;&lt;P&gt;        sortl like blfa1-sortl,&lt;/P&gt;&lt;P&gt;        stras like blfa1-stras,&lt;/P&gt;&lt;P&gt;        pfach like blfa1-pfach,&lt;/P&gt;&lt;P&gt;        ort01 like blfa1-ort01,&lt;/P&gt;&lt;P&gt;        pstlz like blfa1-pstlz,&lt;/P&gt;&lt;P&gt;        ort02 like blfa1-ort02,&lt;/P&gt;&lt;P&gt;        pstl2 like blfa1-pstl2,&lt;/P&gt;&lt;P&gt;        land1 like blfa1-land1,&lt;/P&gt;&lt;P&gt;        regio like blfa1-regio,&lt;/P&gt;&lt;P&gt;        spras like blfa1-spras,&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;        .......................&lt;/P&gt;&lt;P&gt;end of t_file.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the order of the fields are diffrent in the 2 files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to out the data in that prescribed format(the order in  the output file) how can i accomplish that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx much,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2006 15:38:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170231#M122872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-15T15:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170232#M122873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dev,&lt;/P&gt;&lt;P&gt;  You can use like below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE CORRESPONDING T_DATA TO T_FILE.&lt;/P&gt;&lt;P&gt;after that update the t_file with the rest of the data &amp;amp; use MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you could use.&lt;/P&gt;&lt;P&gt;LOOP AT T_DATA.&lt;/P&gt;&lt;P&gt;MOVE T_DATA-NAME1 TO T_FILE-NAME1.&lt;/P&gt;&lt;P&gt;..............&lt;/P&gt;&lt;P&gt;.............&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;T_FILE-USNAME = 'XXX'.&lt;/P&gt;&lt;P&gt;APPEND T_FILE.&lt;/P&gt;&lt;P&gt;CLEAR T_FILE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phani Kiran Nudurupati&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2006 15:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170232#M122873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-15T15:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170233#M122874</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;  In order to get that U need to &lt;/P&gt;&lt;P&gt;  Loop at 1st itab.&lt;/P&gt;&lt;P&gt;    Use move corresponding fields into output table&lt;/P&gt;&lt;P&gt;    fill other fields in the output table&lt;/P&gt;&lt;P&gt;    append output table&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;GSR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2006 15:46:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170233#M122874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-15T15:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170234#M122875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thnaks very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2006 16:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170234#M122875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-15T16:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170235#M122876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;To get the required output:&lt;/P&gt;&lt;P&gt;loop at first internal table,&lt;/P&gt;&lt;P&gt;use move corresponding fields...and move all the required fields from first internal table to the output table and then add other fields to the output table.&lt;/P&gt;&lt;P&gt;Then you will get the output in the required format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Swathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2006 04:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1170235#M122876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-16T04:39:41Z</dc:date>
    </item>
  </channel>
</rss>

