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

FUNCTION ALV - LIST

michael_teran
Participant
0 Likes
462

Hi everbody ,

At the event "BEFORE LINE OUTPUT" WITH "NEW-PAGE" I trigger the event "TOP OF PAGE".

I want to do the same but trigger the event "TOP OF LIST" how can I do that? it can be done?

4 REPLIES 4
Read only

Former Member
0 Likes
439

Hi,

DATA : g_t_events TYPE slis_t_event.
DATA : g_r_events TYPE slis_alv_event.

    * Top of Page event for standard header

g_r_events-name = 'TOP_OF_PAGE'.
g_r_events-form = 'TOP_OF_PAGE'.
APPEND g_r_events TO g_t_events.

NOW u call the REUSE_ALV_LIST_DISPLAY.

Some thing like this

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = IT_VARIANT-REPORT
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' IT_FIELDCAT = IT_FIELDCAT
I_SAVE = 'A'
IS_VARIANT = IT_VARIANT
TABLES
T_OUTTAB = G_T_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.

IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

&---------------------------------------------------------------------
*& Form TOP-OF-PAGE
&---------------------------------------------------------------------

    * For Top of page

----------------------------------------------------------------------
FORM TOP_OF_PAGE. "#EC CALLED

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_COMMENTARY.

ENDFORM. "top_of_page

<REMOVED BY MODERATOR>

Thanks

Vikranth

Edited by: Alvaro Tejada Galindo on Jun 12, 2008 1:45 PM

Read only

Clemenss
Active Contributor
0 Likes
439

Hi Michael,

what is it you want to achieve?

TOP_OF_LIST is triggered automatically and once per FM call before the first line of output is created.

The only way to trigger TOP_OF_LIST is to create any output. Even if the display table is empty, it will trigger TOP_OF_LIST .

Regards,

Clemens

Read only

michael_teran
Participant
0 Likes
439

How Can I throw a TOP OF LIST???

Can anybody help me!!!!

Read only

0 Likes
439

Hi Michael,

as I tried to explain: Just call FUNCTION 'REUSE_ALV_GRID_DISPLAY' and TOP_OF_LIST is raised (thrown).

Once again: What do you want to do?

Regards,

Clemens