cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT TEXT PRINT IN COLUMN

navin_khedikar2
Contributor
0 Kudos

Hi All

I would like to print TEXT (by using text id VBBP-0001-) , but in that text id 50-60 character's or more, and column width is only 20 chars , rest of the text is print in next line but not in same column. So please let me know how to print that text in same column.

Thanks In Advance

-Navin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

In script you have to check first how much space you have?

E.G. MAKTX requires 40 char sapace but if sapce is of 17 char then do this

l_len = strlen ( l_maktx )

if (l_len > 17)

CALL FUNCTION 'RKD_WORD_WRAP'

EXPORTING

textline = l_maktx

outputlen = '17'

IMPORTING

out_line1 = l_-maktx1

out_line2 = l_maktx2

OUT_LINE3 =

EXCEPTIONS

outputlen_too_large = 1

OTHERS = 2

.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

and now take this two variables to your script.

This FM is used as I wanted not to break any word inbetween , but exactly at the space.

Like ' ABAP PROGRAMMING IS GOOD'

will be taken as 'ABAP PROGRAMMING

IS GOOD'

If this doesnt work for you have break with offset.

Reward if helpful,

Thanks

Madhura

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

the only way to solve this is , u have to define two more line in ur script , and write like as,

&i1-f1(20)&,,&i1-f2&,,&i1-f3&

&i1-f121(20)&,,,,

&i1-f141(20)&,,,,

now it will come under one coloumn.

reward if helpful.

Former Member
0 Kudos

Declare a field with length7 or 80 ,

After u send the text into that parameter,and display

If helpful rewards me.

Former Member
0 Kudos

HI,

I could not understand your problem. Do you want to print all the text in rthe same line?

If that is the case , you are saying that your line will accommodate upto 20 characters right?

If possible increase the length of the window.

Regards,

Nageswar