‎2008 Sep 02 11:37 AM
HI experts,
I have a string with 150 lenth ,i ahve to split or offset this string into two parts, with 75, 75 lenths,
please give me an idia on this.
thanks in advance.
Radhakrishna
‎2008 Sep 02 11:38 AM
‎2008 Sep 02 11:39 AM
‎2008 Sep 02 11:40 AM
hii
you can use offset here.like
w_final = wa_str1+0(75).
w_final1 = wa_str1+75(75).
regards
twinkal
‎2008 Sep 02 11:41 AM
You can use the offset in a similar way it is used for char fields.
move text+0(75) to text1.
move text+75(75) to text2.
I think it will solve ur problem .
‎2008 Sep 02 11:41 AM
Use Offset, as it allows u to split at particular character length.
where as split , splits the word at any occurance of a character which u specify in syntax.
So use Offset.
‎2008 Sep 02 11:41 AM
‎2008 Sep 02 11:41 AM
Hi,
try this....
data : str1(75) type c,
str2(75) type c,
str(150) type c.
str1 = str+(75).
str2 = str+76(75).
write : str1,str2.
‎2008 Sep 02 11:44 AM
Hi Radhakrishna,
Use this:
data: var1 type string,
var2 type string.
var1 = str+0(75).
var2 = str+75(75).
Hope this will help.
Regards,
Nitin.
‎2008 Sep 02 11:51 AM
‎2008 Sep 02 11:57 AM
hi ,,
data : n type n value '75'.
split wa_str at n into wa_str2 wa_str3.