<?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: Problem Data Selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846717#M1133530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from VBPA into table JTAB for all entries in ITAB&lt;/P&gt;&lt;P&gt;    where vbeln = it_vbeln and parvw in r_parvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This'll give you all the delivery num &amp;amp; partners&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;RAvish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Never use a select query inside a loop unless unavoidable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Dec 2008 14:33:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-05T14:33:57Z</dc:date>
    <item>
      <title>Problem Data Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846716#M1133529</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 one query. I have unique sales order in my table ITAB. Now my requirement is to find out the partner function SP &amp;amp; SH for all sales order available in ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For partner function I have appended both partner function in one range table having 2 values as above mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote the below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM VBPA INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE VBELN = WA-VBELN AND PARVW IN R_PARVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the database table VBPA having entries for both partner function. But still after the loop I am getting only one value in internal table JTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion pls?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 14:29:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846716#M1133529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Data Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846717#M1133530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from VBPA into table JTAB for all entries in ITAB&lt;/P&gt;&lt;P&gt;    where vbeln = it_vbeln and parvw in r_parvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This'll give you all the delivery num &amp;amp; partners&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;RAvish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Never use a select query inside a loop unless unavoidable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 14:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846717#M1133530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T14:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Data Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846718#M1133531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you do Select ... into table .. statement, your internal table is refreshed for every statement, so it will have the results from just the last execution. thats the reason you are getting one entry as you are in a loop here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the answer above, and fix it./&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 14:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846718#M1133531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T14:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Data Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846719#M1133532</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;Instead of writing select in the loop try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM VBPA INTO CORRESPONDING FIELDS OF TABLE JTAB &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;WHERE VBELN = ITAB-VBELN AND PARVW IN R_PARVW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 14:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846719#M1133532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T14:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Data Selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846720#M1133533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to consider POSNR while selecting from VBPA table, then you can see more than one entry in the internal table for partner functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM VBPA INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE VBELN = WA-VBELN and  posnr = wa-posnr AND PARVW IN R_PARVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sujatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 14:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-data-selection/m-p/4846720#M1133533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-05T14:50:18Z</dc:date>
    </item>
  </channel>
</rss>

