Skip to main content

delete

The DeleteRequestBuilder class allows you to create DELETE requests, that delete an entity.

/*
The following won't work on the real SAP S/4HANA BusinessPartner service because BusinessPartners cannot be deleted.
This is added only for the sake of the example.
*/
const { businessPartnerApi } = businessPartnerService();
businessPartnerApi.requestBuilder().delete(businessPartner);

Be aware that delete requests will fail if their ETag doesn't match. Check out the ETag section for more information.