sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS SY SUBRC 1 documentation, setup help and example usage



Return to SAP documentation index


INCLUDE
ARTICLE

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.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    OO_OBS_SY_REPID_1
    OO_OBS_TABLES_1




    comments powered by Disqus