PLANTA project and SAP
Information
- The following description is relevant for you if you want to use the PLANTA-SAP interface, which can be realized on the basis of the PLANTA universal interface.
- This description only provides technical information on the communication with an SAP system.
- The user view, the actual data exchange, and the technical logic on which it is based, are not covered here. For more information, please refer to the Universal Interface documentation.
- PLANTA provides several SAP standard interfaces which can be used as a template for setting up individual SAP interfaces.
See also: Further integration of PLANTA project
General
Information
- The SAP system communicates via remote function call (RFC) API.
- For this purpose, the SAP NetWeaver RFC Client Library is integrated and addressed via a Python module.
- Hence, the SAP access is capable of scripting and is therefore highly flexible.
Setup
Information
- With the Server, PLANTA provides the CPython wrapper which is based on the https://github.com/piersharding/python-sapnwrfc Python module.
- With the server, PLANTA provides the CPython wrapper which is based on the https://github.com/SAP/PyRFC Python module.
With Server 39.5.31, the pysapnwrfc Python module is provided for the last time and the pyrfc Python module is provided for the first time. The SAP connection should thus be changed to the new module.
Windows
Requirements
- The customer must have
- an SAP system with NetWeaver compatible RFC implementation of version 7.20P_7 or 7.50P_6. Version 7.50P_6 is recommended.
- SAP RFC client libraries in 64bit-x86 version installed on the application server on which PLANTA project is run.
- SAP NetWeaver RFC SDK version 7.50P_6 requires a runtime made available by the following packet: Visual C++ Redistributable Packages for Visual Studio 2013 (msvcr120.dll). If runtime is not installed, the dlls of the SDK cannot be loaded.
Note on the implementation
- Depending on which PLANTA Server version you currently use (install), i.e. depending on the combination of Python and SAP library versions, the wrapper already contained in the PLANTA Server must possibly be replaced by the other wrapper. The new wrapper files can be found in the separate SAP Libs for RFC Windows directory on the PLANTA transfer server. If required, copy the wrapper file named
pyrfc.cpython-*.so
from the respective subdirectory to <server directory>\sap\lib.
SAP 7.20P_7 | SAP 7.50P_6 | |
---|---|---|
Python 39.5.3 (up to S 39.5.26) | Existing wrapper files are functional | not available |
Python 39.5.0 (S 39.5.27 - 39.5.29) | Existing wrapper files must be replaced | Existing wrapper files must be replaced |
Python 3.8.5 (from S 39.5.30) | Existing wrapper files must be replaced | Existing wrapper files are functional |
Procedure
- The path to the SAP libraries must be made available in the
PATH
operating system environment variable.
Linux
Requirements
- The customer must have
- an SAP system with NetWeaver compatible RFC implementation of version 7.20P_7 or 7.50P_6.
- To use 7.50P_6 you need PLANTA Server 39.5.30.
- SAP RFC client libraries in 64bit-x86 version installed on the application server on which PLANTA project is run.
- an SAP system with NetWeaver compatible RFC implementation of version 7.20P_7 or 7.50P_6.
Note on the implementation
- Depending on which PLANTA Server version you currently use (install), i.e. depending on the combination of Python and SAP library versions, the wrapper already contained in the PLANTA Server must possibly be replaced by the other wrapper. The new wrapper files can be found in the separate SAP Libs for RFC Linux directory on the PLANTA transfer server. If required, copy the wrapper file named
pyrfc.pdb
andpyrfc.pyd
from the respective subdirectory to <server directory>\sap\lib.
SAP 7.20P_7 | SAP 7.50P_6 | |
---|---|---|
Python 39.5.3 (up to S 39.5.26) | Existing wrapper files are functional | not available |
Python 39.5.0 (S 39.5.27 - 39.5.29) | Existing wrapper files must be replaced | not available |
Python 3.8.5 (from S 39.5.30) | Existing wrapper files are functional | Existing wrapper files are functional |
Procedure
- The path to the SAP libraries must be made available in the operating system environment variable
LD_LIBRARY_PATH
. - In addition, the
SAPNWRFC_HOME
operating system variable must be created with <server directory>\sap.
Use
Information
- The sapnwrfc Python module can be embedded and used in PLANTA project within any Python macro via
import sapnwrfc
. - The pyrfc Python module can be embedded and used in PLANTA project within any Python macro via
import sapnwrfc
.