Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query SAP database from Python? [closed]

Can Python be used to query a SAP database?

like image 643
ilya n. Avatar asked Sep 23 '09 15:09

ilya n.


People also ask

Can we connect Python to SAP?

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!

What is PyRFC?

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.


2 Answers

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.

like image 196
gimel Avatar answered Oct 03 '22 13:10

gimel


Python RFC connector is now available as open source: PyRFC

like image 38
bsrdjan Avatar answered Oct 03 '22 12:10

bsrdjan