cancel
Showing results for 
Search instead for 
Did you mean: 

Report

Former Member
0 Kudos

Hi,

Table field for 'Total order quantity' for a production order ??

have an internal table as below.

qty uom sloc movementtyp ORDER

10 g CH 261 12345

12 mts XD 261 12345

13 KG CH 261 12345

14 ET FR 261 12345

10 mts XD 261 12345

Requirment is to sum it up only for sloc = 'XD' and Movemnt typ = '261' and this 'qty' and 'Total Order Quantity' are to be moved into another to another internal table with key field as 'order' .

Can i have a samle code

thxs

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

loop at itab into wa.

if wa-sloc = 'XD' and wa-movementtyp = '261'.

<<move values to a separate work area here>>

collect wa1 into itab1.

endif

endloop.

here itab 1 is the target table for you...and wa1 is its work area...adjust code to your requirement

Answers (1)

Answers (1)

former_member188827
Active Contributor
0 Kudos

loop at itab.

if sloc eq 'XD' and movementtyp = '261'.

move-corresponding to itab2.

append itab2.

endif.

endloop.

loop at itab2.

zsum = itab2-qty + zsum.

endloop.