on 2023 Jun 21 1:04 PM
Hi,
We are using an API for S/4HANA cloud (Journal entries- POST, SOAP API). We want to know if it is possible to send in the API two debtor line items, as I show you below.
We use this API to post the payment of an invoice from the customer, but, when the customer has a down payment and we put two line items for the debtor, one with a debit code (S) and the other with the credit code (H), we get an error.
The first debtor line item makes reference to the down payment with a value of 89000
The second line item makes reference to the account balance with a value of 52176
The third debtor line item makes reference to the total of the invoice with a value of - 141176
The credits and the debits have the same amount
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<DocumentReferenceID>RECAUDOS</DocumentReferenceID>
<AccountingDocumentType>ZD</AccountingDocumentType>
<DocumentHeaderText>RECAUDO TITAN</DocumentHeaderText>
<CreatedByUser>CB9980000013</CreatedByUser>
<CompanyCode>4810</CompanyCode>
<DocumentDate>2023-06-20</DocumentDate>
<PostingDate>2023-06-20</PostingDate>
<TaxDeterminationDate>2023-06-20</TaxDeterminationDate>
<DebtorItem>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<Debtor>1000965</Debtor>
<AmountInTransactionCurrency currencyCode="COP">89000</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>Down payment</DocumentItemText>
<Reference1IDByBusinessPartner>-----</Reference1IDByBusinessPartner>
<Reference3IDByBusinessPartner>DAVID ----</Reference3IDByBusinessPartner>
<DownPaymentTerms>
<SpecialGLCode>A</SpecialGLCode>
<TaxCode>V0</TaxCode>
</DownPaymentTerms>
</DebtorItem>
<Item>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<GLAccount>11051050</GLAccount>
<AmountInTransactionCurrency currencyCode="COP">52176</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>ACCOUNT BALANCE</DocumentItemText>
<Reference1IDByBusinessPartner>-----</Reference1IDByBusinessPartner>
<Reference3IDByBusinessPartner>DAVID ----</Reference3IDByBusinessPartner>
<AccountAssignment>
<ProfitCenter>4810111121</ProfitCenter>
</AccountAssignment>
</Item>
<DebtorItem>
<ReferenceDocumentItem>3</ReferenceDocumentItem>
<Debtor>1000965</Debtor>
<AmountInTransactionCurrency currencyCode="COP">-141176</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>TOTAL INVOICE</DocumentItemText>
<AssignmentReference>0090000057</AssignmentReference>
<Reference1IDByBusinessPartner>-----</Reference1IDByBusinessPartner>
<Reference3IDByBusinessPartner>DAVID ----</Reference3IDByBusinessPartner>
</DebtorItem>
<ProductTaxItem>
<TaxCode>V0</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="COP">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="COP">89000</TaxBaseAmountInTransCrcy>
<TaxBaseAmountInGroupCrcy currencyCode="COP">89000</TaxBaseAmountInGroupCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
But, the API responds with a balance error:
Thank you in advance.
Best regards.
Just group nodes DebtorIetm together, without any other items in between.
Hint was given by Yang from SAP - cudos to him!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.