ERPClimb logoERPClimb
RAP Basics
Architect / Cross-trackadvanced 23 min read

RAP Build-Along Part 7: Clean Core, Security, Performance and Transport

Preview · a free account unlocks the full lesson

Key takeaway

Part 7 of the RAP Bootcamp hardens the Travel + Booking app for production: DCL read access versus RAP modify authorization, released APIs and clean core, ATC, bulk and N+1 performance, draft/lock/concurrency and authorization negative tests, DEV→QAS→PRD transport and service-binding checks, production troubleshooting, a managed vs unmanaged decision table, and a capstone checklist.

In this lessonShow sections

Visual overview

RAP Build-Along Part 7: Clean Core, Security, Performance and Transport — learning sheetIn one line: Part 7 of the RAP Bootcamp hardens the Travel + Booking app for production: DCL read access versus RAP modify authorization, released APIs and clean core, ATC, bulk and N+1 performance, draft/lock/concurrency and authorization negative tests, DEV→QAS→PRD transport and service-binding checks, production troubleshooting, a managed vs unmanaged decision table, and a capstone checklist.ERPClimb.com / ARCH / LESSON 7/9 / LEARNING SHEETRAP Build-Along Part 7: Clean Core, Security, Performanceand Transport1 · IN ONE LINEPart 7 of the RAP Bootcamp hardens the Travel + Booking app for production: DCL read accessversus RAP modify authorization, released APIs and clean core, ATC, bulk and N+1performance, draft/lock/concurrency and authorization negative tests, DEV→QAS→PRD transport…2 · KEY IDEAS EXPLAINEDDCL Versus RAP Modify AuthorizationTwo independent layers:Clean Core And Released APIsKeep the package in ABAP Cloud language versionwhere available (BTP, S/4HANA Cloud, and S/4HANA2022+ developer extensibility). The compiler then…Use only released APIs: `cl_abap_context_info` fordate/user, `cl_system_uuid`, released CDS viewslike `I_Currency`. Check the API State tab in ADT…AtcUse of unreleased API / non-cloud-compliantstatements.`COMMIT WORK` / `ROLLBACK WORK` in behaviorimplementation.Performance: Bulk And N+1RAP calls handlers with all keys at once.Performance bugs are almost always N+1:3 · DO · AVOIDBest practice!Common mistakeAlways implement both DCL (read) and behaviorauthorization (modify), aligned on the same…Keep ABAP Cloud language version and releasedAPIs; ATC clean before release.Design handlers for bulk; trace with ABAPCross Trace and profiler at realistic volume.✕Relying on DCL alone and assuming it blocksmodifications.✕Using `IN LOCAL MODE` from consumer code tobypass a 403.✕Switching a package to Standard ABAP to use anunreleased API instead of finding a released…4 · IN A REAL PROJECTA security review found that an external integration user with no read access to a sales region could stillupdate travels of that region by sending known UUIDs to the OData service. The app relied only on DCL. Addingagency-aware instance authorization in the BO, reusing the same authorization object field as the DCL, and…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

This part adds no new business features — it adds what separates a demo from a production app: an access control object ZI_RAP_Travel (DCL) for read restriction, alongside the existing RAP modify authorization; an authorization object ZRAP_TRVL with fields ACTVT and ZAGENCY and matching IAM/role assignments; a clean ATC run for the package; performance-safe handlers and CDS; a negative-test suite for drafts, locks, ETags, and authorization; and a transport and go-live checklist.

It assumes Part 6 is complete, with service definition ZUI_RAP_TRAVEL, binding ZUI_RAP_TRAVEL_O4, and an EML end-to-end test plus ABAP Unit already in place.

DCL and RAP modify authorization are two genuinely independent layers. Read access is handled by DCL (define role) on ZI_RAP_Travel/ZC_RAP_Travel, protecting which rows a user can SELECT or read via OData, enforced on every CDS read carrying #CHECK.

Modify authorization is handled by the BDEF's authorization master plus the handler methods, protecting create, update, delete, actions, and draft Edit, enforced on every EML or OData modify that isn't running in local mode.

DCL does not replace RAP modification authorization — a user who can read Travel 42 via DCL can only change it if get_instance_authorizations allows it, and conversely, removing a user's read access does not automatically block an EML MODIFY against a known key, since the behavior authorization has to check too.

The DCL here restricts Travels by agency using the ZAGENCY field of ZRAP_TRVL, and projections inherit this via inheriting conditions from entity ZI_RAP_Travel (or a projection-level role using @AccessControl.authorizationCheck: #CHECK); the instance authorization from Part 4 is extended to check the same agency, so the read and write rules agree with each other.

IN LOCAL MODE skips authorization entirely — that's correct inside the BO's own handlers, but it should never be used in code called by an external consumer just to "work around" a 403.

On clean core and released APIs: keep the package in the ABAP Cloud language version where available (BTP, S/4HANA Cloud, and S/4HANA 2022+ developer extensibility), since the compiler then rejects unreleased objects outright. Use only released APIs — cl_abap_context_info for date/user, cl_system_uuid, released CDS views like I_Currency — checking the API State tab in ADT or the Released Objects tree.

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

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

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.