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
839

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
817

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.

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

5 REPLIES 5
Read only

Former Member
0 Likes
817

Hi,

Write:

select f1 from tab1

where f1 like '%WORD%.

Read only

0 Likes
817

Hi vishal

its not working.

Read only

Former Member
0 Likes
817

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
817

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
818

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.