Can Python be used to query a SAP database?
You can use these python codes to simply fetch the data, display results or use the computational abilities of python for data analytics/ predictive analytics and send the results back to SAP ECC. The possibilities are endless!
PyRFC - The Python RFC Connector The pyrfc Python package provides Python bindings for SAP NetWeaver RFC Library, for a comfortable way of calling ABAP modules from Python and Python modules from ABAP, via SAP Remote Function Call (RFC) protocol.
Python SAP RFC module seems inactive - last (insignificant ) commit 2 years ago - but may serve you:
Pysaprfc is a wrapper around SAP librfc (librfc32.dll on Windows, librfccm.so or librfc.so on Linux). It uses the excellent ctypes extension package by Thomas Heller to access librfc and to define SAP compatible datatypes.
Modern SAP versions go the Web Service
way - you could build a SAP Web Service
and consume it from Python
.
With SAP NetWeaver, developers can connect applications and data sources to integrate processes using Web services.
In particular, developers can use one infrastructure to define, implement, and use Web services in an industry standards based way. SAP NetWeaver supports synchronous, asynchronous, stateful and stateless web service models - enabling developers to support different integration scenarios.
sapnwrfc
supports this SAP NetWeaver
functionality, supersedes the older RFC SDK, and is actively maintained.
Python RFC connector is now available as open source: PyRFC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With