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

select statement

Former Member
0 Likes
677

Hi

i have created one RFC. in that one import parameter is clientname. after giving the clientname i want to check the database table wheather that word contains in the database table of that field. how to write select satatement with contains.

please help me

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
655

Try this:

concatenate '%' import_parameter_name '%' into v_clientname.

select single f1 from table1 where f1 like v_clientname.

if sy-subrc = 0.

  • found

else.

  • not found

endif.

5 REPLIES 5
Read only

Former Member
0 Likes
655

Hi,

Write:

select f1 from tab1

where f1 like '%WORD%.

Read only

0 Likes
655

Hi vishal

its not working.

Read only

Former Member
0 Likes
655

hi,

select single * from table name where sy-mandt = xxxxx.

if sy-subrc = 0.

message i000(0) with 'User exists'.

else.

message i000(0) with 'User doesnot exists'.

endif.

Hope this is clear.

Thanks and regards

Read only

former_member195383
Active Contributor
0 Likes
655

suppose ztab is the database table....and wf_name is the parameter that u r passing.

select single namefield

into wf_namecheck from ztab

where namefield cs wf_name.

if sy-subrc = 0.

it is success..

Reward if useful...

Read only

Former Member
0 Likes
656

Try this:

concatenate '%' import_parameter_name '%' into v_clientname.

select single f1 from table1 where f1 like v_clientname.

if sy-subrc = 0.

  • found

else.

  • not found

endif.