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: 

Subtotals in ALV

roland_spindler
Participant
0 Kudos

Hi,

How can I exclude lines from the subtotals in ALV? (Certain lines in the ALV are just additional information and should not be added to the subtotals.)

I'd even try to change the subtotals manually if this is possible.

thanks in advance

Roland

7 REPLIES 7

Former Member
0 Kudos

hai Roland,

Refer this link..

Regards,

Srikanth.

Former Member

0 Kudos

Hi,

I do not want to exclude columns from the subtotals, but lines!

Here is an example of what I want:

..........................value

Relevant line A...1000

Irrelevant line.....2000

Relevant line B...3000

-


subtotal............4000

The subtotal is 4000, because the irrelevant line is excluded.

Roland

Message was edited by: Roland Spindler

Message was edited by: Roland Spindler

0 Kudos

Hello,

Data: I_SORT TYPE SLIS_T_SORTINFO_ALV,

WA_SORT TYPE SLIS_SORTINFO_ALV.

*---Sort

WA_SORT-SPOS = '1'.

WA_SORT-FIELDNAME = 'LINE'.

WA_SORT-UP = 'X'.

WA_SORT-SUBTOT = 'X'.

APPEND WA_SORT TO I_SORT.

CLEAR WA_SORT.

Pass this in FM,

IT_SORT = I_SORT

Regards,

Naimesh

0 Kudos

Hi,

Thanks for explaining for the third time how to make a subtotal line, but that was not my question.

best regards

Roland

0 Kudos

Hello Roland,

It is not possible to exclude certain lines from ALV subtotal. Because it is applicable to all.

Regards,

Naimesh

0 Kudos

Roland,

You would need to create your own custom ALV Class Object that excludes this information.

The sub-totals on all appropriate lines is the "out-of-the-box" solution provided by SAP.

Note - to write a custom ALV solution for this would be a noticable undertaking. I would suggest that you "live with it" as is.