Ansicht
Dokumentation

ABENRPM_GLOBAL_CLASS - RPM GLOBAL CLASS

ABENRPM_GLOBAL_CLASS - RPM GLOBAL CLASS

CPI1466 during Backup   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Global class


* Work in progress *

CLASS class_name DEFINITION PUBLIC
  $[ABSTRACT$]
  $[FINAL$]
  FOR BEHAVIOR OF CDS_entity_behavior.
  PUBLIC SECTION.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.
CLASS class_name IMPLEMENTATION.
ENDCLASS.


Effect

The behavior pool, a special global ABAP class, is used to implement the transactional behavior of a business object. The global class is implicitly defined as abstract and final.

The behavior definition CDS_entity_behavior specifies the behavior of the business object. ABAP Compiler derives both the operations to implement and the structure types and table types used from behavior definitions. The behavior pool depends on the behavior definition: Changes to the behavior definition lead to its regeneration.

Any number of behavior pools can be assigned to a behavior definition (1:n relation). This way, applications can structure their implementations in multiple units.

The behavior pool can have static methods, CLASS-DATA, CONSTANTS and TYPES.

The actual substance of a behavior pool is located in the local classes. Two types of special local classes can be defined:

  • one or more handler classes to implement the interaction phase of the business object behavior
  • and a saver class to implement the save phase of the business object behavior.

Note

The behavior pool is not instantiated or inherited.

In the following example, the data from the ABAP flight data reference scenario (short flight data scenario) is used. It represents a legacy business logic that can be used to create and update flight bookings. The root entity Travel represents the business object for managing flight trips. The underlying data model and the behavior of the root entity Travel are described in the CDS BDL - Example.

The following example shows the global class of the behavior implementation of the business object.

CLASS zcl_travel DEFINITION
  PUBLIC
  ABSTRACT
  FINAL
  FOR BEHAVIOR OF travel.
  PUBLIC SECTION.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.
CLASS zcl_travel IMPLEMENTATION.
ENDCLASS.





BAL Application Log Documentation   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 3912 Date: 20240328 Time: 125601     sap01-206 ( 56 ms )