ABAP Keyword Documentation → ABAP - Quick Reference
FIND - Quick reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
FIND [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF]
{[SUBSTRING] substring} | {REGEX regex} IN
{ {[SECTION [OFFSET off] [LENGTH len] OF] dobj}
| {TABLE itab [FROM lin1 [OFFSET off1]]
[TO
lin2 [OFFSET off2]]} }
[IN {CHARACTER|BYTE} MODE]
[{RESPECTING|IGNORING} CASE]
[MATCH COUNT mcnt]
{ {[MATCH LINE mlin]
[MATCH OFFSET moff]
[MATCH LENGTH mlen]}
| [RESULTS result_tab|result_wa] }
[SUBMATCHES s1 s2 ...].
Effect
Searches for character strings or byte strings or for
regular expressions in a character-like or byte-like data object
(dobj) or in an internal table (itab).
Additions
-
{FIRST OCCURRENCE}|{ALL OCCURRENCES OF}
Defines whether the system searches for the first occurrence only or for all occurrences. -
{[SUBSTRING] substring} | {REGEX regex}
Defines whether the system searches for asubstringor a regular expression (regex). -
SECTION [OFFSET off] [LENGTH len] OF dobj
Searches in a character string or byte string (dobj) with restriction of the search area to the section starting from the offset specified inoffwith the length specified inlen. -
TABLE itab [FROM lin1 [OFFSET off1]] [TO lin2 [OFFSET off2]]
Searches in anitabwith restriction of the search area to the section from the row specified inlin1with the offset specified inoff1up to the row specified inlin2with the offset specified inoff2. -
IN {CHARACTER|BYTE} MODE
Specifies character string or byte string processing. -
{RESPECTING|IGNORING} CASE
Defines whether case is respected insubstring,regex, anddobj. -
MATCH COUNT mcnt
Gets the number of occurrences inmcnt. -
MATCH LINE mlin
When searching in internal tables, gets the row number of the last occurrence inmlin. -
MATCH OFFSET moff
Gets the offset of the last occurrence inmoff. -
MATCH LENGTH mlen
Gets the length of the last found substring inmlen. -
RESULTS result_tab|result_wa
Gets the properties of all occurrences or the last occurrence in an internal table (result_tab) or a structure (result_wa). -
SUBMATCHES s1 s2 ...
When searching for regular expressions, gets the contents of the subgroup tabs of the last occurrence ins1,s2, and so on.