on 10-22-2007 11:49 AM
Hi friends,
I have a small requirement,
I have a string length of 30 char. i should split that string in such a way that first 18 char should be stored in one variable and remaining 12 char in another variable.
Plz help me out.
bye.
hi kamal....
try this program.....
DATA : str(30) TYPE c VALUE 'HARIMANJESH.ASHWATHM',
str1(18) TYPE c,
str2(12) TYPE c.
START-OF-SELECTION.
str1 = str+0(18). " Instead of this statement, u can also use <b>MOVE</b> Command.
str2 = str+18(2).
WRITE : / str1 ,
/ str2.
Reward me if useful.
Harimanjesh AN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
data : char(18) typec ,
char1(12) type c,
variable(30) type c. " in which you have the value
now
char = variable+0(18).
char1 = variable+18(12).
regards,
Venkatesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move string+0(18) to str1.
move strinf+18(12) to str2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.