SAP RAP: Modify ENTITIES in the respond (Unmanaged Implementation)

Hello Guys,

I am working on a RAP Service type: “Unmanaged Implementation”

And I would like to modify the ENTITIES values in the respond. Below my POSTMAN request, when I execute it (POST), I want to fill the parameter: “RESERVATION” in the RESPOND.

rachidroughi_0-1714549405360.png

Here my Service Exposition and Method:

rachidroughi_1-1714550061699.png

rachidroughi_0-1714549993410.png

Here my Business Definition:

rachidroughi_1-1714549562702.png

Here my CDS:

rachidroughi_2-1714549627653.png

Here my Behavior Class:

rachidroughi_3-1714549715201.png

I added the code:

rachidroughi_0-1714563379822.png

And when I execute the request, i have an issue:

 

 
“code”: “BEHAVIOR_CONTRACT_VIOLATION”,
“message”: “ABAP Runtime error ‘BEHAVIOR_CONTRACT_VIOLATION'”,

It’s normal because ENTITIES is defined as IMPORTING parameter.

How can I do specify ENTITIES as CHANGING ?

Any idea?

Best regards,

Rachid

 

 

 

Scroll to Top