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

plz correct me

Former Member
0 Likes
816

hi friends ,

my problem is when i am modifying it while modifying

second record first record get clear.

it[] = item1[].

DELETE ADJACENT DUPLICATES FROM it COMPARING rbeln.

loop at it.

indx = sy-tabix.

loop at item1 where rbeln = it-rbeln.

MOVE item1-vv013 TO it-vv013.

MOVE item1-vv011 TO it-vv011.

MOVE item1-kwfulk TO it-kwfulk.

MOVE item1-vv007 TO it-vv007.

MOVE item1-vv009 TO it-vv009.

MOVE item1-vv005 TO it-vv005.

MOVE item1-vv010 TO it-vv010.

MOVE item1-vv003 TO it-vv003.

modify it index indx.

endloop.

clear:it,item1.

endloop.

hi friends ,

my problem is when i am modifying it while modifying

second record first record get clear.

it[] = item1[].

DELETE ADJACENT DUPLICATES FROM it COMPARING rbeln.

loop at it.

indx = sy-tabix.

loop at item1 where rbeln = it-rbeln.

MOVE item1-vv013 TO it-vv013.

MOVE item1-vv011 TO it-vv011.

MOVE item1-kwfulk TO it-kwfulk.

MOVE item1-vv007 TO it-vv007.

MOVE item1-vv009 TO it-vv009.

MOVE item1-vv005 TO it-vv005.

MOVE item1-vv010 TO it-vv010.

MOVE item1-vv003 TO it-vv003.

modify it index indx.

endloop.

clear:it,item1.

endloop.

5 REPLIES 5
Read only

Former Member
0 Likes
778

Hi

Use READ statement instead of LOOP of item1

loop at it.

indx = sy-tabix.

read table item1 with key rbeln = it-rbeln.

if sy-subrc = 0.

MOVE item1-vv013 TO it-vv013.

MOVE item1-vv011 TO it-vv011.

MOVE item1-kwfulk TO it-kwfulk.

MOVE item1-vv007 TO it-vv007.

MOVE item1-vv009 TO it-vv009.

MOVE item1-vv005 TO it-vv005.

MOVE item1-vv010 TO it-vv010.

MOVE item1-vv003 TO it-vv003.

modify it index indx.

endif.

endloop.

Regards

anji

Read only

0 Likes
778

hi friends

belnr val1 val2 val3

1 1

1 2

1 3

belnr is same but first val in 1 col 2nd value in 2nd col and 3rd val in 3rd col

i want three value in one line

belnr val1 val2 val3

1 1 2 3

Read only

former_member404244
Active Contributor
0 Likes
778

Hi,

Try like this..change ur code.

it[] = item1[].

sort it by rbeln.

DELETE ADJACENT DUPLICATES FROM it COMPARING rbeln.

loop at it.

loop at item1 where rbeln = it-rbeln.

MOVE item1-vv013 TO it-vv013.

MOVE item1-vv011 TO it-vv011.

MOVE item1-kwfulk TO it-kwfulk.

MOVE item1-vv007 TO it-vv007.

MOVE item1-vv009 TO it-vv009.

MOVE item1-vv005 TO it-vv005.

MOVE item1-vv010 TO it-vv010.

MOVE item1-vv003 TO it-vv003.

modify it .

clear : it.

endloop.

clear:item1.

endloop.

Reward if helpful.

Regards,

nagaraj

Read only

former_member386202
Active Contributor
0 Likes
778

Hi,

Dont use nested loop, instead of that use read statement. It will help u.

Regards,

Prashant

Read only

Former Member
0 Likes
778

hi sonu,

try to modify with using transporting,

Ex.

modify it index indx transporting w013 w011 kwfulk w007 w009 w005 w010 w003.