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

Require a detailed explanation of Compare Function.

Hi Every One,

I require a an expalanation of the following function.

Compare Function:

When I try to compare two strings of values ABC and XYZABC it returns a value -23. Could you please provide me more details on how the comparision is been done by this function.

Kindly do the needy.

Thanq very much in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 09, 2011 at 11:40 AM

    just i copied below content from help.sap.com,

    http://help.sap.com/saphelp_nwpi71/helpdata/EN/c8/7e5e3c754e476ee10000000a11405a/frameset.htm

    compare
     Compares string X with string Y:
    
    R = 0, when the strings are equal
    R = positive number i, when X is lexicographically larger than Y
    R = negative number i, when X is lexicographically smaller than Y
    
    i specifies the difference between the two strings lexicographically.
    
    The function acts in the same way as the compareTo() method of the JDK class java.lang.String.

    Regards,

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2011 at 11:43 AM

    DID U CHK THIS:

    http://wiki.sdn.sap.com/wiki/display/XI/StandardFunctionsinPI7.0

    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.