web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SAP ERP connector - Ca...
Power Automate
Answered

SAP ERP connector - Cannot invoke RFC (timeout)

(1) ShareShare
ReportReport
Posted on by 103

Hello there,

 

I am trying to test the SAP ERP connector in my company. I have a test SAP system in which I have created a system user for invoking RFCs.

 

I have installed the on-premises data gateway (latest version) on a windows server VM as well as the NCo 3.1 64-bit version and its dependencies on it.

 

I have also created the SAP ERP connector and all good.

 

Thing is that whenever I try the  Call SAP function (V2) the following error shows from PA cloud flow:

 

The dynamic invocation request failed with error: Unexpected error occurred when calling the ApiHubsRuntime API: 'Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The ApiHubsRuntime API call failed with http status code 'BadGateway' and response content '{
"error": {
"code": 502,
"source": "europe-001.azure-apim.net",
"clientRequestId": "e8f8b662-b325-42dc-b46a-d2b5931c2657",
"message": "BadGateway",
"innerError": {
"error": {
"code": "ExceptionWhileConnecting",
"message": "\nLOCATION SAP-Gateway on host sid-hdb-s4h / sapgw00\nERROR timeout during allocate\nTIME Thu May 9 08:07:02 2024\nRELEASE 781\nCOMPONENT SAP-Gateway\nVERSION 2\nRC 242\nMODULE /bas/781_REL/src/krn/si/gw/gwr3cpic.c\nLINE 2257\nDETAIL no connect of TP sapdp00 from host\n ec2-3-220-194-148.compute-1.amazonaws.com after 20 sec\nCOUNTER 12\n\nRETURN CODE: 27",
"target": "Microsoft.Adapters.SAP.NCo.RfcClientConnection.<OpenAsync>d__26.MoveNext()\r"
}
}
}
}'
at Microsoft.Azure.ProcessSimple.Data.DataProviders.HttpClientDataProvider.<>c__DisplayClass49_1`2.<<CallService>b__0>d.MoveNext() in C:\__w\1\s\src\processsimple\Roles\ProcessSimple.Data.Shared\DataProviders\Services\HttpClientDataProvider.cs:line 664
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.WindowsAzure.ResourceStack.Common.Algorithms.AsyncRetry.<Retry>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.ProcessSimple.Data.DataProviders.HttpClientDataProvider.<CallService>d__49`2.MoveNext() in C:\__w\1\s\src\processsimple\Roles\ProcessSimple.Data.Shared\DataProviders\Services\HttpClientDataProvider.cs:line 509'.

This error happens no matter which SAP user I use for establishing the connection....

 

The SAP System json that I'm using is:

{"AppServerHost":"s4hana.xxx.xx", "Client":"100","LogonType":"ApplicationServer","SystemNumber":"00"}  

 On the data gateway I've investigated the logs and all I see is this:

 

RETURN CODE: 27</ccon>

GatewayPipelineErrorCode=DM_GWPipeline_UnknownError
GatewayVersion=
InnerType=RfcCommunicationException
InnerMessage=<ccon>
LOCATION SAP-Gateway on host sid-hdb-s4h / sapgw00
ERROR timeout during allocate
TIME Thu May 9 07:36:32 2024
RELEASE 781
COMPONENT SAP-Gateway
VERSION 2
RC 242
MODULE /bas/781_REL/src/krn/si/gw/gwr3cpic.c
LINE 2257
DETAIL no connect of TP sapdp00 from host
ec2-x-xx-194-148.compute-1.amazonaws.com after 20 sec
COUNTER 2    

Any idea? I've been fighthing with this for days...thanks! 

Categories:
I have the same question (0)
  • scottwoodall Profile Picture
    Microsoft Employee on at

    Try making sure the gateway has network connectivity to the SAP port. From a PowerShell window run:

     

    Test-NetConnection -ComputerName s4hana.xxx.xx -InformationLevel "Detailed" -Port 3300

  • ksoze92 Profile Picture
    103 on at

    Hi @scottwoodall , thanks for the answer!

     

    I am able to make the connection from the VM where the on-prem data gateway is installed:

     

    ksoze92_1-1715765538553.png

     

    But still the same error....

     

  • Verified answer
    scottwoodall Profile Picture
    Microsoft Employee on at

    Hello @ksoze92 -

    I found an SAP note that shares how to troubleshoot the "ERROR timeout during allocate" issue. I don't believe the current error is a Power Platform/On-premises data gateway issue.

    Please review the SAP note with your SAP Basis team.

     

    [edit update]

    Here an additional SAP note to further help troubleshoot this issue.

    Cheers,

    Scott

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 241 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 179

#3
Haque Profile Picture

Haque 159

Last 30 days Overall leaderboard