Skip to Content
author's profile photo Former Member
Former Member

select statement

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 06:10 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 05:21 AM

    Hi,

    Write:

    select f1 from tab1

    where f1 like '%WORD%.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 05:25 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 05:25 AM

    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...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.