cancel
Showing results for 
Search instead for 
Did you mean: 

Wrap Text in table of SAPSCRIPT

Former Member
0 Kudos

Hi,

I need to display text in table of sapscript, it has to be wrapped within the cell of the table without crossing the table. Is there any method to handle this in sapscript.

Thank You

Rajesh

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

I had a similar problem with outputting text in our PO form

What I did was to create a new paragraph format called <b>WT</b>, where the left and right margins are the outer limits of where the text is to go. I also ticked the page protection box, but that's up to you.

Then the line is output in the Main window as follows

,,&ekpo-ebelp&,,&ekpo-matnr&,,<<b>WT</b>>&ekpo-txz01&</>

where ekpo-txz01 is the text to be output. You could try adding a length to the field if you need to.

Former Member
0 Kudos

Hi,

If you sure that text is not going to exceed beyond certain characters,

say 80 characters and you want to display 40 in first line & remaining 40 in 2nd line you can do it using offset,

say you want to display name in 2 lines

&name+0(40)& in first line

and &name+40(80)& in 2nd line.

Regards,

Raghavendra

Former Member
0 Kudos

Hello,

Proceed in following manner.

1.Display the text .

2.Then draw the box around it.

What i mean to say is the element which i displaying text should be first and then element which is drawing the table .

Check and let me know if u face any problem.

Regards

Former Member
0 Kudos

Hi Rajesh,

If u r using text from SO10, u can edit there itself to fit into window.

if u r using include i think there is no chance of editing or breaking the obtained text. u can use READ_LINES FM for this.

The other case is using READ_LINES FM in driver program.

In this cases one line cantains 132 chars. there u break it and use it in SCRIPT.

Regards,

Sanjeev

Former Member
0 Kudos

Hi,

If you display the text in a window..I believe it will automatically wrap it in the window..

Thanks,

Naren

Former Member
0 Kudos

Hello Rajesh,

The first thing you need to do is see how many characters can fit into the table. Based on that you can use the function module RKD_WORD_WRAP and pass the big line into it. That will break out the big line into smaller ones .

I hope this helps.

Thanks,

Kalyan