Skip to main content

Remote Function Call (RFC) Functions

You can find detailed documentation about SAP Remote Function Call (RFC) functions on SAP's official website. This documentation provides comprehensive information on the various types of RFCs, such as Synchronous RFC (sRFC), Asynchronous RFC (aRFC), Transactional RFC (tRFC), Queued RFC (qRFC), Background RFC (bgRFC), and Local Data Queue (LDQ), along with their specific characteristics and uses. It also covers aspects of data transfer and security relevant to RFC communication.

All ERPL functions loaded into DuckDB can be retrieved by the following SQL statement:

SELECT * FROM duckdb_functions() WHERE function_name LIKE '%sap%';

Available RFC Functions

Table Operations

Function Discovery and Inspection

Function Invocation

  • sap_rfc_invoke - Executes a specified function module in the SAP system.

Usage Examples

-- List all available tables
SELECT * FROM sap_show_tables()

-- Find tables starting with "FLIGHT"
SELECT * FROM sap_show_tables(TABNAME='*SPFL*')

-- Get field descriptions for a table
SELECT * FROM SAP_DESCRIBE_FIELDS('SPFLI');

-- Search for functions
SELECT * FROM sap_rfc_search_function(FUNCNAME='BAPI_FLIGHT*') ORDER BY 1

-- Get function details
SELECT * FROM sap_rfc_describe_function('BAPI_FLIGHT_GETLIST')

-- Invoke a function
SELECT * FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', path='/FLIGHT_LIST')

-- Read table data
SELECT * FROM sap_read_table("SFLIGHT")

For detailed documentation on each function, see the individual function pages linked above.