RAP compiler → standalone Node.js application — Plan

Status: approved on 2026-11-09, being implemented. The decisions taken are in §11 and detailed in docs/DECISIONS.md. The scope was widened to all the features of a non-draft managed RAP BO (decision D14), then to draft (D54); the coverage is tracked in docs/FEATURES.md. This plan is the original design document: the milestones and choices it describes are the starting point, the decisions record what changed. The findings of §2 come from checks made on 2026-11-09 on the published versions of the libraries, in a sandbox outside the repository.

Contents

  1. Summary
  2. Preliminary checks
  3. Architecture
  4. Technical choices and licenses
  5. Inputs, outputs, CLI
  6. Detailed design
  7. Test strategy
  8. Milestones
  9. Risks
  10. Travel / Booking fixture
  11. Decisions taken
  12. Appendix A — requests of the conformance suite

---

1. Summary

---

2. Preliminary checks

Tested versions: @abaplint/core 2.120.98, @abaplint/transpiler and @abaplint/runtime 2.14.24, Chevrotain 13.2, Node 22.23, pnpm 10.28.

#SubjectFindingConsequence for the plan
V1CDS (CDSParser of abaplint)Parses without errors define root view entity … composition [0..*] of …, association to parent … on $projection.X = _P.X, as projection on … provider contract transactional_query, redirected to composition child, and the DDLX annotate entity … with { … }. The annotations come out as a tree (objects, arrays, #X enumerations, strings, booleans).No dedicated CDS parser for the MVP: an abaplint AST → IR adapter is enough. A complementary parser only if a gap shows up.
V2SRVDObject recognized, but source not parsed.Small Chevrotain grammar (define service … { expose … as …; }).
V3BDEF in abaplintA combinator parser exists (≈ 30 expressions). It produces a generic tree abaplint mostly uses to resolve aliases.We write the requested Chevrotain grammar (typed AST, precise errors). The abaplint parser is used as an oracle in the tests.
V4Derived typesTYPE TABLE FOR … gives a table of void (internal marker "RAP-TODO"); keys, failed, reported, mapped, result are void. The transpiler stops on WITH CORRESPONDING #( keys ): TypeNameOrInfer, type not found: #.We must provide these types ourselves (§6.3).
V5EML in the transpilerREAD/MODIFY/COMMIT/ROLLBACK ENTITIES become calls abap.Classes['KERNEL_RAP_EML'].begin/read/modify/execute/commit/rollback. The names are passed as strings (bdef, entity, operation, fields…); the tables and the targets MAPPED/FAILED/REPORTED/RESULT are passed as is. The upstream tests inject the kernel with abap.Classes["KERNEL_RAP_EML"] = ….The EML layer is a TypeScript implementation of this contract.
V6EML not loweredREAD … BY \_assoc, CREATE BY \_assoc, LINK, OPERATIONS, RELATING TO, AUGMENTING, functions, IN SIMULATION MODE: the generated code raises a "not supported" error at runtime.KNOWN_GAPS.md entries, with a diagnostic at compile time. The fixture does not use these forms. Upstream contribution possible (§11).
V7IN LOCAL MODE, PRIVILEGEDIgnored by the lowering: the kernel does not know whether the call is local.All the EML coming from the ABP is treated as IN LOCAL MODE. No effect in the MVP scope (no authorizations nor dynamic feature control). Documented.
V8SQL layer of the transpilerThe transpiler builds SQL views from the DDLS and fails on the associations (unsupported database definition).The registry given to the transpiler receives "shadow" DDLS, without associations. Our SQL comes from the IR, not from the transpiler.
V9%… components%tky, %control, %param, %msg, %element and INCLUDE TYPE … AS %tky (named, nested groups) pass the abaplint syntax check, the transpilation and the execution.The derived types can be written in standard ABAP.
V10End-to-end PoCABP rewritten by hand as the tool would, generated type interface, in-memory JS kernel. validateDates fills failed and reported (%msg with its text, %element-EndDate = mk-on). acceptTravel chains MODIFY … IN LOCAL MODE UPDATE FIELDS, READ … ALL FIELDS, then fills result with %param. The methods in the PRIVATE SECTION are called through the "friends" mechanism of the generated code.The approach of §6.3 is retained.
V11Existing workopen-steamgate (MIT) emulates a complete ABAP application server (ADT, OData V2/V4, RAP runtime written in ABAP). Its documentation describes the same KERNEL_RAP_EML contract and the same typing limit: the EML targets must be declared explicitly, and the project relies on patched builds of abaplint and of the transpiler.Good source of inspiration. Our approach works with the published packages, without a fork.
V12Semantics of field ( mandatory )The ABAP Cloud documentation says it: no check at runtime, it is a hint for the consumer.We reproduce this behavior: no runtime check, Common.FieldControl Mandatory in the CSDL. The business check stays in a validation.
V13EnvironmentPostgreSQL 16 binaries present. Docker CLI present, daemon stopped. Chromium and Playwright pre-installed.Fast tests on PGlite, e2e on a real PostgreSQL. Docker in CI, or here if the daemon starts.

---

3. Architecture

 abapGit folder (fixtures/travel/src)
   TABL .xml · DDLS .asddls · DDLX .asddlxs · BDEF .asbdef · SRVD .srvdsrv · CLAS .abap
   │
   ▼
┌──────────────────────────── @open-rap/compiler ────────────────────────────┐
│ 1. Parsing                                                                        │
│    abaplint registry: CDS (DDLS, DDLX), DDIC (TABL, DTEL, DOMA) + std catalog     │
│    Chevrotain       : BDEF (behavior + projection), SRVD                          │
│ 2. IR (model.json) + semantic validation (diagnostics file:line:col)              │
│ 3. Generators                                                                     │
│    sql/   PostgreSQL DDL: tables + views (R layer then C layer)                   │
│    csdl/  $metadata XML + UI, Common, Core, Capabilities, Measures annotations    │
│    abap/  derived types → ABP rewrite → @abaplint/transpiler → .mjs modules       │
│    ui/    OpenUI5 application (List Report / Object Page, freestyle)              │
│    app/   package.json · server.mjs · Dockerfile · docker-compose · .env          │
└───────────────────────────────────────────────────────────────────────────────────┘
   │
   ▼
 output folder (standalone application) + bundled @open-rap/runtime (vendor/)

   browser (OpenUI5, ODataModel V4)
        │  $batch, GET, POST, PATCH, DELETE
        ▼
   OData V4 (Fastify) ── OIDC auth / dev mode ── CSRF token
        │ reads                       │ writes, actions
        ▼                             ▼
   SQL views zc_*             RAP managed runtime (buffer, triggers, save sequence)
        │                             │  ▲
        │                             │  └── KERNEL_RAP_EML ◄── transpiled ABP (@abaplint/runtime)
        ▼                             ▼
                 PostgreSQL (Kysely + pg)

pnpm monorepo:

packages/
  model/      @open-rap/model     types of the IR, (de)serialization, version of model.json
  compiler/   @open-rap/compiler  rapt CLI, parsers, IR construction, generators
  runtime/    @open-rap/runtime   OData V4, RAP managed runtime, EML kernel, auth, DB access
fixtures/travel/                        reference BO (abapGit format)
e2e/                                    end-to-end scenarios (HTTP + Playwright)

Internal dependencies: compiler → model ← runtime. The compiler only depends on the runtime to bundle it into the output.

---

4. Technical choices and licenses

Licenses read on the npm registry on 2026-11-09. LICENSES.md is created in M1 and kept up to date with each new dependency (name, version, license, use, date of the check).

Building blockChoiceLicenseReason, alternative
Language, toolingTypeScript 7.0 (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes), ESM, Node ≥ 22, pnpm 10 (workspaces), Vitest 5Apache-2.0, MIT, MITRequired by the specification. Fallback to TypeScript 5.9 if a tool is not yet compatible with 7.
ABAP and CDS parsing@abaplint/core 2.120.98MITRequired; sufficient CDS coverage (V1). Exact version pinned.
Transpilation of the ABP@abaplint/transpiler and @abaplint/runtime 2.14.24MITRequired. Same exact version for both, pinned.
BDEF, SRVD grammars, OData optionsChevrotain 13Apache-2.0Required for BDEF; reused for SRVD and $filter/$orderby/$expand.
HTTP serverFastify 5MITinject() to test without a network, encapsulated plugins, good typing. Alternative: Express 5 (MIT).
DatabasePostgreSQL 16+, pg 8, Kysely 0.29PostgreSQL, MIT, MITRequired. Parameterized queries only.
Database for the testsPGlite 0.5 + kysely-pglite-dialect 1.4Apache-2.0, MITReal in-process PostgreSQL engine (WASM), without Docker: fast integration tests.
OIDCjose 6 (JWT, JWKS), openid-client 6 (code + PKCE), @fastify/secure-session 8MITGeneric OIDC provider (Keycloak, Entra ID, Auth0…).
Static files@fastify/static 10MITServes the built UI.
OIDC testsoauth2-mock-server 9 (dev); Keycloak (Docker image)MIT, Apache-2.0Fake provider in Vitest; real Keycloak in e2e.
UIOpenUI5 1.154 (1.136 LTS until D121): sap.m, sap.f, sap.uxap, sap.ui.layout, sap.ui.core, sap_horizon themeApache-2.0Allowed. The ODataModel V4 is the same as the one of Fiori Elements V4. sap.fe, sap.ui.comp and sap.suite are not part of OpenUI5 and are not used.
UI buildUI5 Tooling (@ui5/cli 4)Apache-2.0ui5 build self-contained: standalone bundle, usable offline.
Browser E2EPlaywright 1.65Apache-2.0Chromium already installed here.
XMLin-house writing for the CSDL; fast-xml-parser 5 in devMITNo runtime dependency for the XML.
CLInode:util parseArgs(Node, MIT)No dependency.
Docker imagesnode:22-alpine, postgres:16-alpine, quay.io/keycloak/keycloakMIT and free packages, PostgreSQL, Apache-2.0Official images.
Test corpus (option)BDEF/CDS sources of the SAP-samples examples (refscen-flight, rap-opensap, fiori-feature-showcase)Apache-2.0Robustness of the parsers, read-only, with attribution (decision 13).

Prohibitions respected: no @sap/cds (CAP), no SAPUI5, no sap.fe, no library under the SAP Developer License. The "clean-room" ABAP base (§6.3) is written from scratch from the documented public signatures; no SAP code is copied.

---

5. Inputs, outputs, CLI

Input: a folder in abapGit format

TypeFilesMVP
TABLztravel.tabl.xml (DD02V, DD03P)yes
DTEL, DOMA.dtel.xml, .doma.xmlyes when present; otherwise, bundled catalog of the standard elements usual in RAP (SYSUUID_X16, ABP_*, TIMESTAMPL, ABAP_BOOLEAN…), type metadata only
DDLS.ddls.asddlsyes
DDLX.ddlx.asddlxsyes
BDEF.bdef.asbdefyes (managed and projection)
SRVD.srvd.srvdsrvyes
SRVB.srvb.xmloptional: name of the binding, version, path of the service
CLAS.clas.abap, .clas.locals_imp.abap, .clas.locals_def.abapyes (behavior pool)
MSAG.msag.xml"should": for new_message( id = … number = … )

CLI

rapt check <src>                                   diagnostics (parsing, RAP semantics, ABAP syntax check)
rapt ir    <src> --service ZUI_TRAVEL              IR as JSON (debugging, snapshots)
rapt build <src> --service ZUI_TRAVEL --out <dir> [--odata-path …] [--ui5-version …]

The diagnostics follow the format file:line:column: error|warning CODE message. The exit code is non-zero on error.

Output: a standalone folder

package.json          public dependencies (fastify, kysely, pg, @abaplint/runtime, jose, openid-client…)
vendor/               bundled runtime as a tarball: no private registry needed
server.mjs            startup: configuration (env) → DB schema → ABAP runtime → Fastify
model/model.json      serialized IR
odata/metadata.xml    CSDL ($metadata)
db/schema.sql         tables + views
abap/*.mjs            transpiled ABP, derived types, "clean-room" base
webapp/  ui5.yaml     OpenUI5 application, built as a standalone bundle in the Docker build
Dockerfile  docker-compose.yml  .env.example  keycloak/realm.json  README.md

Start: npm start (PostgreSQL through DATABASE_URL, AUTH_MODE=none|oidc) or docker compose up.

---

6. Detailed design

6.1 Parsing

BDEF (Chevrotain). Case-insensitive lexer, // and /* */ comments, namespaced names (/DMO/I_Travel), $self, cardinalities [1], [0..*]. MVP subset:

The out-of-scope constructs are recognized by generic rules. The tool emits a clear diagnostic instead of an opaque syntax error:

ConstructHandling
with draft, unmanaged, late numbering, with additional save, with unmanaged save, static or factory actions, functions, determine action, eventerror: out of the MVP scope
authorization master, authorization dependent, side effects, features : instance, mandatory : create, readonly : updatewarning: accepted but ignored, gap described in KNOWN_GAPS.md

CDS (through abaplint). The adapter extracts the name, the kind (root or child), the source (table or entity), the select list with key and aliases, the associations and compositions (cardinality, ON condition), redirected to, provider contract, and the entity and element annotations converted to JSON. MVP: columns and aliases; expressions (CASE, CAST, calculations) produce an "unsupported" diagnostic until an extension. Merge of the annotations: DDLX (layers CUSTOMER > PARTNER > INDUSTRY > LOCALIZATION > CORE), then projection, then base view (propagation), respecting @Metadata.ignorePropagatedAnnotations.

SRVD. define service S { expose E [as Alias]; }, with annotations.

DDIC. Tables read by abaplint (DD03P XML); DTEL and DOMA by abaplint; bundled catalog for the standard elements. The client column (CLNT) is ignored (decision 9).

6.2 IR

Sketch of the types of the model package:

interface Model { version: 1; service: Service; bos: BusinessObject[]; projections: ProjectionBO[]; tables: Table[] }

type AbapType = { kind: "char" | "numc" | "string" | "dec" | "curr" | "quan" | "int1" | "int2" | "int4"
                      | "int8" | "fltp" | "dats" | "tims" | "timestamp" | "timestampl" | "utclong"
                      | "raw" | "rawstring" | "cuky" | "unit" | "bool";
                  length?: number; decimals?: number; ddic?: string };

interface Field { name: string; type: AbapType; column?: string; key: boolean;
                  semantics?: "createdBy" | "createdAt" | "lastChangedBy" | "lastChangedAt" | "localInstanceLastChangedAt";
                  currencyRef?: string; annotations: Annotations; src: SourceRef }

interface Entity { name: string; alias: string; root: boolean; table?: string; baseEntity?: string;
                   fields: Field[]; associations: Association[]; annotations: Annotations }

interface Association { name: string; target: string; kind: "composition" | "toParent" | "association";
                        cardinality: [min: number, max: number | "*"]; on: Array<[source: string, target: string]> }

interface Trigger { create?: true; update?: true; delete?: true; fields: string[] }
interface HandlerRef { abapClass: string; method: string; params: Record<string, string> }

interface EntityBehavior {
  entity: string; persistentTable: string;
  lock: { master: true } | { dependentBy: string };
  etag?: { master: string } | { dependentBy: string };
  operations: { create: boolean; update: boolean; delete: boolean; createBy: string[] };
  fieldControl: Record<string, Array<"readonly" | "mandatory">>; numberingManaged: string[];
  determinations: Array<{ name: string; on: "modify" | "save"; triggers: Trigger; handler: HandlerRef }>;
  validations: Array<{ name: string; triggers: Trigger; handler: HandlerRef }>;
  actions: Array<{ name: string; result?: { cardinality: "1"; self: true }; handler: HandlerRef }>;
  mapping: Record<string, string>; src: SourceRef }

Semantic validations (positioned diagnostics): known entity, field and association; BDEF mapping consistent with the CDS view and the table; etag master field existing and of a timestamp type; numbering : managed field a key of type RAW 16; fields of the triggers existing; the projection only uses capabilities of the base; each validation, determination and action has a handler method in the ABP.

6.3 ABP → JavaScript

  1. abaplint syntax check of the original sources (ABAP for Cloud Development). The errors point to the original lines.
  2. Derived types. For each BDEF, a generated ABAP interface (ZRAP_DT_<BDEF>, or a hashed name beyond 30 characters). Per entity: groups %key, %pky, %tky, %data, %control; tables FOR CREATE, UPDATE, DELETE, READ IMPORT, READ RESULT, ACTION IMPORT, ACTION RESULT; structures RESPONSE FOR FAILED/REPORTED/MAPPED (%cid, %cid_ref, %fail, %msg, %element, %op…). All according to the ABAP documentation of the BDEF derived types.
  3. Rewrite. abaplint provides the AST and the positions; targeted text edits are applied, preserving the line numbers: | In the ABP | Becomes | |---|---| | METHODS v FOR VALIDATE ON SAVE IMPORTING keys FOR Travel~v. | METHODS v IMPORTING keys TYPE <dt>=>tt_travel_keys CHANGING failed TYPE <dt>=>ts_failed reported TYPE <dt>=>ts_reported. | | FOR DETERMINE ON MODIFY …, FOR MODIFY IMPORTING keys FOR ACTION Travel~a RESULT result | same principle; result and mapped typed according to the operation | | TYPE TABLE FOR UPDATE zr_travel\\travel, TYPE STRUCTURE FOR …, TYPE RESPONSE FOR … | TYPE <dt>=>tt_travel_update, etc. | | RESULT DATA(x), FAILED DATA(f), REPORTED DATA(r), MAPPED DATA(m) of an EML statement | DATA x TYPE … hoisted on the same line, then RESULT x | | EML operand CORRESPONDING #( … ) or VALUE #( … ) | # replaced by the expected derived type | | handlers the tool does not call (for example FOR GLOBAL AUTHORIZATION) | signature typed the same way, so that the class transpiles; method never called | | everything else, EML statements included | unchanged: the transpiler lowers the EML to KERNEL_RAP_EML |
  1. Registry of the transpiler: rewritten ABP, type interface, shadow DDLS (V8), tables, and a "clean-room" base written by us: CL_ABAP_BEHAVIOR_HANDLER (new_message_with_text, new_message), IF_ABAP_BEHV (mk, cause…), IF_ABAP_BEHV_MESSAGE.
  2. Transpilation (unknownTypes: compileError) → .mjs modules. The tool writes the registry of the handlers into model.json: BDEF validation, determination or action → transpiled local class, method, names of the parameters.

Safeguard: the transpiler and the runtime are never patched, they are given standard ABAP. An unhandled construct produces a diagnostic and an entry in KNOWN_GAPS.md.

Execution. The runtime instantiates the local class (for example abap.Classes['CLAS-ZBP_R_TRAVEL-LHC_TRAVEL']). It builds keys, failed, reported and result from the generated types, calls the method, then reads the responses back. The KERNEL_RAP_EML kernel links each EML call to the buffer of the current LUW, found through AsyncLocalStorage. The abaplint runtime has a global state (sy-*, static attributes) shared between requests: the ABP calls are therefore serialized in a process. Scaling is done with processes or containers (decision 11).

6.4 SQL (PostgreSQL)

The tables come from the TABLs: lower-case names, client column removed, primary key, child → parent foreign key for the compositions, index on the parent key. A SQL view is generated for each CDS view: zr_* on the tables, then zc_* on zr_*. The OData reads go through the zc_* views; the writes go through the RAP runtime, to the tables. The DDL is idempotent (IF NOT EXISTS). Schema evolution (ALTER) is not in the MVP.

ABAPPostgreSQLEdm
CHAR(n)varchar(n), trailing blanks removedString, MaxLength=n
NUMC(n)varchar(n), digits with leading zerosString + Common.IsDigitSequence
STRING, SSTRING(n)text, varchar(n)String
INT1, INT2, INT4, INT8smallint, smallint, integer, bigintByte, Int16, Int32, Int64
DEC, CURR, QUAN (p,s)numeric(p,s)Decimal, Precision and Scale
FLTPdouble precisionDouble
DATSdate; initial value 00000000 ↔ NULLDate
TIMStime(0)TimeOfDay
TIMESTAMP (DEC 15)timestamptz(0)DateTimeOffset, Precision 0
TIMESTAMPL (DEC 21,7), UTCLONGtimestamptz(6)DateTimeOffset, Precision 7
RAW(16) (SYSUUID_X16)uuidGuid
other RAW(n), RAWSTRINGbyteaBinary
CHAR(1) ABAP_BOOLEANbooleanBoolean
CUKY, UNITvarchar(5), varchar(3)String; the amount carries Measures.ISOCurrency or Measures.Unit

6.5 $metadata (CSDL XML)

Conventions taken from RAP, so that an existing Fiori Elements application finds what it expects: schema com.sap.gateway.srvd.<srvd>.v0001 (alias SAP__self), types <Alias>Type, entity sets <Alias>, navigations with Partner and NavigationPropertyBinding, bound actions with an _it parameter. The vocabularies (Core, Capabilities, Measures on the OASIS side; Common, UI on the SAP side) are referenced by their public URL.

SourceCSDL annotation
@EndUserText.labelCommon.Label
@UI.lineItem (including #FOR_ACTION)UI.LineItem (UI.DataField, UI.DataFieldForAction, UI.Importance)
@UI.selectionFieldUI.SelectionFields
@UI.headerInfoUI.HeaderInfo
@UI.facetUI.Facets: ReferenceFacet to Identification, FieldGroup or the LineItem of an association; CollectionFacet
@UI.identification, @UI.fieldGroupUI.Identification, UI.FieldGroup#Qualifier
@UI.hiddenUI.Hidden
@ObjectModel.text.elementCommon.Text
@Semantics.amount.currencyCode, @Semantics.quantity.unitOfMeasureMeasures.ISOCurrency, Measures.Unit
field ( readonly ), numbering : managedCore.Computed
field ( mandatory )Common.FieldControl Mandatory
etag masterCore.OptimisticConcurrency on the entity set
available operations (create, update, delete, create by association)Capabilities.InsertRestrictions, UpdateRestrictions, DeleteRestrictions, NavigationRestrictions

6.6 OData V4 runtime

Goal: that an existing Fiori Elements V4 application (outside this project, used under the SAP license of its owner) can consume the service. Our tests only use OpenUI5.

The table gives the requested scope, plus the additions I propose because a V4 List Report / Object Page needs them (decision 5):

FunctionRequestedProposed addition
Service document, $metadata✓
GET collection; GET entity, short key Travel(<guid>) and named key Travel(TravelUUID=<guid>)✓
GET through a navigation Travel(…)/_Booking (table of the Object Page)✓
$filter: eq, ne, gt, lt, and, or, contains✓ge, le, not, startswith, endswith, parentheses, null (the FE filter bar produces them)
$orderby, $top, $skip, $count=true✓/$count segment
One-level $expand, with nested $select, $orderby, $top, $skip✓
$select✓
Simple $search (ILIKE on the @Search.defaultSearchElement fields)✓
POST, PATCH, DELETE✓POST through a navigation Travel(…)/_Booking; one-level deep insert
Bound actions✓
Multipart $batch, atomic changesets, Content-ID✓$<id> references inside a changeset
ETag: @odata.etag, If-Match, 412 on a mismatch✓428 when If-Match is missing
IEEE754Compatible=true (Decimal and Int64 as strings)✓ (UI5 always sends it)
CSRF token (X-CSRF-Token: Fetch on HEAD or GET)✓
Messages: V4 error with target and @Common.numericSeverity; success and warnings in the sap-messages header✓
sap-* parameters (sap-client, sap-language…)accepted and ignored

Implementation: a Fastify plugin; the system options are parsed by Chevrotain, then the AST is translated into parameterized Kysely queries (never SQL concatenation), with an allow list of properties from the IR. A changeset corresponds to a RAP LUW and to a PostgreSQL transaction. The JSON $batch format (OData 4.01) is not in the MVP.

Path of the service: by default the one of a RAP binding, /sap/opu/odata4/sap/<binding>/srvd/sap/<srvd>/0001/, so that an existing FE application points to it without changing its manifest. The path is configurable (decision 6).

6.7 RAP managed runtime (without draft)

6.8 Authentication

6.9 Generated OpenUI5 UI (freestyle, without sap.fe)

6.10 Packaging

---

7. Test strategy

LevelContentTools
UnitGrammars (positive and negative cases, error positions), IR construction, generators (assertions + snapshots), OData parsers, ABAP ↔ SQL ↔ Edm type conversionsVitest
OracleBDEF compared with the abaplint parser; CDS and BDEF of the SAP-samples corpus, read-onlyVitest
ABPSnapshots of the rewrite; transpilation then execution of the handlers on a fake kernel; tests of the KERNEL_RAP_EML contract and of the access to the private methodsVitest + abaplint
IntegrationRAP runtime + SQL on a real in-memory PostgreSQL enginePGlite
OData conformanceRequests as Fiori sends them (appendix A), including raw $batch bodies. First written from the URLs of a V4 List Report, then completed with real traces: the OpenUI5 ODataModel V4 is driven with Playwright and the captured requests are frozen in reference files.fastify.inject + PGlite
E2Erapt build on the fixture → docker compose up → HTTP scenarios and UI journeys (filter, open, edit, action, create, delete). Variant without Docker on a local PostgreSQL.Playwright

CI: GitHub Actions (typecheck and tests on each push, Docker e2e job).

---

8. Milestones

Each milestone ends with green Vitest tests, a commit pushed to the branch and a short report.

M1 — Foundation, fixture, BDEF parser, IR

M2 — SQL and $metadata generators

M3 — OData read runtime (and authentication foundation)

M4 — Writes, EML, transpiled ABP

M5 — Generated UI

M6 — Docker packaging, complete OIDC, e2e

---

9. Risks

RiskProbabilityImpactMitigation
RAP derived types not resolved by abaplint (V4)observedblocking for the ABPGenerated types + rewrite (PoC V10); eventually, an upstream contribution.
EML forms not lowered (V6), especially READ … BY \_Booking, common in real determinationshighreal ABPs refusedDiagnostic at compile time, KNOWN_GAPS entry; upstream contribution if you accept it.
Very active abaplint libraries (daily releases). The KERNEL_RAP_EML contract is recent; the access to the private methods goes through an internal detail of the generated code (FRIENDS_ACCESS_INSTANCE).mediumbreakage on upgradeExact pinned versions, dedicated contract tests, explicit upgrades.
Global state of the ABAP runtime (sy-*, static attributes) shared between requestscertaindata crossed between requestsSerialized ABP calls; scaling with processes.
RAP semantic fidelity (order of the determinations, triggers, HTTP codes, format of the messages)mediumbehavior different from SAPBehavior tests written from the ABAP documentation; gaps listed in KNOWN_GAPS.
OData V4 conformance with UI5 and FE (IEEE754Compatible, $batch, ETag, messages)mediumUI that does not workConformance suite on real requests + e2e with the real OpenUI5 ODataModel V4.
CDS coverage beyond the MVP (CASE, CAST, joins, parameters, unions)low for the MVPparser or SQL to extendIsolated adapter; complementary parser if needed.
Precision of the timestamps (7 decimals in ABAP, 6 in PostgreSQL)certainlowTimestamps generated to the microsecond; documented.
Security: injection through $filter, CSRF, XSS in the UIlowhighParameterized queries, allow list of properties, CSRF token, CSP headers, dedicated tests.
Legal: "clean-room" base (CL_ABAP_BEHAVIOR_HANDLER…)lowmediumWritten from scratch from the public signatures; no SAP code copied; no SAP dependency.
Duration and size of the OpenUI5 buildmediumlowBuild in a Docker stage, with a cache; OpenUI5 CDN in dev mode.
Docker unavailable in some environments (like this one)mediumDocker e2e cannot runEquivalent e2e on a local PostgreSQL; Docker job in CI.

Gaps already identified, which will go to KNOWN_GAPS.md: EML forms of V6; IN LOCAL MODE and PRIVILEGED ignored (V7); authorizations, dynamic feature control and side effects ignored with a warning; conversion exits (ALPHA…) and ISO conversion of the languages not handled; precision of the timestamps; client ignored; serialized ABP execution.

---

10. Travel / Booking fixture

The fixture is delivered in fixtures/travel (abapGit format); its detailed description is in fixtures/travel/README.md. The objects carry the ZRT_ prefix to avoid collisions with the objects of the RAP tutorials when it is imported into a real system.

ObjectTypeRole
ZRT_TRAVEL, ZRT_BOOKINGTABLPersistent tables
ZRT_R_TRAVELDDLSRoot view entity, composition [0..*] of ZRT_R_Booking
ZRT_R_BOOKINGDDLSChild view entity, association to parent
ZRT_C_TRAVEL, ZRT_C_BOOKINGDDLS, DDLXProjections and UI annotations
ZRT_R_TRAVEL, ZRT_C_TRAVELBDEFManaged strict(2) behavior and projection
ZBP_RT_R_TRAVELCLASBehavior pool
ZRT_UI_TRAVEL, ZRT_UI_TRAVEL_O4SRVD, SRVBService and OData V4 binding

Compared with the initial sketch, the fixture covers more non-draft features (decision D14): global authorization, instance feature control on the acceptTravel action, internal action reCalcTotalPrice called by two calculateTotalPrice determinations (on Travel and on Booking), with a READ … BY \_Booking and a READ … BY \_Travel read.

---

11. Decisions taken

The owner of the project delegated the technical choices, with one requirement: all the features of a non-draft RAP BO must be respected. The recommendations were all retained, with three adjustments due to this requirement. The details are in docs/DECISIONS.md.

#DecisionAdjustment
1Chevrotain BDEF grammar, abaplint parser as an oracle (D1)
2Generated derived types + rewrite of the ABP (D2)The pass also lowers READ … BY \_assoc, LINK and CREATE BY \_assoc, which the transpiler does not handle: they are common features of a non-draft BO.
3Fastify (D3)
4Reads through generated SQL views (D4)
5Additions to the OData scope (D5)
6Path of the service modeled on RAP, configurable (D6)
7Fixture activatable on a real system (D7)The global authorization of the fixture is really run, not only accepted.
8Timestamps as timestamptz(6) (D8)
9Client removed (D9)
10OpenUI5 1.136 LTS (1.154 since D121), sap.m, sap.f, sap.uxap (D10)
11Serialized ABP execution (D11)The lock is reentrant for the LUW that holds it.
12@open-rap/*, rapt CLI, MIT license (D12)
13Extract of the SAP-samples corpus to test the parsers (D13)

Complementary decisions (D14 to D21): complete non-draft scope, runtime driven by the IR, canonical representation of the values, toolchain, PGlite for the tests, "shadow" DDIC for the transpiler, semantics of mandatory, triggering of the determinations.

---

Appendix A — requests of the conformance suite

Shapes sent by the UI5 ODataModel V4 and by a Fiori Elements V4 List Report / Object Page. Paths relative to the root of the service, except the first line.

HEAD /sap/opu/odata4/sap/zrt_ui_travel_o4/srvd/sap/zrt_ui_travel/0001/       X-CSRF-Token: Fetch
GET  $metadata                                                         Accept: application/xml
POST $batch                         Content-Type: multipart/mixed;boundary=batch_id-1731160000000-12

--batch_id-1731160000000-12
Content-Type:application/http
Content-Transfer-Encoding:binary

GET Travel?$count=true&$select=AgencyID,BeginDate,CurrencyCode,EndDate,OverallStatus,TotalPrice,TravelID,TravelUUID&$skip=0&$top=30 HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:en


--batch_id-1731160000000-12--
#CaseRequest (in the $batch)
1Initial listGET Travel?$count=true&$select=…&$skip=0&$top=30
2Filter barGET Travel?$count=true&$filter=OverallStatus eq 'O' and (AgencyID eq '070001' or AgencyID eq '070002')&$select=…&$skip=0&$top=30
3Date range$filter=BeginDate ge 2026-01-01 and BeginDate le 2026-12-31
4Contains, starts with$filter=contains(Description,'Paris'), $filter=startswith(TravelID,'000')
5Exclusion$filter=not (OverallStatus eq 'X'), $filter=OverallStatus ne 'X'
6Sorting$orderby=BeginDate desc,TravelID
7Search$search=Paris
8Scrolling$skip=30&$top=30
9Object PageGET Travel(3f2504e0-4f89-11d3-9a0c-0305e82c3301)?$select=…
10Table of the Object PageGET Travel(3f2504e0-…)/_Booking?$count=true&$orderby=BookingID&$select=BookingID,BookingUUID,CurrencyCode,FlightDate,FlightPrice&$skip=0&$top=10
11ExpandGET Booking(…)?$select=…&$expand=_Travel($select=TravelID,TravelUUID)
12Update (changeset)PATCH Travel(…), If-Match: W/"…", body {"EndDate":"2026-12-24"}
13Creation with children (changeset)POST Travel, body {"TravelID":"00000042", …, "_Booking":[{…}]}
14Creation of a child (changeset)POST Travel(…)/_Booking
15Deletion (changeset)DELETE Booking(…), If-Match: W/"…"
16ActionPOST Travel(…)/com.sap.gateway.srvd.zrt_ui_travel.v0001.acceptTravel, If-Match, body {}, possibly followed by ?$select=…
17Error casesStale ETag → 412; missing If-Match → 428; unknown property in $select → 400; failed validation → 400 with details[].target; unknown key → 404