cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP RAP Odata V2 and V4 create save data.

Abhinandan_Dutt
Discoverer
0 Likes
504

Hello Experts,

While working on a simple RAP program as part of the "Building Apps with the ABAP RESTful Application Programming Model" course, I encountered something that I’m having trouble understanding.

Why the below piece of code is required before raising the actual error? 

      APPEND VALUE #(  %tky                 = travel-%tky
                       %state_area          = 'VALIDATE_CUSTOMER'
                     ) TO reported-travel.

Any guidance or insights would be greatly appreciated!

ABAP RESTful Application Programming Model , SAP Fiori for SAP S/4HANA 

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
SAP Champion
SAP Champion
0 Likes

@Abhinandan_Dutt 
The section "Invalidating State Messages" of the RAP document explains why that piece of code is required. In a nutshell, it is for invalidating (clearing) previous state messages. Without it, duplicate error messages will appear on the UI.