<?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: Internal table not updating IN Sselect between loop-endloop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679873#M1100485</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;there seems to be no syntax error in your code. please confirm that the declaration of ITAB table contains the vbeln field and the spell is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nirmal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2008 04:31:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-22T04:31:22Z</dc:date>
    <item>
      <title>Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679869#M1100481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 qs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I tried using for all entries in itab and  vbap&lt;SUB&gt;vbeln = itab-vbeln AND vbap&lt;/SUB&gt;posnr = itab-posnr . I could see the data in itab in debug mode and using write statement with wa. However, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT   f1 f2 ....&lt;/P&gt;&lt;P&gt;     INTO  CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;      FROM (  vbap INNER JOIN vbak ON vbap&lt;SUB&gt;vbeln = vbak&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;     for all entries in itab&lt;/P&gt;&lt;P&gt;      WHERE&lt;/P&gt;&lt;P&gt;      vbap&lt;SUB&gt;vbeln = itab-vbeln AND vbap&lt;/SUB&gt;posnr = itab-posnr &lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is throwing an error saying itab does not have the component vbeln. This should work as per the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/erp2005_ehp_03/helpdata/EN/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/erp2005_ehp_03/helpdata/EN/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I opted to try select in a loop at itab to overcome problem 1. Here the internal table itab2 is storing only the last entry. I tried clearing it but no use. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with any way you can. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa,     &lt;/P&gt;&lt;P&gt;  vbeln TYPE vbap-vbeln,&lt;/P&gt;&lt;P&gt;  posnr TYPE vbap-posnr,&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;END OF wa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab LIKE TABLE OF wa.&lt;/P&gt;&lt;P&gt;itab2 like table of wa.&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; .....checked by printing itab values .. and data is as expected to meet the where conditions below ****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT   f1 f2 ....&lt;/P&gt;&lt;P&gt;     INTO  CORRESPONDING FIELDS OF TABLE itab2&lt;/P&gt;&lt;P&gt;      FROM (  vbap INNER JOIN vbak ON vjoin condition)&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      WHERE&lt;/P&gt;&lt;P&gt;      vbap&lt;SUB&gt;vbeln = wa-vbeln AND vbap&lt;/SUB&gt;posnr = wa-posnr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 03:31:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679869#M1100481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T03:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679870#M1100482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suzzie,&lt;/P&gt;&lt;P&gt;Try it in this way.&lt;/P&gt;&lt;P&gt;First populate tow  internal table say it_vbak and it_vbap &lt;/P&gt;&lt;P&gt;which is a join of table vbap and vbak.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select f1 f2 into corresponding fields of table it_vbap
for all entries in itab where vbeln = itab-vbeln

select f1 f2 into corresponding fields of table it_vbap
for all entries in itab where vbeln = itab-vbeln
Loop at itab.
  read table it_vbap with key vbeln = itab-vbeln
                                          posnr = itab-posnr.
  if sy-subrc = 0.
   " assign value into the workarea of the table.
endif 
read table it_vbak with key vbeln = itab-vbeln.
  if sy-subrc = 0.
   " assign value into the workarea of the table.
endif 
"append final table.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 03:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679870#M1100482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T03:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679871#M1100483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- the into table and comparision table should not be the same. (which u have kept as &lt;STRONG&gt;ITAB&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;- and in my opinion a join should be like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: itab2 type STANDARD TABLE OF vbap WITH HEADER LINE, 
      itab type STANDARD TABLE OF vbak WITH HEADER LINE.

select * from vbak into TABLE itab up to 10 rows.

SELECT c~vbeln d~posnr
      INTO CORRESPONDING FIELDS OF TABLE itab2
      FROM ( VBAK AS c
             INNER JOIN VBAP AS d ON c~vbeln = d~vbeln )
      FOR ALL ENTRIES IN itab
      WHERE c~vbeln = itab-vbeln.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is ofcoz just an example as i dont know exactly from where u are getting itab values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Somu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:08:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679871#M1100483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679872#M1100484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT vbak~vbeln
             vbap~posnr
             vbap~matnr       "i am not sure what fields you are using..?
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( vbap INNER JOIN vbak ON vbap~vbeln = vbak~vbeln )
for all entries in itab
WHERE
vbap~vbeln = itab-vbeln AND vbap~posnr = itab-posnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679872#M1100484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679873#M1100485</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;there seems to be no syntax error in your code. please confirm that the declaration of ITAB table contains the vbeln field and the spell is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nirmal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679873#M1100485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679874#M1100486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT vbak~vbeln&lt;/P&gt;&lt;P&gt;             vbap~posnr&lt;/P&gt;&lt;P&gt;             vbap~matnr       "i am not sure what fields you are using..?&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM ( vbap INNER JOIN vbak ON vbap&lt;SUB&gt;vbeln = vbak&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;vbap&lt;SUB&gt;vbeln = itab-vbeln AND vbap&lt;/SUB&gt;posnr = itab-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried this with both the followng declarations of itab but still no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;vbeln type vbap-vbelnr,&lt;/P&gt;&lt;P&gt;posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa,&lt;/P&gt;&lt;P&gt;vbeln type vbap-vbelnr,&lt;/P&gt;&lt;P&gt;posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;end of wa,&lt;/P&gt;&lt;P&gt;itab like table of wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have also tried using separete itabs in "into corresponding" and in where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to succesfully do with "for all entries" and with loop-endloop, only the last value is showing up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW does the solution depend on the number of tables in join? I am actually using 3 tables for join .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have to try out the following suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select f1 f2 into corresponding fields of table it_vbap&lt;/P&gt;&lt;P&gt;for all entries in itab where vbeln = itab-vbeln&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;select f1 f2 into corresponding fields of table it_vbap&lt;/P&gt;&lt;P&gt;for all entries in itab where vbeln = itab-vbeln&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;  read table it_vbap with key vbeln = itab-vbeln&lt;/P&gt;&lt;P&gt;                                          posnr = itab-posnr.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   " assign value into the workarea of the table.&lt;/P&gt;&lt;P&gt;endif &lt;/P&gt;&lt;P&gt;read table it_vbak with key vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   " assign value into the workarea of the table.&lt;/P&gt;&lt;P&gt;endif &lt;/P&gt;&lt;P&gt;"append final table.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:47:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679874#M1100486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679875#M1100487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure to use APPEND in loop-endloop option. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nirmal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679875#M1100487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table not updating IN Sselect between loop-endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679876#M1100488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Append using work are did the trick in loop-endloop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 15:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-not-updating-in-sselect-between-loop-endloop/m-p/4679876#M1100488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T15:38:52Z</dc:date>
    </item>
  </channel>
</rss>

