11-26-2007 8:48 AM
Hi,
I have a material Description as some XXXX YYYY ZZZZ I have to split this by four characters that is the four space inbetween should also get loaded into the variable is there any way to do this without using loop ..
Kindly help urgent...
Thanks in advance
11-26-2007 8:56 AM
Hi,
If you know the material description is going to splitted after every 4 characters every time then use offset, it will solve your problem.
eg, Material descrption = 'XXXXYYYYZZZZ'.
var1 = material description+0(4).
var2 = material description+4(4).
var3 = material description+8(4).
Regards,
SD
11-26-2007 8:56 AM
Hi,
If you know the material description is going to splitted after every 4 characters every time then use offset, it will solve your problem.
eg, Material descrption = 'XXXXYYYYZZZZ'.
var1 = material description+0(4).
var2 = material description+4(4).
var3 = material description+8(4).
Regards,
SD
11-26-2007 8:59 AM
data: var1(8) type c,
var2(8) type c,
var2(8) type c,
var1 = field+0(4).
var2 = field+4(4).
var3 = field+8(4).
11-26-2007 9:01 AM
Hi ,
Try This.
eg, descrption = 'XXXX YYYY ZZZZ'.
Desc1= description+0(5). '' XXXX "
Desc2= description+5(5). "YYYY "
Desc3 = description+10(4). "ZZZZ"
This will allow to get the spaces also.
Reward If useful.
Regards,
Chitra
11-26-2007 9:07 AM
data: sym(15) type c value 'XXXX YYYY ZZZZ',
var1(5) type c,
var2(5) type c,
var3(5) type c.
var1 = sym+0(4).
var2 = sym+5(4).
var3 = sym+10(4).
write: var1,var2,var3.