ABAP Keyword Documentation → ABAP − Reference → Obsolete Language Elements → Obsolete Processing of External Data → Obsolete Database Access → Obsolete Native SQL → Obsolete Cursor Processing in Native SQL
EXEC SQL - EXIT FROM SQL
EXIT FROM SQL.
The statement terminates implicit cursor processing
after the current subroutine has finished. Processing of the called ABAP program is resumed after
sy-dbcnt contains the number of rows read up until
that point and
sy-subrc is set to the value 4. If an overflow occurs because the number or rows is greater than 2,147,483,647,
sy-dbcnt is set to -1.