A user creates a new agency in draft and, in the same session, travels for it, which are a separate RAP business object. Discarding the agency should discard the travels too. How do you model this with RAP draft scope?
Say your answer out loud first.
Practise another way
Before draft scope, two business objects meant two independent drafts. Since release 2602 RAP supports a draft scope across BOs. Both BOs declare cross associations; the leading agency BO defines the association to travel with create and with draft, and its projection exposes it with dependent draft.
The travel projection says use draft as dependent. Then the travels' drafts belong to the agency's draft: they are locked together, activated with it and discarded with it.
The problem. A composition gives you one draft for a root and its children. But many real objects are separate BOs with their own lifecycle: a customer and its sales orders, an agency and its travels.
Before, a user creating both in draft had two unrelated drafts, and discarding one left the other behind.
Draft scope (SAP release 2602). SAP's overview deck compares the two. With exclusive draft, locking the root locks only its own items.
With a draft scope, editing the leading object also locks the dependent objects. Deleting a newly created leading object in draft removes the dependent ones too.
How SAP's Flight sample models it (package xbo, cloud branch):
" Base BDEF of the leading BO
managed; strict ( 2 ); with draft;
with cross associations;
define behavior for /DMO/R_AGENCYTP_XBO alias Agency ...
{ ...
association _Travel using /DMO/R_TRAVELTP_XBO \_Agency
{ create; with draft; }
}
" Projection of the leading BO
projection; strict ( 2 ); use draft;
define behavior for /DMO/C_AGENCYTP_XBO alias Agency
{ use association _Travel { create; with dependent draft; } }
" Projection of the dependent BO
projection; strict ( 2 ); use draft as dependent;
define behavior for /DMO/C_TRAVELTP_XBO_DRAFTDP alias Travel
{ use create; use update; use delete; use association _Agency { with draft; } }
with cross associations;in both base BDEFs allows associations between the BOs to carry transactional behavior.- The agency defines its
_Travelassociation using the travel BO's own_Agencyassociation, so both sides agree on the relationship, and allowscreatethrough it. - In the travel base BDEF the
_Agencyassociation also declareslink action,unlink actionand aninverse function, which SAP's sample uses to attach or detach existing travels. - The travel BO keeps its normal projection for standalone use and gets a second projection that is dependent on the agency's draft.
Design questions to ask first
- Is the dependent object really separate? If it never exists without the parent and has no own app, a composition child is simpler.
- Locking: users editing an agency now block edits on its travels. Is that acceptable for large customers with thousands of orders?
- Authorization on both BOs, and both need draft tables and total ETags.
- Release: draft scope arrived in release 2602 of the ABAP environment; check whether the customer's on-premise release has it before you design on it.
Confidence note. The syntax above is from SAP's sample; the behavior description comes from SAP's 2026 deck and session. Confirm details in the RAP development guide for the target release.
Explains why composition drafts do not cover separate BOs, writes the cross-association and dependent-draft syntax, and weighs locking and release availability.
Proposes discarding the travels manually in a determination, or merges the BOs into one composition without asking whether travel has its own lifecycle.
Assuming a normal association between two draft-enabled BOs ties their drafts together. Without a draft scope each BO's draft lives and dies on its own.
- When would you still model travel as a composition child instead?
- What locking side effect does a draft scope have for very large leading objects?
- What are link and unlink actions on an association for?
6 official pages. Confidence: medium. Checked 3 Dec 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.