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: 

QUERY

Former Member
0 Kudos

hi friends,

i nedd to calculate MTD QTY oRDERED.

based on the below description plz help me

SO FOR THAT sum all order quantity(kwmeng) and grouping based on "ship-to- number''(kunnr) and material number(matnr)

regards,

divya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you are using query (SQ01 transaction) with ALV GRID style, you have the option at the end of your query run to change the column order (with drag and drop them by their header), to sort the colomns, and make the TOTALS and SUB-TOTALS by the relevant button.

And if you are finished just save the layout as a layout-variant.

Regards

4 REPLIES 4

Former Member
0 Kudos

Hi,

Can you be more clear?

post the requirement more clearly

Regards,

Sowjanya

0 Kudos

hi,

already i calculated kwmeng(order quantity) so i need to sum all calculated order quantity(kwmeng) and grouping based on ship to number(kunnr) and matnr

regards,

divya

0 Kudos

As you said that you have already collected the order qty in an internal table.

Let say you have the table as itab.

itab-structure=>

kunnr

matnr

kwmeng

sort itab.

loop at itab.

write : / itab-kunnr, itab-matnr, itab-kwmeng.

at end of matnr.

sum.

write : / 'Material Total :', itab-kwmeng.

endat.

at end of kunnr.

sum.

write : / 'Ship to Party Total :', itab-kwmeng.

endat.

endloop.

Former Member
0 Kudos

If you are using query (SQ01 transaction) with ALV GRID style, you have the option at the end of your query run to change the column order (with drag and drop them by their header), to sort the colomns, and make the TOTALS and SUB-TOTALS by the relevant button.

And if you are finished just save the layout as a layout-variant.

Regards