RAP Basics Part 7: Actions, Determinations and Validations — Design Decisions
Preview · a free account unlocks the full lesson
Decide where each piece of business logic belongs in a RAP BO: validations (check on save, reject with messages), determinations (derive values on modify or on save), actions (explicit user or API operations, instance, static and factory), side effects for Fiori, and the trigger conditions that keep logic efficient.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 6 controlled operations and fields; now we place business logic correctly. Part 9 shows the implementation code for what's declared here. Validation is a check: it runs on save (and, with draft, during Prepare), reports failed keys and messages, and never changes data — for example, validation validateCustomer on save { create; field CustomerID; } reads the data, checks it, and fills failed-travel and reported-travel. A failed validation stops the save, and with draft it runs during Prepare/Activate.
Determination is a derivation rather than a check. It can run on modify, immediately — for example setting default values or recalculating totals, as in determination setInitialStatus on modify { create; } for a default status of 'O' (open), or determination calculateTotal on modify { field BookingFee, CurrencyCode; } for immediate recalculation — or on save, as in determination drawTravelID on save { create; }, where a number is only assigned at save time. Determinations run IN LOCAL MODE and are allowed to set readonly fields.
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.