On paper, write the behavior definition of the same entity once as managed and once as unmanaged, and show where the create logic lives in each.
Say your answer out loud first.
Practise another way
In managed, the BDEF declares create, update and delete with a persistent table, and the framework provides the buffer, locking and save. The custom code is only validations, determinations and actions.
In unmanaged, the header says unmanaged and there is no persistent table. The handler plus the saver methods implement create, update, delete, read and lock.
They usually call existing function modules into the BO's own buffer and write in save. Unmanaged is the right pick only to reuse proven legacy logic.
Managed
managed implementation in class zbp_r_order unique;
strict ( 2 );
define behavior for ZR_Order alias Order
persistent table zorder
lock master
authorization master ( instance )
etag master LocalLastChanged
{
create; update; delete;
field ( numbering : managed, readonly ) OrderUUID;
validation checkCustomer on save { create; field Customer; }
}
No create method exists in the class. The framework creates the instance in its buffer, fills the UUID, locks, and writes zorder in the save sequence. You implement checkCustomer and the authorization method.
Unmanaged
unmanaged implementation in class zbp_i_order_u unique;
strict ( 2 );
define behavior for ZI_Order_U alias Order
lock master
authorization master ( instance )
etag master LastChangedAt
{
create; update; delete;
field ( mandatory : create, readonly : update ) OrderID;
mapping for zorder corresponding { OrderID = order_id; }
}
No persistent table: that addition exists only for managed BOs. Now you must implement create, update, delete, read, lock in the handler and finalize, check_before_save, save, cleanup (and adjust_numbers with late numbering) in the saver.
METHOD create.
LOOP AT entities ASSIGNING FIELD-SYMBOL(<new>).
DATA(row) = CORRESPONDING zorder( <new> MAPPING FROM ENTITY ).
zcl_order_buffer=>get( )->add( row ). " checks, no DB write
INSERT VALUE #( %cid = <new>-%cid OrderID = row-order_id ) INTO TABLE mapped-order.
ENDLOOP.
ENDMETHOD.
The saver's save flushes the buffer (or calls the legacy save function module) and cleanup clears it. SAP's Flight unmanaged scenario follows this pattern with /DMO/FLIGHT_TRAVEL_CREATE in create, /DMO/FLIGHT_TRAVEL_SAVE in save and /DMO/FLIGHT_TRAVEL_INITIALIZE in cleanup; its lock method enqueues through cl_abap_lock_object_factory.
How to choose (say this out loud)
- Managed: new application, new tables. Least code, draft and locking out of the box.
- Unmanaged: an existing, UI-independent API that already holds the business logic and its buffer, typically function modules or BAPIs that must stay the only write path.
- Middle ground: managed with
with unmanaged saveorwith additional savewhen only the write must go through legacy code.
The handler contract is the same in both: report problems in failed and reported, map new keys in mapped, never commit.
Writes both headers correctly (persistent table only in managed) and shows a real unmanaged create with buffer and mapped. Names the saver methods and gives a reason-based choice, including managed with unmanaged save.
Writes 'managed = automatic, unmanaged = manual' without code, or puts a persistent table and an INSERT inside the unmanaged create method.
Writing to the database in the unmanaged create or update handler. Database changes belong only in the late save phase; the handler fills a buffer.
- In the unmanaged BO, why does the create method not write to the database?
- When would you use managed with unmanaged save instead of unmanaged?
- What must the unmanaged lock method do?
2 candidate write-ups, 3 official pages and 1 prep guide. Confidence: high. Checked 2 Dec 2026.
- Candidate write-up Gives the question.
- Candidate write-up Gives the question.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.