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

doubt

Former Member
0 Likes
317

Hi all.

I have set of fields values in internal table .I need check number of item number (POSNR) for particular VBELN .Copy the same record , number of time of line item if more then one line item. Here VBELN 1000, it has 3 line item so I need to populate same records 3 times as follows. NETWR and FKIMG both I need to sum of all line item respectively Sum_of_NETWR and Sum_of_FKIMG.

How can I do it?

VBELN ERDAT ERZET SOLD_TO_PARTY_NAME

1000 20071212 1234 dummy 1000 20071212 1234 dummy 1000 20071212 1234 dummy

NETWR Sum_of_NETWR FKIMG Sum_of_FKIMG

0 75 0 15

25 75 10 15

50 75 5 15

Please help me.

To be reward all helpful answers.

JNJ

1 REPLY 1
Read only

Former Member
0 Likes
296

Hi JNJ,

Do it like this...

DATA: TOTAL_NETWR TYPE NETWR.

DATA : TOTAL_FKIMG TYPE FKIMG.

LOOP AT ITAB.

AT END OF VBELN.

SUM.

TOTAL_NETWR = ITAB-NETWR.

TOTAL_FKIMG = ITAB-FKIMG.

ENDAT.

ENDLOOP.

Reward if helpful,

Regards,

Tejas