‎2006 Dec 08 11:29 AM
Dear gurus,
i am having an input with 001, 002 in the same field (text) .
I want to seperate this field into two by identifyung the comma
i thas to be like this now
reason id = 001
counter = 002
How shall i do this with query
Thanx in advance
senthil
‎2006 Dec 08 11:35 AM
‎2006 Dec 08 11:31 AM
hi,
Use the Split command ,
split text1 at ',' into test2 test3.
Reagrds
Arun
‎2006 Dec 08 11:31 AM
SPLIT f AT g INTO h1 ... hn.
SPLIT NAMES AT ',' INTO ONE TWO THREE
‎2006 Dec 08 11:35 AM
‎2006 Dec 08 11:45 AM
hi ,
we can do this in 2 way.
<b>Easy way:</b>
using split command.
data: text1(11) type c value '100,200',
text2(5) type c,
text3(5) type c.
split text1 at ',' into test2 test3.
<b>Hard way:</b>
using offset.
data: text1(11) type cvalue '100,200',
text2(5) type c,
text3(5) type c,
len type i.
offset type i.
len = strlen( text1 ).
do len times.
if text1+sy-index(1) = ','.
offset = sy-index - 1.
text2 = text1+1(offset).
offset = sy-index + 1.
text3 = text1+offset(5).
endif