<?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: Read Statement antwork in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206690#M1522089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; i am not suppose to use loop inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This rule is nonsense. Make proper use of SORTED tables for the item table. Search for background information, especially in the ABAP Performance forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Aug 2010 12:49:44 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-08-10T12:49:44Z</dc:date>
    <item>
      <title>Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206684#M1522083</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;I am having one record in it_vbrk table and in it_vbrp table i am having three records with same vbeln with three items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_vbrk into wa_vbrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move: XXXX to XXXX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_vbrp into wa_vbrp with key vbeln = wa_vbrk-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: XXXX to XXX.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&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;here in the above code i am getting only one record output. but i need three records as output with all the three item details of it_vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not suppose to use loop inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest with code example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206684#M1522083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T12:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206685#M1522084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should loop at multiple records internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_vbrp into wa_vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move: XXXX to XXXX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table it_vbrk into wa_vbrk with key vbeln = wa_vbrp-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: XXXX to XXX.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&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;It should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Tamya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206685#M1522084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T12:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206686#M1522085</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;In this scenario try to loop item table and read header table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read it_vbrk with key .....&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move xxx to xyz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&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 works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:43:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206686#M1522085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T12:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206687#M1522086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My thumb rule: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;"Always LOOP on the line item table &amp;amp; READ the header table"&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course if there is any specific requirement you've not mentioned in the post, i will stick with my rule &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:44:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206687#M1522086</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-08-10T12:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206688#M1522087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kumar &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to use one inner &lt;STRONG&gt;LOOP&lt;/STRONG&gt; to do this, &lt;STRONG&gt;READ TABLE&lt;/STRONG&gt; will only return you one record at a time. Hope you understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:45:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206688#M1522087</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-08-10T12:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206689#M1522088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some optimizations guidance :&lt;/P&gt;&lt;P&gt;- Try Parallel Cursor method : look at wiki sample at [Copy of ABAP Code for Parallel Cursor - Loop Processing |http://wiki.sdn.sap.com/wiki/display/Snippets/Copy&lt;EM&gt;of&lt;/EM&gt;ABAP&lt;EM&gt;Code&lt;/EM&gt;for&lt;EM&gt;Parallel&lt;/EM&gt;Cursor&lt;EM&gt;-&lt;/EM&gt;Loop+Processing]&lt;/P&gt;&lt;P&gt;- Reverse the order of table processing, using the item table in the external LOOP and READ to get the header table, but only if each and every header has a least one item, else you will miss some header records.&lt;/P&gt;&lt;P&gt;- Use a LOOP in another LOOP if the internal table is a SORTED or HASH (as of Release 7.0) one and the WHERE criteria are the key of the table (check LOOP  [WHERE log_exp |http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_ITAB_COND.htm#&amp;amp;ABAP_ADDITION_3@3@] online documentation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206689#M1522088</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-08-10T12:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206690#M1522089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; i am not suppose to use loop inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This rule is nonsense. Make proper use of SORTED tables for the item table. Search for background information, especially in the ABAP Performance forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206690#M1522089</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-08-10T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206691#M1522090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at item and read header ... but i stick with a sorted type item table  and a nested loop. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 13:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206691#M1522090</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-10T13:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206692#M1522091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's the use of a nested loop if you can avoid that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 13:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206692#M1522091</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-08-10T13:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206693#M1522092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an example suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if the header contais 2 rows and item contains 2000 records related to it . Eventhough a control break and modify statement would do ... but when you measure the run time sorted tables gives you better results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 14:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206693#M1522092</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-10T14:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206694#M1522093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can the header data contain multiple rows for the same document ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFAIK the header tables generally have the document number as the key fields (BKPF, MKPF, RBKP, VBAK, VBRK etc. )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still not convinced a header table will contain multiple rows referencing to the same object. May be i'm wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are cases where "thumb rule" doesn't apply. I'm still not convinced OP needs a nested loop unless he mentions some special processing is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 14:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206694#M1522093</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-08-10T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206695#M1522094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 10:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206695#M1522094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-11T10:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement antwork</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206696#M1522095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Answered&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How?&lt;/STRONG&gt; so that it will help the people who will search the similar problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 10:10:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-antwork/m-p/7206696#M1522095</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-08-11T10:10:50Z</dc:date>
    </item>
  </channel>
</rss>

