<?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: combining internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753911#M326797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot check fully because i dont have records for this combination. you can try this with your records.&lt;/P&gt;&lt;P&gt;I hope it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************&lt;/P&gt;&lt;P&gt;REPORT  Z_TESTYUVA                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables : MPOS,&lt;/P&gt;&lt;P&gt;         MHIS,&lt;/P&gt;&lt;P&gt;         PLWP,&lt;/P&gt;&lt;P&gt;         PLPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data  p_warpl LIKE mpos-warpl.&lt;/P&gt;&lt;P&gt;Parameter : p_warpl LIKE mpos-warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : i_mpos LIKE mpos Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_mhis LIKE mhis Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_plwp LIKE plwp Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_plpo LIKE plpo Occurs 0 With Header Line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : Begin of it_final Occurs 0 ,&lt;/P&gt;&lt;P&gt;warpl LIKE MPOS-warpl,&lt;/P&gt;&lt;P&gt;wstra LIKE MPOS-wstra,&lt;/P&gt;&lt;P&gt;plnnr LIKE MPOS-plnnr,&lt;/P&gt;&lt;P&gt;plnal LIKE MPOS-plnal,&lt;/P&gt;&lt;P&gt;abnum LIKE MHIS-abnum,&lt;/P&gt;&lt;P&gt;zaehl LIKE MHIS-zaehl,&lt;/P&gt;&lt;P&gt;nplda LIKE MHIS-nplda,&lt;/P&gt;&lt;P&gt;terma LIKE MHIS-terma,&lt;/P&gt;&lt;P&gt;stadt LIKE MHIS-stadt,&lt;/P&gt;&lt;P&gt;lrmdt LIKE MHIS-lrmdt,&lt;/P&gt;&lt;P&gt;offze LIKE MHIS-offze,&lt;/P&gt;&lt;P&gt;offzo LIKE MHIS-offzo,&lt;/P&gt;&lt;P&gt;abrud LIKE MHIS-abrud,&lt;/P&gt;&lt;P&gt;abrna LIKE MHIS-abrna,&lt;/P&gt;&lt;P&gt;plnkn LIKE PLWP-plnkn,&lt;/P&gt;&lt;P&gt;paket LIKE PLWP-paket,&lt;/P&gt;&lt;P&gt;datuv LIKE PLWP-datuv,&lt;/P&gt;&lt;P&gt;strat LIKE PLWP-strat,&lt;/P&gt;&lt;P&gt;ltxa1 LIKE PLPO-ltxa1,&lt;/P&gt;&lt;P&gt;arbei LIKE PLPO-arbei,&lt;/P&gt;&lt;P&gt;END OF it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl wstra plnnr plnal&lt;/P&gt;&lt;P&gt;FROM mpos INTO CORRESPONDING FIELDS OF TABLE i_mpos&lt;/P&gt;&lt;P&gt;WHERE warpl = p_warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl abnum zaehl nplda terma stadt lrmdt&lt;/P&gt;&lt;P&gt;offze offzo abrud abrna&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_mhis&lt;/P&gt;&lt;P&gt;FROM mhis&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;where warpl = i_mpos-warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT plnnr plnal plnkn paket zaehl datuv strat&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_plwp&lt;/P&gt;&lt;P&gt;FROM plwp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT plnnr plnkn ltxa1 arbei&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_plpo&lt;/P&gt;&lt;P&gt;FROM plpo&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_plwp&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;plnkn = i_plwp-plnkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_mpos.&lt;/P&gt;&lt;P&gt;   move-corresponding  i_mpos to it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_mhis WHERE warpl = i_mpos-warpl.&lt;/P&gt;&lt;P&gt;       move-corresponding i_mhis to it_final.&lt;/P&gt;&lt;P&gt;       APPEND it_final.&lt;/P&gt;&lt;P&gt;       CLEAR it_final.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_plwp WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;       plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;       move-corresponding i_plwp to it_final.&lt;/P&gt;&lt;P&gt;       MODIFY it_final TRANSPORTING plnnr plnal plnkn paket zaehl datuv strat  "You can try giving all to transporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;        plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_plpo WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;        plnkn = i_plwp-plnkn.&lt;/P&gt;&lt;P&gt;       move-corresponding i_plpo to it_final.&lt;/P&gt;&lt;P&gt;       MODIFY it_final TRANSPORTING plnnr plnkn ltxa1 arbei         "You can try giving all to transporting&lt;/P&gt;&lt;P&gt;        WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;        plnal = i_plwp-plnal.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BY&lt;/P&gt;&lt;P&gt;Yuvaram.&lt;/P&gt;&lt;P&gt;Reward if useful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2007 14:25:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-02T14:25:14Z</dc:date>
    <item>
      <title>combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753905#M326791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   i need to put the below 4 internal table values into i_final internal table, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl wstra plnnr plnal&lt;/P&gt;&lt;P&gt;    FROM mpos INTO CORRESPONDING FIELDS OF TABLE i_mpos&lt;/P&gt;&lt;P&gt;    WHERE warpl IN p_warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl abnum zaehl nplda terma stadt lrmdt&lt;/P&gt;&lt;P&gt;       offze offzo abrud abrna&lt;/P&gt;&lt;P&gt;       INTO   CORRESPONDING FIELDS OF TABLE i_mhis&lt;/P&gt;&lt;P&gt;       FROM   mhis&lt;/P&gt;&lt;P&gt;       FOR    ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;       where  warpl = i_mpos-warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT plnnr plnal plnkn paket zaehl datuv strat&lt;/P&gt;&lt;P&gt;         INTO   CORRESPONDING FIELDS OF TABLE i_plwp&lt;/P&gt;&lt;P&gt;         FROM   plwp&lt;/P&gt;&lt;P&gt;         FOR    ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;         WHERE  plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;                plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT plnnr plnkn ltxa1 arbei&lt;/P&gt;&lt;P&gt;           INTO   CORRESPONDING FIELDS OF TABLE i_plpo&lt;/P&gt;&lt;P&gt;           FROM   plpo&lt;/P&gt;&lt;P&gt;           FOR    ALL ENTRIES IN i_plwp&lt;/P&gt;&lt;P&gt;           WHERE  plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;                  plnkn = i_plwp-plnkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   could any one pls send coding for the above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753905#M326791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753906#M326792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer demo code below - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort itab_vbap by vbeln posnr.&lt;/P&gt;&lt;P&gt;sort itab_vbkd by vbeln posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab_vbap into wa_vbap.&lt;/P&gt;&lt;P&gt;read table itab_vbkd into wa_vbkd with key vbeln = wa_vbap-vbeln posnr = wa_vbap-posnr binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move corresponding wa_vbap to wa_final.&lt;/P&gt;&lt;P&gt;move corresponding wa_vbkd to wa_final.&lt;/P&gt;&lt;P&gt;append wa_final to itab_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;For move corresponding statement the name of the fields should match in both the work areas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:46:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753906#M326792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753907#M326793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Create a workarea for the final internal table.&lt;/P&gt;&lt;P&gt;2. Read the 4 internal tables and transfer the data from work areas of the 4 internal tables to the final internal table.&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;Kannaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753907#M326793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753908#M326794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Hi Karthik,

sort i_mpos by warpl.
sort i_mhis by warpl.
sort  i_plwp by plnnr.
sort i_plpo  by plnnr.

 loop at i_mpos.
   move-corresponding  i_mpos to it_final.
   read table i_mhis with key warpl eq i_mpos-warpl binary search.
    if sy-subrc eq 0.
        move-corresponding i_mhis to it_final.
    endif.
   read table i_plwp with key plnnr eq i_mpos-plnnr binary search.
    if sy-subrc eq 0.
        move-corresponding i_plwp to it_final.
    endif.
   read table i_plpo with key plnnr eq i_mpos-plnnr binary search.
    if sy-subrc eq 0.
        move-corresponding i_plpo to it_final.
    endif.

  append it_final.
  clear it_final.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:01:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753908#M326794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753909#M326795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sekar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The problem is all the four internal table containd different number of entries.&lt;/P&gt;&lt;P&gt;I applied you code but only one record is coming in the final internal table, bez the mpos table containd only one entry and mhis  table contains 12 entries and plwp comtains 4 entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753909#M326795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753910#M326796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,  &lt;/P&gt;&lt;P&gt;   loop at i_plpo.&lt;/P&gt;&lt;P&gt;   read table i_plwp with key plnnr = i_plpo-plnnr.&lt;/P&gt;&lt;P&gt;   read table i_mhis with key zaehl = i_plwp-zaehl.&lt;/P&gt;&lt;P&gt;   read table i_mpos with key warpl = i_mhis-warpl.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   then assign the final table fields value from respective internal table.&lt;/P&gt;&lt;P&gt;  append finaltable.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;if helpful get me some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;Praveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:45:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753910#M326796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753911#M326797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot check fully because i dont have records for this combination. you can try this with your records.&lt;/P&gt;&lt;P&gt;I hope it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************&lt;/P&gt;&lt;P&gt;REPORT  Z_TESTYUVA                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables : MPOS,&lt;/P&gt;&lt;P&gt;         MHIS,&lt;/P&gt;&lt;P&gt;         PLWP,&lt;/P&gt;&lt;P&gt;         PLPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data  p_warpl LIKE mpos-warpl.&lt;/P&gt;&lt;P&gt;Parameter : p_warpl LIKE mpos-warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : i_mpos LIKE mpos Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_mhis LIKE mhis Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_plwp LIKE plwp Occurs 0 With Header Line,&lt;/P&gt;&lt;P&gt;       i_plpo LIKE plpo Occurs 0 With Header Line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : Begin of it_final Occurs 0 ,&lt;/P&gt;&lt;P&gt;warpl LIKE MPOS-warpl,&lt;/P&gt;&lt;P&gt;wstra LIKE MPOS-wstra,&lt;/P&gt;&lt;P&gt;plnnr LIKE MPOS-plnnr,&lt;/P&gt;&lt;P&gt;plnal LIKE MPOS-plnal,&lt;/P&gt;&lt;P&gt;abnum LIKE MHIS-abnum,&lt;/P&gt;&lt;P&gt;zaehl LIKE MHIS-zaehl,&lt;/P&gt;&lt;P&gt;nplda LIKE MHIS-nplda,&lt;/P&gt;&lt;P&gt;terma LIKE MHIS-terma,&lt;/P&gt;&lt;P&gt;stadt LIKE MHIS-stadt,&lt;/P&gt;&lt;P&gt;lrmdt LIKE MHIS-lrmdt,&lt;/P&gt;&lt;P&gt;offze LIKE MHIS-offze,&lt;/P&gt;&lt;P&gt;offzo LIKE MHIS-offzo,&lt;/P&gt;&lt;P&gt;abrud LIKE MHIS-abrud,&lt;/P&gt;&lt;P&gt;abrna LIKE MHIS-abrna,&lt;/P&gt;&lt;P&gt;plnkn LIKE PLWP-plnkn,&lt;/P&gt;&lt;P&gt;paket LIKE PLWP-paket,&lt;/P&gt;&lt;P&gt;datuv LIKE PLWP-datuv,&lt;/P&gt;&lt;P&gt;strat LIKE PLWP-strat,&lt;/P&gt;&lt;P&gt;ltxa1 LIKE PLPO-ltxa1,&lt;/P&gt;&lt;P&gt;arbei LIKE PLPO-arbei,&lt;/P&gt;&lt;P&gt;END OF it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl wstra plnnr plnal&lt;/P&gt;&lt;P&gt;FROM mpos INTO CORRESPONDING FIELDS OF TABLE i_mpos&lt;/P&gt;&lt;P&gt;WHERE warpl = p_warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl abnum zaehl nplda terma stadt lrmdt&lt;/P&gt;&lt;P&gt;offze offzo abrud abrna&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_mhis&lt;/P&gt;&lt;P&gt;FROM mhis&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;where warpl = i_mpos-warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT plnnr plnal plnkn paket zaehl datuv strat&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_plwp&lt;/P&gt;&lt;P&gt;FROM plwp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT plnnr plnkn ltxa1 arbei&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_plpo&lt;/P&gt;&lt;P&gt;FROM plpo&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_plwp&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;plnkn = i_plwp-plnkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_mpos.&lt;/P&gt;&lt;P&gt;   move-corresponding  i_mpos to it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_mhis WHERE warpl = i_mpos-warpl.&lt;/P&gt;&lt;P&gt;       move-corresponding i_mhis to it_final.&lt;/P&gt;&lt;P&gt;       APPEND it_final.&lt;/P&gt;&lt;P&gt;       CLEAR it_final.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_plwp WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;       plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;       move-corresponding i_plwp to it_final.&lt;/P&gt;&lt;P&gt;       MODIFY it_final TRANSPORTING plnnr plnal plnkn paket zaehl datuv strat  "You can try giving all to transporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHERE plnnr = i_mpos-plnnr AND&lt;/P&gt;&lt;P&gt;        plnal = i_mpos-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_plpo WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;        plnkn = i_plwp-plnkn.&lt;/P&gt;&lt;P&gt;       move-corresponding i_plpo to it_final.&lt;/P&gt;&lt;P&gt;       MODIFY it_final TRANSPORTING plnnr plnkn ltxa1 arbei         "You can try giving all to transporting&lt;/P&gt;&lt;P&gt;        WHERE plnnr = i_plwp-plnnr AND&lt;/P&gt;&lt;P&gt;        plnal = i_plwp-plnal.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BY&lt;/P&gt;&lt;P&gt;Yuvaram.&lt;/P&gt;&lt;P&gt;Reward if useful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753911#M326797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: combining internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753912#M326798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well in my eyes you sould either have a global structure for your final ITAB, or you should define one locally.&lt;/P&gt;&lt;P&gt;then just make your selects into the corresponding fields of your final ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This creates you an internal table with all the attributes of the four internal tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:     Begin of i_final,&lt;/P&gt;&lt;P&gt;               Include mpos (if the type of your itab i_mpos is not mpos, use this type),&lt;/P&gt;&lt;P&gt;               Include mhis (same goes for those itabs),&lt;/P&gt;&lt;P&gt;               Include plpw (same goes for those itabs),&lt;/P&gt;&lt;P&gt;               Include plpo (same goes for those itabs),&lt;/P&gt;&lt;P&gt;               End of i_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT warpl wstra plnnr plnal&lt;/P&gt;&lt;P&gt;FROM    mpos&lt;/P&gt;&lt;P&gt;INTO      CORRESPONDING FIELDS OF TABLE i_final&lt;/P&gt;&lt;P&gt;where     warpl in p_warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT abnum zaehl nplda terma stadt lrmdt&lt;/P&gt;&lt;P&gt;FROM    mhis&lt;/P&gt;&lt;P&gt;INTO      CORRESPONDING FIELDS OF TABLE i_final&lt;/P&gt;&lt;P&gt;FOR       ALL ENTRIES IN i_mpos&lt;/P&gt;&lt;P&gt;WHERE warpl = p_warpl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT plnnr plnal plnkn paket zeahl datuv strat&lt;/P&gt;&lt;P&gt;FROM    plpw&lt;/P&gt;&lt;P&gt;INTO      CORRESPONDING FIELDS OF TABLE i_final&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_final-plnnr&lt;/P&gt;&lt;P&gt;AND      plnal = i_final-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT itxa arbei&lt;/P&gt;&lt;P&gt;FROM    plpo&lt;/P&gt;&lt;P&gt;INTO      CORRESPONDING FIELDS OF TABLE i_final&lt;/P&gt;&lt;P&gt;WHERE plnnr = i_final-plnnr&lt;/P&gt;&lt;P&gt;AND      plnkn = i_final-plnkn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 15:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-internal-tables/m-p/1753912#M326798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T15:05:43Z</dc:date>
    </item>
  </channel>
</rss>

