Skip to main content

SQL Reference

The canonical, source-verified function reference now lives at ERPL Function Reference.

For deeper protocol guides:

For pragma functions specifically:

Connection model

ERPL stores SAP credentials as a DuckDB secret. The connection is established lazily on the first call.

CREATE SECRET my_sap (
TYPE sap_rfc,
ASHOST 'sap-server.com',
SYSNR '00',
CLIENT '100',
USER 'username',
PASSWD 'password',
LANG 'EN'
);

-- Validate the connection
PRAGMA sap_rfc_ping;

-- Use it
SELECT * FROM sap_read_table('KNA1', MAX_ROWS => 100);

Multiple secrets coexist; pass SECRET => 'my_sap' to any ERPL function to select one explicitly. Connection pooling is automatic.