Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Displaying text without breaking words..

Former Member
0 Likes
908

Hi,

i am printing a text on a sap script using the

field :BSEG-SGTXT. this is of length 50 characters.

i am printing it on 2 lines of 25 characters each.

is there any way / function module to ensure that

the words dont get cut while the text is bieng

displayed on 2 lines..?

Rgds

Ravindra

Hi,

i am printing a text on a sap script using the

field :BSEG-SGTXT. this is of length 50 characters.

i am printing it on 2 lines of 25 characters each.

is there any way / function module to ensure that

the words dont get cut while the text is bieng

displayed on 2 lines..?

Rgds

Ravindra

4 REPLIES 4
Read only

Former Member
0 Likes
682

Hi ravindra,

u can use the FM 'RKD_WORD_WRAP' to ensure the same...

use OUTPUTLEN as 25..

Read only

Former Member
0 Likes
682

1) Check with FM <b>HR_HK_STRING_INTO_2_LINES</b>

2)Or You can write a logic in your print program in order to check the last word around the 25th character and if it is splitting then add that word to the line 2.

rgds,

TM

Read only

0 Likes
682

Hi ,

<i>...check the last word around the 25th character and if it is splitting then add that word to the line 2.

...</i>

That's ok - but sometimes it's not possible without breaking word, when strlen of sgtxt is too big.

A.

Read only

Former Member
0 Likes
682

Hi,

you can try this way...

: BSEG-SGTXT+0(25)
: BSEG-SGTXT+25(50).

Regards

vijay