Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Formatting in SAP script

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

Tags:
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question