Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Split string into a range table directly ?

Former Member
0 Likes
1,589

Hi,

I got this error message that:

"R_SSCODE" does not have the structure of a selection table.

AnyWay: Is there a way to split a string into a range table (selection table) directly. The SIGN/OPTION should be working with the IF statement.

//Martin

data: l_test type zhen_config-SERVICE_CODE.

data: l_tmp type string.

data: r_sscode type table of char4.

data: my_code type char4.

my_code = 'Z033'.

select single SERVICE_CODE

from zhen_config

into l_test

where ID = '1'.

split l_test at ',' into table r_sscode.

if my_code in r_sscode.

write my_code.

endif.

1 REPLY 1
Read only

Former Member
0 Likes
617

Is your both table Structures matched ?

data: l_test type yh002-value.

data: l_tmp type string.

data: r_sscode type yh002-value occurs 0 with header line.

select single value

from yh002

into l_test

where control = 'URL'.

split l_test at ',' into table r_sscode.

Rgds,

Jothi.