2007 Mar 15 7:40 PM
Hello all,
I have a ALV report using classes and methods. I want to include header details (Top-of_page) to this report. Sample codes, suggestions appreciated.
Thanks
2007 Mar 15 7:42 PM
2007 Mar 15 7:54 PM
perform top-of-page.
--
form top-of-page.
DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
--
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'REPORT FOR : '.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'MATERIAL DETAILS,'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'PURCHASE ORDER DETAILS,'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'SALES ORDER DETAILS.'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'A'.
WA_HEADER-INFO = 'GENERATED BY : SINDIRI SAIKIRAN '.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
--
WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = 'Date: '.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO WA_HEADER-INFO. "TODAYS DATE
APPEND WA_HEADER TO T_HEADER.
CLEAR: WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = ''.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
--
DESCRIBE TABLE I_OUT LINES LD_LINES.
LD_LINESC = LD_LINES.
CONCATENATE 'Total No. of Records Selected: ' LD_LINESC
INTO T_LINE SEPARATED BY SPACE.
WA_HEADER-TYP = 'A'.
WA_HEADER-INFO = T_LINE.
APPEND WA_HEADER TO T_HEADER.
CLEAR : WA_HEADER, T_LINE.
--
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'MIRACLE22_LOGO'
IT_LIST_COMMENTARY = T_HEADER.
ENDFORM. "TOP-OF-PAGE
<b>reward points if useful</b>