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 BEFORE_LINE_OUTPUT event is not working

Former Member
0 Kudos

Hi all.

I have problems to use the before line output event. The alv never use it...

  • Get events

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

IMPORTING

et_events = lt_events.

READ TABLE lt_events WITH KEY name = 'BEFORE_LINE_OUTPUT'

INTO ls_events.

  • Add Form for event BEFORE_LINE_OUTPUT

ls_events-form = 'UPDATE_TOTALS'.

MODIFY lt_events INDEX sy-tabix FROM ls_events.

I've put a BREAK-POINT in the update totals subroutine and never stop there.

Somebody knows how to do it??

thanks a lot

6 REPLIES 6

Former Member
0 Kudos

Hi,

1. You need to add the event in the IT_EVENTS table....

2. Register the events in the PBO of the screen......

Check with this 2 steps and i think it should work perfectly fine...

Regards,

Kunjal

0 Kudos

Hi

But is and ALV ?? I haven´t any pbo

Thanks

0 Kudos

Havent you defined any custom control for the display of ALV data....

What CLASS or FM you are using for the Display of ALV??

Regards,

Kunjal

0 Kudos

FM

Thanks

0 Kudos

If you are using the List function then it will work, otherwise it will not. But incase of Grid then it works for Print mode. what exactly you want to do in that event.

REPORT  ztest_alv_test.

type-pools: slis,kkblo.
DATA: it_flight TYPE sflight_tab1.
DATA: it_events TYPE  slis_t_event,
      wa_event LIKE LINE OF it_events.

SELECT * FROM sflight INTO TABLE
it_flight UP TO 20 ROWS.

wa_event-name = slis_ev_before_line_output.
wa_event-form = 'BEFORE'.
append wa_event to it_events.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    i_callback_program = sy-repid
    i_structure_name   = 'SFLIGHT'
    it_events          = it_events
  TABLES
    t_outtab           = it_flight
  EXCEPTIONS
    program_error      = 1.

form before using gs_lineinfo type kkblo_lineinfo.
break-point.
endform.

0 Kudos

Hi,

I am trying to edit the subtotals and totals line, changing formula, color, etc.

thanks