09-10-2008 12:25 PM
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
09-10-2008 12:33 PM
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
09-10-2008 12:48 PM
09-10-2008 12:51 PM
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
09-10-2008 12:52 PM
09-10-2008 1:14 PM
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.
09-10-2008 3:10 PM
Hi,
I am trying to edit the subtotals and totals line, changing formula, color, etc.
thanks