05-05-2009 11:20 AM
Hi,
While using REUSE_ALV_COMMENTARY_WRITE is it possible to position the details at the header.The information which we give in header-key.Can we make it to be displayed at any position we want or will it be left alligned only.
For example,
GW_LISTHEADER-TYP = 'S'.
GW_LISTHEADER-KEY = 'UserName '.
GW_LISTHEADER-INFO = SY-UNAME.
APPEND GW_LISTHEADER TO GI_LISTHEADER.
CLEAR GW_LISTHEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GI_LISTHEADER.
Will Username be left alligned or can we postion and format it
05-05-2009 11:24 AM
05-05-2009 11:25 AM
Hi,
By default is left aligned only. You can give any postition kind of thing here. Forcefully if you want move it towards right, then probably using the space before kind of thing may be helpful.
I don't think alighment is possible.
Regards,
Santhosh.
05-05-2009 11:32 AM
Hi,
If you wish to format the text in the ALV header, like aligning and changing the font and size, you need to use HTML_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
Write a Subroutine with the name 'HTML_TOP_OF_PAGE' -
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
CALL METHOD document->add_gap
EXPORTING
width = '100'.
CALL METHOD document->add_text
EXPORTING
text = 'Your text here'
sap_style = 'HEADING'.
CALL METHOD document->new_line.
ENDFORM.
Check the attributes and methods of the class CL_DD_DOCUMENT for more text formatting.
Hope this helps.
Regards,
Himanshu
05-05-2009 12:40 PM
Hi,
Check this link
[link|https://forums.sdn.sap.com/click.jspa?searchID=25685847&messageID=7166145]
Hope it helps