Comparison operators startsWith, endsWith ?

Hi,
it would be helpful to have the predefined comparison operators starts with and ends with.
I know that this is only a small thing and could easily be worked around with the CP operator, like this
contains pattern "STRING*"
and
contains pattern "*STRING"
but it would improve the readabilty of the rules to have these operators built-in, in particular if the STRING is not a literal but a variable which has to be manipulated first in a separate, purely technical step.
In my example, I have a string representing the product hierarchy, and the first two digits representing the top level of the hierarchy, called "Bedarfsbereich". The rule has to check whether the actual product hierarchy value fits into this "Bedarfsbereich". Both data objects, product hierarchy and "Bedarfsbereich", are data objects, not constants, in my rule - coming in as import parameters.
I am currently working with a custom formula function to meet this case.
By the way: Would it be possible to define custom comparison operators?
Regards,
Rüdiger

I forgot to mention that I am on SAP_BASIS release 702.
So this is answered.

Similar Messages

  • Decode function - using comparison operators

    Can I use comparison operators in a decode function such as below:
    select tasknum, title, esthrs, assigndate,
    decode(assigndate, < '04-OCT-04', '--') accum_hrs
    from assignment
    thanks.

    Found my answer.

  • Using comparison operators to solve several different mathematic​al expression​s is not clear

    Though I found LabVIEW very interesting , still some of its basic fundamentals are not clear, like using comparison operators (>,<,..) for solving different
    mathematical expressions. Please give example showing how to use such operators in advanced mathematical problems.
    Best Regards,
    Allawi

    allawi1 wrote:
    What I am looking for is how to use such functions in selecting different mathematical expressions i.e..(working like logical if statement).
    You need to be more specific. A comparison operation IS like a logical IF statement and the result is either TRUE or FALSE.
    What do you mean by a "mathematical expression"? What do you mean by "different"? Can you give an illustrative example?
    If two alternative mathematical expressions should depend on the comparison, wire the comparison output to a case structure and place the two different expressions in their own case, for example.
    LabVIEW Champion . Do more with less code and in less time .

  • Support for .startsWith() & .endsWith()?

    Hi,
    This is the FAQ that I referred in my post titled "Searchable news
    archive?":
    Does Kodo currently supports query filter expressions that include
    ".startsWith()", ".endsWith()"? It's not listed as a known bug or
    limitation.
    Thanks,
    Matthew

    My bad: <stupidUserError><shellGotcha /></stupidUserError>
    "Joe Mannering" <[email protected]> wrote in message
    news:9tjdok$dn2$[email protected]..
    We are using .startWith() - this works fine.
    Joe.
    Matthew T. Adams wrote in message <9tgt1g$ujq$[email protected]>...
    Hi,
    This is the FAQ that I referred in my post titled "Searchable news
    archive?":
    Does Kodo currently supports query filter expressions that include
    ".startsWith()", ".endsWith()"? It's not listed as a known bug or
    limitation.
    Thanks,
    Matthew

  • Comparison operators ,

    How do I do a >,<,>=,<= comparison in the XML Parser V2?
    '<' and '>' aren't allowed in attributes and it doesn't recognize
    $lt$ or $gt$
    e.g.
    <xsl:if test="@value > 0">
    null

    Grant Jennings (guest) wrote:
    : How do I do a >,<,>=,<= comparison in the XML Parser V2?
    : '<' and '>' aren't allowed in attributes and it doesn't
    recognize
    : $lt$ or $gt$
    : e.g.
    : <xsl:if test="@value > 0">
    Try using < for < and > for >.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Comparison operators for character-type operands

    Hi Experts,
    I have one internal table in that Name is one field(char type) .
    some records have upper case,
    some in lower case,
    some are mixed.
      in selection screen i am entering the name and i am serching the record using search button.
    i am using code like as below,
    loop at itab where name cs name.
    endloop.
    cs operator is not working properly.
    can any body tell me how to do this.
    thanks in advance.
    tharangini.

    first of all change both the strings into one comman case like uppercase or lowercase.
    TRANSLATE w-string2 TO LOWER CASE.
    or
    TRANSLATE w-string2 TO UPPER CASE.
    then do the search operation in internal table.

  • Comparison Operators - Wildcard?

    Hey Folks,
    I am working on some search functionality, and want to be
    able to create a statement that will compare a string to see if it
    is included in a larger one. For instance, the user could search
    for "Bread" and I would want the results to include ["Bread
    Pudding","Wheat Bread","Cornbread"]. Something like that is proving
    tough for me,but I bet there is a magic piece of knowledge that I
    am not finding. Anyone got it?

    you can use the indexOf() method of strings with a.s. 2. or
    use a.s. 3 which supports regular expressions.

  • Logical operators in Oracle select query

    Hello all,
    Can i use logical operators in oracle select queries?
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?
    Regards,

    Hi,
    NB wrote:
    Hello all,
    Can i use logical operators in oracle select queries?Sure; Oracle has the logical operators AND, NOT and OR. All the comparison operators, including >, >=, = !=, EXISTS, IN, IS NULL, LIKE and REGEXP_LIKE are really logical operators, since they return logical values. You can use them in SELECT statements, and other places, too.
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.It's unclear what you want. Maybe you'd be interested in the BITAND function:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions014.htm#sthref1080
    BITAND is the only logical function that I know of. Many other functions, especially numberical fucntions such as MOD, have applications in logic.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data.
    Explain how you get those results from that data.
    Always say which version of Oracle you're using.

  • Problems with string comparison using

    I have a problem using the > and < comparison operators.
    When the xsl:if test uses numeric values the comparison works OK. If the
    test uses string values it always returns a false result.
    The style sheet below shows an example (which should run against any
    XML doc with a root element)
    Note - the spurious
    tags are just for debugging- I write the
    output to an HTML page and IE happens to recognise them
    even though the rest of the HTML tags are missing !!
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:for-each select="*">
    Starting numeric test :
    <xsl:if test="(1 < 2)">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished numeric test :
    Starting alpha test :
    <xsl:if test="('a' < 'b')">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished alpha test :
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    null

    Having looked at the XPath spec I believe what I am trying to do (compare strings with gt and lt type tests) is not supported. The spec indicates that they can only be used for node sets or numerics. Presumably the processor is attempting to convert the values to numbers but evaluating them both as NaN (not a number). Can someone confirm this.
    I find this restriction quite strange, is this a situation where an extension function is required ? If so can someone point me to some (Java) examples.
    null

  • Problem while using Comparison Operator 'CA' in select queries

    Hi ,
    I have written select query like this.
       SELECT * FROM rsdodso INTO TABLE gt_rsdodso       
                                 WHERE odsobject CA s_obj-low.
    then I am getting error 'CA is not a valid comparison operator'.
    Would you please suggest me how to use Comparison operators.
    Regards,
    K.krishna.
    Moderator Message: Basic Post. Thread Locked. Points unassigned.
    Edited by: kishan P on Dec 27, 2010 1:07 PM

    Hi,
       Use 'IN' and not CA. You cannot use CA in where clause. Write CA in if .. endif.
       SELECT * FROM rsdodso INTO TABLE gt_rsdodso
       WHERE odsobject IN s_obj.
    if  gt_rsdodso-ODSOBJECT CA '0D_FC_D01'.
    endif.
    Regards,
    Srini.
    Moderator Message: Do NOT answer basic questions.
    Edited by: kishan P on Dec 27, 2010 1:07 PM

  • Dynamin comparision operators

    Hi,
    Need your inputs. Details mentioned below:
    Program needs to compare values between 2 variables. However, the comparison operators (EQ, NE, GT, GE, LT, LE) are retrieved from a custom table and my code needs to compare based on the values returned in the internal table i.e. if I get EQ, then i have to equate the values of 2 variable.
    One way of working around this is to use IF ELSEIF but I am not very inclined on using that.
    Any other pointers?
    Will appreciate an early response.
    Thanks
    Regards
    Yatin.

    Hi Viswas,
    Why to go for if elseif.
    CASE itab-operator. "from Database table
    WHEN 'EQ'.
    check var1 EQ var2.
    WHEN 'GT'.
    check var1 GT var2.
    WHEN OTHERS.
    through error.
    ENDCASE.
    Thanks,
    Vinod.

  • Query Builder - Where Clause - Could not format error using date comparison

    We've come across a bug in the Query Builder, under the Create Where Clause tab, if you select a column of Date type plus one of the comparison operators =, !=, <, >, <=, >=, BETWEEN or NOT BETWEEN it displays an error in the Logging Page:
    Level: Severe
    Source: o.d.r.queryBuilder.SQLGenerator
    Message: Could not format :2010-09-02 16:20:31.0
    Then under the Show SQL tab it doesn't display the date(s) you selected, e.g.
    WHERE LAST_UPDATE BETWEEN AND
    Also the View Results tab does not display any results.
    You can still press Apply to add the SQL as is to the editor window and from there you have to manually code in the date parameters.
    We're using the latest version of SQL Developer 2.1.1.64.45 Windows 32bit version with JDK

    Hi Gordon,
    When I add the following lines:
    declare @refdt1 date
    set @refdt =
    /*select 1 from jdt1 t0 where t0.RefDate*/ '[%1]'
    declare @refdt2 date
    set @refdt =
    /*select 1 from jdt2 t0 where t0.RefDate*/ '[%2]'
    WHERE T0.RefDate >= @refdt1 and T0.RefDate <= @refdt2
    ... the error message is now:
    Must declare the scalar variable @refdt1
    Note: Before adding these lines, the query works perfectly, and returns totals from the whole database (with dynamically generated column headings!)
    Thanks
    Leon Lai
    AMENDED QUERY:
    declare @refdt1 date
    set @refdt1 =
    /*select 1 from jdt1 t0 where t0.RefDate*/ '[%1]'
    declare @refdt2 date
    set @refdt2 =
    /*select 1 from jdt1 t0 where t0.RefDate*/ '[%2]'
    --------- I inserted the 6 lines above ---------------------
    DECLARE @listCol VARCHAR(2000)
    DECLARE @query VARCHAR(4000)
    SELECT @listCol =
    STUFF
    ( SELECT DISTINCT   '],['    +    CAST(month(T0.RefDate) AS varchar)
    FROM  JDT1 T0
    FOR XML PATH('')
    ), 1, 2, ' ') +   ']'
    SET @query =
    'SELECT * FROM
    (SELECT Account, month (T0.RefDate) Month , Debit
    FROM JDT1 T0
    ------------------- I add the WHERE clause below --------------------
    WHERE T0.RefDate >= @refdt1 and T0.RefDate <= @refdt2
    GROUP BY Account, RefDate, Debit
    ) S
    PIVOT
    Sum(Debit)
    FOR Month IN ('+@listCol+')
    ) AS pvt'
    EXECUTE (@query)
    Edited by: LEONLAI on Oct 21, 2011 2:36 PM

  • Smart Collections / Text Filter - exact Meaning of Comparison Operator

    Can anybody explain to me (in technical or IT terms) what exactly the different comparison operators (contains, contains all, contains words, starts with, ends with, ...) are supposed to do?
    I got confused by doing the following:
    I have an original image with 2 virutal copies, one containing "Copy 1", the other one "Copy 2" in the Copy Name attribute.
    I was playing around with smart collections (and text filters as well), trying to identify all my VCs with the term "Copy 1" in the Copy Name attribute.
    I notice that Starts with or Ends with Copy 1 does not show any results (?)
    Contains Copy 1 will also show images with Copy 2, Copy 3, Copy 4 .... (seems to be "Copy OR 1")
    Contains all Copy 1 will also show images with Copy 10, Copy 11, Copy 12
    Contains words Copy 1 does not show any results (?)
    How can I search for an exact term (including spaces) in an attribute (like "Copy 1" in Google)?
    Thanks for your help.
    Beat Gossweiler
    Switzerland

    In Text filter you should be able to use Copy Name Contains All Copy 1+
    The + sign means Ends with.
    The same approach can be used with Smart Collections

  • Current shutdown comparison

    Hello,
    I am trying to make labview display an error message if daq assistant is inputting  more then 1amp of current, but if it is less then 1 amp of current i want the program to continue on normally. I am not sure how to program this since the comparison operators output a boolean value in labview. Is there a way on how I can change it so it will output the data coming from DAQ assistant?
    I appreciate all the help!

    You're going to want to go through some training.
    NI Learning Center
    NI Getting Started
    -Hardware Basics
    -LabVEW Basics
    -DAQ Application Tutorials
    -cRIO Developer's Guide
    3 Hour LabVIEW Introduction
    6 Hour LabVIEW Introduction
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Specifically what you are looking for is after a comparision is done, do this IF the condition, ELSE do something else.  That can easily be done with a case structure which chooses to execute one of two cases when a boolean is used.  The Select function can also be used to select one of two values of data, which are of the same data type.  Not sure if that would be useful.  When you have something you should post it so we can better help.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Comparison Program

    I am trying to write a program that reads 5 integers and displays the highest and lowest integers typed in. We are only supposed to use the ideas of variables and comparison operators. The way I figured does this is create a variable named maxVar and keep reassigning it if some other variable ends up being larger. What am I doing wrong. I am new to java
    public class Comparison
    public static void main( String args[] )
             { // start main method
          Scanner input = new Scanner( System.in );
            int number1; // first number to compare
            int number2; // second number to compare
            int number3; // third number to compare
            int number4; // fourth number to compare
            int number5; // fifth number to compare
            int maxVar = 0; // This is the MaxValue
            System.out.print( "Enter First Integer: " );
            number1 = input.nextInt();
            System.out.print( "Eneter Second Integer: " );
            number2 = input.nextInt();
            System.out.print( "Enter Third Integer: " );
            number3 = input.nextInt();
            System.out.print( "Enter Fourth Integer: " );
            number4 = input.nextInt();
            System.out.print( "Enter Fifth Integer: " );
            number5 = input.nextInt();
            if ( number1 <= number2 )
                    number2 = maxVar;
            if ( number1 > number2)
                    number1 = maxVar;
            if ( number3 >= maxVar )
                    number3 = maxVar;
           if ( number4 >=  maxVar )
                    number4 = maxVar;
            if ( number5 >=  maxVar )
                    number5 = maxVar;
            System.out.print( " The maximum Integer You Entered Was:"  );
            System.out.printf("%d /n", maxVar );
            } // end method main
    } // end class Comparison

    What is wrong with the answers you got in your other thread?
    http://forum.java.sun.com/thread.jspa?threadID=764850&messageID=4362380#4362380

Maybe you are looking for

  • Composite to tv no video?

    When I connect my iphone to a digital TV using the composit AV cable.  I get audio by no video.  The tech sheet says "Make sure you set your IPhone to send a video signal out to your TV, see user guide for your IPhone. I've looked in the guide but ha

  • Adobe Wrong font in Preview

    Hi Friends, I have designed my layout in adobe form in Arial font. In layout preview it is coming proper. But in the print preview as well as print out I am getting Times New Roman font instead of Arial. Please help me through this. Awaiting your val

  • Blank screen while using a ati radeon x1300 pro graphics card

    i'm getting a blank screen at start up while using my radeon x1300 pro... dont really know whats wrong with it. the agp slot is good, i'm getting power to the card, my board is set to boot agp/pci for the video so thats good. only problem is is that

  • ICal printer defaults

    Every time I go to print out my calendar, I have to reset the printer preferences. I would like a default option that leaves the printer preferences as they were during the last printing session. Is there any way to do this now?

  • Video app hangs on loading iTunes Library through Home Sharing

    Hello, On my 4th gen iPad I try loading my iTunes Library, which is on a mid-2011 iMac. Home Sharing is configured and working, but when loading my library it hangs during load. See attached screenshot. The library is huge, but that shouldn't be a pr