‎2008 Mar 25 10:47 AM
I have a piece of code like below:
select * from zconfig into table i_zconfig where ZKEY = 'ZI2X11'.
if sy-subrc eq 0.
loop at i_zconfig.
split i_zconfig-zto at "," into table i_ordtyp.
loop at i_ordtyp.
write:/ i_ordtyp-ordtyp.
endloop.
endloop.
endif.
It shows a syntactic error in the split statement as:
"INTO" expected after "LOOP"
Please suggest!
‎2008 Mar 25 10:51 AM
HI,
use single quotes here.
split i_zconfig-zto at ',' into table i_ordtyp.
rgds,
bharat.
‎2008 Mar 25 10:51 AM
see the syntax below.
DATA: str1 TYPE string,
str2 TYPE string,
str3 TYPE string,
itab TYPE TABLE OF string,
text TYPE string.
text = `What a drag it is getting old`.
SPLIT text AT space INTO: str1 str2 str3,
TABLE itab.
otherwise u have to get the values in variable then...append that into a internal table..
Regards
Sugumar G
Edited by: Sugumar Ganesan on Mar 25, 2008 11:53 AM
‎2008 Mar 25 10:51 AM
HI,
use single quotes here.
split i_zconfig-zto at ',' into table i_ordtyp.
rgds,
bharat.
‎2008 Mar 25 10:52 AM
Hi,
Use single quotes
Regards,
Dhruv Shah
Edited by: Dhruv Shah on Mar 25, 2008 4:22 PM
‎2008 Mar 25 10:52 AM
Hi
i_ordtyp should be of type
data: begin of i_ordtyp occurs 0,
text(255),
end of i_ordtyp.
size of text may be any.
Regards
Aditya
‎2008 Mar 25 10:55 AM
use single quote ..
split i_zconfig-zto at ',' into table i_ordtyp.
‎2008 Mar 25 10:57 AM
Hi,
select * from zconfig into table i_zconfig where ZKEY = 'ZI2X11'.
if sy-subrc eq 0.
loop at i_zconfig.
split i_zconfig-zto at ',' into table i_ordtyp.
if i_ordtyp[] is not initial.
loop at i_ordtyp.
write:/ i_ordtyp-ordtyp.
endloop.
endif.
refresh i_ordtyp.
endloop.
endif.
‎2008 Mar 25 11:01 AM
‎2008 Mar 25 11:01 AM