SAP EXEC CURSOR ABAP Statements
Get Example source ABAP code based on a different SAP table
• OPEN FOR SELECT EXEC SQL
ABAP_EXEC_SQL -
In embedded
ABAP_SYNTAX
What does it do?
Opens a database cursor
Latest notes:
The number of database cursors open simultaneously is restricted by the platform. Any attempts to open too many database cursors raise an exception of the class
ABAP_HINT_END
• FETCH EXEC SQL
ABAP_SYNTAX
What does it do?
Uses an open database cursor
• CLOSE EXEC SQL
ABAP_SYNTAX
What does it do?
Closes an opened database cursor
If no row can be read using
Latest notes:
It depends on the database system whether the database cursor in the database is closed implicitly after the extraction of the final row of the result set or not. For this reason, it is advisable to use the statement
ABAP_HINT_END
Example ABAP Coding
Reading of multiple rows from the database table
ABEXA 00241
ABAP_EXAMPLE_END
Return to menu