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

How to search char field data using wild card option with no casesenstive?

How to search char field data using wild card option with no casesenstive?

ex - if i give in search - a*

it should able to pick up all the records ..

ABAP

Abap

abap

abaP

i tried like this

ranges: r_name for kna1-name1.

r_name-sign = 'I'.

r_name-option = 'CP'.

if name is initial.

r_name-low = '*'.

else.

r_name-low = name.

endif.

append r_name.

but this is working fine for wildcard.. but how to extend this for with out case sensitive search?

thanks.

Murali.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2006 at 07:42 PM

    Hi Murali,

    Instead of using 'CP' in your ranges use 'CS' which is not case sensitive.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2006 at 07:40 PM

    Append one more record to your range with other case.

    Hope this helps.Use append inside the if and else condition itself.

    r_name-sign = 'I'.

    r_name-option = 'CP'.

    if name is initial.

    r_name-low = 'A*'.

    append r_name.

    r_name-low = 'a*'.

    append r_name.

    else.

    r_name-low = name.

    append r_name

    endif.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2006 at 07:44 PM

    If you want KNA1-NAME1, use KNA1-MCOD1 instead. It's NAME1 translated to uppercase (and shortened to 25 from 35 characters).

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2006 at 07:49 PM

    Hi Murali,

    You can check this thread

    select-options

    Sri.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2007 at 04:33 PM

    Hi Murali..

    Just to inform you that the wildcard you use on the selection screen is different from what you code..

    We use astrisk sign * in the screen like A* to find all words starting with 'A'.

    But when we code this in a SELECT query, we take '%' sign instead of *.

    WHERE name LIKE 'A%'

    Thanks and Best Regards,

    Vikas Bittera.

    **Points for useful answers**

    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.