2007 May 08 9:51 AM
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.
2007 May 08 10:03 AM
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,
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.
2007 May 08 9:53 AM
just write this
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
FORM TOP_OF_PAGE.
ENDFORM.
2007 May 08 9:57 AM
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.
2007 May 08 9:58 AM
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.
2007 May 08 9:58 AM
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
2007 May 08 10:03 AM
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
*
2007 May 08 10:05 AM
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.
2007 May 08 11:23 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |