SAP Knowledge Base Article - Public

3101527 - 'Precondition required' error message while trying to cancel a Billing document through API - S/4HANA Cloud

Symptom

You are trying to use API_BILLING_DOCUMENT_SRV to cancel a Billing document however faces error message: 'Precondition required".

 

Environment

S/4HANA Cloud all versions

Cause

The error message "Precondition required" indicates that you did not pass an Etag when posting the request. Kindly read the business documentation for further info.

Resolution

To ensure that you process the latest version of a billing document, you have to use the ETag handling feature that is implemented using the LastChangeDateTime property in the A_BillingDocument node. To retrieve the ETag value for a billing document, perform a GET operation on the LastChangeDateTime property. This value can then be used when triggering a cancel action. 

Keywords

KBA , SD-BIL-IV , Processing Billing Documents , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions