‎2009 Nov 18 6:52 AM
Hi,
I have an internal table with the following structure.
PO Number PO Line Number Quantity ETA
PO_1 001 10 10 Aug 2009
PO_1 002 12 11 Aug 2009
PO_2 001 5 10 Aug 2009
PO_1 001 13 10 Aug 2009
PO_1 001 7 11 Aug 2009
Now I want to sum up quantity based on ETA dates so that the structure will look like as below:
PO Number PO Line Number Quantity ETA
PO_1 001 23 10 Aug 2009
PO_1 001 7 11 Aug 2009
PO_1 002 12 11 Aug 2009
PO_2 001 5 10 Aug 2009
Collect statement will not work as the checking is on date but not on po no and line item.
Regards,
Abhi...
‎2009 Nov 18 7:36 AM
‎2009 Nov 18 7:10 AM
Hi,
If possible create a structure with ponumber poitem date quant and then move corresponding fields to another internal table and use collect
‎2009 Nov 18 7:24 AM
Use SUM statement for adding the quantity fields.
Sample code :
LOOP AT T INTO WA_T.
WA_N = WA_T
SUM.
WA_N-QUANTITY = WA_T-QUANTITY.
APPEND WA_N TO ITAB_N.
ENDLOOP.
‎2009 Nov 18 7:36 AM