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.

  1. 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.
  2. Add the SDK's lib folder to the library path: PATH on Windows or LD_LIBRARY_PATH on Linux. On Windows, also install the 64-bit Visual C++ 2013 runtime.
  3. Make sure the SAP user has S_RFC authorization for the function groups it calls, and the business authorizations each BAPI checks.
  4. Create a Connection for SAP ECC on the Local Runtime Cluster and enter the logon details. With MessageServer, the host must resolve every server name the message server returns.
  5. 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.

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 use YYYYMMDD, and times use HHMMSS. A value that does not fit its SAP field fails instead of being cut off.
  • Empty SAP dates (00000000) are returned as null, and raw byte fields use Base64. Text is returned with any trailing blanks.
  • An E or A message in RETURN, a logon failure, or a communication failure stops a read with an error.
  • Each Create, Update, or Execute item is its own transaction. When RETURN has no E or A message, the item is committed. Otherwise it is rolled back and its row has Flowgear.IsSuccess set to false, and later items still run. A later failure never undoes an earlier committed item.
  • An E or A message raised by the function module itself, rather than returned in RETURN, stops the Step, because SAP closes the session. This mostly affects Execute with 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_TABLE on EKKO through Execute.
  • SNC, X.509, and logon-ticket authentication are not supported.

See also