2007 Nov 02 6:14 AM
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.
2007 Nov 02 6:19 AM
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
2007 Nov 02 6:34 AM
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
2007 Nov 02 6:20 AM
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
2007 Nov 02 6:20 AM
Hi,
Dont use nested loop, instead of that use read statement. It will help u.
Regards,
Prashant
2007 Nov 02 6:23 AM
hi sonu,
try to modify with using transporting,
Ex.
modify it index indx transporting w013 w011 kwfulk w007 w009 w005 w010 w003.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |