pythonsaprfcpyrfc

SAP RFC server with Python, is it possible?


I have a service that can make SAP RFC requests to some server. Assume that I can not modify this service, but need to handle such requests and process their data. So I want to develop my own server that will process RFC requests, I prefer Python but can do it with C++ too.

I read that it should be possible to do with PyRFC https://sap.github.io/PyRFC/server.html#server-server

but there are "gateway parameters" and I don't know what I should use here, and in my concept I do not need SAP Gateway here, I just want to process requests in my standalone server.

Is it possible to develop own standalone server for processing RFC requests with Pyhton or C++? Or it can be used only with SAP Gateway? In this case what I need to do in SAP Gateway side?


Solution

  • You will need a SAP Gateway server/service anyway - and by that, I don't mean the SAP Gateway product that is used to provide OData services, but the sapgw process that is part of the SAP NetWeaver Application Server ABAP installation. This process is required because your custom RFC server registers itself at a sapgw server (specifying an identifier in the process), and the sapgw instance will route outgoing (!) calls to your implementation based on the identifier that is specified in the RFC destination as well.

    As for direct communication between non-SAP systems (so non-outgoing RFC calls) - that should be possible as well, but I strongly believe that the calling service will have to be adapted to the fact that it's not talking to a "real" ABAP back-end. You'll also have to mock the DDIC Repository access, the user authentication process, ... - realistically speaking, it might be easier to simply install an ABAP system and do the processing there.