07-23-2007 2:09 PM
HI all,
int_outtab is my final internal table.
I am getting order quantity(WMENG) from VBEP.
and modifying the quantity in table as per my VBELN in int_outtab.
Here my problem is......................
VBELN WMENG
0000003756| 25.000 |
0000003756| 0.000 |
0000003756| 1.000 |
i want to update this data into my internal table based on VBELN.
1.000 ||0000003756| <
0.000 ||0000003756| <
0.000 ||0000003756| <
see here i am able to update last value only the remaining are 0.
plese help me regarding this...
VKR.
07-23-2007 2:30 PM
Try following code.
Loop at i_vbep.
l_vbeln = i_vbep-vbeln.
sum = sum + i_vbep-wmeng.
at end of vbeln.
move: l_vbeln to i_final-vbeln.
sum to i_final-wmeng.
append i_final.
clear i_final.
endat.
Endloop
07-23-2007 2:30 PM
Try following code.
Loop at i_vbep.
l_vbeln = i_vbep-vbeln.
sum = sum + i_vbep-wmeng.
at end of vbeln.
move: l_vbeln to i_final-vbeln.
sum to i_final-wmeng.
append i_final.
clear i_final.
endat.
Endloop
07-23-2007 2:48 PM
sort i_vbeln assending vbeln
loop at i_vbeln into w_vbeln
AT END OF wmng.
SUM.
<pass data to your 2nd itab> w_wmng mean there sum value
endloop
in that case you can getting there sum value in the work area
rewards if useful.