SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
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 →occ - Occurrence
Syntax
... ( ... occ = occ ... ) ...
Effect
In string functions that are being searched, the parameter occ specifies the occurrence of a match. occ is a numeric expression position of type i.
If occ is positive, the occurrences are counted from the left; if occ is negative, the they are counted from the right. The values 1, 2, .... indicate the first, second, ... occurrences. The values -1, -2, .... indicate the last, last but one, ... occurrences.
The default value of occ is 1. Except in the case of the replacement function replace, the value 0 raises an exception from the class CX_SY_STRG_PAR_VAL.
Note
The sign of occ also modifies the default values of off and len.