SAP Knowledge Base Article - Public

3697813 - How to determine the "ReferenceDocumentItem" for the "WithholdingTaxItem" when using Journal Entry Post API? - SAP S/4HANA Cloud Public Edition

Symptom

When calling API JOURNALENTRYCREATEREQUESTCONFI , an error message is returned: "The withholding tax base amount exceeds the customer detail or vendor detail *."

Environment

SAP S/4HANA Cloud Public Edition

Cause

The ReferenceDocumentItem field in the WithholdingTaxItem node identifies the item linked to its corresponding creditor or debtor. 

For all other items, such as Debitor Item, Credit Item, Items, and Product Tax Item, the system disregards the value provided in the 'ReferenceDocumentItem' field and instead, automatically assigns Accounting Document Line Item Number based on the predefined order listed:

  1. Debitor Item
  2. Credit Item
  3. Items
  4. Product Tax Item

Resolution

See examples:

 In scenarios where a single DebitItem is present and the intention is to assign the WithholdingTaxItem to the CreditItem, the 'ReferenceDocumentItem' in the payload should be set to 2

 ReferenceDocumentItem in payload  Accounting Document Line Item Number 
Item13
DebitorItem21
CreditItem32
WithholdingTaxItem2 
ProductTaxItem44
ProductTaxItem55

 In scenarios where two DebitItem are present and the intention is to assign the WithholdingTaxItem to the CreditItem, the 'ReferenceDocumentItem' in the payload should be set to 3

 ReferenceDocumentItem in payload  Accounting Document Line Item Number
Item14
DebitorItem21
DebitorItem32
CreditItem43
WithholdingTaxItem3 
ProductTaxItem55
ProductTaxItem66

See Also

Keywords

S4HC API, JOURNALENTRYCREATEREQUESTCONFI, withholding tax base amount, error message 003, ReferenceDocumentItem, debtor records, creditor records, XML payload, API structure, withholding tax item, N:N condition , KBA , AC-INT-2CL , Accounting Interface (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions