‎2005 Aug 22 7:08 AM
Hi,
While dealing with events in ALV we use FM 'REUSE_ALV_EVENTS_GET' which returns gt_eventtab.
Now when we need to provide the corresponding processing routine for an event we modify the gt_eventtab.
I do it this way
data : wa_event TYPE slis_alv_event.
MOVE 'TOP_OF_PAGE' TO wa_event-form.
MODIFY gt_eventtab FROM wa_event transporting form.
Why does this stmt gives me dump ? How should I go about it ?
Regards,
Nitin
‎2005 Aug 22 7:17 AM
Hi,
Before modifying you have to read the event in gt_eventtab.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_eventstab[].
read table gt_eventtab with key
name = slis_ev_end_of_page into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
modify gt_eventtab from ls_event
transporting form index sy-tabix.
endif.
‎2005 Aug 22 7:13 AM
Hi Nitin,
The MODIFY statement will modify the internal table from the work area. But did you fill the field NAME before the modify statement. Please try filling NAME as well and use the WHERE condition or INDEX.
MODIFY itab [FROM wa] TRANSPORTING f1 ... fn WHERE cond.
Thanks
Vinod
Message was edited by: Vinod C
‎2005 Aug 22 7:14 AM
Hi,
Try out in this way.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = i_events
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSiY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
read table i_events
with key name = slis_ev_top_of_page
into wa_events.
if sy-subrc = 0.
move 'TOP_OF_PAGE' to wa_events-form.
modify i_events from wa_events index sy-tabix.
endif.
Hope it helps you.
Thanks&Regards
Ruthra.R
‎2005 Aug 22 7:17 AM
Hi,
Before modifying you have to read the event in gt_eventtab.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_eventstab[].
read table gt_eventtab with key
name = slis_ev_end_of_page into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
modify gt_eventtab from ls_event
transporting form index sy-tabix.
endif.
‎2005 Aug 22 7:20 AM
Hi..
use - APPEND wa_event to gt_eventtab.
if you use modify-transporting you have to use either WHERE or INDEX.. otherwise it will give dump only..
Regards,
Pradhiba