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

Parallel Looping

Former Member
0 Likes
406

Hi,

How does parallel looping works?

I need to get every entry from afko-plnbez for every crhd-arbpl...

Now for every crhd-arbpl and afko-plnbez,,, I have to get the mseg-menge where mseg-bwart = 101 and 102...Then,

Add the values where mseg-bwart is 101 and subtract from that the summation of values where mseg-bwart is 102...

I have the code below:

REFRESH i_crhd.

SELECT a~kostl

b~objid

b~vgwts

b~arbpl

FROM crco AS a INNER JOIN crhd AS b

ON aobjid = bobjid

INTO TABLE i_crhd

WHERE b~arbpl IN s_arbpl.

REFRESH i_mseg.

SELECT a~mblnr

a~bwart

a~matnr

a~werks

a~dmbtr

a~menge

a~meins

a~aufnr

a~kostl

b~budat

FROM mseg AS a INNER JOIN mkpf AS b

ON amblnr = bmblnr

INTO TABLE i_mseg

WHERE a~werks = p_werks

AND b~budat IN s_dates.

IF i_mseg[] IS NOT INITIAL.

REFRESH i_afko.

SELECT aufnr

plnbez

aufpl

rsnum

FROM afko INTO TABLE i_afko

FOR ALL ENTRIES IN i_mseg

WHERE aufnr = i_mseg-aufnr.

endif.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
382

hi,

hope this link will help u to know about parallel cursor ie using loops inside loops

[http://www.saptechnical.com/Tutorials/ABAP/ParallelCursor.htm]

regards,

priya

1 REPLY 1
Read only

Former Member
0 Likes
383

hi,

hope this link will help u to know about parallel cursor ie using loops inside loops

[http://www.saptechnical.com/Tutorials/ABAP/ParallelCursor.htm]

regards,

priya