SAP Knowledge Base Article - Public

3741543 - The InvoicedQuantity tag is Displayed with an Incorrect Amount in the eDocument XML - SAP S/4HANA Cloud Public Edition

Symptom

The InvoicedQuantity tag is displayed with the amount as 1 in the eDocument XML, however it's is expected to be displayed with the value zero.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Go to the eDocument Cockpit App.
  2. In the Source Document field, enter ABC (where ABC represents the Source Document ID).
  3. Mark the eDocument ABC.
  4. Select Display -> Preview/Display XML.

The <InvoicedQuantity> tag is displayed with the value 1, however it should be displayed as zero according to the information in the Source Document ABC.

Cause

InvoicedQuantity
This is the actual billed quantity.

The value stored in the <InvoicedQuantity> tag of the eDocument XML is not displayed as zero, even though it should reflect the actual billed quantity from the source document. This behavior occurs because, in accordance with the Peppol BIS Billing 3.0 – November 2025 release (BR-22 rule), when the item quantity is zero, the system automatically defaults the invoice quantity to 1 in the XML. This is driven by the fixed value DEFAULT_QUANTITY configured in the "Define Fix Values" activity.

Resolution

This is currently the expected system behavior.

As a possible workaround, a custom logic via the BAdI EDOC_ADAPTOR_CLOUD can be implemented to adjust the value in the <InvoicedQuantity> tag in the eDocument XML. 

Using the Badi EDOC_ADAPTOR_CLOUD is possible to directly change, remove or add information in the tags of the XML of the eDocument through a custom logic. 

See Also

Community Blog: Enhancing the Standard XML File for Electronic Documents using the BAdI EDOC_ADAPTOR_CLOUD

Keywords

XML, InvoicedQuantity, EDOC_ADAPTOR_CLOUD, InvoicedQuantity, BaseQuantity, zero, one , KBA , CA-GTF-CSC-EDO-DE , Germany , How To

Product

SAP S/4HANA Cloud Public Edition all versions