To transform a standard CDS data model into a Business Object (BO) structure capable of transactional behavior, you must define a composition tree (parent-child relationship).
1. Define the Root Node (Parent)
In the parent CDS view (e.g., ZI_RAP_Travel_####), change the definition to a root view and replace the standard association to the child with a composition:
define root view entity ZI_RAP_Travel_####
...
composition [0..*] of ZI_RAP_Booking_#### as _Booking
2. Define the Child Node
In the child CDS view (e.g., ZI_RAP_Booking_####), replace the standard association to the parent with an association to parent:
association to parent ZI_RAP_Travel_#### as _Travel on $projection.TravelUUID = _Travel.TravelUUID
3. Activation
After modifying both files, use Activate All (Ctrl+Shift+F3) to activate both the parent and child views simultaneously.
// In Parent (Travel)
define root view entity ZI_RAP_Travel_####
composition [0..*] of ZI_RAP_Booking_#### as _Booking
// In Child (Booking)
association to parent ZI_RAP_Travel_#### as _Travel on $projection.TravelUUID = _Travel.TravelUUID