ERPClimb logoERPClimb
RAP Business Objects
RAP / CDS / ODataintermediate 10 min read

RAP Business Objects Part 2: Managed vs Unmanaged — A Decision Framework

Preview · a free account unlocks the full lesson

Key takeaway

Get the big picture of RAP implementation types — managed, managed with additional save, managed with unmanaged save and unmanaged — and a short decision checklist you can apply in design workshops.

In this lessonShow sections

Explanation

There are four RAP implementation types: managed, managed with additional save, managed with unmanaged save, and unmanaged. The question that decides which one you need is who must actually persist the data. Business logic, services and consumers stay the same across all four types — the risk to watch for is applying "managed" on tables that a legacy system already owns, which bypasses that legacy system's rules.

Part 1 designed the business object tree; the next design decision is who implements the transactional work — the RAP framework itself, or your own code. This lesson gives the overview, and Unmanaged RAP Part 5 goes deeper into save_modified code and migration.

"Transactional work" covers everything that has to happen for a change: keeping changes in a buffer until save, applying partial updates correctly, locking the data, checking ETags, assigning keys, handling draft, and finally writing to the database in one LUW. The implementation type you choose decides how much of this the framework handles for you.

In the managed type, the framework does everything, including writing your own tables, declared as the "persistent table" in the BDEF — you implement only the business logic: determinations, validations, actions, authorization and feature control. This is the best fit for new objects with their own tables.

Managed with additional save works like managed, but adds a save_modified method where you do extra work inside the same LUW, such as writing a change log or raising an event. The framework still writes the tables itself.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.