Application Development 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: 

Internal table

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.