No slash command · from erpl
Calls SAP RFC function modules and BAPIs from DuckDB using erpl_rfc. Handles scalar, STRUCT, and LIST parameters, unnests output tables, and describes function signatures.
Ships in erpl. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
sap_rfc_invoke calls one RFC-enabled function module and returns its exports as columns: scalars as
scalar columns, structures as STRUCT, tables as LIST of STRUCT. path turns one output table into rows.
DESCRIBE SELECT * FROM sap_rfc_invoke(...) calls the
function module. Never wrap a function with side effects in an exploratory query.RETURN table (TYPE E or A)
and the SQL statement still succeeds. Always read RETURN.sap_rfc_invoke('BAPI_TRANSACTION_COMMIT') runs in a new
session and commits nothing from an earlier call. Use erpl for reading; write BAPIs that need an
explicit commit do not work this way.'AIRLINE', 'DATE_RANGE', 'SIGN'). Look them
up with sap_rfc_describe_function. Optional parameters can be omitted.DATS parameter takes a DATE (DATE '2024-01-31'), NUMC a string with
leading zeros ('0400'), packed numbers a DECIMAL/number.S_RFC must allow the function group of every module you call (sap_rfc_authorizations() lists
erpl's own needs; user-called modules show as <user-specified>).sap_rfc_invoke(function_name, {params} [, path, secret])-- Scalar import → scalar exports
SELECT * FROM sap_rfc_invoke('STFC_CONNECTION', {'REQUTEXT': 'Hello SAP'});
-- One output table as rows
SELECT * FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', {'AIRLINE': 'LH'}, path => '/FLIGHT_LIST');
-- A table parameter (ranges) as a LIST of STRUCT
SELECT count(*) FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST',
{'AIRLINE': 'LH',
'DATE_RANGE': [{'SIGN': 'I', 'OPTION': 'BT', 'LOW': DATE '2017-01-01', 'HIGH': DATE '2017-12-31'}]},
path => '/FLIGHT_LIST');
-- An export structure
SELECT * FROM sap_rfc_invoke('BAPI_FLIGHT_GETDETAIL',
{'AIRLINEID': 'LH', 'CONNECTIONID': '0400', 'FLIGHTDATE': DATE '2017-02-06'},
path => '/FLIGHT_DATA');
Without path, every export, changing and table parameter is a column; nested values come back as STRUCT
or LIST and can be unnested in SQL:
SELECT r.type, r.message
FROM (SELECT unnest("RETURN") AS r
FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', {'AIRLINE': 'XX'}));
RETURN-- Rows with TYPE 'E' (error) or 'A' (abort) mean the call failed
SELECT TYPE, ID, NUMBER, MESSAGE
FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', {'AIRLINE': 'XX'}, path => '/RETURN')
WHERE TYPE IN ('E', 'A');
SELECT FUNCNAME, GROUPNAME, STEXT FROM sap_rfc_show_function(FUNCNAME => 'BAPI_FLIGHT*');
SELECT * FROM sap_rfc_show_function(GROUPNAME => 'SAPBC_BAPI_SFLIGHT');
SELECT name, text FROM sap_rfc_show_groups(GROUPNAME => 'SAPBC*');
-- Signature: one row with import / export / changing / tables lists
SELECT name, text, function_group, remote_callable FROM sap_rfc_describe_function('BAPI_FLIGHT_GETLIST');
-- One row per import parameter, with the DuckDB type to pass
SELECT p.name, p.duckdb_type, p.optional, p.text
FROM (SELECT unnest(import) AS p FROM sap_rfc_describe_function('BAPI_FLIGHT_GETLIST'));
sap_rfc_describe_function returns name, text, function_group, remote_callable (R = callable via
RFC), the lists import, export, changing, tables (each element: name, text, abap_type,
duckdb_type, direction, length, decimals, default_value, optional) and source. Only remote-
enabled modules can be called.
| Need | Use |
|---|---|
| Rows of a table | sap_read_table (erpl-rfc-tables) — faster and pushes filters |
A business object with its logic, texts, derived fields (BAPI_*_GETDETAIL) | sap_rfc_invoke |
| One output table as rows | path => '/TABLE_NAME' |
| Several output tables | call once without path and unnest each column, or call once per table |
| Find which BAPI exists | sap_rfc_show_function(FUNCNAME => 'BAPI_<OBJECT>*') |
| Function with side effects | Do not call it from exploratory SQL (gotcha 1) |
-- 1. find and inspect
SELECT FUNCNAME, STEXT FROM sap_rfc_show_function(FUNCNAME => 'BAPI_FLIGHT*');
SELECT p.name, p.duckdb_type, p.optional
FROM (SELECT unnest(import) AS p FROM sap_rfc_describe_function('BAPI_FLIGHT_GETLIST'));
-- 2. call and keep the rows
CREATE OR REPLACE TABLE lh_flights AS
SELECT * FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', {'AIRLINE': 'LH'}, path => '/FLIGHT_LIST');
-- 3. confirm SAP reported no error
SELECT TYPE, MESSAGE FROM sap_rfc_invoke('BAPI_FLIGHT_GETLIST', {'AIRLINE': 'LH'}, path => '/RETURN')
WHERE TYPE IN ('E', 'A');
See also: erpl-rfc-tables (raw tables), erpl-choose-interface, erpl-setup (authorizations).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub datazoode/erpl --plugin erpl12 skills in this plugin
/erpl-ape-cdsExtracting SAP CDS views and entities with erpl_ape through SAP's ABAP Pipeline Engine: discovery with sap_ape_show, sap_ape_describe and sap_ape_preview; full snapshots with sap_ape_read_full (columns, chunk_size, wireformat; server-side filters are refused); delta reads with deletes via sap_ape_read_delta(cds, subscriber_process) and the /1DH/OPERATION column (U after-image, D delete); recovering an interrupted delta from the local erpl_ape.delta_spill with recover => true; subscriptions (sap_ape_show_subscriptions, PRAGMA sap_ape_drop, the ERPL_ prefix); readiness checks with PRAGMA sap_ape_ping, sap_ape_system_info and sap_ape_check_authorizations (read verdict); erpl_ape_allow_unreleased and erpl_ape_prepare_timeout. Use when extracting a CDS view (I_*, C_*, Z*), building an incremental CDS load that must see deletes, or when an APE read is slow to start, refused or unauthorised.
/erpl-bics-metadataExploring SAP BW models, data flows and lineage with erpl_bics metadata functions: InfoProviders and their fields (sap_bics_meta_providers, sap_bics_meta_provider_fields), DataSources (sap_bics_meta_datasources, sap_bics_meta_datasource_fields), transformations and rules (sap_bics_meta_transformations, sap_bics_meta_transform_fields), CompositeProviders (sap_bics_meta_hcpr_components, sap_bics_meta_hcpr_mapping), queries, their elements, usage and runtime statistics (sap_bics_meta_queries, sap_bics_meta_query_elements, sap_bics_meta_query_usage, sap_bics_meta_query_stats), InfoObjects (sap_bics_meta_infoobjects, sap_bics_describe_infoobject), the cross reference sap_bics_meta_objxref, and lineage / impact analysis (sap_bics_lineage_edges, sap_bics_lineage_graph_json, sap_bics_lineage_trace, sap_bics_query_lineage). Use when documenting or auditing a BW system, answering "where does this key figure come from" or "what breaks if I change this InfoObject/DataSource", finding unused queries, or preparing a BW migration.
Other plugins' skills for the same job