Get Example source ABAP code based on a different SAP table
OPEN CURSOR>, Read Data Using Cursor The example shows how to read data using the cursor.
ABAP_SOURCE_CODE DEMO CL_DEMO_SELECT_CURSOR
ABAP_DESCRIPTION Opens two cursors for the tables SPFLI> and SFLIGHT>. Since both tables are associated using a foreign key dependency, a nested loop can be defined across the tables by sorting the selection by the primary key. The system then reads the data of the inner loop depending on the data of the outer loop. This way of programming is more efficient than using nested SELECT> loops, since the cursor for the inner loop does not need to be reset again and again. In a group level change in the inner loop, the system buffers the data read until the next loop pass since it is not possible to reset the cursor.