Skip to content

Why Atscript OData ​

Why we built this ​

We like model-driven UIs: describe the data once, add annotations, and the screens follow. SAP Fiori® elements and the SAP® Cloud Application Programming Model (SAP CAP) are built on that idea, and it's a good one.

What kept hurting was everything after: a field or screen that has to work differently, our own layout, types for the data, calling the service from code, and, for SAP CAP apps, the runtime's license. Atscript OData keeps the model and turns the screens into plain code you can change.

What Atscript OData is ​

Atscript OData turns the $metadata of your OData v2 or v4 service into typed Atscript models, and Atscript UI renders Vue tables, forms and value helps from them. The page talks to the service directly or through your own Moost server; the service doesn't change (Overview).

You can try everything on this page in the live demo: a coffee roaster's back office on a public OData v4 service (about the demo).

Three things about Atscript's model you can check for yourself: annotations sit on the field they describe (how), a typo in one is a build error right in your editor (VS Code), and the model compiles to the TypeScript types your code imports (Type Safety).

Four pain points in building OData apps ​

Customization ​

What hurts. In SAP Fiori elements, a custom field or column is an app extension: you write it, and its display and behaviour are your app's responsibility (SAP's docs). To be fair, SAP has extension points for custom columns, sections, fields and actions in v2 and v4.

The look follows the same pattern. SAP's UI Theme Designer takes your colours and logo (tutorial). Past that, it's custom CSS, and SAP warns: "the deeper such adaptations are, the more likely is it that they break with future SAPUI5 updates" (CSS Styling Issues). In the launchpad, SAP advises against overriding UI5's styles at all (Walkthrough, step 14).

What we do instead. Customization is a first-class citizen: one annotation puts your own component on a form field or a table cell, and the rest stays generated.

atscript
annotate Coffee {
    @ui.form.component 'tags'
    notes
}

Try it in the live demo on a coffee's page and the coffee list (how). The demo's coffee brand is just a palette, fonts, a few images and a few style overrides (how).

What we don't do. No floorplans, no draft editing, and not the SAP Fiori look: you compose the screens from tables, forms and pickers (when SAP's tools fit better).

Own layout ​

What hurts. We've lived this more than once. An app starts in SAP Fiori elements, because that's quick, and goes live. Then real users bring real requirements, the template stops fitting, and the app gets rewritten as a freestyle app. Someone on SAP Community describes the same path (a comment, 2025):

"Consider a simple development going live as a Fiori Elements app, but new requirements turn out to be so complex that freestyle seems to be unavoidable. Developers have to re-write already tested and working parts, and management is frustrated."

In our experience, SAP Fiori elements works well for standard apps and for demos; with real users in a real business domain, we kept ending up rewriting. To be fair, SAP's Fiori elements team replied in the same thread that in v4 "there are options for developer efficiency AND flexibility": the flexible programming model builds custom pages from SAP's annotation-driven building blocks (SAP's explorer).

After a rewrite, SAP's smart controls (v2 only) and building blocks (v4) still read value helps, texts and labels from the annotations; with plain UI5 controls, React or Vue, you wire them up yourself.

What we do instead. Lay out your screens in Vue from day one, so growing requirements never force a rewrite. Tables, forms and pickers still read value helps, texts and labels from the annotations (full list). Try it in the live demo: on a new order, pick a café, and its city fills in from the service's value list.

What we don't do. We don't read the layout annotations (UI.LineItem, UI.SelectionFields, UI.Facets, UI.FieldGroup, except their action records), and we don't apply a dynamic Common.FieldControl. Your screens decide the layout.

Type safety ​

What hurts. You can generate types: Andreas Kunz (SAP) shows how with odata2ts (SAP Community, 13 Apr 2023), SAP CAP has cds-typer, and the SAP Cloud SDK generates typed clients. But in a UI5 app, binding paths and filter fields are strings, so a typo shows up only when the app runs.

What we do instead. Each entity set becomes a TypeScript type, regenerated from the saved $metadata on every build. The compiler catches a misspelled field in a filter, or a number where the service wants a decimal string (Type Safety).

What we don't do. Types stop where your code stops: Atscript UI components take a URL, and a filter on a host-computed column fails only at runtime (what isn't checked).

OData Client ​

What hurts. With UI5's OData v4 model, a call outside a binding takes extra steps. A Stack Overflow question (2 Dec 2021):

"How should I submit OData requests that should not necessarily be bound to the UI?" (Stack Overflow)

The v2 model has read and callFunction. On a server, you need a separate client, such as the SAP Cloud SDK's generated one.

What we do instead. One set of types for your screens and your code: odata.client(type) in the browser, space.getTable(Type) in Node, in a Moost server, a script or a job (how). CSRF tokens, ETags, the service's messages on their fields and $batch are handled for you, as in UI5's models (Writes, Batching, Messages).

What we don't do. The server doesn't auto-batch, and there's no JSON $batch (Limitations).

Three ways to use Atscript OData ​

Start small, and go further when you need to:

  1. Browser app. Each user's own login, in your SAP ABAP® system as a BSP app or behind a reverse proxy. No drafts yet.
  2. Moost server. Your own users and rules, actions on all matching rows, scripts and jobs. SAP's checks and change logs see one technical user.
  3. Open stack. For services your team owns, like SAP CAP apps: one group of related sets at a time, to PostgreSQL, MySQL, SQLite or MongoDB. Needs the Moost server.

Choose Your Path compares them.

Licenses: ours and SAP CAP's ​

  • Ours: MIT, every package: Atscript, Atscript DB, Atscript UI, Moost, vunor and the OData packages (GitHub).

  • SAP CAP's: since v9 (May 2025), its components that aren't open source ship under the SAP Developer License 3.2 CAP. SAP presents it as clearer rules: productive use is allowed and supported on BTP or another platform licensed from SAP; elsewhere, it's for testing (SAP's license page, more). For some developers, that was a reason to leave:

    "I lost interest on cap due to the last license changes" (a comment on GitHub, 2025)

  • Your SAP system's: nothing changes for your SAP S/4HANA® or SAP® Gateway licensing. One technical user is an architecture choice, not a license saving, and SAP's checks and change logs see that user.

This is not legal advice. Read the licenses for your own setup.

When SAP's own tools fit better ​

Stay with SAP's tools when:

  • Your app fits the standard floorplans. An app expressed almost entirely through annotations "survives an S/4HANA upgrade with minimal rework" (Rakesh Narayan).
  • You need draft editing. We refuse writes to draft-enabled sets (Limitations).
  • The app must live in the SAP Fiori launchpad. Ours opens from a tile or a link, outside the shell, without intent-based navigation or launchpad settings (Open it).
  • Key users adapt the app themselves. SAP's apps take key-user changes and saved views without code (SAPUI5 flexibility).
  • You need vendor support and long-term maintenance for the UI.
  • Your users expect the SAP look and what comes with it: "Navigation, responsiveness, accessibility, and behavior come built in." (Software Unplugged)
  • You want the SAP look in Vue or React: SAP's open-source UI5 Web Components bring it.
  • Your team knows UI5 well and the app fits it.

What Atscript OData builds on ​

  • Atscript: types, metadata and validation from one .as file.
  • Atscript DB: tables on PostgreSQL, MySQL, SQLite or MongoDB; Atscript OData is one of its adapters.
  • Atscript UI: forms, smart tables and value helps from the model, in Vue.
  • Moost: a decorator-based Node.js framework for your server.

What's missing today ​

  • It's a preview. The OData packages are 0.0.x; their APIs may still change.
  • No drafts, no floorplans, no launchpad shell.
  • No benchmarks against UI5, so no speed claims.
  • The live demo runs on a mock server, SAP's open-source @sap-ux/fe-mockserver-core, not a real SAP system (The service).

Limitations has the full list. Missing something? Tell us in an issue.

SAP, SAP S/4HANA, SAP Fiori, SAPUI5, SAP BTP and other SAP products and services mentioned herein, as well as their respective logos, are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Atscript OData is an independent open-source project and is not affiliated with, sponsored or endorsed by SAP SE.
Released under the MIT License.