on 2026 Mar 16 1:20 PM
Question:SAP S/4HANA Cloud Public Edition
Calling SOAP Journal Entry-Clearing (asynchronous) API, how to pass in parameters in ABAP Development Tools, and the interface call failed? The call attempts the following three ways, all of which report errors, as follows:
Situation 1:
Use standard SAP_COM_0002, and use service _ id: journalentryBulkclearingrequest _ in.
Error in calling asynchronous SOAP interface: The communication protocol does not exist.
1-1
1-2Situation 2:
Use standard SAP_COM_0002, and use service _ id: journalentryburkclearningquestions _ webi.
Error in calling asynchronous SOAP interface: The communication protocol does not exist.
Situation 3:
Use standard SAP_COM_0002 and service _ id: co _ fins _ journal _ entry _ bulk _ cle _ sprx. Error in calling asynchronous SOAP interface: Logical port does not belong to consumer agent.
Request clarification before answering.
Hello,
Thank you very much for your question. I asked our internal chatbot for support and hope that you find the response useful. Please check whether the AI-generated information helps you solve your issue.
Kind regards, Henrike
For more information, see Journal Entry – Clearing (Asynchronous).
Based on your three error scenarios, here are the solutions:
This error occurs when the logical port or service ID is misconfigured.
Verify the correct Service ID in transaction SOAMANAGER:
SOAMANAGER → Select the correct systemJournalEntryBulkClearingRequest_In (case-sensitive)Check Logical Port Configuration:
Transaction: SOAMANAGER
→ Web Service Configuration
→ Logical Ports
→ Verify port exists and is activeCorrect Code Implementation:
DATA: lo_client TYPE REF TO cl_soap_client.
TRY.
CALL METHOD cl_soap_client=>create
EXPORTING
logical_port_name = 'YOUR_LOGICAL_PORT_NAME'
IMPORTING
client = lo_client.
"Set up request
lo_client->request = ...
CALL METHOD lo_client->invoke.
CATCH cx_soap_fault INTO DATA(ls_fault).
MESSAGE e000(SO) WITH ls_fault->get_text( ).
ENDTRY.This error means the logical port is not assigned to your consumer proxy.
Verify Consumer Proxy Configuration:
Transaction: SOAMANAGER
→ Web Service Consumer
→ Select correct service/proxy
→ Check "Logical Port Assignment"Correct Service ID Format:
co_fins_journal_entry_bulk_cle_srp (remove extra characters)TRANSACTION SE80 → Service ImplementationProper Code with Error Handling:
DATA: lo_proxy TYPE REF TO z_journal_entry_proxy. "Your proxy class
TRY.
CREATE OBJECT lo_proxy
EXPORTING
logical_port_name = 'JOURNAL_ENTRY_PORT'.
CALL METHOD lo_proxy->journal_entry_bulk_clearing_request
EXPORTING
request = ls_request_data
IMPORTING
response = ls_response_data.
CATCH cx_ai_system_fault INTO DATA(ls_sysfault).
MESSAGE e000(SO) WITH ls_sysfault->get_text( ).
ENDTRY.List all available logical ports:
CALL FUNCTION 'SOAMANAGER_GET_LOGICAL_PORTS'
IMPORTING
lt_ports = DATA(lt_ports).Verify Web Service is active:
SOAMANAGER → Check activation statusCheck Consumer Proxy Namespace:
SE80 → Select your proxyTest with Transaction SOAMANAGER directly before coding
Would you like help with any specific step or the exact code for your scenario?
Can you please help this SAP S/4HANA Cloud Public Edition partner? Calling SOAP Journal Entry-Clearing (asynchronous) API, how to pass in parameters in ABAP Development Tools, and the interface call failed? The call attempts the following three ways, all of which report errors, as follows: Situation 1: Use standard SAP_COM_0002, and use service _ id: journalentryBulkclearingrequest _ in. Error in calling asynchronous SOAP interface: The communication protocol does not exist.
1-1 1-1 1-2 1-2 Situation 2: Use standard SAP_COM_0002, and use service _ id: journalentryburkclearningquestions _ webi. Error in calling asynchronous SOAP interface: The communication protocol does not exist.
图片2-1.png图片2-2.pngSituation 3: Use standard SAP_COM_0002 and service _ id: co _ fins _ journal _ entry _ bulk _ cle _ sprx. Error in calling asynchronous SOAP interface: Logical port does not belong to consumer agent.
图片3-1.png图片3-2.png
Since this is S/4HANA Cloud Public Edition, the issue is fundamentally different from on-premise. Here's the correct approach:
In S/4HANA Cloud Public Edition, you cannot use standard SAP_COM_0002. You must use the actual communication arrangement created in your system.
Go to SAP Fiori Launchpad → Search: "Communication Arrangements"
Look for arrangements related to Journal Entry clearing:
SAP_COM_0545 (Journal Entry Bulk Clearing - Inbound)Note the Service ID shown (e.g., JournalEntryBulkClearingRequest_In_V1)
Fiori → Communication Arrangements
→ Find Journal Entry Clearing arrangement
→ Check:
✓ Status: Active
✓ Inbound Service: Enabled
✓ Protocol: REST or SOAP
✓ Authentication: OAuth 2.0 or Basic AuthSince Journal Entry Clearing is typically asynchronous, use this approach:
*&---------------------------------------------------------------------*
*& Report: Call Journal Entry Bulk Clearing (Async)
*&---------------------------------------------------------------------*
REPORT z_journal_entry_clearing.
DATA: lv_url TYPE string.
DATA: lv_response TYPE string.
DATA: lv_request_body TYPE string.
DATA: lo_http_client TYPE REF TO if_http_client.
DATA: lv_status_code TYPE i.
DATA: lv_reason_phrase TYPE string.
START-OF-SELECTION.
" 1. Build the request payload
lv_request_body = build_journal_entry_request( ).
" 2. Get the service endpoint (from Communication Arrangement)
lv_url = 'https://[your-s4hc-system]/sap/opu/odata/sap/C_JOURNALENTRYITEM_SRV'.
" 3. Create HTTP client
TRY.
cl_http_client=>create_by_url(
EXPORTING
url = lv_url
IMPORTING
client = lo_http_client
).
" 4. Set authentication (OAuth token or Basic)
lo_http_client->request->set_header_field(
name = 'Authorization'
value = 'Bearer ' && get_oauth_token( ) "Or use Basic Auth
).
" 5. Set Content-Type
lo_http_client->request->set_header_field(
name = 'Content-Type'
value = 'application/json'
).
" 6. Send request
lo_http_client->request->set_cdata( lv_request_body ).
lo_http_client->send( ).
" 7. Get response
lv_status_code = lo_http_client->response->get_status( ).
lv_reason_phrase = lo_http_client->response->get_reason_phrase( ).
lv_response = lo_http_client->response->get_cdata( ).
IF lv_status_code = 202 OR lv_status_code = 200.
MESSAGE 'Request submitted successfully (Async)' TYPE 'S'.
ELSE.
MESSAGE 'Error: ' && lv_reason_phrase TYPE 'E'.
ENDIF.
CATCH cx_http_client_error INTO DATA(lx_error).
MESSAGE lx_error->get_text( ) TYPE 'E'.
ENDTRY.
*&---------------------------------------------------------------------*
*& Form: Build Request Payload
*&---------------------------------------------------------------------*
FORM build_journal_entry_request CHANGING cv_payload TYPE string.
" Build JSON payload for Journal Entry Clearing
" Example structure (adjust to your API):
cv_payload = |{
"JournalEntryBulkClearingRequest": {
"JournalEntry": [
{
"CompanyCode": "1000",
"JournalEntryNumber": "100001",
"FiscalYear": "2024",
"DocumentDate": "2024-01-15"
}
]
}
}|.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form: Get OAuth Token
*&---------------------------------------------------------------------*
FORM get_oauth_token CHANGING cv_token TYPE string.
" Implementation depends on your OAuth setup
" Usually retrieved from Communication Arrangement credentials
cv_token = 'YOUR_OAUTH_TOKEN_HERE'.
ENDFORM.| Situations 1 & 2 | Wrong Service ID format; SAP_COM_0002 doesn't support Journal Entry Clearing | Use actual communication arrangement ID |
| Situation 3 | co_fins_journal_entry_bulk_cle_sprx doesn't exist in Cloud Edition | Use OData/REST endpoint instead |
S/4HANA Cloud prefers OData v4 over SOAP:
DATA: lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy.
DATA: ls_request_uri TYPE /iwbep/if_cp_request_uri=>ty_uri.
TRY.
lo_client_proxy = /iwbep/cl_cp_factory=>create_v4_remote_proxy(
EXPORTING
service_id = 'C_JOURNALENTRYITEM_SRV' "Actual service name
logical_port_name = 'JOURNAL_ENTRY_CLEAR'
).
" Create request
DATA(lo_request) = lo_client_proxy->create_resource_for_entity_set(
'JournalEntry'
)->create_request_for_action(
'JournalEntryClearingAction'
).
" Execute
DATA(ls_response) = lo_request->execute( ).
CATCH /iwbep/cx_gateway INTO DATA(lx_error).
MESSAGE lx_error->get_longtext( ) TYPE 'E'.
ENDTRY.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.