Purpose of using wild cards in SAP-ABAP

what is the purpose of using the following in ABAP programs.
In my case these naming convention are used in Reports * (Custom Programs)
1> tables: *nast.
why we use * before the table name?
2> Data:  %var1 type mara-matnr,
What for this % is used to declare the variable. what effect it will have?
              %%var1 type marc-werks.
this kind of declaration is also used, what purpose?
3> Perform %<form-name>.
A sub routine is called with the above kind of syntax, what purpose?
Please help me to find what purpose they are used?
Message was edited by:
        VK AJAY
Message was edited by:
        VK AJAY

HI,
WILDCARD characters which are used for comparisions with character strings & numeric strings.
Refer samplecode:
Example to select all customers whose name begins with 'M':
DATA SCUSTOM_WA TYPE SCUSTOM.
SELECT ID NAME FROM SCUSTOM
       INTO CORRESPONDING FIELDS OF SCUSTOM_WA
       WHERE NAME LIKE 'M%'.
  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME.
ENDSELECT.
Example to select all customers whose name contains 'huber':
DATA SCUSTOM_WA TYPE SCUSTOM.
SELECT ID NAME FROM SCUSTOM
       INTO CORRESPONDING FIELDS OF SCUSTOM_WA
       WHERE NAME LIKE '%huber%'.
  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME.
ENDSELECT.
Example to select all customers whose name does not contain 'n' as the second character:
DATA SCUSTOM_WA TYPE SCUSTOM.
SELECT ID NAME FROM SCUSTOM
       INTO CORRESPONDING FIELDS OF SCUSTOM_WA
       WHERE NAME NOT LIKE '_n%'.
  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME.
ENDSELECT.
Reward points if this Helps.
Manish

Similar Messages

  • Using wild card with Captivate 5 ( fill in the blank)

    I am training software package that requires many fill in the blanks besides the login screeen.  If I were to recording the actions using Captivate 5 record, I think,  I can only use a demonstration recording as oppsed to having my students interact with the product by filling in the blank. For example, my product asks for a login. When I login to demonstrate how it should be done, the product reponds correctly.  By my student is limited to watching as opposed to interacting.  While login is not such a big deal, there are several other areas where the same concept applies.  Ideally, I wish to use wild cards in fill in the blank so that any name or information can be used to interact with Captivate and move the slide along.    Is this possible, and if so, how?

    I think Lilybiri may be misinterpreting your use of the term "wildcards" to mean using them in the programming sense.
    Perhaps you are referring to the characters that appear in a typical Password field to hide what the user is actually typing?
    If so, the text field object in Captivate has an option to use these password characters so that the user's typing characters are hidden.  The characters used are asterisks, which are what some people refer to as wildcard characters.

  • How to use wild card with variable in powershell

    HI
    i am trying to use wild card with variable but getting an error message, "You cannot call a method on a null-valued expression."
    $src = 'C:\Temp'
    $TabletzipPath = $src + "tab*.zip"
    i would like to copy the tablet zip file which is placed in in $src to be copied in $TabletzipPath.
    i am using tab* because this file name changes continuously. so if i give a fix name for example tablet1.zip than it works fine.

    Not sure if the wildcard will work without seeing how you're using the variable.
    That said, I can say that it looks like you're missing the backslash between the $src path and the wildcard filename. As-is the above code assigns a value to $TabletzipPath of "C:\temptab*.zip" instead of what you are likely expecting ("C:\temp\tab*.zip")
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • Open file using wild cards

    does anyone know how to open a file using wild cards in the name.
    For example, a certain folder will contain a number of files, with the name constructed as follows:
    CALDB_ then a 6 digit serial number, and then 14 characters which could be ANYTHING.  so it might look like this
    CALDB_123456_33KA1234567890.txt
    or
    CALDB_123457_33KA1234567890.txt
    The key part of the file name is the 6 digit serial number which is unique, and the CALDB_ which is always the same.
    I would like to use a file open command with the file name something like  CALDB_123456_*.txt, but it doesn't appear to work. 
    Can anyone help?
    Thanks
    Solved!
    Go to Solution.

    Hi Dylan,
    I have been searching along our forum, and found a similar question for using wildcards in selecting files. An active user (unclebump) replied on this request with a VI, with which you can select a folder on your computer which is scanned for certain files. I've adjusted this VI for selecting the CALDB_* files. Enclosed you will find this file (zipped) including my test folder.
    Maybe this will be helpfull for your application.
    Best regards,
    Peter Schutte
    Message Edited by Peter S on 10-14-2008 03:22 AM
    Attachments:
    File selecting.zip ‏12 KB

  • How to use wild card character in input field

    Hi
    I'm creating model in which the Purchase Order information need to be entered in Input Field.
    My requirement is search using wild char char as '*'
    Let say in input field  i gave PO order as 20* then it'll search for all the PO's which starts from 20.
    Could you please share some documents/guidelines, for this issue
    Thanks and Regards
    Puneet

    Hi,
    You can use the wild card char in the input box.please try  below steps.
    1.Check whether the input string has ' * '  char using "CONTAINS(text,pattern)" operation.
    2.If yes, Replace the ' * ' with space by "REPLACE(text,pattern,repstr)" operation.->consider this result as input2
    3.Now , Have a Filter from ur webservice(which gives your Purchase Order information )
    and filter it by the condition " BEGINS(WSField,input2)"
    the Final expression in the filter will be "_=IF(CONTAINS(input,""),BEGINS(HelpWSField,REPLACE(input,"\","")),true)_"
    Hope it helps.
    Regards,
    Priya
    Edited by: priya on May 20, 2009 12:49 PM

  • Why use filters in BADI (SAP-ABAP) when same can be achieved using paramete

    Hello Experts!
    I am a newbie in SAP and this might be a very basic question so, i am sorry for that!
    I was wondering, what is the use of "filters(flt_val)" in BADI (SAP-ABAP) ?
    I guess we can achieve the same using parameters ?
    I know that we can pass structure as flt_val, thus reducing the no. of parameters sent. I also read about sending country and things like that to our BADIs to behave differently based on that.
    (i.e. say tax rates differ from country to country so may be we can set tax rate of GB to 16 or something..)
    but still i am confused about the significance of Filters.
    I will be grateful, if anyone could answer this one...
    Thanks in advance!!!
    Rgds,
    Mayur

    Hello Mr. Venu,
    Thanks for your answer. It helped somewhat, but it's not solved the doubt to 100%... 
    Please let me ask you for some more information on this one and please correct if i am wrong: -
    Suppose, there are 10 company codes that we need to handle, so as you said, we have 10 implementations of the BADI.
    We decide to use company code as filter. We have 10 different implementations of BADI, which are deveoped
    by 10 different teams(or 10 members of the same team etc..). 
    This will have 10 different Active implementations of our BADI. and based on the filter, respective impls are called.
    Is this right or wrong?
    If right, then why not use parameters instead? They can do the same!
    If wrong, i am sorry, but could you elaborate about the mistake?
    Thanks again,
    Mayur.

  • 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

  • EBS-  How to map search string using wild card

    Hi Gurus
    I got two similar string on bank statement which needs to be mapped to two different posting rules.
    MV-WORLDPAY- 1805 MOTO
    MV-WORLDPAY -1805 WEB
    in above string 1805 could be any no,( it is not fix no). I have tried using different wildcards and symbols like
    +,*,?,# but it is not piciking the right posting rule, also search string use is also activated. so please guide me.
    Many Thanks
    Sam Rathod.

    Hi
    Try keeping the 1st two digits of search string as b;ank. i.e. ############ (12 digits) mapped to __##########. I used underscore to denote balnk space. Using this when you recevie say 000000001618 (12 digits), it will be mapped to 0000001618 (10 digits). Then your interpretation algo will use this 10 digit number.
    Thanks
    Nikhil

  • Using Wild Card % in the IF condition of RTF templates

    Hi every one, we have a requirements to make bold whenever COL1 ends with Total. Below logic is not working. Can any body help?
    Thanks in advance.
    <?if@row:COL1like '%Total'?> <xsl:attribute name="font-weight" xdofo:ctx="incontext">bold</xsl:attribute><?end if?>
    -Phani Reddy
    ADP india,
    [email protected]

    You can do these
    <?if@row:contains(COL1,'Total')?> <?end if?>
    or
    <?if@row:ends-with(COL1,'Total')?> <?end if?>

  • 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 Selection in BEX

    Hi Gurus,
    I am trying to use the wild cards in Query in  the selection screen . I have created a variable of type " Selection Option ".
    Now when I execute the report it is giving a box before the input box, and when I select * from that box and executing the query, I am not getting the required results.
    From ex: when i give : G19  in input box  with * in the box before the input box  , it is displaying as "No Applicable Data Found. " , even though data is present for G197.
    Can some one explain me how to use wild cards in query.
    Thanks in advance,
    Ananya

    Check this:
    Wild cards in Select-options and Parameters
    how to enable wild search(*) on a query variable
    Note: That feature is not available in BI 7.0.
    It works only with BW 3.x queries.
    Re: Using wild card * in the selection screen
    /message/2983877#2983877 [original link is broken]
    Re: Wild Card Selection in BEX
    Hope it helps..
    Edited by: ashok saha on Mar 18, 2008 8:54 PM

  • 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

  • Wild Card issue

    Hi,
    I have a noticed a weird thing with wild cards in sap standard table PROJ.
    We have entries for 23* , 24* & 25* in SAP table PROJ. When I try these individually everything is working as required.
    When I enter 23* to 24* i am getting all entries for 23* and 24*...
    but when i try 23* to 25* I am not getting entries with 25..* but i am getting 23* & 24*.
    I thought it issue would be with conversions exit from user parameters.. I tried uncheck and check it is not working.
    What is wrong here?
    Rgds
    vara
    Edited by: Vara K on Mar 2, 2009 6:23 PM
    Edited by: Vara K on Mar 2, 2009 8:13 PM

    I tried 24* to 25* -I am only getting 24* records....
    I tried 23* to 24* -I am only getting 23* records....
    I tried 23* to 26* -I am getting 23, 24  & 25* records....So it is chopping off last selection.
    rgds
    Vara

  • Wild card prompt

    Hi ,
    Can u give the difference between wild card and multi select prompts.
    THANKS!

    user,
    Multi select prompt is vice versa of drop down functionality i.e. In multi select prompt you are provided with a capability to select multiple values.
    I did not hear of wild card prompt in OBEE. But what I assume is you can search using wild card characters within Multi select prompt.
    Open the multi select prompt, within the pop-up window you have like, begins with, etc. thus based on your need use _(underscore) to search.
    J
    -bifacts
    http://www.obinotes.com

  • Wild cards in custom views

    Is there a way to use wild cards in the sql in custom views in Discoverer? We can allow a parameter in the actual report but one of the tables we're using has term effective dates instead of actual term dates so we need to pull info from the term effective date prior to the term we're reporting on.
    We've created a table that updates a view that allows the user to fill in the term they're interested in, but our users find that too cumbersome.
    Thanks,
    Janet

    One method that I've recently come across - and like a lightbulb when you see it - is to have the first worksheet ask for parameters. Then a function is called that uses the parameters to write results to a table and voila, the next worksheet simply reports on that table's value.
    You also can pass parameters from you workbook to the EUL, but it's not trivial. It's been well documented on this forum.
    As for using wild cards in the SQL of a custom folder - have you tried it? I've never had to do that - and may be corrected - but on the surface, can see no reason why a custom folder using a '%" in the condition shouldn't work.
    Russ

Maybe you are looking for

  • No longer syncs with iCal

    Since upgrading to itunes 7 and updating the ipod software, my ipod no longer syncs with my iCal calendars - despite having the option selected to do so. I have tried restoring from scratch to no avail. It does work if I copy the calendars manually i

  • Problem accessing Excel

    Hello! I'm doing my first steps into Xcelsius world. But every time I try to import my excel sheets ... I get this error message "Problem accessing Excel : Exiting"  and xcelsius closes. I really don't understand what is wrong. I've read many other m

  • MAPPING DEBBUG ERROR: ORA-02291(data column format)

    I think the problem is the data format... in csv files I have dd/mm/yyyy, and i set the mask in the flat file import like this dd/mm/yyyy, but when I debbug I receeive constraint violation parent key not found, the sonstraint is ok, how I must set th

  • Problems with saprfc library: CallReceive iconv error

    Hi, I tried to execute the following few lines of code rfc = SAP::Rfc.new(:ashost => "iwdf3018.wdf.sap.corp" , :sysnr => "50" ,:lang => "EN" , :client => "800" , :user => "removed" , :passwd => "removed" , :trace => "0" ) iface = rfc.discover("RFC_GE

  • Changing printer profile in Colorsync

    I'm trying to change my printer's color profile in Colorsync. I opened Colorsync and went to the devices menu. Dropping down to my printer, I selected it and the available profiles were displayed... But not the custom profile I made. *Mac Help* walke