2006 Nov 13 1:41 PM
Hello Experts,
I am facing a problem when displaying the ALV heading.
I need the ouptu like this
Zusammenfassung:
Schätzpreis ungültiger Infosatz Anzahl Anteil(%)
Best. mit X - 10 10.5
Best. mit - X 10 10.5
Best. mit X - 10 10.5
Best. mit X - 10 10.5
But I am getiing the output like when I am concatnating the char fields:
Schätzpreisungültiger InfosatzAnzahlAnteil(%)
Best. mit X-1010.5
Best. mit X-1010.5
Best. mit X-1010.5
Best. mit X-1010.5
I have tried all sorts of concatenating options like separated by..
So please help me how to achieve the desired output.
Thanks in Advance,
Vasanth.M
2006 Nov 13 5:25 PM
Hi,
With REUSE_ALV_COMMENTARY_WRITE everything gets condensed so that you cannot have more than one space in the grid header - in the list header multiple spaces are shown.
If you do not unse REUSE_ALV_COMMENTARY_WRITE, you can pass a form routine for the online grid case with parameter I_CALLBACK_HTML_TOP_OF_PAGE:
form top_of_page using cl_dd type ref to cl_dd_document.
In this form methods of class CL_DD_DOCUMENT can be used to create den text output in HTML-format.
This allows for spaces.
Regards,
Clemens
2006 Nov 13 1:46 PM
hi,
just u sort that all field before passing that fields information in to that particulat function madhule.u sort information based on character field............
with regards.
m.srikanth
2006 Nov 13 1:48 PM
Hi,
Did u try using like below.
Concatenate A SPACE(3) B SPACE(3) to C.
Where A and B are variables which has data.
Regards
Rakesh
2006 Nov 13 1:48 PM
Hi,
as I learned today in the FAQs, concatenate will not remove spaces if they are included in string literals.
con catenate 'a' ` ` 'b' into c => a b
the back-quote ( `, french accent grave) encloses string literals and leading or trailing spaces are not removed from string literals. Normal single quotes (') are for character literals, ABAP removes eading or trailing spaces.
I think it's worth a try!
Regards,
Clemens
2006 Nov 13 1:50 PM
try using
concatenate....separated by ` `.
Note that these are not normal quotes. these are the quotes above the "TAB" key in your keyboard.
Regards,
Ravi
2006 Nov 13 1:51 PM
Hi Vinod,
I tested with this sample code,
data: v1 type char20 ,
v2 type char6,
v3 type char6,
v4 type char50.
v1 = 'Best. mit X -'.
v2 = '10'.
v3 = '10.5'.
concatenate v1 v2 v3 into v4 separated by space .
write: / v4.
and the output is <b>Best. mit X - 10<u></u> 10.5</b>, you could observe the space between them.
Hope may be you are doing some thing else.
Regards,
Raghav
2006 Nov 13 2:39 PM
Hello,
Thanks for the reply.
I need more than one space in the line
X - 10 10.5
I need the output like the above,
Vasanth
2006 Nov 13 2:48 PM
Hi Vasanth,
try with this code.
data: v1 type char20 ,
v2 type char6,
v3 type char6,
v4 type char50.
constants : c_space type abaptype value space .
v1 = 'Best. mit X -'.
v2 = '10'.
v3 = '10.5'.
concatenate v1 v2 c_space v3 into v4 separated by space .
write: / v4.
Regards,
Raghav
2006 Nov 13 2:57 PM
Hello Raghavendra,
If the write the variable after concatenating it will show the spaces. But when I am passing the same variable into the FM <b>REUSE_ALV_COMMENTARY_WRITE</b> Iam not able to see the space.
Vasanth
2006 Nov 13 3:38 PM
2006 Nov 13 3:58 PM
Hi Vasanth,
I dont think you will get more than one character of space.
DATA : V_SPACE(10) TYPE C.
CONCATENATE 'VIKRANTH' 'RAJESH' INTO V_CONCATE.
wa_comment-typ = 'S'.
wa_comment-key = 'USER :'.
wa_comment-info = V_CONCATE.
append wa_comment to it_comment.
output : vikranth rajesh.
but you will not get vikranth rajesh this many spaces.
Thanks
Vikranth Khimavath
2006 Nov 13 5:25 PM
Hi,
With REUSE_ALV_COMMENTARY_WRITE everything gets condensed so that you cannot have more than one space in the grid header - in the list header multiple spaces are shown.
If you do not unse REUSE_ALV_COMMENTARY_WRITE, you can pass a form routine for the online grid case with parameter I_CALLBACK_HTML_TOP_OF_PAGE:
form top_of_page using cl_dd type ref to cl_dd_document.
In this form methods of class CL_DD_DOCUMENT can be used to create den text output in HTML-format.
This allows for spaces.
Regards,
Clemens
2006 Nov 14 8:35 AM
Hello,
COuld anybody tell me how to use the parameter <b>I_CALLBACK_HTML_TOP_OF_PAGE</b> in the REUSE_ALV_GRID_DISPLAY fm.
and the use of the method CL_DD_DOCUMENT .
Thanks in advance.
Vasanth
2006 Nov 14 9:08 AM
Vasanth,
there is a useful sample program that should help you to start:
BCALV_TEST_FULLSCREEN_STRING
Use FORM HTML_TOP_OF_PAGE. Copy it to your program and modify according to your wishes. I did not try the multiple space thing but I'm convinced it works.
Regards,
Clemens
2006 Nov 14 9:25 AM
Hello Clemens,
I am using the sample report you have mentioned in ur previous post.
It works exactly as I need.
Thank You very Much.
Vasanth