RAP Basics
Architect / Cross-trackintermediate

Managed vs Unmanaged Scenarios

Choosing the right RAP flavour.

Explanation

Managed RAP: SAP generates the persistence layer โ€” you define CDS + behaviour, framework handles DB writes. Best for greenfield entities. Unmanaged RAP: you keep your own persistence (BAPIs, existing tables) and implement the CRUDQ handlers. Best for wrapping existing logic.

Code example

ABAP Code
managed implementation in class zbp_i_travel unique;define behavior for ZI_Travel alias Travelpersistent table ztravel{ create; update; delete; }

Real project scenario

A travel-approval Fiori app was built in one sprint using managed RAP: only CDS + behaviour + UI annotations.

Common mistakes

Choosing unmanaged when managed would suffice; mixing frameworks; ignoring draft handling for editable apps.

Best practices

Start managed for new entities; unmanaged only when existing persistence must be reused; version behaviours.

Interview angle

What is the draft table and when is it needed?