12-01-2017 12:38 PM
Hello,
We have created a CDS view with BOPF objects and using the OData service generated by it in UI5 layer.
We are creating and sending the data set from UI5 layer using POST method.
By default, the OData is storing data set in the table specified in BOPF object, We need to validate the data before storing it.
Can someone help here how can we validate the data received by POST method against master data table data.
Where and how exactly can we implement the logic.
Eg: If master data exists for Cost Center Group is C0101-2, C0101-3. it should check before storing whether the data received by POST method is valid.
12-07-2017 12:28 PM
You can create an action validation for the "CREATE_NODE_NAME" action. You have to add the node's key to parameter ET_FAILED_KEY. Then the service will answer with 500. You can also add messages with parameter EO_MESSAGE. The messages will be visible in response.
06-21-2020 10:32 PM
Hi, Thanks for the answer. Unfortunately I had to switch to gateway OData model instead of OData of a CDS view because of many other complexities.