Skip to Content
avatar image
Former Member

output page no

Hello experts:

i use 'REUSE_ALV_GRID_DISPLAY' to output alv.

how to add the page no after printing the result.

the solution will be appreciated

thank u

Best Regards

Kevin

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 18, 2007 at 03:36 PM

    use function module 'REUSE_ALV_EVENTS_GET' .

    sample code is below ...

    DATA: W_EVENT TYPE SLSI_ALV_EVENT "LINE ITEM OF EVENT TABLE

    DATA: IN_EVENTS TYPE SLSI_T_EVENT . "Internal table containing events

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = IN_EVENTS[].

    READ TABLE IN_EVENTS WITH KEY NAME = 'TOP_OF_PAGE'

    INTO W_EVENT.

    IF SY-SUBRC EQ 0.

    MOVE 'sub_TOP_OF_PAGE' TO W_EVENT -FORM.

    MODIFY IN_EVENTS FROM W_EVENT INDEX SY-TABIX.

    ENDIF.

    Here the FORM ROUTINE 'sub_TOP_OF_PAGE' is being set up for the

    event TOP_OF_PAGE which will fire when the ALV LIST will be displayed ,This form

    will be called dynamically by th ALV LIST display during top_of_page event and for this the modified Events internal table has to be passed to the FM 'REUSE_ALV_LIST_DISPLAY' in the exporting parameter IT_EVENTS.

    in 'sub_TOP_OF_PAGE' you can write your customised code which will be fired for TOP_OF_PAGE event .

    and don't forget to pass the IN_EVENTS to IT_EVENTS ( import parameter of 'REUSE_ALV_GRID_DISPLAY' )

    Add comment
    10|10000 characters needed characters exceeded