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

ALV.

Former Member
0 Likes
939

Hi,

When using the I_CALLBACK_TOP_OF_PAGE in ALV grid display where should I declare the perform for TOP-OF-PAGE?

Thanks,

Sandeep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
913

In that you have to pass the name of the existing routine.like ALV_TOP_OF_PAGE_SE in program LRHPPF06. Check the routine.

Otherwise you can write a similar routine with your own name in the same program....

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = CALLBACK_PROGRAM

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'ALV_USER_COMMAND_SE'

I_CALLBACK_TOP_OF_PAGE = 'ALV_TOP_OF_PAGE_SE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME = 'PERSQ_PROF'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE = ' '

  • I_GRID_SETTINGS =

IS_LAYOUT = L_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

*

Hi,

When using the I_CALLBACK_TOP_OF_PAGE in ALV grid display where should I declare the perform for TOP-OF-PAGE?

Thanks,

Sandeep.

7 REPLIES 7
Read only

Former Member
0 Likes
913

just write this

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

FORM   TOP_OF_PAGE.


ENDFORM.

Read only

Former Member
0 Likes
913

Hi,

If the caller specifies an EXIT routine, this routine must have the following form:

FORM top_of_page.

Module REUSE_ALV_COMMENTARY_WRITE can then be called within the EXIT routine. This module is responsible for formatting the header information and also ensures online HTML formatting. In the print preview or in batch mode, the text passed is then output in the normal format.

If module REUSE_ALV_COMMENTARY_WRITE cannot be used, you must use two parameters instead. In I_CALLBACK_TOP_OF_PAGE you pass the form routine that is responsible for normal formatting in batch mode or in the print preview mode. The form routine that is responsible for online formatting, is passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE. If one of these parameters is not filled, top-of-page is not output in the respective mode.

Thanks.

Read only

Former Member
0 Likes
913

Hi,

i_CALLBACK_TOP_OF_PAGE itself is a perform for top_of_page.

There's no need to write another perform.

Just call it in ur eventcatalog

Thanks.

Read only

Former Member
0 Likes
913

Hi,

The form can be created in program / include in which reuse_alv... FM is called. or any other include which is accessible to calling section.

Jogdand M B

Read only

Former Member
0 Likes
914

In that you have to pass the name of the existing routine.like ALV_TOP_OF_PAGE_SE in program LRHPPF06. Check the routine.

Otherwise you can write a similar routine with your own name in the same program....

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = CALLBACK_PROGRAM

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'ALV_USER_COMMAND_SE'

I_CALLBACK_TOP_OF_PAGE = 'ALV_TOP_OF_PAGE_SE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME = 'PERSQ_PROF'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE = ' '

  • I_GRID_SETTINGS =

IS_LAYOUT = L_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

*

Read only

Former Member
0 Likes
913

hi,

see below example,

data:

t_spfli like standard table of spfli.

DATA:

w_program LIKE sy-repid.

SELECT *

INTO CORRESPONDING FIELDS OF TABLE t_spfli

FROM spfli.

MOVE sy-repid TO w_program.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = w_program

I_CALLBACK_TOP_OF_PAGE = <b>'TOP_OF_PAGE'</b>

i_structure_name = 'SPFLI'

TABLES

t_outtab = t_spfli

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 status

&----


  • text

----


  • -->P_T_EXTAB text

----


FORM top_of_page.

<b> data:tbl_listheader type slis_t_listheader,

wa_listheader type slis_listheader .

wa_listheader-typ = 'S'.

wa_listheader-info = 'FLIGHT DETAILS'.

append wa_listheader to tbl_listheader.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = tbl_listheader.</b>

ENDFORM.

regards,

Naresh.

Read only

Former Member
0 Likes
913

hi,

when u call function module Reuse_alv_grid_display.

exporting.

programme =

fieldcat =

top-of-page = 'TOPOFPAGE'.

importing

t_output = internal table name.

exceptions.

form top_of_page.

wa_header-typ = 'H'.

wa_header-info = 'ALV Report'.

append wa_header to t_header.

clear wa_header.

call function module reuse_alv_commentary_write.

header = t_header.

---

endform.

if helpful please reward with points

Message was edited by:

Vinutha YV