Implementing the Method ExistenceCheck

The method ExistenceCheck is contained in the interface Check existence, which is inherited from the standard interface. You must implement this method for each object type. To do this, you must redefine the method before you implement it.

The exception Object does not exist is defined for the method ExistenceCheck with the number 0001 .

Example

Implementation of the method ExistenceCheck ( check existence of an object).

The method operates on an object of the type FORMABSENC ( form: notification of absence). This object type has the key field NUMBER .

* Method ExistenceCheck
************************************************************
BEGIN_METHOD EXISTENCECHECK CHANGING CONTAINER.

  SELECT SINGLE * FROM SWXFORMABS WHERE FORMNUMBER = OBJECT-KEY-NUMBER.
  IF SY-SUBRC NE 0.
    EXIT_RETURN 0001 SPACE SPACE SPACE SPACE.
  ENDIF.
END_METHOD.