04-12-2006 9:20 AM
Hi all,
I am using maktx in my report but it is a long field. I want first 10 characters in first line and then next line.
Is there any way to do that
Tina
04-12-2006 9:27 AM
Tina,
I feel what you are trying to make use of is called wrapping in SAP Scripts.
For putting a field of 40 char length as maktx in more than one line in a column which can accomodate 10 character, in the first line you need to use field0(10) in the first line at the position where you want to display it and in the next line at the same position you need to mention field11(10). This way you can do the wrapping of the text.
In this case it will be it_mat-maktx0(10) in the first line and it_mat-maktx11(10) in the second line and so on.
Make sure it is included in between && .
you can also use FM 'RKD_WORD_WRAP'. Pass the length of each line that u want and also the string containing the text, it will wrap it and pass it on to an internal table and to three export parameters as 3 lines of text (i.e if u feel that text will not cross more than 3 lines then u can directly get the wrapped texts from these export variables instead of getting it from internal table).
Hope it helps,
Suruchi
04-12-2006 9:27 AM
hi,
you can do it some thing like this...
<b>&maktx+0(10)&
&maktx+10(10)&</b>
something like this..
Regards
vijay
04-12-2006 9:27 AM
Tina,
I feel what you are trying to make use of is called wrapping in SAP Scripts.
For putting a field of 40 char length as maktx in more than one line in a column which can accomodate 10 character, in the first line you need to use field0(10) in the first line at the position where you want to display it and in the next line at the same position you need to mention field11(10). This way you can do the wrapping of the text.
In this case it will be it_mat-maktx0(10) in the first line and it_mat-maktx11(10) in the second line and so on.
Make sure it is included in between && .
you can also use FM 'RKD_WORD_WRAP'. Pass the length of each line that u want and also the string containing the text, it will wrap it and pass it on to an internal table and to three export parameters as 3 lines of text (i.e if u feel that text will not cross more than 3 lines then u can directly get the wrapped texts from these export variables instead of getting it from internal table).
Hope it helps,
Suruchi
04-12-2006 9:28 AM
hello Tina,
In script it is not possible if the field is not MAIN window.
You can use RKD_WORD_WRAP in you calling program and pass the variables to SAPscript.
Regards,
Naimesh
Reward points, if it is helpful..!
04-12-2006 9:29 AM
You have to break it up using offsets.. and print them in different lines
for ex: maktx+0(10)
maktx+10(30)...