ABAP Keyword Documentation → ABAP - Short Reference
OPEN CURSOR - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
OPEN CURSOR [WITH HOLD] dbcur FOR
SELECT ...
FROM ...
[[FOR ALL ENTRIES IN itab] WHERE sql_cond]
[GROUP BY ...] [HAVING sql_cond]
[ORDER BY ...].
Effect
Opens a database cursor
for the selection defined using SELECT
and links a cursor variable dbcur
with this database cursor.
Additions
-
WITH HOLD
Leaves the cursor open in the case of an explicitly triggered database commit or database rollback. -
SELECT ...
Defines a selection set. -
FROM ...
Specifies the database table(s). -
[FOR ALL ENTRIES IN itab] WHERE sql_cond
Specifies a condition for the result set. -
GROUP BY ... [HAVING sql_cond]
Compresses lines and sets a condition on the compressed lines. -
ORDER BY ...
Sorts the result set.