ERPClimb logoERPClimb
Unmanaged RAP
RAP / CDS / ODataadvanced 13 min read

Unmanaged RAP Part 5: Choosing the Implementation Type and Migrating BOPF/SEGW

Preview · a free account unlocks the full lesson

Key takeaway

Compare the four RAP implementation types — managed, managed with additional save, managed with unmanaged save and unmanaged — choose correctly, and follow a safe step-by-step path for moving BOPF objects and SEGW services to RAP.

In this lessonShow sections

Visual overview

Unmanaged RAP Part 5: Choosing the Implementation Type and Migrating BOPF/SEGW — learning sheetIn one line: Compare the four RAP implementation types — managed, managed with additional save, managed with unmanaged save and unmanaged — choose correctly, and follow a safe step-by-step path for moving BOPF objects and SEGW services to RAP.ERPClimb.com / RAP / LESSON 5/5 / LEARNING SHEETUnmanaged RAP Part 5: Choosing the Implementation Type andMigrating BOPF/SEGW1 · IN ONE LINECompare the four RAP implementation types — managed, managed with additional save, managedwith unmanaged save and unmanaged — choose correctly, and follow a safe step-by-step pathfor moving BOPF objects and SEGW services to RAP.2 · KEY IDEAS EXPLAINEDThe Four Implementation TypesManaged — the framework does CRUD, buffer, lockingand writes your tables. Use for new objects withyour own tables.Managed with additional save — framework writesyour tables as usual, AND you get a save_modifiedmethod to do something extra in the same LUW…The Decision GuideAsk these questions in order:How Save_modified Workscreate-<entity> — complete new instances.update-<entity> — changed instances with%control flags showing which fields changed. Add"with full data" in the BDEF if you need…Migrating Bopf To RAPBOPF node → CDS view entity in a composition tree.Determination → determination. Validation →validation. Action → action.3 · DO · AVOIDBest practice!Common mistakeUse the decision guide: managed → additionalsave → unmanaged save → unmanaged, choosing…Extract business logic out offramework-specific code (BOPF classes…Keep save_modified thin: translate and callthe persistence API only.✕Defaulting to full unmanaged whenever a legacyAPI is involved, when managed with unmanaged…✕Using managed with additional save to replacethe standard write — it is for extra work in…✕Forgetting "with full data" and thenpersisting only the changed fields as if they…4 · IN A REAL PROJECTA team migrating a SEGW-based "maintenance notification lite" app chose full unmanaged RAP because"the data is saved through an existing BAPI". Six weeks in, they had 900 lines of buffer, read andCRUD code, and a steady flow of PATCH and ETag bugs. In a design review they realized the BAPI only mattered…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

You have now built both a managed version (in the Managed series) and an unmanaged version (Parts 1-4) of the same Purchase Request, and seen how much more code the unmanaged version needs. This final part lays out the options in between, a decision guide for choosing among them, and how to migrate existing BOPF and SEGW implementations.

There are four implementation types, ordered from most framework help to least. Managed means the framework does CRUD, buffer, locking, and writes your tables — the right choice for new objects built on your own tables.

Managed with additional save still has the framework write your tables as usual, but adds a save_modified method that lets you do something extra in the same LUW, such as writing a change log, filling an extra table, or raising an event; it's declared with "persistent table zpr_head with additional save".

Managed with unmanaged save keeps the framework doing CRUD, buffer, locking, ETag, draft and numbering, but instead of writing tables itself it calls your save_modified method with everything that changed, and you call the persistence API yourself; it's declared with "with unmanaged save" in place of "persistent table".

Unmanaged, the subject of this series, means you own the buffer and all CRUD handlers as well as the saver.

The decision guide asks these questions in order. If the data lives in tables you own with no legacy logic that must run, choose managed. If it's the same situation but you need extra persistence or side effects at save, choose managed with additional save.

If an existing API must write the data but the interaction logic — CRUD, buffer, draft — can stay standard, choose managed with unmanaged save; this is often the best fit for brownfield work, since you get the framework's buffer and %control handling for free and only have to write the save.

Only if the existing application must also control reads, locks, numbering, or complex in-memory state during the interaction phase — for example because the legacy API has its own buffer that must be filled on every change — should you go fully unmanaged.

Many teams pick full unmanaged when managed with unmanaged save would have been enough, and that choice costs hundreds of lines of buffer and CRUD code along with the bugs that come with it, as seen in Part 3.

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.