Skip to Content
author's profile photo Former Member
Former Member

ALV Sorting by subtotals?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 10:30 AM

    Hi

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

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 01:48 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 01:51 PM

    NOt possible.

    BR, JAcek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 02:01 PM

    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.

    *

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 02:03 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.