Skip to Content
0
Oct 18, 2005 at 06:13 AM

Top Of Page not triggering in ALV

35 Views

Hi

I am using ALV List Disaply. I have a itab that has 2000 Rows. When i scoll down, the header appears at the top always. Now i added the following code to trigger a Top of Page Event.

FORM xevents.

CLEAR xs_event.

xs_event-name = slis_ev_top_of_page.

xs_event-form = 'XTOP_OF_PAGE'.

APPEND xs_event TO gt_xevents.

CLEAR xs_event.

ENDFORM.

FORM xtop_of_page.

BREAK-POINT.

WRITE: / 'X_TOP_OF_PAGE'.

ENDFORM.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_STRUCTURE_NAME =

is_layout = st_layout

it_fieldcat = fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

it_filter = filttab[]

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

it_events = gt_xevents

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = alv_tab[]

  • 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.