Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Operator Table

Former Member
0 Likes
1,665

Hi all

Anyone know the table name for the field 'operator'.

This is Operator Field contain 'EQ', '=', 'NE', '<>', '<', '>' and more.

Anyone know this table in sap.

7 REPLIES 7
Read only

Former Member
0 Likes
1,145

HI,

There is no table for storing operators.

Best regards,

Prashant

Read only

gopi_narendra
Active Contributor
0 Likes
1,145

These are relational operators and are not stored in any table.

Regards

Gopi

>> Chekc this <a href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb34fc358411d1829f0000e829fbfe/frameset.htm">link</a>

Read only

0 Likes
1,145

i need this relational operator. how can i gt it

Read only

Former Member
0 Likes
1,145

Hi,

For relational operators,go & see the Help Document.

Regards,

Padmam.

Read only

Former Member
0 Likes
1,145

The following table lists the comparison operators for comparisons between operands of various data types.

Operator Description

<b>=, EQ Equal:</b> True, if the content of operand1 matches the content of operand2.

<b><>, NE Not Equal:</b> True, if the content of operand1 does not match the content of operand2.

<b><, LT Lower Than:</b> True, if the content of operand1 is smaller than the content of operand2.

<b>>, GT Greater Than:</b> True, if the content of operand1 is greater than the content of operand2.

<b><=, LE Lower Equal:</b> True, if the content of operand1 is lower than or equal to the content of operand2.

<b>>=, GE Greater Equal:</b> True, if the content of operand1 is greater than or equal to the content of operand2

**************

Operator Meaning

<b>CO Contains Only:</b> True, if operand1 only contains characters from operand2. Upper/lower case and trailing blanks are taken into account for both operands. If operand2 is of type string and is initial, then the logical expression is false, unless operand1 is also of type string and is initial, in which case the logical expression is always true. If the result of the comparison is negative, sy-fdpos contains the offset of the first character in operand1, that is not contained in operand2. If the result of the comparison is positive, sy-fdpos contains the length of operand1.

<b>CN Contains Not Only;</b> True if a logical expression with CO is false, that is, if operand1 contains not only characters from operand2. sy-fdpos is set in the same way as for CO. If the comparison is true, sy-fdpos contains the offset of the first character in operand1 that is not contained in operand2. If the comparison is false, sy-fdpos contains the length of operand1.

<b>CA Contains Any:</b> True, if operand1 contains at least one character from operand2. Upper/lower case and trailing blanks are taken into account for both operands. If operand1 or operand2 is of type string and initial, the logical expression is always false. If result of the comparison is positive, sy-fdpos contains the offset of the first character in operand1 that is also contained in operand2. If the result of the comparison is negative, sy-fdpos contains the length of operand1.

<b>NA Contains Not Any:</b> True if a logical expression with CA is false, that is if operand1 does not contain any characters from operand2. If the result of the comparison is negative, sy-fdpos contains the offset of the first character in operand1 that is also contained in operand2. If the result of the comparison is true, sy-fdpos contains the le of operand1.

<b>CS Contains String:</b> True if the content of operand2 is contained in operand1. Upper/lower case is not taken into account, trailing blanks of the left operand are taken into account. If operand1 is of type string and initial, or of type c and contains only blank characters, the logical expression is false, unless operand2 is also of type string and initial, or of type c and only contains blank characters. In this case the logical expression is always true. If the result of the comparison is true, sy-fdpos contains the offset of operand2 in operand1. If the result of the comparison is negative, sy-fdpos contains the length of operand1.

<b>NS Contains No String:</b> True, if a logical expression with CS is false, that is if operand1 does not contain the content of operand2. If the result of the comparison is negative, sy-fdpos contains the offset of operand2. If the comparison is true, sy-fdpos contains the length of operand1.

<b>CP Covers Pattern:</b> True, if the content of operand1 fits the pattern in operand2. Wildcard characters can be used for forming the operand2 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. 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.

<b>NP No Pattern:</b> True, if a logical expression with CP is false, that is, if operand1 does not fit the pattern operand2. If the comparison is false, 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 true, sy-fdpos contains the length of operand1.

Message was edited by:

Prashant Patil

Read only

0 Likes
1,145

How to call the relational operator out since if it not a table form?

Read only

Former Member
0 Likes
1,145

data : a type i,

b type i,

c type i.

a = 100.

b = 50.

if a <b>GT</b> b.

write 😕 'A greater than B'.

elseif a <b>LT</b> b.

write 😕 'A is smallest'.

elseif a <b>EQ</b> b.

write 😕 'A = B'.

endif.