‎2010 Feb 07 1:03 PM
Hi all,
I have a string as follows:
DATA: d(20) TYPE c,
d1 type string.
d = 'xy10007101'.
I want to get xy, 1000 and 7101 as seperate strings.Tried as follows but gives an error.
d1 = d - d(2).
How to get them seperately.
Also If i have declared 'xy10007101' as a string and If I wanted to use the "split" function ,how can I put a delimiter say ',' into the string and then later call the split function....
Thanks
P
‎2010 Feb 07 1:13 PM
Hi ,
this is very simple...instead of using the '-' sign use the '+' sign like
DATA: d(20) TYPE c,
d1 type string.
d = 'xy10007101'.
I want to get xy, 1000 and 7101 as seperate strings.Tried as follows but gives an error.
d1 = d - d(2).
d1 = d+0(2).
d2 = d+2(4).
d3 = d+6(4),
all the d1,d2,d3 are c type with the desired legth.
For Split.....press f1 you'll get the result...else use SPLIT d at ',' into d1 d2 d3 d4 .
Hope this will solve you problem.
Pooja
Edited by: Pooja Gupta on Feb 7, 2010 2:13 PM
‎2010 Feb 07 1:07 PM
Hi,
Click F1 on the word SPLIT. You will get the answer with many more examples.
Thanks,
Vinod.
‎2010 Feb 07 1:13 PM
Hi ,
this is very simple...instead of using the '-' sign use the '+' sign like
DATA: d(20) TYPE c,
d1 type string.
d = 'xy10007101'.
I want to get xy, 1000 and 7101 as seperate strings.Tried as follows but gives an error.
d1 = d - d(2).
d1 = d+0(2).
d2 = d+2(4).
d3 = d+6(4),
all the d1,d2,d3 are c type with the desired legth.
For Split.....press f1 you'll get the result...else use SPLIT d at ',' into d1 d2 d3 d4 .
Hope this will solve you problem.
Pooja
Edited by: Pooja Gupta on Feb 7, 2010 2:13 PM
‎2010 Feb 07 1:22 PM
Thanks pooja,1 more question
>>else use SPLIT d at ',' into d1 d2 d3 d4 .
But in my string I dont have the "," delimiter.So I have to put this delmiter to my string right?
How will I put it?
‎2010 Feb 07 1:45 PM