- Comparison between Data Types.EQ (or) =Equal ToNE (or) <> (or) ><Not Equal ToLT (or) <Less ThanLE (or) <=Less Than or Equal toGT (or) >Greater ThanGE (or) >=Greater Than or Equal To
- Comparison between Strings.COContains OnlyCNContains Not OnlyCAContains AnyNAContains Not AnyCSContains StringNSContains No StringCPMatches patternNPDoes not Matches patternThe special statements for processing strings, there are special comparisons that you can apply to strings with types C, D, N, and T.There are no conversions with these comparisons. Instead, the system compares the characters of the string.
<f1><operator><f2>ResultSY-FDPOS'BD 'CO'ABCD 'true5'BD 'CO'ABCDE'false2'ABC12'CN'ABCD 'true3'ABABC'CN'ABCD 'false5'ABcde'CA'Bd 'true1'ABcde'CA'bD 'false5'ABAB 'NA'AB 'false0'ababa'NA'AB 'true5'ABcde'CS'bC 'true1'ABcde'CS'ce 'false5'ABcde'NS'bC 'false1'ABcde'NS'ce 'true5'ABcde'CP'*b*'true1'ABcde'CP'*#b*'false5'ABcde'NP'*b*'false1'ABcde'NP'*#b*'true5
- Comparing Bit Sequences
The above three operators to compare the bit sequence of the first operand with that of the second.Obits are oneZbits are ZeroMbits are Mixed
The second operand must have type X.
The comparison takes place over the length of the second operand.
The first operand is not converted to type X.
Example :
REPORT demo_log_expr_bits .
DATA: text(1) TYPE c VALUE 'C',
hex(1) TYPE x,
i TYPE i.
hex = 0.
DO 256 TIMES.
i = hex.
IF text O hex.
WRITE: / hex, i.
ENDIF.
hex = hex + 1.
ENDDO.
The output is as follows:
00 0
01 1
02 2
03 3
40 64
41 65
42 66
43 67
Wednesday, 29 August 2012
Relational Operators
About SAP ABAP Mentors
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates.
Relational operators
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.