SAP Knowledge Base Article - Public

2762970 - Http Error 500 happens for API - Create Allocation Posting (SAP_COM_0315)

Symptom

You are trying to simulate request for API Create Allocation Posting (Communication Scenario SAP_COM_0315) with SOAP UI tool. You get error Http Error 500.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

Simulate request for API Create Allocation Posting.

Cause

Normally this error is caused by incorrect format of values in the request body.

Resolution

This KBA explains the way to find out the correct data format in the request body.

  1. Use App Communication Arrangements to select the Arrangement that you have built already. 

    2019-03-01_13-18-14.png
  2. Click into the detail. In the Inbound Services part, you can see the Service URL and a link to download WSDL. 

    2019-03-01_13-20-27.png
  3. In SOAP UI tool, create SOAP project and select the WSDL file that you downloaded in Step 2. 
    2019-03-01_14-02-30.png
  4. Double-click the request and input the Service URL. Also add Basis Authentication.
    2019-03-01_13-58-31.png
  5. Elements “UUID” and “CreationDateTime” are normally the ones with problems. They belong to section “AllocationPostingBulkCreateRequest” and subnode “MessageHeader”. Following Steps will explain how to find the correct format for these 2 elements.
    2019-03-01_14-24-15.png
  6. Open the WSDL file you downloaded in Step 2. Search the keyword “AllocationPostingBulkCreateRequest” in Step 5. There could be more than 1 match with this keyword, but you just need to find the one used as definition having property “Type”. In this case it’s “AllocationPostingCreateRequestBulkMessage”.
    2019-03-01_15-05-35.png
  7. Search the word “AllocationPostingCreateRequestBulkMessage” you get in Step 6 and you’ll see the corresponding structure definition. It consists of element “MessageHeader” and “AllocationPostingCreateRequest”. Since “UUID” and  “CreationDateTime” belong to “MessageHeader”, you just write down the type used in “MessageHeader” - “BusinessDocumentMessageHeader”.
    2019-03-01_15-10-15.png
  8. Search the keyword “BusinessDocumentMessageHeader” you get in Step 7 and locate the type definition part. You just write down the type used in “UUID” – “UUID” and “CreationDateTime” – “GLOBAL_DateTime”.
    2019-03-01_15-12-22.png
  9. Search the keyword “UUID” you get in Step 8 and locate the type definition part. And you’ll see its value pattern is “[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}”. Hence the valid value should like this “8cdcd400-0c70-1ed7-aeb1-71d606060b12”.
    2019-03-01_15-14-19.png
  10. Search the keyword “GLOBAL_DateTime” you get in Step 8 and locate the type definition part. And you’ll see its value pattern “[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]{1,7})?Z”. Hence the valid value should like this “2019-03-01T10:32:53Z”.
    2019-03-01_15-18-37.png
  11. Change the request body according to the correct format.
  12. Submit the request and check the returning result.

Keywords

INT, J11, ALLOC_POSTG_CREATE_REQUEST_IN, SOAP, SOAP over HTTP, soap:body , KBA , FI-FIO-GL-2CL , Fiori UI for General Ledger Accounting (Public Cloud) , CO-OM-IS , Information System, iViews , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions