04-21-2009 10:56 AM
Hi All,
My requirement includes to ALV Block List Display with header and footer.
I have made two forms TOP_OF_PAGE and END_OF_PAGE . I have pass the form and name of event to an internal table it_events.
This it_events[] is then passed to FM ' REUSE_ALV_BLOCK_LIST_APPEND' . But only Top of Page is working.
Am I missing any thing in the code? or I have to use something else.
Pls Help
Regards,
Nibha
04-21-2009 10:58 AM
hi,
Please check whether you have appened all the events in th tables it_events[].
04-21-2009 10:58 AM
Hi,
For end_of_page you need to use Events as follows:
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
*&---------------------------------------------------------------------*
*& Form BUILD_EVENTCAT
*&---------------------------------------------------------------------*
FORM build_eventcat .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
wa_event-form = 'END_OF_PAGE'. " Sub-routine that will be used to write
MODIFY it_event FROM wa_event INDEX sy-tabix. " Modify it_event
CLEAR wa_event.
ENDFORM. " F_BUILD_EVENTCAT
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = g_t_alv_layout2
it_fieldcat = g_t_fieldcat2[]
it_events = it_event[]
TABLES
t_outtab = <fs_final_itab>.
Regards,
Mansi.
04-21-2009 11:06 AM
Yes, I passing both the events TOP_OF_PAGE & END_OF_PAGE.
Also, I am using ALV Block List Display.
04-21-2009 11:10 AM
Hello,
For TOP_OF_PAGE you dont need events. TOP_OF_PAGE is done using the I_CALLBACK_TOP_OF_PAGE parameter in FM REUSE_ALV_GRID_DISPLAY'. Juts for event end-of-page pass the event and use my sample code. It works as desired.
04-21-2009 11:13 AM
I am using the below mentioned FMs REUSE_ALV_BLOCK_LIST_INIT ,
REUSE_ALV_BLOCK_LIST_APPEND ,
REUSE_ALV_BLOCK_LIST_DISPLAY .