on 2023 Apr 12 3:18 AM
Dear Experts.
I have problem calling Journal Entry Posting SOAP API. I'm calling "Journal Entry - Post (Asynchronous)" API and getting status code 202 with no result. As I check Manage Journal Entries application, none of the journal entry was created. However, in Technical Monitoring application, which I selected "Message Monitoring SOAP Error Log," there is no error.
I'm posting details below. Please tell me if I made any mistake.
<URL>
http://{{host}}/sap/bc/srt/scs_ext/sap/journalentrybulkcreationreques?MessageId={{GUID}}
Defined {{host}} in Communication System and setting GUID in {{GUID}}
<Authentication>
Defined user information in Communication Arrangements application, and as I'm not getting 401 Unauthorized, authentication should be fine. If I change username value, I can get statuscode 401, so getting 202 also shows authentication is fine.
<Header>
I'm trying to call API by using Postman. Before createing request, I imported WSDL file of the API I want to call. Then, I set the header below.
<Request>
I'll post XML Request below. I created request by trial and error, until I get no errors. I filled required value, and I created <Item> and <CreditorItem> Tag which I saw in someone's blog.
I saw API Refference biut didn't really get how the Item, DebtorItem, CreditorItem works, so this part might be mistaking.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<ID>API_TEST</ID>
<CreationDateTime>2023-04-11T14:40:00.1234567Z</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<ID>API_TEST</ID>
<CreationDateTime>2023-04-11T14:40:00.1234567Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<CreatedByUser>CB9980000002</CreatedByUser>
<CompanyCode>1510</CompanyCode>
<DocumentDate>2023-04-11</DocumentDate>
<PostingDate>2023-04-11</PostingDate>
<Item>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<GLAccount>10010000</GLAccount>
<AmountInTransactionCurrency currencyCode="JPY">110000</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>Test Item 1</DocumentItemText>
</Item>
<CreditorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Creditor>10010000</Creditor>
<AmountInTransactionCurrency currencyCode="JPY">110000</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
</CreditorItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope><br>
Thank you.
Hi Yu,
If return code is 202, it normally means the API posting was accepted by the gateway and the data generation coding was executed.
However, there could be error with the functional area.
You need to check the errors in Message Dashboard.
For more details, please check below blogs:
https://blogs.sap.com/2018/08/26/example-of-synchronous-vs-asynchronous-apis-in-sap-s4hana-cloud/
https://blogs.sap.com/2018/03/07/api-extensibility-in-sap-s4hana-cloud-and-monitoring-with-aif/
Best Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
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.