0% found this document useful (0 votes)
8 views

Parallel Cursor

Uploaded by

12jamesroy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Parallel Cursor

Uploaded by

12jamesroy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Generally we use the below logic for implementing Parallel Cursor

LOOP AT it_vbak ASSIGNING <lfs_vbak>.


LOOP AT it_vbap FROM lv_tabix ASSIGNING <lfs_vbap>.
* Save index & Exit the loop, if the keys are not same
IF <lfs_vbak>-vbeln <> <lfs_vbap>-vbeln.
lv_tabix = sy-tabix.
EXIT.
ENDIF.
* Rest of the logic would go from here...
ENDLOOP.
ENDLOOP.

I figured out that the same can be implemented using the ABAP 7.4 syntaxes as
below:

DATA(lt_final) = VALUE ty_t_final( FOR ls_vbap IN it_vbap


FOR ls_vbak IN it_vbak FROM line_index( it_vbak[ vbeln = ls_vbap-vbeln ] )
WHERE ( vbeln = ls_vbap-vbeln )
LET ls_final = VALUE ty_final(
vbeln = ls_vbak-vbeln )
IN ( CORRESPONDING #( BASE ( ls_final ) ls_vbap ) ) ).

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?

SAP Managed Tags:

You might also like