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

String Manipulation

Former Member
0 Likes
430

Hi .

I got two strings that i need to concatenate. one is a name and other is a 7 digit number that i converted to a string format to be able to concatenate.

say:

string1 = geniusrain.

string2 = 1234567.

The thing is, i need to attach the 7 digit number starting on the 34th space.

When i use ordinary concat, it returns. geniusrain1234567.

but what i need is " geniusrain_______________________1234567 " . where _ is equivalent to SPACE.

Please help.

Thank you!

Edited by: geniusrain on Nov 11, 2009 2:05 AM

1 ACCEPTED SOLUTION
Read only

venkat_o
Active Contributor
0 Likes
396

Hi, <li>Do not use concatenate statement to do like that. <li>Try this way.


 REPORT ztest_notepad.
 DATA:str1(10) TYPE c VALUE 'Venkat'.
 DATA:str2(10) TYPE c VALUE '1234567'.
 DATA:data(42) TYPE c.
 data = str1.
 data+33(7) = str2.
 WRITE data.
Thanks Venkat.O

2 REPLIES 2
Read only

venkat_o
Active Contributor
0 Likes
397

Hi, <li>Do not use concatenate statement to do like that. <li>Try this way.


 REPORT ztest_notepad.
 DATA:str1(10) TYPE c VALUE 'Venkat'.
 DATA:str2(10) TYPE c VALUE '1234567'.
 DATA:data(42) TYPE c.
 data = str1.
 data+33(7) = str2.
 WRITE data.
Thanks Venkat.O

Read only

Former Member
0 Likes
396

hi!

thank you very much. that did it!!!

rewarded!