ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Character String and Byte String Processing → Expressions and Functions for String Processing → String Functions → Common Parameters of Character String Functions
off, len - Offset and Length
Other versions: 7.31 | 7.40 | 7.54
Syntax
... ( ... off = off len = len ... ) ...
Effect
off
is used to pass an
offset and len
to pass a length. In functions in which off
and len
can be passed simultaneously, they determine the subarea in which a character string is to be processed.
off
and len
are numerical expression positions.
The default value of off
is generally 0 and the default value of len
is generally the length of the character string minus a predefined offset or an offset specified using
off
. If, in functions for which this is supported, a negative argument is
also passed for occ
,
the default value of off
is the length of the character string, and the default value of len
is the value of the corresponding offset.
If off
or len
has a negative value, an offset
defined using off
is not within the character string, or a subarea defined
by off
und len
is not completely contained in the character string, an exception of class CX_SY_RANGE_OUT_OF_BOUNDS is triggered.