Application Development and Automation 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: 
Read only

ABAP Coding Help for Subtotal type output - SAP Query

benjamin_allsopp
Active Participant
0 Likes
528

I've created a SAP Query to display a stock overview by storage type using the table LQUA.

The output that I get is:

                                      

MaterialDescriptionPlantWHNSLOCStorage TypeBatchGR DateAvailable stock
2057  STRAWBERRIESBP011000088200000108176617.06.2014225
2057STRAWBERRIESBP011000088200000108176617.06.2014720
2061VOSTIZZA CURRANTSBP011000088200000108127217.06.20141,000
2061VOSTIZZA CURRANTSBP011000088200000108127217.06.20141,000
2061VOSTIZZA CURRANTSBP011000088200000108127217.06.20141,000
2061VOSTIZZA CURRANTSBP011000088200000108127217.06.20141,000

I can get a subtotal for each Material, batch and GR date combination by using the ALV grid functionality.

This method adds too much clutter to my query and can't be easily manipulated in Excel afterwards for what I want. I want to condense the results down and just keep a cumulated available stock, e.g:

MaterialDescriptionPlantWHNSLOCStorage TypeBatchGR DateAvailable stock
2057  STRAWBERRIES      BP011000088200000108176617.06.2014945
2061VOSTIZZA CURRANTSBP011000088200000108127217.06.20144,000

How can this be done?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
484

Hi,

Please try to use STATISTICS in your SAP Query. you can sort and add your value based on condiiton then it will be show you collect value in SQ01.

Please see the below documents for STATISTICS


https://help.sap.com/saphelp_erp2004/helpdata/en/d2/cb4263455611d189710000e8322d00/content.htm

Regards,

Prasenjit Mishra

1 REPLY 1
Read only

Former Member
0 Likes
485

Hi,

Please try to use STATISTICS in your SAP Query. you can sort and add your value based on condiiton then it will be show you collect value in SQ01.

Please see the below documents for STATISTICS


https://help.sap.com/saphelp_erp2004/helpdata/en/d2/cb4263455611d189710000e8322d00/content.htm

Regards,

Prasenjit Mishra