In ABAP Objects, an error message occurs on:
EXEC SQL PERFORMING
form.
select ... into :wa from dbtab where
...
ENDEXEC.
FORM
form.
...
EXIT
FROM SQL.
...
ENDFORM.
Correct syntax:
EXEC SQL.
open
c1 for
select ... from dbtab where ...
ENDEXEC.
DO.
EXEC SQL.
fetch
next c1 into :wa
ENDEXEC.
IF
sy-subrc <> 0.
EXIT.
ENDIF.
...
ENDDO.
EXEC
SQL.
close c1
ENDEXEC.
Reason:
You should not call subroutines from local classes, and cannot call them from global
classes. The called subroutine has no interface, working instead with the global data of the main program.
The EXIT FROM SQL statement ends the SQL processing without reference to the actual SQL statement.
Overview:
Replacement for Obsolete Statements ABAP Objects