Get Example source ABAP code based on a different SAP table
Migrating SEARCH> to FIND> When migrating from the obsolete SEARCH>> to the FIND>> statement, the following points should be respected:
With ENDING AT> a position greater than the length of the data object to be searched can be specified for SEARCH>. This is not possible for the addition SECTION OF> of FIND> and an exception is raised.
A position greater than the length of the data object to be searched specified behind STARTING AT> for SEARCH> sets sy-subrc > to 4. Such a specification for SECTION OF> of FIND> raises an exception.
A position 0 specified behind STARTING AT> for SEARCH> sets sy-subrc > to 4. Setting the respective offset to -1 for SECTION OF> of FIND> raises an exception.
SEARCH> sets the system field sy-fdpos>, even if a search is not successful. FIND> does not affect the system field sy-fdpos>. The system field sy-fdpos> must not be evaluated after FIND >. When migrating to string functions> used in operand positions, different rules apply. Especially, system fields cannot be evaluated after using a function.