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 Event SUBTOTAL_TEXT is not triggered

Former Member
0 Kudos

Gurus,

I am using REUSE_ALV_GRID_DISPLAY. For every subtotal line, using the values from that subtotal, I need to print another subtotal line. I am trying to get values of the subtotals using the event SUBTOTAL_TEXT. The problem is the program is never triggering that event. I have break-point there but not hitting inside the form.

I have correctly declared that event & form in events table. Can anyone help me on why this event is not getting triggered(other events are working fine). Is there some special setup for this event to be triggered.

Thanks for your help

Baskaran

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

check this thread

you need to have a dummy field for that . check the comments in my code.

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

check this thread

you need to have a dummy field for that . check the comments in my code.

0 Kudos

Thanks Vijay,

It did solve the problem. Now the list started showing additional subtotal line(two subtotals instead of one) due to that dummy field. I need to find a way to suppress that unwanted additional subtotal line.

Thanks for your help

0 Kudos

you need to set the subtotal option only to the dummy field. see the below code related.


  "no need of subtot option here..
  ls_sort-spos = 1.
  ls_sort-fieldname = 'EBELN'.
  ls_sort-tabname = 'ITAB'.
  ls_sort-up = 'X'.
  ls_sort-group = 'UL'.
  APPEND ls_sort TO it_sort.
  CLEAR ls_sort.

  ls_sort-spos = 2.
  ls_sort-fieldname = 'D'.
  ls_sort-tabname = 'ITAB'.
  ls_sort-up = 'X'.
  ls_sort-group = 'UL'.
  ls_sort-subtot = 'X'.           "Only specify here
  APPEND ls_sort TO it_sort.