Ansicht
Dokumentation

ABENBDL_FOREIGN - BDL FOREIGN

ABENBDL_FOREIGN - BDL FOREIGN

General Data in Customer Master   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- foreign entity

...
foreign entity ForeignEntityName $[alias AliasName$];
...


Effect

Defines a RAP BO entity which s not part of the CDS composition tree of the current RAP BO as part of the response structures, thus enabling message mapping for other BOs. An alias name AliasName can be specified. The length of this alias name can be a maximum of 30 characters.

A foreign entity is defined in the CDS behavior definition header and is therefore included in the response structures of all BO nodes of the current RAP BO. A foreign entity includes the specified entity in the response structures, not a complete foreign BO. It is possible to specify multiple foreign entities, if required.

A business object determination may trigger an operation of another business object that then returns messages. To receive and adapt the messages from a foreign business object, the foreign business object can be registered in the current BO. The messages are mapped during the save sequence.

A reimplementation of the method map_messages in the ABAP behavior pool is optional.

Available for business objects of type managed, unmanaged, projection, and interface.

Development guide for the ABAP RESTful Application Programming Model, section Mapping Messages Between Business Objects.

Example

The following example shows a managed BDEF based on the CDS root view entity DEMO_RAP_FOREIGN_ENTITY. It establishes a connection to the foreign entity DEMO_SALES_CDS_SO_1.

The program DEMO_RAP_FOREIGN_ENTITY accesses the BDEF and creates three new entity instances.

Code snippet:

Result: The entities of the referenced foreign business object are added to the reported structure.

IMAGE @@ABDOC_FOREIGN_ENTITY.png@@456@@528@@




Fill RESBD Structure from EBP Component Structure   General Material Data  
This documentation is copyright by SAP AG.

Length: 3570 Date: 20240424 Time: 130144     sap01-206 ( 48 ms )