Ansicht
Dokumentation

ABAPEXEC_IMPLICIT - EXEC IMPLICIT

ABAPEXEC_IMPLICIT - EXEC IMPLICIT

General Material Data   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- PERFORMING

Short Reference



EXEC SQL PERFORMING subr.
  SELECT ... INTO :wa1 :wa2 ...
ENDEXEC.

Effect

If the addition PERFORMING, which is forbidden in classes, is specified after EXEC SQL, the Native SQL interface performs implicit cursor processing.

Only a SELECT statement can be specified as an embedded Native SQL statement. The Native SQL interface opens a cursor for the SELECT statement and reads the corresponding data row by row. The subr subroutine is called each time a row is read successfully. The subr subroutine must be defined in the same ABAP program and must not have a parameter interface.

If the host variables specified in the SELECT statement after INTO are global data objects of the ABAP program, they can be evaluated in the subroutine. In the subroutine, sy-dbcnt contains the number of rows read so far and sy-subrc is set to the value 0. After the ENDEXEC statement, sy-dbcnt contains the total number of rows read so far and sy-subrc is set to 4 since no more rows could be read using the implicit cursor. If an overflow occurs because the number or rows is greater than 2,147,483,647, sy-dbcnt is set to -1.

Notes

  • Implicit cursor processing using the PERFORMING addition is obsolete and forbidden in classes, since methods of global classes do not have access to the global data and the subroutines of the calling ABAP program. Explicit cursor processing should be used instead.
  • Implicit cursor processing can be exited using the obsolete statement EXIT FROM SQL.

Reads multiple rows from the DDIC database table SCARR and calls the subroutine evaluate for each row read.

Explicit cursor processing.






BAL Application Log Documentation   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 2544 Date: 20240623 Time: 194831     sap01-206 ( 47 ms )