Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

top-of-page not getting triggered

Dear Freinds,

iam not able to trigger the top of page event , iam givng complete code which i have written for ALV.

Form alv_display.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = v_repid.

IF it_count_succ IS NOT INITIAL.

  • Get the fieldcatalog for the first block

  • * tOTAL

s_fieldcatalog-col_pos = '1'.

s_fieldcatalog-fieldname = TOTAL_SUCSS'.

s_fieldcatalog-tabname = 'IT_COUNT_SUCC'.

s_fieldcatalog-seltext_m = 'Total Count '.

APPEND s_fieldcatalog TO t_fieldcatalog1.

CLEAR s_fieldcatalog.

*dESC

s_fieldcatalog-col_pos = '2'.

s_fieldcatalog-fieldname = 'DESC'.

s_fieldcatalog-tabname = 'IT_COUNT_SUCC'.

s_fieldcatalog-seltext_l = 'Status of

the E-MAIL'.

s_fieldcatalog-outputlen = '50'.

APPEND s_fieldcatalog TO t_fieldcatalog1.

CLEAR s_fieldcatalog.

ENDIF.

IF it_count_fail IS NOT INITIAL.

    • Get the fieldcatalog for the second block

  • * tOTAL

s_fieldcatalog-col_pos = '1'.

s_fieldcatalog-fieldname = 'TOTAL_FAIL'.

s_fieldcatalog-tabname = 'IT_COUNT_FAIL'.

s_fieldcatalog-seltext_m = 'Total Count '.

APPEND s_fieldcatalog TO t_fieldcatalog2.

CLEAR s_fieldcatalog.

*dESC

s_fieldcatalog-col_pos = '2'.

s_fieldcatalog-fieldname = 'DESC'.

s_fieldcatalog-tabname = 'IT_COUNT_FAIL'.

s_fieldcatalog-seltext_l = 'Status of the E-MAIL'.

s_fieldcatalog-outputlen = '50'.

APPEND s_fieldcatalog TO t_fieldcatalog2.

CLEAR s_fieldcatalog..

ENDIF.

IF it_count_succ IS NOT INITIAL OR

it_count_fail IS NOT INITIAL.

wa_events-form = 'TOP_PAGE'.

wa_events-name = 'TOP_OF_PAGE'.

APPEND wa_events TO it_events.

ENDIF.

IF it_count_succ IS NOT INITIAL.

v_tabname = 'IT_COUNT_SUCC'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = v_layout

it_fieldcat = t_fieldcatalog1[]

i_tabname = v_tabname

it_events = it_events[]

TABLES

t_outtab = it_count_succ.

ENDIF.

IF it_count_fail IS NOT INITIAL.

v_tabname = 'IT_COUNT_FAIL'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = v_layout

it_fieldcat = t_fieldcatalog2[]

i_tabname = v_tabname

it_events = it_events[]

TABLES

t_outtab = it_count_fail.

ENDIF.

**Display

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'

EXPORTING

i_interface_check = ' '

  • IS_PRINT =

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

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_PAGE

&----


  • text

-


FORM top_page.

break-point.

WRITE:/ 'PLAYSLIP REPOT ' COLOR 5.

ENDFORM. "TOP_PAGE

endform.

Please correct me where i went wrong , there by iam not able to getting the top of page. In debugging i can see that the Form top_page is not getting selected at all, even though i can see data in IT_EVENTS when 'REUSE_ALV_BLOCK_LIST_APPEND'

regards

divya.

Former Member
Not what you were looking for? View more on this topic or Ask a question