SAP ECC v2
Provides integration with SAP ERP Central Component (ECC 6.0), an on-premises enterprise resource planning system used to run finance, sales, purchasing, materials management and other core processes, through remote function calls (RFC).
Use this Node to read and change SAP ECC data from a Workflow, for example to read customers, vendors and materials, search sales orders, create or change sales and purchase orders, or call any other remote-enabled function module or BAPI by name.
Revision History
0.0.0.3 - Initial release.
Connection
The Connection logs on to SAP ECC over RFC, either to one application server or through a message server logon group.
| Property | Type | Description |
|---|---|---|
LogonType |
Enum | ApplicationServer logs on to one server. MessageServer uses load balancing through a logon group. |
AppServerHost |
String | Application server host name or IP address. Used with ApplicationServer. |
SystemNumber |
String | Two-digit instance number, for example 00. Used with ApplicationServer. |
MessageServerHost |
String | Message server host name or IP address. Used with MessageServer. |
MessageServerService |
String | Optional message server port or service name. Used with MessageServer. |
SystemId |
String | Three-character SAP system ID, for example ECD. Used with MessageServer. |
LogonGroup |
String | Logon group used for load balancing, for example PUBLIC. Used with MessageServer. |
SapRouter |
String | Optional SAProuter route string, for example /H/router.example.com/S/3299/H/. |
Client |
String | Three-digit SAP client, for example 100. |
User |
String | SAP user with S_RFC authorization for the called function groups. |
Password |
Masked | SAP password. |
Language |
String | Logon language. The default is EN. |
Setup Notes
This Node runs only on a local Cluster that can reach the SAP system's RFC ports.
- Download the SAP NetWeaver RFC SDK 7.50 from SAP and install it on the Local Runtime host. SAP does not allow the SDK to be redistributed, so it is not included with the Node.
- Add the SDK's
libfolder to the library path:PATHon Windows orLD_LIBRARY_PATHon Linux. On Windows, also install the 64-bit Visual C++ 2013 runtime. - Make sure the SAP user has
S_RFCauthorization for the function groups it calls, and the business authorizations each BAPI checks. - Create a Connection for
SAP ECCon the Local Runtime Cluster and enter the logon details. WithMessageServer, the host must resolve every server name the message server returns. - Test and save the Connection. The test logs on and runs
RFC_PING.
Without the SDK, the connection test and every Method fail with a message that names it.
Methods
Select a template for each Step. Template details are read from the connected system's function metadata, so they show that system's parameters. Parameters and fields use SAP's names: structures are objects and tables are lists of objects.
Get
Reads one customer, vendor, material, or purchase order by its key.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Function module selected by the template. |
Options |
Object | The record key, which is required, and any qualifiers. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row with every output parameter of the function module except RETURN. |
List
Lists company codes.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Function module selected by the template. |
Options |
Object | Optional function parameters. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per company code. |
Search
Searches customers, materials, or sales orders by selection criteria.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Function module selected by the template. |
Options |
Object | At least one filter, such as IDRANGE for customers, MATNRSELECTION for materials, or CUSTOMER_NUMBER and SALES_ORGANIZATION for sales orders. Selection ranges use SIGN, OPTION, LOW, and HIGH. MAXROWS limits the rows where the BAPI supports it. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per result. No matches return zero rows. |
A Search with no filter values fails, so a missing mapping cannot read the whole collection. A range row that sets SIGN or OPTION without a value also fails, naming the row, because SAP would compare it with a blank value and return every record. The Customers and Materials templates set MAXROWS to 100, so change or clear it to return more rows. Sales-order searches have no row limit, so bound them with DOCUMENT_DATE and DOCUMENT_DATE_TO.
Create
Creates sales orders or purchase orders.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Function module selected by the template. |
Items |
Array | One document per item, with the BAPI's parameters. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item: SAP's output, including RETURN, plus a Flowgear object with IsSuccess, Message, and Request. |
Update
Changes sales orders or purchase orders.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Function module selected by the template. |
Items |
Array | One document per item, with its key (SALESDOCUMENT or PURCHASEORDER), the fields to change, and the matching X flags. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item: SAP's output, including RETURN, plus a Flowgear object with IsSuccess, Message, and Request. |
Execute
Calls any remote-enabled function module by name, once per item.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | SAP ECC Connection to use. |
OperationId |
String | Name of the function module, for example Z_MY_FUNCTION or /NAMESPACE/FUNCTION. |
Items |
Array | The function module's parameters for each call. For a module without inputs, such as RFC_SYSTEM_INFO, send one empty item per call. |
Options |
Object | CommitWork commits each successful call and rolls back each failed one. The default is true. Set it to false for read-only or self-committing modules. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item: SAP's output, plus a Flowgear object with IsSuccess, Message, and Request. |
Usage Notes
- Enter values in SAP's internal format. Numeric keys keep their leading zeros, such as customer
0000001000, dates useYYYYMMDD, and times useHHMMSS. A value that does not fit its SAP field fails instead of being cut off. - Empty SAP dates (
00000000) are returned asnull, and raw byte fields use Base64. Text is returned with any trailing blanks. - An
EorAmessage inRETURN, a logon failure, or a communication failure stops a read with an error. - Each
Create,Update, orExecuteitem is its own transaction. WhenRETURNhas noEorAmessage, the item is committed. Otherwise it is rolled back and its row hasFlowgear.IsSuccessset tofalse, and later items still run. A later failure never undoes an earlier committed item. - An
EorAmessage raised by the function module itself, rather than returned inRETURN, stops the Step, because SAP closes the session. This mostly affectsExecutewith custom function modules. - Calls are never retried, so a document is never created twice. Each read and each item can run for up to 10 minutes. When a call times out or the Workflow is cancelled, the outcome of that item in SAP is unknown, so check SAP before running it again.
Known Issues
- There is no purchase-order Search template. To find purchase order numbers, call
RFC_READ_TABLEonEKKOthroughExecute. - SNC, X.509, and logon-ticket authentication are not supported.