ABAP Open/ Fetch Cursor
The Open SQL statement OPEN CURSOR opens a database cursor for the result set of the main query defined after FOR and links a cursor variable dbcur with this database cursor. The results set of the main query can be read with the statement FETCH. If the addition WITH HOLD is specified, the database cursor is not closed by a database commit executed using Native SQL. Syntax OPEN CURSOR [ WITH HOLD ] @dbcur | @DATA(dbcur) FOR [ WITH +cte1 AS ( SELECT subquery_clauses ) [ , +cte2 AS ( SELECT subquery_clauses ) ... ] ] SELECT mainquery_clauses [ UNION ... ] [ UP TO ... ] [ OFFSET ... ] [ abap_options ] . Fetch cursor The Open SQL statement FETCH extracts the requested rows (using the addition INTO or APPENDING ) from the results set of the database cursor ...
Comments
Post a Comment