Interfaces
Version 27 Version 26 39.5.25 39.5.23 39.5.22 39.5.21 39.5.20 39.5.19 39.5.18 39.5.17 German English
Version 27 Version 26 39.5.25 39.5.23 39.5.22 39.5.21 39.5.20 39.5.19 39.5.18 39.5.17 German English

PLANTA Project and SAP

Information

  • This page describes the technical connection of PLANTA Project to an SAP system. It is relevant if you set up an SAP interface on the basis of the PLANTA link universal interface.

  • The data exchange and the business logic are described on the Introduction to PLANTA link and Interfaces page.

  • 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

  • PLANTA Project communicates with the SAP system via remote function calls (RFC).

  • For this purpose, the Worker integrates the SAP NetWeaver RFC Client Library via the pyrfc Python module.

Setup

Requirements

  • The Worker image does not contain the pyrfc Python module. It is based on PyRFC and is provided by the customer.

  • The libraries of the SAP NetWeaver RFC Software Development Kit (SDK) 7.50 for Linux are not included in the image. They are provided by the customer.

  • The Worker container must be able to reach the SAP system via the network.

Notes

  • The Worker finds the SDK libraries via the LD_LIBRARY_PATH environment variable. The /planta/dlls path must come first.

  • The SAPNWRFC_HOME environment variable is not required.

  • Do not store pyrfc in the venus customizing folder. The import fails there.

  • The volume must not be mounted in the Worker container with the noexec option. Otherwise, the Worker cannot load the libraries, and the log reports failed to map segment from shared object.

Procedure

  • Store the SDK libraries in a directory and mount this directory into the Worker container as a volume, e.g. under /opt/sap/nwrfcsdk/lib.

    • In a single environment, this is done in the docker-compose.yml file under volumes of the Worker service.

    • In an orchestrated environment, this is done in the Helm values under worker.additionalVolumes and worker.additionalVolumeMounts.

  • Extract the pyrfc and pyrfc-3.3.1.dist-info directories from the PyRFC 3.3.1 wheel for Python 3.12 on Linux (cp312).

  • Mount both directories into the Worker container individually, under /planta/py/distribution/site-packages/pyrfc and /planta/py/distribution/site-packages/pyrfc-3.3.1.dist-info. Without the pyrfc-3.3.1.dist-info directory, the import fails.

  • Set the LD_LIBRARY_PATH environment variable of the Worker container to /planta/dlls:/opt/sap/nwrfcsdk/lib.

    • In a single environment, this is done in the docker-compose.yml file under environment of the Worker service.

    • In an orchestrated environment, this is done in the Helm values under worker.env.

  • Restart the Worker container.

  • Check the setup in a Python macro with import pyrfc and pyrfc.get_nwrfclib_version(). If the import reports No module named 'pyrfc', pyrfc is not mounted. If pyrfc.Connection is missing, the Worker does not find the SDK libraries.

Update to Version 27

From Version 27 with Worker S 39.2.5, the Worker image contains the pyrfc Python module. After the update, it is sufficient to provide the SDK libraries. Then remove the pyrfc and pyrfc-3.3.1.dist-info mounts from the Worker container.

Use

Information

  • The pyrfc Python module can be embedded and used in PLANTA Project within any Python macro via import pyrfc.

Traditional Installation on Windows or Linux

The setup on this page applies to PLANTA Project in container operation. If your PLANTA Server is installed traditionally on Windows or Linux (up to Server S 39.5.37), you can find the setup in the documentation for Version 39.5.23.

The sapnwrfc module has been replaced by pyrfc from Server S 39.5.31. Change Python macros that still use sapnwrfc to pyrfc when switching to container operation.