What is the difference between a precheck and a validation in RAP, and when do you use each?
Say your answer out loud first.
Practise another way
A precheck runs in the interaction phase before an operation's data reaches the transactional buffer. It sees the incoming values and can refuse the change, so bad data never enters the buffer.
A validation runs in the save sequence on data already in the buffer, based on trigger conditions, and refuses the whole save if anything is inconsistent. I use prechecks for light gatekeeping on incoming values, such as authorization for a new agency, and validations for business consistency.
Precheck
- Declared per operation:
create ( precheck );,update ( precheck );,action ( precheck ) ..., and also on a create-by-association. - Implemented in a handler method
FOR PRECHECK, which receives the incomingentitiesand fillsfailedandreported. - Runs in the interaction phase before the change is applied. A failed instance is not changed; its data never reaches the buffer.
METHODS precheck_update FOR PRECHECK
IMPORTING entities FOR UPDATE travel.
Validation
- Declared with trigger conditions:
validation validateDates on save { create; field BeginDate, EndDate; }. In the BDEF, validations are alwayson save. - Implemented in a
FOR VALIDATE ON SAVEmethod that receives onlykeys; you read the current state withREAD ENTITIES ... IN LOCAL MODE. - Runs in the early save phase. If any instance fails, the whole transactional buffer is rejected (all or nothing) and the consumer is back in the interaction phase to fix the data.
- In a draft BO you also assign it to
draft determine action Prepare, so users see the error before activation.
Side by side
- What it sees: precheck the incoming request; validation the buffer after all changes.
- When: precheck before each modify; validation once at save.
- Failure: precheck refuses that change; validation refuses the save.
When to use which
- Precheck for checks on values that must never land in the buffer. SAP's ABAP Platform 2025 Flight reference scenario uses
precheck_createandprecheck_updateto check whether the user may work with the agency being entered. It does so because instance authorization only sees the state before the change. - Validation for consistency rules that depend on the whole instance or other entities: date ranges, existence of master data, totals across items.
Why not prechecks for everything? They run on every modify, so they must be fast. In a draft app, a refused precheck means the user's input for that field is simply not taken.
A validation, by contrast, lets the draft keep the inconsistent value with a message the user can fix later. That is usually the friendlier design for long forms.
Distinguishes timing and data seen (incoming values vs buffer), failure effect (change vs save refused), and names a real precheck use case such as authorization on incoming values.
Says both 'check data' and are interchangeable, or claims a validation blocks the field change immediately.
Saying a validation stops the change as soon as the user types. A validation never blocks a modify; it blocks the save, and in a draft the inconsistent value stays until the user fixes it.
- At which point of the save sequence does an on-save validation run?
- If only a precheck exists and the data is invalid, does the request ever reach the save sequence?
- Why does instance authorization not see the new value, and how does a precheck help?
2 official pages and 2 prep guides. Confidence: high. Checked 1 Dec 2026.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.