Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

LOOP & ENDLOOP & PARELLEL CURSOR

yasu_1096
Explorer
0 Kudos
1,113

Hi All,

Can anyone tell about the Loop & endloop , parllel cursor why it is used exact meaningful use for loop & endloop ?

what is parellel cursor why it is used exact meaning for the parlell cusrsor ?

4 REPLIES 4
Read only

FredericGirod
Active Contributor
893

Do you know there are some documentation about all that

What it is not clear in these docs, blogs ... ?

Read only

matt
Active Contributor
0 Kudos
893

The parallel cursor technique is obsolete and has been for nearly 25 years. The advent of HASHED and SORTED internal tables removed the need for this technique.

Read only

0 Kudos
893

TO follow the concept you need minimum 2 tables which are have common keys for example if I take PO related data of EKKO, EKPO and EKET. I will need to do as follows:

sort: iekko by ebeln, iekpo by ebeln ebelp, ieket by ebeln ebelp ETENR.

loop at iekko.

read table iekpo with key ebeln = iekpo-ebeln.

check sy-subrc is intital.

loop at iekpo from sy-tabix.

if iekpo-ebeln ne iekko-ebeln.

exit.

endif.

... process logic.

read table ieket with key ebeln = iekpo-ebeln ebelp = iekpo-ebelp.

check sy-subrc is initial.

loop at ieket from sy-tabix

if ieket-ebeln ne iekpo-ebeln or ieket-ebelp ne iekpo-ebelp.

exit.

endif.

... process logic.

endloop

endloop.