Application Development 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: 

split a string into line

Former Member
0 Kudos

Hi Gurus,

I want to split a particular string into lines. I have a string concatenate by values separated by semicoloumn.While print this string in smartform have to print into several rows. but I dont know the exctact length of the field concatenated into a string. My requirement is to split the string into lines but each line have to end with semicoloum, that is all values have to end in a particlar line should not continue on a next line.

Foe eg:

Var1 = 'abcdef'

var2 = 'qwert'

var3 = 'asdfghjkl'.

String = var1;var2;var3.

in printform have to print in a line with length 20 means

Output should be in the below format:

line1 - abcedf;qwert;

line2 - asdfghjkl.

Even there is some space in line1 to hold var3, but i want it in a next line.

Thanks in advance.

Reagrds,

Bhuvana.

2 REPLIES 2

nabheetscn
Active Contributor
0 Kudos

You can use function module rkd_word_wrap function for the same pass output length as 20 and separator as ;.

Nabheet

Former Member
0 Kudos

Hi,

Check the below FM's with same functionality

RKD_WORD_WRAP

RSDG_WORD_WRAP

ALVDG_WORD_WRAP

@Nabheet, You are quick and I impressed