2024 Feb 20 10:21 AM
Hello, right now I am doing development for unmanaged scenario app which has to execute some business logic when saving. In my case that would be a function module which will return some error data using a bapiret table.
Using the error table I'm appending every error as a line of the reported-entity table.
After doing that, the OData request does not fail, but returns a positive return code - in my case I get 201 Created on a create request, and the response body is filled with the error messages that were produced from the function module.
Is it possible to fail the request entirely ( so the request returns error code 500 ) ?
2024 Feb 21 8:09 AM
Hi ,
You will have to fill the response parameter - 'Failed' along with reported.
Failed -> to identify failure and response code.
Reported -> to send the messages in all the scenarios of success, error , warnings etc.
https://help.sap.com/docs/abap-cloud/abap-rap/general-rap-bo-implementation-contract?locale=en-US#lo...
Best wishes,
Ramjee Korada