on 2023 Apr 19 8:38 AM
Hi Experts.
I'm having trouble with the result for calling "Journal Entry - Post (Asynchronous)" API. I'm checking how this API works, and by posting with this API, I only get negative values like below.
I'm checking payload by trial and error, but didn't came up with correct way.
What I did, was changing second item's value to positive "110000" and switching DebitCreditCode to "H". However, a journal entry didn't have been posted, so it means the payload is wrong.
So my question is,
- Which parameter is defining to post with a negative value?
- Am I defining payload with wrong way, to be posted as a negative value?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<ID>API_TEST</ID>
<CreationDateTime>2023-04-19T14:40:00.1234567Z</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<ID>API_TEST</ID>
<CreationDateTime>2023-04-19T14:40:00.1234567Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<CreatedByUser>CB9980000002</CreatedByUser>
<CompanyCode>1510</CompanyCode>
<DocumentDate>2023-04-19</DocumentDate>
<PostingDate>2023-04-19</PostingDate>
<Item>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<GLAccount>10010000</GLAccount>
<AmountInTransactionCurrency currencyCode="JPY">110000</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>Test Item 1 DebitCreditCode H</DocumentItemText>
</Item>
<Item>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<GLAccount>10010000</GLAccount>
<AmountInTransactionCurrency currencyCode="JPY">-110000</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>Test Item 2 DebitCreditCode S</DocumentItemText>
</Item>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
Thank you.
Request clarification before answering.
Hi,
In my experience it is much easier to leave out the field DebitCreditCode. Just focus on the sign on the amount value, where negative values will post as a credit, and positive values will post as a debit.
Kind regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the help documentation: This service supports negative posting on header level. Negative posting can be set if DebitCreditCode doesn't sign off the amount in all items. So it seems that the problem is with the DebitCreditCode, without knowing the details of what you are trying to post unfortunately I can't make any recommendation, but just make sure that the Code you use signs off the amount in all items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
39 | |
6 | |
5 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.