Ansicht
Dokumentation

ABENREAD_TABLE_ABEXA - READ TABLE ABEXA

ABENREAD_TABLE_ABEXA - READ TABLE ABEXA

BAL_S_LOG - Application Log: Log header data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- Output Area

This example demonstrates how and where the line content of internal tables is read to.

Source Code

Execute

Description

Four alternatives for output behavior when reading internal tables are shown. First a sorted table is filled with a list of square numbers.

In the first alternative, the work area line that is compatible with the line type is filled with the numbers 2 and 3. The READ statement finds the line of the table in which the key field col1 has the same content as the work area and is copied to the work area. sy-subrc is two, since different numbers are found when the field col2 is compared.

In the second alternative, the READ statement reads the line of the table in which the key field col1 has the value 3. Only the content of col2 is copied to the work area line. sy-subrc is zero and sy-tabix is three, since itab is an index table.

In the third alternative, the READ statement is used to search for the lines of the table in which the field col2 has the value 16. The primary table key is not used. No fields are copied to the work area and no lines are assigned a field symbol. Only system fields are set. sy-subrc is zero, since a line was found and sy-tabix is four.

In the READ statement of the final alternative, the lines of the table are read in which the key field col1 has the value 2 and are assigned to the field symbol <fs>. The component col2 of <fs> is assigned the value 100. This also changes the corresponding table field.






rdisp/max_wprun_time - Maximum work process run time   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 1851 Date: 20240329 Time: 025902     sap01-206 ( 44 ms )