cancel
Showing results for 
Search instead for 
Did you mean: 

Define a Business Object Structure with the ABAP RESTful Programming Model

gmoa
Member

Hi community,

we are in the design phase of an unmanaged transactional application development with the SAP - ABAP RESTful Programming Model.

Concretely we are working on the Business Object Structure.

It is possible to define the Business Object Structure as CDS views in a parent child relationship with the keywords root, composition of and association to parent.

Additional it is possible to define usual CDS associations (association to).

Is it intended to use the keywords composition and association to parent and association to mixed in one Business Object Structure?

If yes, how should we decide when using composition / association to parent or association to in order to get a stable Business Object Structure?

Thanks in advance for the answers.

Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

maheshpalavalli
Active Contributor
0 Kudos

From my understanding yes, it should work just fine. a normal association is for value help or used for data join but the composition and association to parent is used to define BO structure, Check this below example, all exist at the same time, but the below one is not root cds view.

define view Z_I_BOOKING_M_MP
  as select from /dmo/booking_m as Booking
  association        to parent Z_I_TRAVEL_M_MP as _Travel     on  $projection.travel_id = _Travel.travel_id
  composition [0..*] of Z_I_BookSuppl_M_MP     as _BookSupplement
  association [1..1] to /DMO/I_Customer        as _Customer   on  $projection.customer_id = _Customer.CustomerID

note: above example is part of the #devtoberfest ABAP RAP exercise

Regards,

Mahesh