Skip to Content

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

sum fields in internal table

Hi,

my sorted table with unique key field1 field2 is defined like:

field1 keyfield

field2 keyfield

field3

field4

i would like to get a sum of field3 and field4 of all entries "for each new field1 field2" and write it out.

field1 = 1

field2 = 100

sum(field3)

sum(field4)

write it out.

field1 = 1

field2 = 200

sum(field3)

sum(field4)

write it out.

field1 = 2

field2 = 100

sum(field3)

sum(field4)

write it out.

Q: Should I use LOOP and AT NEW FIELD1/FIELD2 or can i use another way for that ?

Thanks,

Gordon

Tags:
Not what you were looking for? View more on this topic or Ask a question