<?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: Query :Internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383747#M529473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      declare the final internal table i_final. Here Move the fields from&lt;/P&gt;&lt;P&gt;      i_vbap and from i_vbpa using move-correponding or directly field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    for ex-  i_final-posnr = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***do reward if usefull&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2007 06:14:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-06T06:14:00Z</dc:date>
    <item>
      <title>Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383745#M529471</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;I have to internal tables viz  l_vbap(fields matnr ,posnr,pstyv) and l_vbpa(posnr,parvw,adrnr).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to posnr from l_vbap and adrnr from l_vbpa to pull into other internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u please give me suggestion ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its very urgent...Please  help me,.,.....maximum points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavee.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383745#M529471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383746#M529472</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;write the select statement using for all entries and join the two tables then u can fetch the posnr and adrnr..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383746#M529472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383747#M529473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      declare the final internal table i_final. Here Move the fields from&lt;/P&gt;&lt;P&gt;      i_vbap and from i_vbpa using move-correponding or directly field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    for ex-  i_final-posnr = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***do reward if usefull&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:14:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383747#M529473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383748#M529474</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;Here yo u go...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say new internal table is l_newitab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at l_vbap.
  LOOP at l_vbpa where posnr = l_vbap-posnr.
    CLEAR l_newitab.
    l_newitab-posnr = l_vbap-posnr.
    l_newitab-adrnr = l_vbpa-adrnr.
    APPEND l_newitab.
  ENDLOOP.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:14:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383748#M529474</guid>
      <dc:creator>former_member214288</dc:creator>
      <dc:date>2007-06-06T06:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383749#M529475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Declare another internal table ITAB&lt;/P&gt;&lt;P&gt;Your internal tables will also have a common field VBELN in both VBAP and VBPA and sort them by VBELN and POSNR fields(please add that field into the both internal tables)&lt;/P&gt;&lt;P&gt;l_vbap(fields vbeln,matnr ,posnr,pstyv) and l_vbpa(vbeln, posnr,parvw,adrnr).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_vbap.&lt;/P&gt;&lt;P&gt;  itab-vbeln = i_vbap-vbeln.&lt;/P&gt;&lt;P&gt;   itab-posnr = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;   read table i_vbpa with key vbeln = i_vbap-vbeln.&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;       itab-adrnr = i_vbpa-adrnr.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;   append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;Now ITAB will have VBELN POSNR and ADRNR fields&lt;/P&gt;&lt;P&gt;use this for further purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383749#M529475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383750#M529476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use inner join to get values from vbap and vbpa using a common key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or loop at i_vbap and then inside the loop read ur i_vbpa table with a common key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and transfer whatever values u want into another itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383750#M529476</guid>
      <dc:creator>Azeemquadri</dc:creator>
      <dc:date>2007-06-06T06:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383751#M529477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;if u want ot move to another internal table use.&lt;/P&gt;&lt;P&gt;sort i_vbap by posnr.&lt;/P&gt;&lt;P&gt;sort i_vbpa by posnr.&lt;/P&gt;&lt;P&gt;looop at i_vbap.&lt;/P&gt;&lt;P&gt;read table i_vbpa with key posnr  = i_vbap-posnr binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;itab3-posnr = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;itab3-adrnr = i_vbpa-adrnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383751#M529477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383752#M529478</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;Always try to avoid writing nested loops, as u know it will affect the database performance drasticallyand use the combination of  loop and read to fetch the data's.&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;Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383752#M529478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query :Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383753#M529479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sudha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u very much for answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it working fine.....&lt;/P&gt;&lt;P&gt;i am closing the thread .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u very much for ur all immediate answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;pavee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-internal-tables/m-p/2383753#M529479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:52:53Z</dc:date>
    </item>
  </channel>
</rss>

