cancel
Showing results for 
Search instead for 
Did you mean: 

How to consolidate rows in a LOOP with same PO number and PO Line item

Arushi
Explorer
0 Kudos
149

I have a requirement to consolidate/sum up rows with same PO number and PO items.
I have an internal table with PO number, PO Line item, amount, now I need to sum up rows with same PO number and PO line item.
What should be the best way to achieve this?
I am thinking should At new or At change work? is there any other way?

Sandra_Rossi
Active Contributor
AT CHANGE is obsolete. AT NEW is prone to errors so I consider it as obsolete. Choose the classic algorithm (if new value <> previous value then...)

Accepted Solutions (0)

Answers (1)

Answers (1)

MKreitlein
Active Contributor

Hello @Arushi,

what about: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapcollect.htm ?

Otherwise it might be, I don't understand what you are trying to do.

BR, Martin

Arushi
Explorer
0 Kudos
Yes I used Collect along with At New Po_number and it worked for me