Ansicht
Dokumentation

ABENBDL_ANCESTOR_EXT - BDL ANCESTOR EXT

ABENBDL_ANCESTOR_EXT - BDL ANCESTOR EXT

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- ancestor association

...  ancestor association _Assoc$[;$]
             $[abbreviation _newName$]
             $[without response$]
             $[{$[with draft;$]}$]


Effect

Declares an association as ancestor association. The following rules apply to ancestor associations:

  • On the way from the current node to the root node, exactly one association for each hierarchy level must be defined as ancestor association.
  • Only associations that lead to a node on a higher hierarchy level than the current node can be defined as ancestor association.
  • The association to the direct parent entity must not be defined as ancestor association, since it is automatically and implicitly considered as ancestor.
  • An ancestor association must have a cardinality of 1.
  • If several associations point to the same association target, only one of them can be labeled as ancestor.
  • The key fields of all ancestor associations must be marked as readonly.

The purpose of ancestor associations is to guarantee the stability of extensions even if the original BO is modified. Via ancestor associations, the path to the RAP authorization master entity, RAP lock master entity, and RAP ETag master entity can be derived and need not be specified explicitly. Therefore, the syntax ancestor association makes the direct pointing to a authorization master, lock master, and ETag master obsolete:

A short syntax form is available: ( lock, authorization, etag ) dependent. Each of the three components lock, authorization, and etag is optional but at least one of them must be specified within the brackets.

Additions:

  • abbreviation _newName: Defines an alternative name for an association. The abbreviation _newName can have a maximum of 16 characters. Associations are in the namespace of their root entity and can have up to 30 characters. This is under certain circumstances too long to be processed in ABAP RAP. Whenever a shorter name is required, you are prompted to assign an abbreviation to the association with no more than 16 characters.
  • without response The optional addition without response is for cross-BO associations that have an association target from another BO. With such a cross-BO association, the association target entity is automatically included in the response types as foreign entity. In this way, problems with the target entity can become part of the response types during read-by-association or create-by-association operations. without response prevents the default behavior of the foreign entity being included in the response types.
If a BO is draft-enabled, then all associations should be draft-enabled, so that the associations always lead to the target instance with the same state (draft or active). As soon as you draft-enable a BO by adding with draft, all BO-internal associations are automatically draft-enabled. To make this behavior explicit, the behavior prompts you to specify the compositions within a draft BO with with draft.

Example

The BDEF extension DEMO_RAP_EXTENSION_1 extends the CDS behavior definition DEMO_RAP_EXTENSIBLE_ROOT. It behavior-enables an extension node and defines the associations to its sibling, grandparent, and great-grandparent as ancestor associations. Lock, authorization, and ETag master are not specified explicitly, but derived implicitly via ancestor associations.

The executable example Node extension explains the example above in detail.






ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 7877 Date: 20240512 Time: 014519     sap01-206 ( 89 ms )