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

How to give user defined Subtotal text in ALV grid

Hi all,

How to give user defined Subtotal text in ALV grid. Can any one give some sample code / e.g program.

Thanks

Senthil bala

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 25, 2005 at 09:26 AM

    Hi,

    I'm also interested on the event subtotal_text. My question is : How is this event triggered?

    Best Regards,

    Maria João Rocha

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 25, 2005 at 09:49 AM

    Hi,

    U r asking about the subtotal at the end of sum<fieldname> and to append manually.

    If so

    Sort itab.

    Loop at itab.

    AT END OF <fieldname>

    SUM.

    APPEND wa-itab into table.

    U can use this table to dispaly.

    ENDAT.

    ENDLOOP.

    HAve already answered similar type of queries in this forum.

    IF u r asking something different get back to me.

    Thanks & Regards,

    Judith.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 25, 2005 at 11:01 AM

    Hi,

    Andreas,

    Thanks, i've already seen the link but my problem is when do I call the subroutine (method_subtotal_text) and also what values do I pass to the form?

    I've seen also the program BCALV_TEST_GRID_EVENTS, but I can't implement the event. Can you help me?

    Judith,

    Thanks. I've seen your reply to my question sum/count, and at this moment I need to show a counter on the line of the totals, without putting '1' on all the lines. I think I can generate a column containing the value of '1', hide the column, and then using the event subtotal_text. But I don't know to implement the event subtotal_text.

    Thanks in advance,

    Maria João Rocha

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Maria,

      Do exactly , what Serdar has posted :

      …

      Calculate the total for a column.

      Calculate subtotals for column plane type .

      Hide column plane type . To do this, use either the standard context menu or a new layout.

      The new text defined is displayed at the beginning of a subtotal line.

      …

      Before set a break-point in program BCALV_TEST_GRID_EVENTS

      (in 4.6 C- it's line 428:

      perform d0100_event_subtotal_text using es_subtottxt_info

      ….

      Here: is the transfer of the text, which you can manipulate in debugging:

      form d0100_event_subtotal_text using es_subtottxt_info type lvc_s_stxt...  
      
      assign e_event_data->m_data->* to <fs>.  
      
      <fs> = text-200.
      endform.                    " d0100_event_subtotal_text

      regards Andreas

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.