<?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 Parallel Cursor with ABAP 7.4 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193205#M1980977</link>
    <description>&lt;P&gt;Generally we use the below logic for implementing Parallel Cursor &lt;/P&gt;
  &lt;P&gt;LOOP AT it_vbak ASSIGNING &amp;lt;lfs_vbak&amp;gt;.&lt;BR /&gt; LOOP AT it_vbap FROM lv_tabix ASSIGNING &amp;lt;lfs_vbap&amp;gt;.&lt;BR /&gt;* Save index &amp;amp; Exit the loop, if the keys are not same&lt;BR /&gt; IF &amp;lt;lfs_vbak&amp;gt;-vbeln &amp;lt;&amp;gt; &amp;lt;lfs_vbap&amp;gt;-vbeln.&lt;BR /&gt; lv_tabix = sy-tabix.&lt;BR /&gt; EXIT.&lt;BR /&gt; ENDIF.&lt;BR /&gt;* Rest of the logic would go from here...&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;I figured out that the same can be implemented using the ABAP 7.4 syntaxes as below:&lt;/P&gt;
  &lt;P&gt;DATA(lt_final) = VALUE ty_t_final( FOR ls_vbap IN it_vbap&lt;BR /&gt; FOR ls_vbak IN it_vbak FROM line_index( it_vbak[ vbeln = ls_vbap-vbeln ] )&lt;BR /&gt; WHERE ( vbeln = ls_vbap-vbeln )&lt;BR /&gt; LET ls_final = VALUE ty_final(&lt;BR /&gt; vbeln = ls_vbak-vbeln )&lt;BR /&gt; IN ( CORRESPONDING #( BASE ( ls_final ) ls_vbap ) ) ).&lt;/P&gt;
  &lt;P&gt;But when I compare the performance for both of these, the previous one is quite quicker than the one implemented with ABAP 7.4 syntax. Can someone let me know if I am missing anything?&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 15:57:54 GMT</pubDate>
    <dc:creator>satadas30</dc:creator>
    <dc:date>2020-02-24T15:57:54Z</dc:date>
    <item>
      <title>Parallel Cursor with ABAP 7.4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193205#M1980977</link>
      <description>&lt;P&gt;Generally we use the below logic for implementing Parallel Cursor &lt;/P&gt;
  &lt;P&gt;LOOP AT it_vbak ASSIGNING &amp;lt;lfs_vbak&amp;gt;.&lt;BR /&gt; LOOP AT it_vbap FROM lv_tabix ASSIGNING &amp;lt;lfs_vbap&amp;gt;.&lt;BR /&gt;* Save index &amp;amp; Exit the loop, if the keys are not same&lt;BR /&gt; IF &amp;lt;lfs_vbak&amp;gt;-vbeln &amp;lt;&amp;gt; &amp;lt;lfs_vbap&amp;gt;-vbeln.&lt;BR /&gt; lv_tabix = sy-tabix.&lt;BR /&gt; EXIT.&lt;BR /&gt; ENDIF.&lt;BR /&gt;* Rest of the logic would go from here...&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;I figured out that the same can be implemented using the ABAP 7.4 syntaxes as below:&lt;/P&gt;
  &lt;P&gt;DATA(lt_final) = VALUE ty_t_final( FOR ls_vbap IN it_vbap&lt;BR /&gt; FOR ls_vbak IN it_vbak FROM line_index( it_vbak[ vbeln = ls_vbap-vbeln ] )&lt;BR /&gt; WHERE ( vbeln = ls_vbap-vbeln )&lt;BR /&gt; LET ls_final = VALUE ty_final(&lt;BR /&gt; vbeln = ls_vbak-vbeln )&lt;BR /&gt; IN ( CORRESPONDING #( BASE ( ls_final ) ls_vbap ) ) ).&lt;/P&gt;
  &lt;P&gt;But when I compare the performance for both of these, the previous one is quite quicker than the one implemented with ABAP 7.4 syntax. Can someone let me know if I am missing anything?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 15:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193205#M1980977</guid>
      <dc:creator>satadas30</dc:creator>
      <dc:date>2020-02-24T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Cursor with ABAP 7.4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193206#M1980978</link>
      <description>&lt;P&gt;It seems obvious that if you try to implement it the same way, a table iteration is less performing because you can't exit a FOR loop, you need to loop till the end of the internal table!&lt;/P&gt;&lt;P&gt;If it_vbak and it_vbap are standard tables, the table expression will be very slow.&lt;/P&gt;&lt;P&gt;Conclusion: constructor expressions are sometimes "bad"....&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:06:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193206#M1980978</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-02-24T17:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Cursor with ABAP 7.4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193207#M1980979</link>
      <description>&lt;P&gt;I think that both codes are not equivalents.&lt;/P&gt;&lt;P&gt;I mean, in the cursor one, the outside LOOP is for VBAK and then do the LOOP for the VBAP.&lt;BR /&gt;In the 7.4 version, the outside LOOP is for VBAP and the inside LOOP is for VBAK, maybe if you do in this order the performance could be more equlas??&lt;/P&gt;&lt;P&gt;The 7.4 version, I think that should be like this, isn't it?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; DATA(it_final) = VALUE ty_t_final( FOR ls_vbak IN it_vbak 
          FOR ls_vbap IN it_vbak FROM line_index( it_vbak[ vbeln = ls_vbap-vbeln ] ) WHERE ( vbeln = ls_vbak-vbeln ) LET ls_final = VALUE ty_final( vbeln = ls_vbak-vbeln ) IN ( CORRESPONDING #( BASE ( ls_final ) ls_vbap ) ) ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:43:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parallel-cursor-with-abap-7-4/m-p/12193207#M1980979</guid>
      <dc:creator>alopezv74</dc:creator>
      <dc:date>2020-02-24T18:43:39Z</dc:date>
    </item>
  </channel>
</rss>

