Monday, May 13, 2013

Python and SAP?

Python is extremely popular in areas of string manipulation and search in a dictionary. This makes this programing language preferred option by programmers for writing scripting applications. As part of these areas of usage and others; python is used in SAP arena as well.

1/ First time I encounter python in SAP was earlier in 2007 when I start to work with BI Accelerator. Here there is an accelerator admin console written in python. It is using script TREXAdmin.py to start it up - Python Admintool or so called TREX Administration Tool (Python). The tool as itself is used to administrate queues of the TREX queue server and indexes of the TREX index server. It is possible to monitor availability and functions of the TREX. The tool was written in python to be used regardless of the operating system on which TREX was installed. Also as it is stand-alone tool it can be used to monitor TREX during routine operation independently of the application using the TREX.
Speaking of BI Accelerator (later renamed to BWA) there is a bunch of other tools written in python as well. E.g.:
  • importManager.py / exportManager.py – backup/restore  TREX index and queue files
  • RfcServerTrace4SAP.py - Python Trace
  • alertserver.py - TREXAlertserver
  • topoview.py – TREX topology
  • etc.

2/ Another big SAP field where python language is used in SAP MaxDB. There are MaxDB python modules to access SAP MaxDB databases from python scripts. Scope of modules covers executing SQL statements, managing databases, importing and exporting data.

3/ ABAP connectivity. Python us used in several areas e.g. in web applications development, RESTful hardware integration and ABAP extensions while speaking of accessing SAP backaend. As for ABAP based (ABAP stack) backend there must be Python RFC connectors which enable that connectivity. Apart of others SAP is providing Python RFC Connector for that as well. Here’s official pages.

4/ Last but not least there is also SAP HANA relying on the python.
Few examples of how Python is used in HANA:
1659599 - SAP HANA: Pythontrace for TREX-ABAP interfaces
1817038 - HANA/TREX: TREX_ABAP_CUSTOMIZING on HANA
report HANA_ABAP_PYTHON - to switch on ABAP-Python trace
report TREX_ABAP_CUSTOMIZING - Customizing for the TREX ABAP Client, Customizing indexing and search you can choose between the communication methods ICM or TCM. ICM is the default. TCM is slightly faster than ICM and does not do any implicit commits, but can only be chosen if the MaxDB client is installed. (TCM as formerly known as DBSL).

There are some python related blogs available on SCN:

No comments: