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 Grid Control?

abdul_hakim
Active Contributor
0 Likes
494

Hi Friends,

How to handle TOP-OF-PAGE and END-OF-PAGE events in ALV GRID CONTROL using OO approach..Please give me a sample program..

Thanks,

Abdul

Hi Friends,

How to handle TOP-OF-PAGE and END-OF-PAGE events in ALV GRID CONTROL using OO approach..Please give me a sample program..

Thanks,

Abdul

2 REPLIES 2
Read only

Former Member
0 Likes
476

you can use ALV Grid events..

the I_EVENT in ALv contains NAME -Name of the Callback event

and FORM - Name of the form routine that should be called in the calling program at the event.

<b>But this one uses Function Module</b>.

Check this piece of code for reference..

FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',

FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE', FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.

DATA: L_I_EVENT TYPE SLIS_ALV_EVENT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = I_EVENTS.

READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE

INTO L_I_EVENT.

IF SY-SUBRC = 0.

MOVE FORMNAME_TOP_OF_PAGE TO L_I_EVENT-FORM.

APPEND L_I_EVENT TO I_EVENTS.

ENDIF.

READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE

INTO L_I_EVENT.

IF SY-SUBRC = 0.

MOVE FORMNAME_END_OF_PAGE TO L_I_EVENT-FORM.

APPEND L_I_EVENT TO I_EVENTS.

ENDIF.

CLEAR L_I_EVENT.

READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND

INTO L_I_EVENT.

IF SY-SUBRC = 0.

MOVE FORMNAME_USER_COMMAND TO L_I_EVENT-FORM.

APPEND L_I_EVENT TO I_EVENTS.

ENDIF.

.

Read only

Former Member
0 Likes
476

Hi Abdul,

just check the thread . in that Miss.Srilatha Gave the Post(in page two) check that..

regards

vijay