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

How to add * wild card to a specific field on the selection-screen.

Hello,

How to add a * WIld card to a field in selection screen.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : S_STCTS FOR G_STCTS OBLIGATORY, "NUMBER SCHEME

S_AT20A FOR G_ATTR20A, "SUBSTANCE ID

SELECTION-SCREEN END OF BLOCK B1.

I need to add Wild card functionality to Number scheme field S_STCTS on selection-screen.

Any suggestions would be apprecaited..

Regards,

Kittu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 17, 2008 at 06:56 AM

    Hello,

    Try this code:

    INITIALIZATION.
      S_STCTS-sign = 'I'.
      S_STCTS-option = 'CP'.
      S_STCTS-low = 'HU*'.
      APPEND S_STCTS.
    

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2008 at 06:57 AM

    Hi Kittu,

    Here is one sample code:-

    select-option : s_name like kna1-name1.

    start-of-selection.

    if s_name-low = '*'.

    select * from kna1 into table it_kna1.

    elseif s_name-low = 'pat*' or s_name-low = 'pat'.

    select * from kna1 into table it_kna1 where name1 like 'Pat%'.

    endif.

    In case of wild card Select should be :-

    select * from <dbtab> where <field> like 'P%'.

    You can also use RANGES in your Code.

    E.g. RANGES: R_OBJNR FOR JEST-OBJNR

    R_OBJNR-SIGN = 'I'.

    R_OBJNR-OPTION = 'CP'.

    R_OBJNR-LOW = 'K1*'.

    R_OBJNR-HIGH = 'K2*'.

    Hope this helps.

    Thanks & Regards

    Jitendra Gujarathi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:07 AM

    Hello,

    Thank you very much for your response!

    Suggestions were really helpful....

    Regards,

    Kittu

    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.