Character String in SAP ABAP
Here we are sharing you a table in which every Character string operator is explained:
Operator |
Function |
---|---|
CO (Contains Only) |
returns true if A consists of only the characters in B. |
CN (Not Contains ONLY) |
returns true if A consists contains at least one character not present in B. |
CA (Contains ANY) |
returns true if A contains at least one character of B. |
NA (NOT Contains Any) |
returns true if A does not contain any character present in B |
CS (Contains a String) |
returns true if A contains the entire string B |
NS (NOT Contains a String) |
returns true if A does not contains the entire string B |
CP (Contains a Pattern) |
returns true if A contains the pattern in B |
NP (NOT Contains a Pattern) |
returns true if A does not contain the pattern in B |
Example:
. DATA: P(10) TYPE C VALUE 'GFG',
Q(10) TYPE C VALUE 'GEEKS'.
IF P CA Q.
WRITE: / 'P contains at least one character of Q'.
ENDIF.
Output:
P contains at least one character of Q
Operators in SAP ABAP
High-level programming languages like SAP ABAP (Advanced Business Application Programming) are used to create apps in the SAP environment. Operators are essential for the execution of many different operations in SAP ABAP, ranging from straightforward arithmetic computations to complex logical analyses. This article will examine the various SAP ABAP operator types and offer examples to show how to use them.
Table of Content
- SAP ABAP Operators
- Arithmetic Operators in SAP ABAP
- Comparison/ Relational Operators in SAP ABAP
- Bitwise Operators in SAP ABAP
- Character String in SAP ABAP
- Automatic Type Adjustment in SAP ABAP
- String Operators in SAP ABAP
- FAQS on Operators in SAP ABAP: