Application Development and Automation 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: 
Read only

ALV Events - Modify Statement

Former Member
0 Likes
800

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

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
674

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.

4 REPLIES 4
Read only

Vinod_Chandran
Active Contributor
0 Likes
674

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

Read only

Former Member
0 Likes
674

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

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
675

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.

Read only

Former Member
0 Likes
674

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