Repository navigation
v2026.09.23 — CDS delta with deletes, through SAP's own pipeline engine
SAP Note 3255746 prohibits third-party use of the ODP-RFC modules, a security patch has enforced
that since 9 June 2026, and the temporary opt-out expires at the end of the year. The note names
CDS view extraction among the paths that remain permitted. This release is that path: erpl_ape
reads CDS entities through the ABAP Pipeline Engine — the runtime SAP Datasphere itself uses for
ABAP sources — and its delta reports deletes, which a change-timestamp delta structurally
cannot, because a deleted row has no timestamp left to move.
erpl_ape is now part of the erpl bundle, so LOAD erpl loads it beside erpl_rfc,
erpl_bics and erpl_odp. Nothing is installed in SAP: no transport, no Z objects, no ABAP.
Extraction on a customer system needs a role granted on the SAP side; ape/docs/security.md is
the handout and sap_ape_check_authorizations() verifies the result rather than asking anyone to
trust it.
Added
-
[trampoline]
erpl_apeis now part of the bundle, soLOAD erplextracts, installs
and loads it alongsideerpl_rfc,erpl_bicsanderpl_odp. It built correctly before this
and was simply never embedded: the trampoline hard-codes each sub-extension name in eleven
places, and a module missing from those lists compiles, passes its own suite, and does not
exist for anyone who typesLOAD erpl.scripts/smoke-test.shnow asserts one function per
bundled extension — it previously checked three, all fromerpl_rfc, so it could not have
caught this. -
[rfc]
sap_rfc_authorizations()gains theerpl_aperows. Worth reading for one fact
they make plain: the extraction functions reach SAP through onlyDHAPE_GRAPH_MANAGERand
DHAPE_GRAPH_ROUNDTRIPno matter what the pipeline does, because the graph is driven by JSON
rather than by distinct function modules. SoS_RFCsays nothing about which operators a user
may run — that is per-operator viaS_DHAPEOPR, whichsap_ape_check_authorizations()probes. -
[ape] New sub-extension
erpl_ape— CDS entity extraction through SAP's own ABAP
Pipeline Engine (DHAPE_*) and its metadata browser (DHAMB_*), with no ABAP footprint.
Its source lives in theDataZooDE/erpl-apesubmodule atape/; the binary is bundled in
theerpltrampoline, soLOAD erplloads it like the other sub-extensions. Extraction
against a customer system needs a role granted on the SAP side, which is normally agreed per
engagement —ape/docs/security.mdis the handout, andsap_ape_check_authorizations()
verifies the result.PRAGMA sap_ape_ping— logs on and asks the engine for its version, so it fails when the
DHAPE_*function group is unreachable rather than only when logon fails.sap_ape_system_info()— engine version, raw capabilities JSON, and asupportedflag with a
reasonwhen false.sap_ape_show()— CDS entities with release flag, base table and package. Browses only the
/CDSsubtree; the metadata browser's root also exposes/ODP_BWand/ODP_SAPI, and
erpl_ape never reads those.sap_ape_describe()— field list whose DuckDB types come from the same DDIC mapper
sap_read_tableuses, so the two agree cell for cell. Carries the currency/unit reference.sap_ape_preview()— typed sample rows that start no graph and create no subscription.erpl_ape_allow_unreleasedsetting (default off) for entities with no release contract.sap_ape_read_delta()delta including deletes — verified end to end: insert and update
arrive as after-images (/1DH/OPERATION = 'U'), a delete as'D'carrying only its keys. That
is the capability ODP'sbyElementannotation cannot provide.sap_ape_read_full()/sap_ape_read_delta()— extraction through the pipeline engine, with
projection and server-side filters pushed into the reader.filtersuses the same
{FIELDNAME, SIGN, OP, LOW, HIGH}struct aserpl_odp. Delta surfaces the engine's own
per-row change indicator,/1DH/OPERATION, under that name rather than an invented one.sap_ape_show_subscriptions()andPRAGMA sap_ape_drop(cds_name, subscriber_process)— the
engine keeps subscriptions after a graph ends, so they need listing and erasing. There is no RFC
for either; both run short-lived graphs built from the engine's own subscription-reader and
subscription-eraser operators.sap_ape_read_fullerases its own subscription when the scan
ends, so a snapshot leaves nothing behind.recover => trueonsap_ape_read_delta, backed by a local spill in
erpl_ape.delta_spill. The engine commits each portion as it hands it over and has no client
acknowledgement — measured, abandoning a scan after 5 of 180 changes lost the other 175 — so
there is nothing on the SAP side to re-stream and durability has to be local. The spill is
written on its own transaction, so the rollback that loses your rows cannot discard it too.
erpl_ape_spill_enabled = falseopts out, at the cost of making delta at-most-once.sap_ape_check_authorizations([cds_name])— what SAP must grant and whether the
connected user has it, probed live withAUTHORITY_CHECK. The requirement list is read
off the system, and its values come from the ABAP classes that perform the checks rather
than fromTOBJ, which says which fields exist and nothing about what is passed to
them. Readverdict: one row (S_DHAPEOP) is a grant the role must not hold, because
it is the fallback that overridesS_DHAPEOPRand silently defeats the operator
restriction. The list doubles as the module's CDS-only posture in a form a Basis team can
verify —S_DHAPEOPRis checked per operator name byCL_DHAPE_OPERATOR_REGISTRY, and
the browser's SLT / ODP_SAPI / ODP_BW / table / view objects are absent by design.
ape/docs/security.mdcarries theZERPL_APErole definition and handout, and
ape/docs/protocol.mdrecords the class and call site behind every row.erpl_ape_prepare_timeoutbounds the wait for SAP's asynchronous preparation, and
erpl_ape_delta_quiet_secondsbounds how long an already-established delta subscription waits
for a first package before reporting that there is nothing to replicate. They are separate on
purpose: a resumed subscription is already prepared, so minutes of waiting for "no changes"
would be absurd, while a couple of seconds reports "no changes" when the answer is "not yet".- The set of pipeline operators the module will drive is compiled in; no setting widens it, and
the reader is restricted to CDS containers.
Changed
-
[rfc]
SAP_*environment variables no longer seed extension settings.
RfcEnvironmentCredentialsProviderset sixsap_*options that were never registered and never
read — credentials come from secrets — so merely havingSAP_PASSWORDexported crashed extension
load withINTERNAL Error: Unrecognized option sap_password. The provider is removed rather than
registered. If you relied onSAP_ASHOST/SAP_USER/SAP_PASSWORDbeing picked up implicitly,
create a secret instead. The suites never caught this because they useERPL_SAP_*names. -
[ape] Subscriptions erpl_ape registers are named
ERPL_+ yoursubscriber_process. The
engine records no usable creator, so the name is the only way the module can recognise its own —
which is what letssap_ape_show_subscriptions()default to "ours" without hiding the durable
delta subscriptions a caller named itself (previously the default listing showed only the
ephemeral snapshot ones). You never spell the prefix out:sap_ape_read_deltaand
PRAGMA sap_ape_droptake the plain value, and the listing reports it unprefixed alongside the
newsubscription_namecolumn carrying the stored form. The prefix is matched case-sensitively, so
a third party'serpl_xis not treated as ours. Subscriptions from an earlier build carry the
bare name: drop falls back to it, and a delta read that finds one refuses rather than silently
registering a second subscription and re-running the initial load. -
[ape]
recover => trueno longer contacts SAP at all. It used to resolve the entity
against the catalogue at bind time, so it failed exactly when SAP was unreachable — the situation
it exists for. The schema now comes from the spilled package plus the column names recorded with
the batch, so a replay reports the same columns as the read it replaces. -
[ape] The spill's
payloadcolumn is now BLOB. A package whose bytes are not valid UTF-8
— ordinary for SAP text in a non-UTF-8 codepage — used to abort the scan after the engine had
committed the portion, and the error carried the whole package. An existing spill table with a
VARCHAR payload is reported with theDROP TABLEto run rather than silently misused. -
[ape] A value that will not convert raises instead of becoming NULL. The documented wire
sentinels (9999-99-99,NaN, …) map to NULL deliberately, but only where the column cannot hold
them — in a text column?andNaNare data. Anything else names the package, row, column and a
bounded fragment of the text. A silent NULL is a wrong answer the caller cannot see. Likewise a
column the catalogue reports but the package does not carry is an error, not a column of NULLs. -
[ape] An entity named by its metadata-browser path (
/CDS/TMP/ZERPL_APE_D) now resolves to
the bare name the engine stores, so a delta read spelled that way resumes instead of failing on
its second call with "subscription already exists". -
[ape]
wireformatis validated against the four profiles the reader declares, and
recover => falseon a full read no longer raises (only a true value is refused).
Notes
- [ape] Server-side filters are refused, not ignored, and projection is applied on the
client. The pipeline reader available on current releases declares seven configuration
properties and reads seven configuration paths — none of them a filter or a schema — so pushing
either down would return every row while the query looked like it asked for a subset.filters
therefore raises with the remedy (an ordinary SQLWHERE, which the streaming scan applies as
rows arrive), andcolumnsis honoured by mapping the package's self-describing fields. Pushdown
returns with the next-generation reader. - [ape] The engine's CSV writer quotes RFC 4180 style, verified live by seeding hostile
values: a value carrying the separator or a double quote is wrapped in quotes and an inner quote
is doubled, while a backslash is data. The decoder parses quoted fields and additionally checks
each row's cell count against the declared field count, because the scan assigns cells to columns
by index and a shifted row would otherwise be plausible nonsense rather than an error. - [ape] Reads are slow to start, and that is the SAP side, not the client. SAP prepares an
initial load with a background job (DHCDC "ACD"); while it is pending the engine returns neither
data nor an error. The scan polls and, if the job never finishes, fails with a message naming the
application log to check (objectDHCDC, subobjectACP_JOB) rather than hanging. - [ape]
com.sap.abap.cds.reader.v3— the operator the design was originally built around — is
not registered on the releases tested, so the module drivescom.sap.abap.cds.reader.v2.
Known limitations
- [ape] A client killed mid-scan leaves its graph running server-side, which blocks erasing the
subscription and therefore later delta calls on that subscriber. Recovery uses the engine's own
retention mechanism; the delta harness runs it first. Doing this automatically is not yet wired in. - [ape] The gen2 reader (
com.sap.abap.reader, protocol v7) is unusable without driving SAP's
agent message protocol to establishDHAPE_GRAPH-STATE_UUID. Parked; it is likely required for
S/4HANA Public Cloud. See the submodule'sdocs/protocol.md.