Ansicht
Dokumentation

ABENBDL_USING_INTERFACE - BDL USING INTERFACE

ABENBDL_USING_INTERFACE - BDL USING INTERFACE

CPI1466 during Backup   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- using interface, Extension

... using interface InterfaceBdef;

As a prerequisite for using interface, the CDS interface behavior definition InterfaceBdef must explicitly allow extensions. It must be declared as extensible in the behavior definition header as described in topic CDS BDL - CDS Behavior Definition Header, Interface BDEF.

Effect

With the optional addition using interface, an original RAP business object is extended via a RAP BO interface. A RAP BO interface is a layer on top of the original BO that serves as interface for stable consumption and is usually released as API. In a BDEF extension with the addition using interface, only entities that are part of the RAP BO interface can be extended.

An extension using interface leads to simultaneous extensions of the original RAP BO and of the interface. For example, an extension action is part of the BDEF derived types of the original RAP BO and of the interface RAP BO.

The extension BDEF must reference RAP BO entities, RAP BO fields, and other elements by their interface names, not by their original names (which may be different). The only exceptions are elements which are not reflected in the interface, such as determinations and validations.

In its implementation in the ABAP behavior pool, the extension may use any released interface existing for the original RAP BO to perform ABAP EML operations. It is an EML consumer like any other and there might be multiple released interfaces for a RAP BO. But it is most common that it uses the very same interface which it extends.

Note

An extension using interface is created for a BDEF of type managed or unmanaged. It is not created directly for the interface. In ABAP Development Tools, you select the original BDEF as basis for an extension.

Caution

SAP recommends you to always extend a RAP BO via an interface and to always use the addition using interface. In some scenarios, using interface is mandatory and this is enforced by a syntax check error.

  • Development guide for the ABAP RESTful Application Programming Model, topic Business Object Interface.

Example

Original BDEF: RAP BO with four nodes.

Interface BDEF: renames the RAP BO entities.

Extension using interface: Extends the root node, which it refers to by its interface name.

The executable example RAP BO Extension Using Interface explains the example above in detail.






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

Length: 5071 Date: 20240511 Time: 220143     sap01-206 ( 64 ms )