Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP routine in Transfer rules - start routine in BW.

Former Member
0 Kudos

hello everyone,

i need some help in writin an ABAP code. Well the logic is say i have a table which sends data to BW. the data comes like :-

Order Q1

101 50

101 20

102 10

101 60

But i want to store only 1 value for each order , i.e summarize the value so in when the data package comes , i want to check all records for one order and add the qty value for each order and store it in the ODS.

so ODS for above eg should look like

Order qty

101 130

102 10

Thanks,

Will assign points to all helpful answers.

Laura.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can use this Logic.

Sort I_TAB by Order. " I_TAB will be your internal table containg order and Qty

Loop at I_TAB.

at new order.

Move I_Tab-Order to I_outtab - Order.

Collect Itab. " This will sum up the quantiies at end for you

Move I_Tab-Oty to I_outtab-QTY.

Endat.

Endloop.

- Guru

1 REPLY 1

Former Member
0 Kudos

You can use this Logic.

Sort I_TAB by Order. " I_TAB will be your internal table containg order and Qty

Loop at I_TAB.

at new order.

Move I_Tab-Order to I_outtab - Order.

Collect Itab. " This will sum up the quantiies at end for you

Move I_Tab-Oty to I_outtab-QTY.

Endat.

Endloop.

- Guru