SAP To Logic App Error – “no SAP ErrInfo available”

We have a project underway to integrate Logic Apps with SAP S4 Hana. We made good progress connecting to and sending messages to SAP, but ran into some issues when trying to get IDOC’s sent out from SAP to Logic Apps.

We have an Integrated Service Environment (ISE) that we run our Logic Apps thru, but unfortunately the SAP ISE connector has not been released as of yet (February 2020). Our only option at this time is to connect to our SAP environment using a On-Premise Data Gateway.

One day I hope to come back and write some posts with step-by-step instructions, but for now take a look at Microsoft’s SAP connector documentation for information on connecting your Logic Apps to SAP.

The issue we were experiencing would occur when we went to enable our trigger. After Enabling the Logic App, our Trigger History would show a “Failed” trigger status.

When clicking on the Failed Status, the History would show a Code of “BadRequest”.

Clicking on “Output Link” reveals the following error message:

Failed to process request. Error details: ‘no SAP ErrInfo available

"body": {
     "error": {
         "code": "GeneralBadRequest",
         "message": "Failed to process request. Error details: 'no SAP ErrInfo available\nRETURN CODE: 20'.",
         "target": "CommonAdapter"
     }
 }

And then subsequent runs would show the following trigger output:

"body": {
    "error": {
        "code": "GeneralBadRequest",
        "message": "Failed to process request. Error details: 'Cannot modify function handlers of server <Some Long ID> unless it is stopped (current state: Broken)'.",
        "target": "CommonAdapter"
    }
}

This GeneralBadRequest error continues to appear until you restart the On-Premise Data Gateway. At which point the first run reverts back to original error and subsequent runs back to this latest error.

Unfortunately these are very generic error messages that don’t provide much context as to what the actual issue is. So the solution below has helped us, but in your case it could be something else.

There is a way to enable extended SAP logging on the On-premise Data Gateway. David Burg is a Senior Software Engineer at Microsoft who has written a lot of different articles on SAP connectivity with Logic Apps. Half-way down this article David explains how to turn on the extended logging. Unfortunately this extended logging did not provide further details, as well as Microsoft Support was not able to narrow down our issue.

In the end, after many weeks of trying to troubleshoot we discovered what our issue was. During our configuration of our trigger, our BASIS team mentioned our System ID was 30 and that our Gateway Service was “sapgw30“.

During our troubleshooting we never received any error messages in regards to the Gateway Service, so nothing ever led us to believe “sapgw30” was invalid. Also coming from many years of BizTalk Development, this looks like a proper GatewayService.

Finally one of our consultants found the following SAP Community thread: https://answers.sap.com/questions/482451/sapncodll-rfc-server-connection-issues.html
The response in this article that finally gave us our fix?

Instead of service name (sapgwnn) enter the port number of the ABAP gateway. The default gateway port number is 33nn, where nn is the instance number.

Once we updated our Logic App Trigger – GatewayService to “3330” everything started working as it should.

If this helps you out, please let me know in the comments section below. Also be sure to follow me on twitter.

One thought on “SAP To Logic App Error – “no SAP ErrInfo available”

Comments are closed.