SAP FIND TABLE RANGE ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• FROM FIND IN TABLE
• TO FIND IN TABLE
• OFFSET FIND IN TABLE

FIND IN TABLE, table_range
Short Reference

ABAP_SYNTAX
... $[FROM lin1 $[OFFSET off1$]$]
$[TO lin2 $[OFFSET off2$]$] ...

What does it do?
This addition limits the search in the statement FIND IN TABLE to the table range specified in lin1, off1, lin2 and off2. Without this addition, the program searches the entire table line by line. lin1, off1 , lin2 and off2 are numeric expression positions of operand type i.
The table range begins in line lin1 after the offset off1, and ends in line lin2 in front of the offset off2. If FROM is specified without OFFSET, the range implicitly begins at the start of lin1. If TO is specified without OFFSET, the range ends implicitly at the end of line lin2.
The value of lin1 must be greater than or equal to 1, and the value of lin2 must be greater than or equal to the value of lin1, and both must refer to valid table lines. The values of off1 and off2 must be greater than or equal to 0 and be within the respective line length. If lin1 and lin2 refer to the same line, the value of off2 must be greater than or equal to the value of off1. Both offsets may refer to the end of the line.



Latest notes:

This addition is also used in the statement REPLACE IN TABLE.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Reading of a text into an internal table in ITF format and search for the first string AS in a non-case-sensitive search. The line type of the internal table is interpreted as a single field of the type c despite being a structured type. The first search finds the first paragraph format AS in the column tdformat. The second search is limited to the lines of the first paragraph and finds the word as in the column tdline, if it exists here. By specifying the offset, the paragraph format is not found in the first line of the paragraph.
ABEXA 00279
ABAP_EXAMPLE_END

Return to menu