Other platforms and frameworks:
Security Servicescategory of the SAP Cloud Platform Platform Foundation
SAP NW RFC SDK C++ binaries must be downloaded (SAP partner or customer account required) and locally installed. Check installation instructions and SAP NW RFC SDK section on SAP Support Portal. Using the latest version is reccomended as SAP NW RFC SDK is fully backwards compatible, supporting all NetWeaver systems, from today S4, down to R/3 release 4.6C.
Build toolchain requires CMake
Build from source on older Linux systems, may require
uchar.h file, attached to SAP OSS Note 2573953, to be copied to SAP NW RFC SDK include directory.
Build toolchain is based on Centos 7 with devtools-8, following the standard NodeJS build toolchain
Docker container: SAP/fundamental-tools/docker
Visual C++ Redistributable is required for runtime. The version is given in SAP Note 2573790 - Installation, Support and Availability of the SAP NetWeaver RFC Library 7.50
Build toolchain requires Microsoft C++ Build Tools, the latest version reccomended
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode off
Remote paths must be set in SAP NWRFC SDK for macOS: documentation
When the node-rfc is started for the first time, the popups come-up for each NWRFC SDK library, to confirm it should be opened. If SDK is installed in admin folder, the node-rfc app shall be that first time started with admin privileges, eg.
More info: Installation
❗️ The build from source requires NodeJS release with minimum N-API version given in
package.json property "napi_versions": NodeJS/N-API version matrix.
After the SAP NW RFC SDK is installed on your system, the
node-rfc can be installed from npm:
npm install node-rfc
Alternatively, when the
node-rfc package is not provided for your platform for example, you can build the package from source:
git clone --single-branch https://github.com/SAP/node-rfc.git cd node-rfc npm install npm run addon # rebuild native addon npm run ts # rebuild typescript wrapper
In order to call remote enabled ABAP function module, we need to create a
node-rfc client instance with valid logon credentials, connect to SAP ABAP NetWeaver system and then invoke a remote enabled ABAP function module from nodejs. Async example below shows basic principles and you can check the documentationand unit tests for more examles.
Add your ABAP system destintion to sapnwrfc.ini file in your working directory:
DEST=MME USER=demo PASSWD=welcome ASHOST=myhost SYSNR=00 CLIENT=620 LANG=EN
Call the ABAP RFM. When in doubt about RFM parameters' structure try
abap call CLI tool of SAP/fundamental-tools
Finally, the connection is closed automatically when the instance is deleted by the garbage collector or by explicitly calling the
client.close() method of the direct client, or
pool.release() for the managed client.
Highly reccomended series of three insightful articles about RFC communication and SAP NW RFC Library, published in the SAP Professional Journal (SPJ):
If you encounter an issue or have a feature request, you can create a ticket.
Check out the SCN Forum (search for "node-rfc") and stackoverflow (use the tag "node-rfc"), to discuss code-related problems and questions.
We appreciate contributions from the community to node-rfc! See CONTRIBUTING.md for more details on our philosophy around extending this module.
Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.