SAP FIND ITAB OPTIONS ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• MATCH LINE FIND IN TABLE
• RESPECTING CASE FIND IN TABLE
• IGNORING CASE FIND IN TABLE
• MATCH OFFSET FIND IN TABLE
• MATCH LENGTH FIND IN TABLE
• SUBMATCHES FIND IN TABLE
• RESULTS FIND IN TABLE

FIND IN TABLE, options
Short Reference

ABAP_SYNTAX
... $[${RESPECTING$|IGNORING$} CASE$]
$[MATCH COUNT mcnt$]
${ ${$[MATCH LINE mlin$]
$[MATCH OFFSET moff$]
$[MATCH LENGTH mlen$]$}
$| $[RESULTS result_tab$|result_wa$] $}
$[SUBMATCHES s1 s2 ...$] ...

What does it do?
The addition MATCH LINE returns the number of the line in which the last substring was found using FIND IN TABLE in data object mlin. The following can be specified for mlin:
An existing variable that expects the data type i.
An inline declaration DATA(var) or FINAL(var). The declared variable has the data type i.
If the substring is not found, mlin retains its previous value or stays initial.
The remaining additions used for searching in the individual table lines have the same meaning as in the statement FIND for elementary character strings and byte strings.
If the addition RESULTS is used, the line numbers of each occurrence in the component LINE of the table line in question in result_tab or the line number of the last occurrence are also saved to result_wa and the lines in result_tab are sorted by the columns LINE, OFFSET, and LENGTH.

ABAP_EXAMPLE_VX5
Reading of a text into an internal table in ITF format and search for all strings ABAP and XML. The table returned contains the positions of the occurrences. The line type of the internal table is interpreted as a single field of the type c despite being a structured type.
ABEXA 00269
ABAP_EXAMPLE_END

Return to menu