ls $SAPNWRFC_HOME
/usr/local/sap/nwrfcsdk:
bin demo doc fix_paths.sh include lib
Running the ./rfcexec returns the right results :
Error:
Please start the program in the following way:
rfcexec -t -a <program ID> -g <gateway host> -x <gateway service>
-f <file with list of allowed commands> -s <allowed Sys ID>
The options "-t" (trace), "-f" and "-s" are optional.
Below further optional parameters are listed. You can find their
documentation in sapnwrfc.ini:
-on_cce <0, 1, 2> (On Character Conversion Error)
-cfit (Conversion Fault Indicator Token - the substitute symbol used if on_cce=2)
-keepalive (Sets the keepalive option. Default is 0.)
-delta <0, 1> (default 1, i.e. use delta-manager)
-no_compression (table compression, default is 0, i.e. compression is on)
The NPM package is available globally. Running npm -g list I get
Environment
Running node -p "require('node-rfc').environment" I get
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'node-rfc'
Require stack:
- /usr/local/sap/nwrfcsdk/bin/[eval]
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at [eval]:1:1
at Script.runInThisContext (node:vm:129:12)
at Object.runInThisContext (node:vm:305:38)
at node:internal/process/execution:76:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:75:60) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/sap/nwrfcsdk/bin/[eval]' ]
}
This is simply an issue with NODE not knowing where to look to find the globally installed modules. This Stackoverflow thread explains the issue in more depth.
Describe the bug Successful SDK installation but node cannot find the SDK NPM module. Problem on Mac M1?
To Reproduce SDK installed globally and works.
The SDK files are in the right place
Running the ./rfcexec returns the right results :
The NPM package is available globally. Running npm -g list I get
Environment Running
node -p "require('node-rfc').environment"
I get