Ansicht
Dokumentation

ABAPFIND_TABLE_RANGE - FIND TABLE RANGE

ABAPFIND_TABLE_RANGE - FIND TABLE RANGE

rdisp/max_wprun_time - Maximum work process run time   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

FIND IN TABLE, table_range

Short Reference



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


Effect

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.

Note

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

Example

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.






CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 2757 Date: 20240614 Time: 051313     sap01-206 ( 60 ms )