04-16-2009 4:42 AM
Hi,
I am using ALV grid display and displaying the header with top-of-page.
The requirement is to have leading spaces in a line of header.
e.g.
Field1: xxxxxxxxxxxxxx
Field2:YYYYYYYYYYY
<space> <the new line should start from here>
For achieving this i am using SHIFT command before appending the record which requires leading spaces(3rd record in this case.)
When i checked it in debugger, i found that table also stores the record with leading spaces but
when data is written from table in top-of-page event leading spaces are not considered and
line whcih has leading spaces, starts from the beginning.
Is there any way to have leading spaces in HEADER of ALV.
Please suggest a relevant solution.
Thanks
Abhinav
04-16-2009 4:51 AM
04-16-2009 5:13 AM
Thanks for the rsponse.
But it doesn't solve my problem.
Actually, it is already implemented with non OO ALV.
So, if possible suggest something which can be done without using OO concepts.
Thanks
Abhinav
04-16-2009 5:16 AM
just pass html_top_of_page in CAPS into your FM it will work in non OO alv also..
create a form and insert the code which is in the post... and modify to you length and spaces..
04-16-2009 6:29 AM
hi
use this form it will work
FORM top_of_page. "#EC CALLED
Local variables
DATA :
wl_line TYPE slis_listheader,
tl_list_header TYPE slis_t_listheader,
l_cprog TYPE sy-cprog,
l_title TYPE sy-title.
CLEAR wl_line.
MOVE: sy-repid TO l_cprog,
sy-title TO l_title,
c_h TO wl_line-typ,
l_cprog TO wl_line-info.
APPEND wl_line TO tl_list_header.
CLEAR wl_line.
MOVE: c_s TO wl_line-typ,
text-t18 TO wl_line-key.
WRITE: sy-datum TO wl_line-info MM/DD/YYYY,
sy-uzeit TO wl_line-info+12(6) USING EDIT MASK '__:__'.
APPEND wl_line TO tl_list_header.
MOVE : c_s TO wl_line-typ,
text-t19 TO wl_line-key,
l_title TO wl_line-info.
APPEND wl_line TO tl_list_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = tl_list_header.
sy-subrc check not required
ENDFORM. " FORM TOP_OF_PAGE.
text-t18 text-t19 use u r won texts here.
~linganna