Ansicht
Dokumentation

ABENOO_OBS_SY_SUBRC_1 - OO OBS SY SUBRC 1

ABENOO_OBS_SY_SUBRC_1 - OO OBS SY SUBRC 1

ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

No Transfer of sy-subrc

The system field sy-subrc must not be used in ABAP Objects - and, since Release 7.0, also outside of classes - as an actual parameter for the output parameters of external procedures.

In ABAP Objects, the following statement causes an error message:

CALL FUNCTION func IMPORTING p = sy-subrc.

Correct syntax:

DATA subrc TYPE sy-subrc.

CALL FUNCTION func IMPORTING p = subrc.

Reason:

After parameter transfer, sy-subrc is set by the call statement. This overwrites the transferred value. With a few exceptions, system fields should never be overwritten explicitly in a program.






Fill RESBD Structure from EBP Component Structure   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 958 Date: 20240426 Time: 195624     sap01-206 ( 18 ms )