ABAP Keyword Documentation → ABAP − Reference → ABAP Syntax → ABAP Statements → Operands → Functions and Expressions in Operand Positions → Operand Positions for Functions and Expressions → Reading Positions for Functions and Expressions
Character-Like Expression Positions
Character-like expression positions are reading positions in which character-like data objects, constructor expressions, string expressions, table expressions, and built-in functions can be specified, as well as functional method calls and method chainings whose return values have a character-like data type. The following character-like expression positions exist:
- Operand positions in string expressions
- Character-like arguments in processing functions
- Character-like arguments in description functions
- Operand
comp
of the statementASSIGN COMPONENT comp OF STRUCTURE
- Regular expression
regex
in the statementsFIND ... REGEX regex ... IN ...
REPLACE ... REGEX regex ... IN ...
- Search pattern
substring
in the statementsFIND ... SUBSTRING substring ... IN ...
REPLACE ... SUBSTRING substring ... IN ...
- Operand
dobj
in the statementFIND ... IN dobj ...
- Operand
new
in the statementREPLACE ... WITH new ...
REPLACE ... IN TABLE ... WITH new ...
- Operand
substring
in the statementSHIFT ... UP TO substring
- Operand
mask
in the statementSHIFT ... DELETING ... mask
- Operands
dobj
andsep
in the statementSPLIT dobj AT sep INTO ...
- Operand
text
in the statementCONVERT text INTO SORTABLE CODE ...
- Operands
text2
andtext2
in the statementOVERLAY ... WITH text2 USING mask
- Operand
mask
in the statementTRANSLATE ... USING mask
- Operand
sub
in the statementASSERT ... SUBKEY sub ...
LOG-POINT ... SUBKEY sub ...
- Operands
text
anddobj1
todobj4
in the statements
MESSAGE text ...
MESSAGE ...WITH dobj1 ... dobj4
Other versions: 7.31 | 7.40 | 7.54
Example
Uses a string expression
to create a regular
expression in the statement (
&& sub && )+
FIND
to make it possible to find groups of a substring sub
.
DATA: text TYPE string,
sub TYPE string.
FIND REGEX `(` && sub && `)+` IN text.