ABAP RFC connectivity from Node.JS is provided by SAP/node-rfc open source, which provides interface to SAP proprietary SAP NW RFC SDK
SAP NW RFC SDK
SAP NW RFC SDK is not included in SAP/node-rfc because of licensing and SAP Support Portal is the only allowed public distribution channel for SAP NW RFC SDK.
Shared SO libraries are required in runtime and must be registered at operating system level, using LD_LIBRARY_PATH env variable on Linux systems for example. Include files and shared libraries are both required for SAP/node-rfc build and re-build. The node-rfc rebuild can be triggered during BTP deployment, just like for other native Node.JS modules.
Express and SAP/node-rfc are standard NPM packages and BTP deployment is straightforward.
We use this btp_cflinuxfs4 docker container and standard buildpack structure, with application in app folder. To make SAP NW RFC SDK available for SAP/node-rfc in cloud application, it shall be copied to app root folder for example:
During deployment, native NPM modules like node-rfc may be or must be rebuilt. The re-build process requires SAP NW RFC SDK includes and binaries and SAPNWRFC_HOME_CLOUD environment vaiable shell therefore point to SAP NW RFC SDK root folder, just like SAPNWRFC_HOME in on-premise case.
For run-time enablement, the LD_LIBRARY_PATH env variable shall point to RFC SDK "lib" folder, like in manifest.yaml:
memory usage: 128M
start command: npm run start:btp
state since cpu memory disk logging details
#0 running 2023-10-26T13:47:09Z 0.0% 54.9M of 128M 231.8M of 1G 0/s of unlimited