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: 

ALV Sorting by subtotals?

Former Member
0 Kudos

I'd like to sort ALV-grid based report but ONLY by subtotals values!

Is it possible?

ALV grid is displayed as collapsed - only subtotals and totals.

Thanks

5 REPLIES 5

Former Member
0 Kudos

Hi

No! I don't believe it can do it.

Max

Former Member
0 Kudos

Hi

Its not possible to sort by subtotals values. If realy you need it we have to populate the subtotals records also in to the internala table which will be used to display the report output.

It only possible programmatically...

Regards,

Satya.

Former Member
0 Kudos

NOt possible.

BR, JAcek

Former Member
0 Kudos

hi,

first declare

c_SUBTOTAL_TEXT type slis_formname value 'SUBTOTAL_TEXT ',

and use this it will work

&----


*& Form sort_table

&----


FORM sort_table. .

*x_subtotal_text = .

*clear x_sort.

*x_sort-spos = '1'.

*x_sort-fieldname = 'DMBTR'.

*x_sort-tabname = 'IT_FINAL'.

*x_sort-up = c_x.

*x_sort-subtot = c_x.

*

*append x_sort to i_sort.

*

Former Member
0 Kudos

Hi Radoslaw,

i think its no possible.

You have to manage it in your Program.

Compute the subtotal in your Report.

Then use this Information and manupulate

the Fieldcat.

Regards, Dieter

set Fieldcat-COL_POS in order of the subtotal.

Regards, Dieter

Message was edited by: Dieter Gröhn