Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

add amount fields of two same belnr entries

i am working on a zreport ,my problem is that in my itab if belnr is unique then it should print the amount value given against it ,but if it encounters two same belnr values then it should print the cumulative value of amount field.for e.g.

belnr amount

2500000018 205.

2500000020 800

2500000020 200

in case of belnr = 250000018 it should give 205,but in case of belnr = 2500000020 it should print 1000.

it is urgent please .points will be rewarded surely

sarabjit

Tags:
Former Member
Former Member replied

data:

itab1 like table of itab with header line.

sort ITAB by belnr.

loop at ITAB.

itab1 = itab.

collect itab1.

endon.

endloop.

Now ITAB1 will contain the required cumulative results.

If it doesn't work then in need to see how you declared ITAB.

Reward points if useful.Get back in case of query...

Cheers!!!

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question