SAP RFC Input and Output Adapter

The SAP Remote Function Calls (RFC) adapter is both an input and output adapter. The RFC Input adapter executes RFCs to import data from SAP systems into Event Stream Processor, while the RFC Output adapter exports data from Event Stream Processor into SAP systems.

Both adapters include an adapter configuration file and a mapping file. Use the adapter configuration file to set up the RFC Input and Output Transporter modules, the ESP Publisher and Subscriber modules, as well as establish a connection to Event Stream Processor. Use the mapping file to specify mapping definitions for RFCs, how ESP stream columns map to RFC parameters, how SAP table columns map to ESP stream columns, or how columns of the flattened data result set map to ESP streams.

Commands specified in the cnxml file for this adapter cannot contain the following strings: "mv", "rm", or "del".

You can either manually create a mapping file or use the schema discovery functionality in SAP Sybase Event Stream Processor Studio to automatically create one. See Discovering Schema and Creating a Mapping File for the SAP RFC Adapter in the Studio Users Guide for detailed instructions on creating a mapping file in SAP Sybase Event Stream Processor Studio.

These adapters can run in managed or unmanaged mode.

Managed external adapters:
  • Are started and stopped by the ESP Server with an ESP project.
  • Have a cnxml adapter configuration file that is configured within the ESP Studio.
  • Are referenced in a CCL ATTACH ADAPTER statement.
Unmanaged external adapters:
  • Start and stop independently of the ESP Server and ESP projects.
  • Are configured independently.
  • Are not referenced in a CCL ATTACH ADAPTER statement.
The RFC Input adapter:
  • Executes selected RFCs at predefined interval and publishes the retrieved data to streams and windows in Event Stream Processor
  • Operates in three modes: generic RFC (includes RFC chaining capabilities), read table, and BW
The RFC Output adapter:
  • Maps data from ESP streams and windows to input parameters when RFCs are invoked
  • Operates in generic RFC mode only
The RFC Output adapter also supports guaranteed delivery (GD). It can batch up ESP data rows in the RFC parameter list and submit the data in a single RFC call. The <BatchSize> configuration parameter controls how many ESP data row the adapter batches before invoking the RFC.

Batching makes sense for an RFC that builds up table parameters from ESP column data so as to cut down the number of RFC calls involved. If data is mapped to non-table type parameters, values are overwritten as new ESP data rows are processed, so only use batching when data is treated as data rows in a table parameter.

The RFC Input and Output adapters report custom statistics. Enable the time-granularity option in the project configuration (ccr) file to get these statistics reported by the _ESP_Adapter_Statistics metadata stream.

The RFC Input adapter reports these statistics:
  • AdapterRunningTime
  • TotalInputRowsNumber
  • SuccessInputRowsNumber
  • ErrorInputRowsNumber
  • InputLatency
The RFC Output adapter reports these statistics:
  • AdapterRunningTime
  • TotalOutputRowsNumber
  • SuccessOutputRowsNumber
  • ErrorOutputRowsNumber
  • OutputLatency
Related concepts
Guaranteed Delivery and Persistent Subscribe Pattern
Related reference
Adapter Support for Schema Discovery