RAP Build-Along Part 7: Clean Core, Security, Performance and Transport
Preview · a free account unlocks the full lesson
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 sectionsHide sections
Visual overview
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.
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
More lessons in this topic
- RAP Basics Part 1: RAP Architecture — Layers, Artifacts and When RAP Fits
- RAP Basics Part 10: EML — Entity Manipulation Language
- RAP Basics Part 11: Draft, Locking and Authorization
- RAP Basics Part 2: Data Model Design — Tables, Keys, Administrative Fields and Interface Views
- RAP Basics Part 3: Projection Layer and Metadata Extensions
- RAP Basics Part 4: Implementation Types — Managed, Unmanaged, Additional Save and Unmanaged Save
- RAP Basics Part 5: Root Entity, Child Entity and Composition
- RAP Basics Part 6: Behavior Definition — CRUD, Field Control and Features
Interview questions on this topic
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.