06-13-2008 10:00 AM
Hi,
I am using function module 'reuse_alv_commentary_write' to display the header info in my report.
It is displaying header, however it is not displaying spaces between the words in a header line which i want to be displayed.
plz help.
Thanks,
Puja.
06-13-2008 10:01 AM
06-13-2008 10:30 AM
Hi Dhawan,
my report is showing header like this-
User Info:
User:158824
Run Date:06/13/2008
Run Time:14:53:25
Selection Parameters:
Balance Sheet Account:2100099
Posting Date:20080613
Document Date:20080613
Reversal Posting Date:20080613
where as i want to show it like this-
User Info:
User: 158824
Run Date: 06/13/2008
Run Time: 14:53:25
Do u have solution for this problem?
Regards,
Puja
Selection Parameters:
Balance Sheet Account: 2100099
Posting Date: 20080613
Document Date: 20080613
Reversal Posting Date: 20080613
06-13-2008 10:42 AM
Hi,
U can do one thing..
Give User, Run date , Run Time in key field like
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
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.
Here Date will be print in bold letter but here u can give space...
So in place of date give ur info like User, Run Date, Run Time and all that
reward if usefull..
06-13-2008 10:02 AM
06-13-2008 10:03 AM
Hi,
Please refer the code below:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
*-------------------------------------------------------------------*
* Form TOP-OF-PAGE *
*-------------------------------------------------------------------*
* ALV Report Header *
*-------------------------------------------------------------------*
Form top-of-page.
*ALV Header declarations
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.
* Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
* Date
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.
* Total No. of Records Selected
describe table it_ekko 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
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
endform.
Thanks,
Sriram Ponna.
06-13-2008 10:03 AM
Hi Use this code.
gs_line-typ = 'H'.
gs_line-info = 'Hi How Are You'.
append gs_line to alv_list_top_of_page.
gs_line-typ = 'H'.
concatenate sy-datum6(2) '/' sy-datum4(2) '/' sy-datum+0(4) into date.
gs_line-info = date.
append gs_line to alv_list_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = alv_list_top_of_page.
refresh alv_list_top_of_page.
Thanks
Nayan
06-13-2008 10:05 AM
hi
check this code
----
Form TOP-OF-PAGE *
----
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA: l_text TYPE sdydo_text_element,
ld_lines type i,
ld_linesc(10) type c,
R_AREA TYPE REF TO CL_DD_AREA.
CALL METHOD document->INITIALIZE_DOCUMENT.
CALL METHOD document->VERTICAL_SPLIT
EXPORTING
SPLIT_AREA = document
SPLIT_WIDTH = '60%'
IMPORTING
RIGHT_AREA = R_AREA.
concatenate 'Ex-Stock sales from' s_fkdat-low+6(2) '.'
s_fkdat-low+4(2) '.'
s_fkdat-low(4)
'to' s_fkdat-high+6(2) '.'
s_fkdat-high+4(2) '.'
s_fkdat-high(4)
into l_text separated by space.
CALL METHOD document->add_text
EXPORTING
text = l_text
SAP_COLOR = CL_DD_DOCUMENT=>LIST_HEADING_INT
sap_fontsize = cl_dd_document=>large
sap_emphasis = cl_dd_document=>strong.
CALL METHOD R_AREA->ADD_PICTURE
EXPORTING
PICTURE_ID = 'GMLOGO1'
WIDTH ='75'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
l_text = 'Complete Invioce'.
CALL METHOD document->add_icon
EXPORTING
sap_icon = 'ICON_LED_GREEN'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_emphasis = cl_dd_document=>strong.
l_text = 'Cancellation of Invoice / Credit Memo'.
CALL METHOD document->add_icon
EXPORTING
sap_icon = 'ICON_LED_RED'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_emphasis = cl_dd_document=>strong.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
describe table salesreg lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into l_text separated by space.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>large.
ENDFORM. "top_of_page
thnaks
sitaram
06-13-2008 11:17 AM
Hi Pooja
When we use give space (using spacebar) at the end , it will not be shown in the ALV header.
Instead use ' ' (space generated using ALT+255-type it correctly otherwise you will get ? ).
reward if useful