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

Internal table

Former Member
0 Likes
555

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
537

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

2 REPLIES 2
Read only

Former Member
0 Likes
538

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

Read only

Former Member
0 Likes
533

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.