A colleague's validation appends an error message to REPORTED but never adds the instance to FAILED. What do you tell them about what the user sees, whether the save stops, and why RAP treats the two parameters differently?
Say your answer out loud first.
Practise another way
I tell the colleague that the message probably appears, but the save is not stopped by it. RAP decides on FAILED: an instance listed there has failed, with a cause in %fail. REPORTED only carries the explanation for a person.
SAP's RAP guide says termination must depend on FAILED, never on messages. So a validation must fill both, with the same %tky, or bad data can pass while an error is shown.
Two parameters, two jobs. Every handler and saver method gets implicit response parameters. Their types are derived from the BDEF (TYPE RESPONSE FOR ...):
failedidentifies the instances an operation could not process. Each row has the key or%cidand%fail-cause, typedIF_ABAP_BEHV=>T_FAIL_CAUSE(for examplenot_found,unauthorized,conflict).reportedcarries messages:%msg(anIF_ABAP_BEHV_MESSAGEobject),%elementfor the field targets,%state_areafor state messages, and%otherfor messages bound to no instance.mappedlinks%cidto the keys that the provider assigned. It is relevant for create and factory operations only.
What SAP says about termination. The RAP development guide is explicit: termination must depend on entries in the fail structure. Messages in reported are only extra information, not a reliable signal.
A validation that fills only reported has therefore told the user a story without telling the framework anything. The instance is not marked as failed.
The correct pattern (as in SAP's /DMO/BP_TRAVEL_D):
LOOP AT travels INTO DATA(travel) WHERE CustomerID IS INITIAL.
APPEND VALUE #( %tky = travel-%tky ) TO failed-travel.
APPEND VALUE #( %tky = travel-%tky
%state_area = 'VALIDATE_CUSTOMER'
%msg = new_message_with_text(
severity = if_abap_behv_message=>severity-error
text = 'Customer is required' )
%element-CustomerID = if_abap_behv=>mk-on ) TO reported-travel.
ENDLOOP.
The other direction matters too. A failed entry without a message stops the processing but leaves the user guessing. SAP recommends a message for each fail entry.
For EML consumers. After MODIFY ENTITIES or COMMIT ENTITIES, branch on failed (or on sy-subrc after the commit). Use reported to log or display the reason. A warning in reported is normal on a successful request.
Release note. This contract is the same in SAP BTP ABAP environment (now SAP Business AI Platform, ABAP environment), SAP S/4HANA Cloud Public Edition and ABAP Platform 2022 and later.
Says FAILED drives the framework and the caller, REPORTED explains it to a person, and shows both filled with the same %tky, a %fail-cause and an %element target.
Says an error-severity message in REPORTED stops the save by itself, or treats FAILED and REPORTED as two names for the same error list.
Relying on the message severity to stop processing. Only an entry in FAILED marks the instance as failed; a lone error in REPORTED can let the data through.
- Which %fail-cause values have you seen, and which ones does the framework set by itself?
- Where does a message go that belongs to no single instance?
- Why does the validation first append an empty entry with only %tky and %state_area?
4 official pages and 1 prep guide. Confidence: high. Checked 3 Dec 2026.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.