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
compof the statementASSIGN COMPONENT comp OF STRUCTURE
- Regular expression
regexin the statementsFIND ... REGEX regex ... IN ...
REPLACE ... REGEX regex ... IN ...
- Search pattern
substringin the statementsFIND ... SUBSTRING substring ... IN ...
REPLACE ... SUBSTRING substring ... IN ...
- Operand
dobjin the statementFIND ... IN dobj ...
- Operand
newin the statementREPLACE ... WITH new ...
REPLACE ... IN TABLE ... WITH new ...
- Operand
substringin the statementSHIFT ... UP TO substring
- Operand
maskin the statementSHIFT ... DELETING ... mask
- Operands
dobjandsepin the statementSPLIT dobj AT sep INTO ...
- Operand
textin the statementCONVERT text INTO SORTABLE CODE ...
- Operands
text2andtext2in the statementOVERLAY ... WITH text2 USING mask
- Operand
maskin the statementTRANSLATE ... USING mask
- Operand
subin the statementASSERT ... SUBKEY sub ...
LOG-POINT ... SUBKEY sub ...
- Operands
textanddobj1todobj4in 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.