Getting started with Live Mode
Live mode connects SEN to a real SAP system. You can use RFC for on-premise ABAP systems, OData for any SAP system, or ADT REST for development operations.
Prerequisites
- Node.js 20+ (LTS recommended)
- SAP system access with appropriate authorizations
- SAP NW RFC SDK (optional, for RFC connectivity; graceful degradation when unavailable)
Installation
Step 1: Clone and install
git clone https://github.com/ib823/sapconnect.git\ncd sapconnect\nnpm installStep 2: Configure your SAP connection
// .sapconnect.json
{
"connections": {
"source": {
"type": "rfc",
"ashost": "10.0.1.50",
"sysnr": "00",
"client": "100",
"lang": "EN"
}
}
}Step 3: Set environment variables
export SAP_USER="YOUR_SAP_USER"
export SAP_PASSWORD="YOUR_SAP_PASSWORD"
# Optional: SAP Router string for external access
# export SAP_ROUTER="/H/saprouter.example.com/S/3299/H/"Step 4: Start the server
npm run devConnection types
Direct connection (ashost)
Connect directly to a specific application server. Best for development and testing environments.
{
"type": "rfc",
"ashost": "sap-dev.example.com",
"sysnr": "00",
"client": "100"
}Load-balanced connection (mshost)
Connect through the SAP message server for automatic load balancing. Recommended for production systems.
{
"type": "rfc",
"mshost": "sapms.example.com",
"msserv": "3600",
"group": "PUBLIC",
"r3name": "PRD",
"client": "100"
}SAP Router connection
Route through SAP Router for access to systems behind firewalls. Combine with either direct or load-balanced connections.
{
"type": "rfc",
"ashost": "10.0.1.50",
"sysnr": "00",
"client": "100",
"saprouter": "/H/saprouter.example.com/S/3299/H/"
}Required SAP authorizations
The SAP user needs the following authorization objects for full functionality:
- S_RFC -- RFC access to function modules (RFC_READ_TABLE, REPOSITORY_INFOSYSTEM, etc.)
- S_TABU_DIS -- Table display authorization for configuration and master data tables
- S_DEVELOP -- Development access for ADT source code retrieval (read-only sufficient)
- S_CTS_ADMI -- Transport management (only if using write operations)
- S_USER_GRP -- User management (only for authorization analysis)
RFC SDK is optional. If node-rfc is not installed, SEN automatically falls back to OData and ADT REST APIs. This is the recommended approach for SAP Cloud environments where RFC is not available.