SAP Knowledge Base Article - Public

3737710 - Error F5704 "Inconsistent Amounts" when calling Journal Entry - Post API - SAP S/4HANA Cloud Public Edition

Symptom

Error F5704 Inconsistent amounts when post Journal Entry with API Journal Entry - Post.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Post an invoice via API Journal Entry – Create (Synchronous) where the CashDiscountBaseAmount in a CreditorItem or DebtorItem has a different sign from the AmountInTransactionCurrency.
  2. Observe that the system returns error “Inconsistent amounts” (F5704).

Cause

The CashDiscountBaseAmount in a creditor/debtor item had a sign inconsistent with the item’s AmountInTransactionCurrency and debit/credit indicator, leading to inconsistency checks failing.

Generally, error F5704 is raised when amounts in the FI/CO interface do not follow the sign convention: debit amounts are ≥ 0 and credit amounts are ≤ 0 across all relevant amount fields.

Resolution

  1. Align CashDiscountBaseAmount with the item amount:
    • Ensure CashDiscountBaseAmount uses the same sign as the item’s AmountInTransactionCurrency for each creditor/debtor item.
  2. Verify debit/credit consistency:
    • Confirm that the item’s sign and the debit/credit indicator are consistent with FI/CO rules (debit ≥ 0, credit ≤ 0), including scenarios of negative postings. Refer to KBA  3641505 - Negative Posting Check for Posting APIs for proper usage of Negative Posting.

    See Also

    Keywords

    F5704, inconsistent amounts, journal entry post api, cashdiscountbaseamount, amountintransactioncurrency, debitcreditcode, creditor item, debtor item, negative posting, sign mismatch, posting error, soap api, s/4hana cloud, finance , KBA , AC-INT-2CL , Accounting Interface (Public Cloud) , Problem

    Product

    SAP S/4HANA Cloud Public Edition all versions