No slash command · from erpl
Extracts SAP CDS views and entities via the ABAP Pipeline Engine (DHAPE_*). Handles full snapshots, delta reads with deletes, subscriptions, readiness checks, and recovery from interrupted deltas.
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.
erpl_ape reads CDS entities through SAP's own ABAP Pipeline Engine (DHAPE_*) — the same machinery SAP
uses for CDS replication. Nothing is installed in SAP, but the RFC user needs a dedicated role. Its
distinguishing feature: delta with deletes.
PRAGMA sap_ape_ping fails when the engine is unreachable for
the user; sap_ape_check_authorizations('<ENTITY>') lists every grant and its verdict — read verdict,
not present (one row is a grant that must be absent).erpl_ape_prepare_timeout (900 s).@Analytics.dataExtraction.enabled alone allows only full
reads; delta also needs @Analytics.dataExtraction.delta.changeDataCapture.automatic. The engine's
error says which is missing.WHERE, not filters. The engine's reader takes no filter on current releases, so
filters => … is refused rather than silently ignored. columns is applied on the client (the wire
still carries every column).SET erpl_ape_allow_unreleased = true;. Released entities
(is_released) are SAP's stable API — prefer them.D row has its key fields set and other columns blank/zero. Inserts
arrive as U, the same as updates.erpl_ape.delta_spill for recover => true. The spill is always written to the main
database of the process (an ATTACH …; USE … does not move it), so run delta jobs with the warehouse
file as main database (duckdb -unsigned -bail warehouse.duckdb < job.sql). It holds business data in
clear text: that file needs the same protection and backups as the target data.sap_read_table returns).PRAGMA sap_ape_ping; -- 'PONG' + ape_version
SELECT * FROM sap_ape_system_info();
SELECT auth_object, checked_values, verdict, note
FROM sap_ape_check_authorizations('ZERPL_APE_FLIGHT')
WHERE verdict <> 'ok'; -- empty = ready
verdict | Meaning |
|---|---|
ok | Required grant present (or the forbidden one absent) |
missing | A required grant is missing |
granted, and must not be | S_DHAPEOP is held and overrides the operator restriction |
unknown | No verdict (e.g. no connection, no entity given) — never a pass; see note |
The role for the Basis team is produced by /erpl:basis-handout.
SELECT cds_name, description, is_released, package FROM sap_ape_show(search => 'ZERPL%');
SELECT cds_name, description FROM sap_ape_show(search => 'I_%', released_only => true) LIMIT 20;
SELECT field_name, is_key, abap_type, duckdb_type, reference_field
FROM sap_ape_describe('ZERPL_APE_FLIGHT');
SELECT * FROM sap_ape_preview('ZERPL_APE_FLIGHT', max_rows => 10); -- no graph, no subscription
-- ZERPL_APE_FLIGHT is a custom view without a release contract (gotcha 5): allow it deliberately
SET erpl_ape_allow_unreleased = true;
CREATE OR REPLACE TABLE flights AS
SELECT * FROM sap_ape_read_full('ZERPL_APE_FLIGHT');
-- Fewer columns and a filter: both applied as rows stream in
SELECT Carrid, Connid, Fldate, Price
FROM sap_ape_read_full('ZERPL_APE_FLIGHT', columns => ['Carrid', 'Connid', 'Fldate', 'Price'])
WHERE Carrid = 'LH';
A full read creates a temporary subscription and erases it when the scan ends, even after LIMIT or an
error. chunk_size (records per round-trip, default 1000) is the transport knob.
ZERPL_APE_D below is a delta-enabled view (key Rid); ZERPL_APE_FLIGHT carries only the
initial-load annotation, so it serves full reads only.
-- check:skip-live (creates a delta subscription on SAP)
-- First call on a new subscriber_process: initial load (blank /1DH/OPERATION) + subscription
-- Later calls: only the changes since the previous call
CREATE OR REPLACE TABLE stage_d AS
SELECT * FROM sap_ape_read_delta('ZERPL_APE_D', 'DWH_APE_D');
/1DH/OPERATION | Meaning | Row content |
|---|---|---|
'' (blank) | Initial load | full row |
U | Insert or update | full after-image |
D | Delete | key fields only |
Apply a batch idempotently — delete every key in the batch, then insert the non-deletes. The full job
(stage, apply, guard, scheduling) is in erpl-pipelines.
subscriber_process: stable, at most 30 characters, one reader at a time. A delta query returns what is
available and stops — schedule it (erpl-pipelines).
-- check:skip-live (replays the spilled batch of the previous run)
SELECT * FROM sap_ape_read_delta('ZERPL_APE_D', 'DWH_APE_D', recover => true);
Replays the most recent batch from erpl_ape.delta_spill — no SAP connection needed, safe to repeat, cannot
be combined with columns, filters, chunk_size or wireformat. Apply it with the same idempotent
pattern. DELETE FROM erpl_ape.delta_spill; once a batch is safely applied if the data must not linger.
SELECT cds_name, subscriber_process, subscription_name, created_at, status
FROM sap_ape_show_subscriptions(); -- erpl_only => true by default
-- check:skip-live (destructive: the next delta read is an initial load again)
PRAGMA sap_ape_drop('ZERPL_APE_D', 'DWH_APE_D'); -- DROPPED / NOT_FOUND / STILL_PRESENT / REFUSED: …
erpl stores subscriptions as ERPL_<subscriber_process> (what Basis sees in DHCDC_MON); you always pass
the plain name. Dropping resets a pipeline — confirm with the user first.
If a client was killed mid-scan, its graph keeps running on SAP and the subscription cannot be erased ("still in use by a running graph") until SAP's retention cleans it up — involve Basis.
| Situation | Do |
|---|---|
| CDS view, one-off | sap_ape_read_full (or sap_read_table for a quick look) |
| CDS view, recurring, deletes matter | sap_ape_read_delta + idempotent apply |
| View not delta-enabled | Ask the owner for the CDC annotation; meanwhile full reads |
REFUSED/authorisation error | sap_ape_check_authorizations('<ENTITY>'), then /erpl:basis-handout |
| First read hangs | Expected while SAP prepares; check the application log named in the error after erpl_ape_prepare_timeout |
Every read times out; SLG1 object DHCDC shows DHCDC_RT/064 Cannot start ACP daemon | No batch job waits for event SAP_DHCDC_RT_START_ACP_DAEMON (technical job repository) — Basis schedules it; nothing else in APE preparation runs without that daemon |
| First delta over an empty view times out | The initial load of an empty source delivers no package, which reads as a preparation timeout; check the source has rows |
| Delta crashed | recover => true, apply, then continue normally |
Stage → apply → log, as a -bail job on the warehouse file: see erpl-pipelines ("Incremental with deletes
(APE delta)").
See also: erpl-choose-interface (APE vs ODP vs sap_read_table), erpl-pipelines, erpl-operate
(stuck subscriptions), erpl-deploy (the role, persistent databases).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sap, cds-views, abap-pipeline-engine, data-extraction, delta-load
npx claudepluginhub datazoode/erpl --plugin erpl12 skills in this plugin
/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.
/erpl-bics-queriesRunning SAP BW queries and cubes from DuckDB with erpl_bics (BICS, the protocol behind Analysis for Office): finding queries with sap_bics_show_queries / sap_bics_show_cubes / sap_bics_show(obj_type => 'QUERY'), describing them with sap_bics_describe and sap_bics_variables, the stateful session workflow sap_bics_begin (id, variables, hierarchy_variables, variant, rows, columns, filters) → sap_bics_rows / sap_bics_columns / sap_bics_filter / sap_bics_set_char_prop (DISPLAY KEY|TEXT|BOTH, SORT, TOTALS) / sap_bics_attributes / sap_bics_hidden_members → sap_bics_result, structure members, BW hierarchies with sap_bics_hierarchy, result shape and pivoting, the result cell budget (erpl_bics_max_result_memory), sap_bics_result_stats for empty results, and session cleanup with sap_bics_end / sap_bics_sessions / sap_bics_gc. Use when someone wants numbers from a BW query or InfoCube/aDSO, needs to fill BEx variables, drill down, filter or swap axes, or gets an empty, rejected or too-large BW result.
Other plugins' skills for the same job