Wild card search in a FM

Hi experts,
I have a FM in which there is one table customer_name
It has fields as SIGN (type SIGN), OPTION (type OPTION), LOW (type name1_gp), HIGH (type name1_gp).
Now the user can give single value, or a range of values for the customer name.
I am familiar with the wild card search for a select option, but not sure how to apply that funda here.
For ex: If a customer enters the customer name as MG*, then all the names starting with MG should appear
in the output.
Similarly, if the user enters AP* in LOW and MG* in high, the corresponding output should be displayed.
Can you please help me out?
Thanks,
Ajay.

Hi,
Do like this
t_table-sign = 'I'.
t_table-option = 'CP'.
t_table-low = 'AB*'.
t_table-high = 'MG*'.
append t_table.
Use this in your select query.

Similar Messages

  • Wild card search in existsNode function

    Hi,
    How can i do a wild card search for the below data?
    I have a table as follows:
    ID VARCHAR2(32 BYTE),
    MESSAGE_TYPE VARCHAR2(64 BYTE),
    MESSAGE_CONTENT XMLTYPE,
    REJECTED_REASON VARCHAR2(256 BYTE)
    And Sample XML as:
    <?xml version="1.0" encoding="US-ASCII"?>
    <MessageEnvelope>
    <Header>
    <Partner>Renault</Partner>
    <MessageType>Release</MessageType>
    <PartnerMessageType>S74</PartnerMessageType>
    <MessageTime>2001-12-17T09:30:47.0Z</MessageTime>
    <LinkToRawMessage>String</LinkToRawMessage>
    </Header>
    <Body>
    <Release>
    <Addresses>
    <DealerDestAddr>ABCD</DealerDestAddr>
    <DestAddr>ABCD</DestAddr>
    <NextDestAddr/>
    <StartAddr/>
    </Addresses>
    <Assignment/>
    <ClientStatus/>
    <Dates/>
    <HoldInfo>
    <HoldCode>HoldTest</HoldCode>
    </HoldInfo>
    <Message/>
    <Partner>
    <OrderGiverCode>CMR00BCV</OrderGiverCode>
    </Partner>
    <ToDo/>
    <Transport/>
    <Vehicle>
    <VIN>W0LGDM9A_Ran11115</VIN>
    </Vehicle>
    </Release>
    </Body>
    </MessageEnvelope>
    I am executing the foll query:
    select * from t_xml x where x.message_type='DBLVEH' and x.MESSAGE_CONTENT.existsNode('//*[*="Release"]')=1;
    This gives me correct result.
    But i need to search *Rel and it should give me the desired result. How can i accomplish that?
    I tried the foll and it did not work:
    select * from t_xml x where x.message_type='DBLVEH' and x.MESSAGE_CONTENT.existsNode('//*[contains(*,"Re")]')=1;
    Regards,
    Sprightee

    sprightee wrote:
    Hi,
    How can i do a wild card search for the below data?I am not sure how this can be achieved using existsNode function but does following work for you?
    SELECT *
      FROM t_xml
      WHERE
        XMLExists(
          'declare namespace ora = "http://xmlns.oracle.com/xdb"; (: :)
           $d//*
             [ora:matches(text(), "Re*")]'
          PASSING MESSAGE_CONTENT AS "d");

  • Case Sensitive problem in Select Option for wild card search

    Hi,
         Can anyone please let me know how to make the wild card search in any select-option non case-sensitive. What I mean by this is for eg. we want to find out all the POs with short text containing the word  'process', what we do we populate a range with OPTION = 'CP' and LOW = 'process' and select EKPO with short text in this range. This select is however case-sensitive and POs with short text containing 'Process' is not retrieved. But my requirement is that this should be non case-sensitive and both the POs should be in the result set.

    Hi,
    Hope this helps you
    CS:
    You can select characters in operand2 for a direct comparison by adding the escape symbol "#" before the required characters. For these characters, upper/lower case is taken into account, wildcard characters and the escape symbol itself do not receive special treatment, and trailing blanks in operands of type c are not cut off.
    Covers Pattern: True, if the content of operand1 fits the pattern in operand2. Wildcard characters can be used for forming the operand pattern, where "" represents any character string, and "+" represents any character. Upper/lower case is not taken into account. If the comparison is true, sy-fdpos contains the offset of operand2 in operand1, whereby leading wildcard characters "" in operand2 are ignored if operand2 also contains other characters. If the comparison is false, sy-fdpos contains the length of operand1.
    Regards
    Krishna

  • Regarding wild card search in oralce

    I am facing one problem,
    I am using wild card search based on LIKE condition, that search is got used for searching purpose through a user interface.
    the query is like below
    SELECT /*+driving_site(a)*/ A.ID,A.CO_ID,B.NAME,A.CITY,A.state FROM mv1 a,mv2 b WHERE a.id=b.id and nvl(b.name,'x') like '<variable>%' and nvl(a.city,'x') like'<variable>%'  and a.state like'%' ;
    where user can input any one or may two or three parameters for search.
    The problem is in response time because mv1 and mv2(materialized view) contains crores of records(around 3.5 crore )
    I am able to search it with city and state but when I am trying by name I am not not getting response for that query.
    Each where clause is indexed propely even functional index i put there and analyzed also , by explain plan i am able to reduce the cost but im not able to get proper response. I welcome all your suggestions as this is reallly a crucial for me to get that search faster....
    Thanks in Advance
    Edited by: user13104802 on Jul 31, 2010 6:31 AM
    Edited by: user13104802 on Jul 31, 2010 6:31 AM
    Edited by: user13104802 on Jul 31, 2010 6:33 AM

    I welcome all your suggestions as this is reallly a crucial for me to get that search faster....You might want to explore Oracle Text (Index).
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:415419367128
    http://www.oracle-base.com/articles/9i/FullTextIndexingUsingOracleText9i.php
    What is your database version? (the result of: select * from v$version; )
    That'll determine what other pointers we can give you.

  • Wild card search using %

    I have a question on wild card searches. I am currently doing a like behind the scenes to look for a string inside a string...
    However, if the user wants to put in a wild card like 'AP%Report%'... I would like to return all the ones that begin with AP and have Report in them- is that possible using APEX? I currently do not get any records as the % is considered literally. As our users are used to Oracle, we will have users who will key in a % during the search and we need this to work!
    Can anyone please help me with this?
    Thanks!
    Ramya

    Thanks for your quick response, Tony!
    Its a standard report not interactive... version is 'Application Express 4.0.2.00.07'
    Below is the complete query,
    select * from (
    select report_id
    , (SELECT report_type_name FROM xxnf.xxnf_apex_rr_report_types t WHERE t.report_type_id = xxnfarr.report_type_id) report_type
    , Category
    , report_name
    , report_desc
    , image Sample
    , last_used
    , link
    , sample_url
    , decode(sample_url, NULL, 'http://common.newfield.com/images/misc/blank.gif','http://common.newfield.com/images/misc/Sample.gif') sample_icon
    , (select resp_group_name FROM xxnf.xxnf_apex_rr_resp_groups t WHERE t.resp_group_id = xxnfarr.resp_group_id) contact
    from
    xxnf.XXNF_APEX_RR_REPORTS xxnfarr)
    where (
    instr(upper("REPORT_TYPE"),upper(nvl(:P11_REPORT_SEARCH,"REPORT_TYPE"))) > 0 or
    instr(upper("REPORT_NAME"),upper(nvl(:P11_REPORT_SEARCH,"REPORT_NAME"))) > 0 or
    instr(upper("REPORT_DESC"),upper(nvl(:P11_REPORT_SEARCH,"REPORT_DESC"))) > 0
    or
    instr(upper("CATEGORY"),upper(nvl(:P11_REPORT_SEARCH,"CATEGORY"))) > 0
    Hope I answered all your questions.. On why I am doing this instead of a LIKE.. I could not get it working with a LIKE and had to pull this code from one of the sample applications... Hope that makes sense!
    Ramya

  • Wild card search and multiselection in dashboard prompt????

    Hi all:
    Actually, I want to make dashboard prompt that filters the customer code, user can select more than one code at a time. But there is one more requiremnet that is, If user wants to find customer code in report than it just write the code or part of code ("like wild card search"). I want these two works in one dashboard prompt. If there any possiblity to do like this. Please help me to create this type of dashboard prompt. Thanks
    Ali

    Hi Ajith,
    István is correct, wild card '*' is readily available for any Item name, BP name or other searchable fields.
    Thanks,
    Gordon

  • Wild card search enabling in ABAP QUERIES

    Hi All
    How is it possible to enable <b>wild card search</b> for the <b>selection-fields</b> of <b>ABAP Queries</b>, any help in this regard will be credited
    Thanks
    Sudhir.

    Are you asking about wild card search in SELECT statements?
    The following is the help on wild card search in SELECT statements
    ... WHERE CITY LIKE '%town%'.
    This condition is true if the column CITY contains a string containing the pattern ‘town’.
    ... WHERE NAME NOT LIKE '_n%'.
    This condition is true if the column NAME contains a value whose second character is not ‘n’.
    ... WHERE FUNCNAME LIKE 'EDIT#_%' ESCAPE '#'.
    This condition is true if the contents of the column FUNCNAME begin with EDIT_.

  • EIC: Employee search - wild card search with personnel number

    Hi,
    The employee search functionality in EIC employee-search screen allows to search an employee through wild card search. We had set up this and everything was working fine, but suddenly the functionality to search an employee by giving part of personnel number as wild card search is not working, surprisingly other search criteria are listing employee list. For example, if i need to search an employee with personnel no 30000111, then i can give 30* in search criteria and employees starting with 30XXXXXX would be listed. This is the functionality not working at the moment.
    Can anybody please help - what could be the probable cause or where should i look to fix this? Any documentation in this regard would really be helpful.
    Thanks in advance.
    Sujit

    hi,
    Probably u can set a debug point in the bsp application and ask your abaper to debug the same.
    check if any patch application has been done after you saw the functionality working fine.
    Regards
    Sameer

  • Wild card search option

    Is the Wild card search option availble in flex.

    "lalithninan" <[email protected]> wrote in
    message
    news:g6ubfe$sdd$[email protected]..
    > Is the Wild card search option availble in flex.
    Look at regular expressions

  • Wild card searches

    I have created a form that searches a table based on radials drop downs and text boxes, works ok. However the text box is used where there are too many options to be used by other methods.
    Is there any way to automatically place a hidden % wild card at the front and end of the text box? I'm trying to permit users to be able to enter a part of a name in order to search for records.
    Kinda like
    record is The Ramones
    User can type in Ramon and it will still return all records that has Ramon within its title

    Scott,
    I have a related question on wild card searches. I am currently doing a like behind the scenes as you have suggested.
    However, if the user wants to put in a wild card like 'Sc%t%'... I would like to return Scott - is that possible using APEX? I currently do not get any records as the % is considered literally.
    Can anyone please help me with this?
    Thanks!
    Ramya

  • Wild card searching in sql squery (pl/sql function body returning......)

    Hi,
    I've a report based on a sql query (pl/sql function body returnin a sql query).
    One of the statements is
    select .. from ...
    where name_of_person = :P17_NAAM
    I like to built a wild card possibility (with like '%l%m%') to show all persons with in their name an l, and an m (after the l)
    how to modify this statement?
    any reaction will be appreciated.
    Leo

    Leo,
    If I understand you correctly, you want to let the user type the value without wild cards, and than to add them programmatically. If that's the case, here is what you can do:
    1. Create a new item, say P17_HIDDEN_NAAM, that will contain the actual search criteria
    2. Modify your pl/sql to:
    begin
      :p17_hidden_naam := null;
      for l_i in 1..length(:P17_NAAM)
      loop
        :p17_hidden_naam := :p17_hidden_naam || '%' || substr(:P17_NAAM, l_i, 1);
      end loop;
      :p17_hidden_naam := :p17_hidden_naam || '%';
      return
        'select ..
           from ...
          where name_of_person like :p17_hidden_naam';
    end;By the way, I think that it's much better to train your users to use wild cards than to do it in the program.
    Sima

  • How to wild card search in ABAP

    Hello,
    I have user input and i am saving in variable.
    input = userinput.
    Now I want to select wild card values based on user input. I cont hardcode the userinput.
    SELECT field1
                  field2
    FROM TABLE
    WHERE field4 LIKE '%INPUT%" is taking INPUT hardcoded but not as variable.
    Please help.
    Thanks in advance.

    hi
    If your user input it just one variable  like paramter(on screen)
    then
    Select Field1
    Field2
    From XXXX
    INTO Table XXXX
    Where Field4 = input(Input variable).
    IF your input is range then you can do this
    Select Field1
    Field2
    From XXXX
    INTO Table XXXX
    Where Field4 in Range (Input range variable).
    Hoping this helps.
    Regards,
    Komal

  • How to make wild card search for a file using utl_file

    Hi Everyone,
    I want to write to a table from flat file.im using 9i release 2. can i perform filename* (wildcard) search n write to the matching files.
    Regards
    Manish

    Sorry can i write from those files which matches the search criteria i mean the wildcard search
    for e.g COVhj*

  • Hi everone wild card search

    i am new to java .
    in a table i have client name fields ................when i open a search window i need to get all client names starting with A,B..............
    and the search window should open when i press F4 key can anyone send code

    The thing you're looking for is called "ajax suggest" or "ajax autocomplete".
    Googling with those keywords will provide useful information:
    http://www.google.com/search?q=jsp+ajax+suggest
    http://www.google.com/search?q=jsp+ajax+autocomplete

  • Using a * in a wild card search

    Hello again,
    I am doing a search, I was going to use the instr function, but I figured it would be easier to replace the * with a % and let oracle do the rest
    ie
    the string jag1969
    would be caught by the following:
    jag*
    *1969
    jag
    jag1969
    but replace(p_QuoteID,'*','%'); does not work...

    I'm really sorry N. Gasparotto, but I'm a bit lost on your code. I'm relatively new to PL/SQL.
    I guess what I'm saying is that there are loads values in the column p_QuoteID
    p_QuoteID
    jag1969
    mer1916
    bmw1950if a user comes along to the textbox and enters in any of the following:
    jag*
    *1969
    jag
    jag1969
    the output for any of the above searches would display jag1969, except * which would show all of them.
    I get this:
    PLS-00221: 'REPLACE' is not a procedure or is undefinedon the line replace(p_QuoteID,'*','%');I figure if I swap the * for a % then I could do something like:
    thissql := thissql || 'and quo.QUOTEID LIKE '|| p_QuoteID ||' ';instead of
    thissql := thissql || 'and quo.QUOTEID LIKE ''%'|| p_QuoteID ||'%'' ';(the %'s would now be part of the string, and in the right position (ie what the user entered)
    User enters jag*, but the code above would now be jag% and I can use the Like statement with that.)

Maybe you are looking for