RAP Basics Part 6: Behavior Definition — CRUD, Field Control and Features
Preview · a free account unlocks the full lesson
Control what a RAP BO allows with the behavior definition: CRUD operations, static field properties (readonly, mandatory, readonly:update), dynamic field and operation control via features: instance, global features, field mapping, and strict mode.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 5 built the composition tree; now we control what each entity actually allows. The behavior definition (BDEF) is the contract of the business object: which operations exist, which fields are editable, which actions are available, and under what conditions. Operations are declared plainly — create; update; delete; — and delete can simply be left out if the BO must never allow deletion; for children, create happens via an association on the parent, while update and delete are declared on the child itself.
Static field control needs no code at all: field ( readonly ) TravelID, OverallStatus; marks fields that can only be set by logic, field ( mandatory ) AgencyID, CustomerID; marks fields that must be filled, checked on save and flagged in the UI, field ( readonly : update ) CustomerID; makes a field editable only at creation, and field ( readonly, numbering : managed ) TravelUUID; is typical for a managed, system-assigned key.
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
Interview questions on this topic
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.