Skip to Content
0
Jun 30, 2020 at 04:06 PM

How to Patch Operation from SAPUI5 Application for OData Update?

6395 Views

Hi All,

I am looking for the solution or steps to do patch update to OData Service(OData V2) via SAPUI5 Application.

Currently i am using the below code to update the Data

var oData = {
    ProductId: 999,
    ProductName: "myProductUpdated"
}
oModel.update("/Products(999)", oData, {success: mySuccessHandler, error: myErrorHandler});

In the above example, i need to pass the entire payload for my entityset. Instead of passing the entire payload, i just need to send the key and updated fields.

How to do that in SAPUI5?

Thank you ,

Jayakrishnan.