In our application we are using S4Hana SDK for consuming the services of S4Hana.
For update calls to S4 we are using PATCH request type. While doing so found that we are not able to set null value during update(PATCH).
For Eg:
--batch_A
Content-Type: multipart/mixed; boundary=changeset_176b-5a0d-cdab
--changeset_B
Content-Type: application/http
Content-Transfer-Encoding: binary
MERGE RequisitionItems(PurchaseRequisition='',PurchaseRequisitionItem='00000',DraftUUID=guid'00163e4e-c788-1eea-81bd-ddd3e2c48bf2',IsActiveEntity=false) HTTP/1.1
Plant: 0001
Currency: EUR
PurchaseOrg: 0001
CompanyCode: 0001
sap-contextid-accept: header
Accept: application/json
Accept-Language: en-GB
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
Content-Type: application/json
Content-Length: 106
{"ExtPurgOrgForPurg":"0001","PurchasingGroup":"001",**"ExtPlantForPurg":null,**"ExtCompanyCodeForPurg":"0001"}
--changeset_B--
--batch_A--
Here I am trying to set ExtPlantForPurg to null, but the entity is not getting updated with the same, while debugging found that the update request body doesn't contain this field only(its ignored as it contains null)
Let me know if there is any way to update the null values for the property using PATCH request.