4

I am very new to python, I got a task to pull data into python from SAP system. I am following the below link for connections, but it's not working in my landscape. Also, my question is can I connect python 3.6 clients to SAP Systems?

http://www.alexbaker.me/code/python-and-sap-part-1-connecting-to-sap

If any developer ever has done this please guide me.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • Using python, PyRFC, and the NWRFC SDK you can connect to SAP and call remote enabled ABAP functions. This will enable you to load data into or extract data out of SAP. Recently, I have implemented this and wrote a post detailing such (http://tg4.solutions/setup-pyrfc-server/). Other resources include: wbarczynski.pl/calling-bapis-with-python-and-pyrfc – tg4solutions Apr 25 '18 at 08:48
  • Does this answer your question? [Can SAP work with Python?](https://stackoverflow.com/questions/1466917/can-sap-work-with-python) – Suncatcher Feb 13 '20 at 08:45

1 Answers1

4

Like usual with SAP, there are several possibilities.

Python clients hdbcli and PyHDB can exchange data at HANA database level. Beside stored procedures, no business logic is exposed in Python.

SAP open source Python/RFC connector PyRFC can be used to exchange the data at database or business API level, by calling remote enabled ABAP function modules. These modules can read the database (e.g. RFC_READ_TABLE), or communicate at higher business logic level, exposing functions like Create/Update Sales Order for example, with consistency and authorisation checks etc.

There are also ODATA, IDOC, SOAP ...

bsrdjan
  • 436
  • 3
  • 10