cancel
Showing results for 
Search instead for 
Did you mean: 

Script problem

Former Member
0 Kudos

Hi GURUS,

I am stuck with problem is script as I want to print text, which is longer than window length , word should automatmatically roll down to next line if no space is found.

How to do it?

HELP ME GURUS.

KK

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 (0)