<?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: Three select statement data in to One Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611476#M1086601</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;   to get the data of 3 internal tables(TABLEA,TABLEB,TABLEC) into 1 internal table(FINAL) can be done by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; =&amp;gt; append the data of all the 3 internal table into one.&lt;/P&gt;&lt;P&gt;loop at TABLEA.&lt;/P&gt;&lt;P&gt;append TABLEA to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;loop at TABLEB.&lt;/P&gt;&lt;P&gt;append TABLEB to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;loop at TABLEC.&lt;/P&gt;&lt;P&gt;append TABLEC to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; if u want only some specific data from 3 internal tables into 1 internal table then,loop at one table and read every entry of other internal table on the basis of some comparision and filter out the data to a final table,like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at TABLEA.&lt;/P&gt;&lt;P&gt;read table TABLEB with key fielda = TABLEA-fielda.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move TABLEA-fielda to FINAL-fielda.&lt;/P&gt;&lt;P&gt;move TABLEB-fieldb to FINAL-fieldb.&lt;/P&gt;&lt;P&gt;append FINAL.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anf then throw this final table to function module "REUSE_ALV_GRID_DISPLAY" to show the final data in ALV format..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Oct 2008 09:45:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-14T09:45:39Z</dc:date>
    <item>
      <title>Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611471#M1086596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      By using 3 select statement, data is displying by using work area (classical report). Now i want define three internal table for three select statements, and finally get the data in one final itab, and pass this to function module (ALV Report).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;looking for response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 05:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611471#M1086596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T05:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611472#M1086597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u be a bit more clear.&lt;/P&gt;&lt;P&gt;if ur requirement is that u have 3 intable and u want the data in one final table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u can do this&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;wa_final = wa1.&lt;/P&gt;&lt;P&gt;append wa_final to it_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly for for the other 2 itab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 05:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611472#M1086597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T05:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611473#M1086598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just remove all write statements and Skip keyword.&lt;/P&gt;&lt;P&gt;and create internal tables as same as earlier work area were defined and collect all data in itab by using read statements.&lt;/P&gt;&lt;P&gt;this seems a very structured process while switching to ALV from classical &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 05:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611473#M1086598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T05:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611474#M1086599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI sushant,&lt;/P&gt;&lt;P&gt;      In a classicall report, getting the data by using Select &amp;amp; Endselect statements (total 3 select stat). Now i want to displya the data in ALV formate. So, i want to get all data in to one final itab. &lt;/P&gt;&lt;P&gt;      I am thinking to define 3 itabs for 3 select stats &amp;amp; one final itab. How to fetch all data into the final itab....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope provieded clear info..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 06:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611474#M1086599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T06:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611475#M1086600</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;first define 3 internal tables and get data into them.&lt;/P&gt;&lt;P&gt;now you can loop at one internal table and read the data from other internal tables and move that data into final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Form final_table.

loop at it_bsis.
 CLEAR IT_bkpf.
 READ TABLE IT_bkpf WITH KEY bukrs = IT_bsis-bukrs
                             belnr = it_bsis-belnr
                             gjahr = it_bsis-gjahr.


 IF SY-SUBRC = 0.

 it_final-xblnr = it_bkpf-xblnr.
 it_final-bukrs = it_bkpf-bukrs.
endif.
 CLEAR IT_bseg.
 READ TABLE IT_bseg WITH KEY bukrs = IT_bkpf-bukrs
                             belnr = it_bkpf-belnr
                             gjahr = it_bkpf-gjahr.
                             
 IF SY-SUBRC = 0.

 IT_FINAL-belnr = IT_bseg-belnr.
 it_final-prctr = it_bseg-prctr.
 IT_FINAL-gsber = IT_bseg-gsber.
endif.
 APPEND IT_FINAL.
 CLEAR IT_FINAL.
endloop.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 06:50:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611475#M1086600</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-10-14T06:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611476#M1086601</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;   to get the data of 3 internal tables(TABLEA,TABLEB,TABLEC) into 1 internal table(FINAL) can be done by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; =&amp;gt; append the data of all the 3 internal table into one.&lt;/P&gt;&lt;P&gt;loop at TABLEA.&lt;/P&gt;&lt;P&gt;append TABLEA to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;loop at TABLEB.&lt;/P&gt;&lt;P&gt;append TABLEB to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;loop at TABLEC.&lt;/P&gt;&lt;P&gt;append TABLEC to FINAL.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; if u want only some specific data from 3 internal tables into 1 internal table then,loop at one table and read every entry of other internal table on the basis of some comparision and filter out the data to a final table,like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at TABLEA.&lt;/P&gt;&lt;P&gt;read table TABLEB with key fielda = TABLEA-fielda.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move TABLEA-fielda to FINAL-fielda.&lt;/P&gt;&lt;P&gt;move TABLEB-fieldb to FINAL-fieldb.&lt;/P&gt;&lt;P&gt;append FINAL.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anf then throw this final table to function module "REUSE_ALV_GRID_DISPLAY" to show the final data in ALV format..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 09:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611476#M1086601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T09:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611477#M1086602</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;just go through this simple example. no need of declaring 3 itabs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of st1,
        a1 type c,
        a11 type i,
      end of st1.

data: begin of st2,
        a2 type i,
        a22 type c,
      end of st2.

data: begin of st3,
        a3 type i,
        a33 type i,
      end of st3.

data: begin of fin_struct.
          include structure st1.
          include structure st2.
          include structure st3.
data: end of fin_struct.

data: fin_itab like table of fin_struct with header line.

*1st structure  values
move 'a' to fin_itab-a1.
move 1 to fin_itab-a11.

*2nd structure values
move 11 to fin_itab-a2.
move 'b' to fin_itab-a22.

*3rd structure values
move 15 to fin_itab-a3.
move 12 to fin_itab-a33.

*appending 1st record.
append fin_itab.

*1st strcuct values
move 'b' to fin_itab-a1.
move 3 to fin_itab-a11.

*2nd structure values
move 22 to fin_itab-a2.
move 'c' to fin_itab-a22.

*3rd structure values
move 20 to fin_itab-a3.
move 30 to fin_itab-a33.

*appending 2nd record.
append fin_itab.


loop at fin_itab.
write:/ fin_itab-a1, fin_itab-a11, fin_itab-a2, fin_itab-a22, fin_itab-a3, fin_itab-a33.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here structre1,2,3...&lt;/P&gt;&lt;P&gt;i used move statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here u write select statement.. into struct1,2,3....&lt;/P&gt;&lt;P&gt;using move u move all the values ...&lt;/P&gt;&lt;P&gt;finally append it to final itab...&lt;/P&gt;&lt;P&gt;rest of and all common for ALV...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 10:11:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611477#M1086602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T10:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611478#M1086603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI sandya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;did u got it.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 10:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611478#M1086603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T10:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Three select statement data in to One Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611479#M1086604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shakar,&lt;/P&gt;&lt;P&gt;         yes i got it. ur answer helped me, not only this case but another case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 09:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/three-select-statement-data-in-to-one-internal-table/m-p/4611479#M1086604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-17T09:27:31Z</dc:date>
    </item>
  </channel>
</rss>

