Skip to content

OData adapter for Atscript

OData apps,built your way.

Turn any OData v2 or v4 service into TypeScript types and runtime validators. Generate the screens, write your own in Vue, or mix both.

Works with SAP S/4HANA®, SAP Gateway®, ABAP® RAP, SAP CAP® and any other OData v2 or v4 service.

One value list in $metadata, a working picker on screen. No glue code.

Why Atscript OData

A better UI for your users.A better DX for you.

Generated where it fits. Yours where it doesn't. Typed everywhere.

UI For your users

  • Any screen, not just a floorplan.

    Forms, tables and value helps are Vue components. Place them anywhere.

  • Change one field. Keep the rest.

    Swap one cell or a whole screen. The rest stays generated.

  • Your design system.

    Your palette, your density, your components.

DX For you

  • Typed from $metadata.

    Every entity set is a TypeScript type. The compiler catches what changed.

  • Validated before it's sent.

    Lengths, ranges and formats, checked in the form, the client and the server.

  • No glue code.

    Value helps, texts, ETags and CSRF just work, in every screen.

How it works

From $metadata to a screen in three steps.

  1. Save

    Open the service's $metadata in your browser and save it. One file holds every entity set.

  2. Generate

    Every build writes typed models, tweakable in annotate blocks. At runtime they follow the live service.

    // atscript.config.ts
    odata({
      services: [{
        name: "sales",
        metadata: "odata/sales.xml",
        language: "EN",
      }],
    })
  3. Render

    Point Atscript UI at an entity set. Tables, forms and value helps appear.

    <AsTableRoot :type="SalesOrder"
      url="/odata/sales/SalesOrder">
      <AsFilters /> <AsTable />
    </AsTableRoot>

Two ways to run it

Straight from the browser

No server of your own: the browser talks OData to the service.

BrowserAtscript UIODataYour OData servicev2 or v4

Through a Moost server

Your auth, row filters and actions in front. A technical user behind.

BrowserAtscript UIRESTMoost serveryour authODataYour OData servicev2 or v4

What it reads

What the service declares, the screen does.

Common.ValueList@ui.valueHelp

Value helps

Pickers that filter, fill related fields and show text next to codes.

ETag@db.column.version.token

Optimistic concurrency

ETags travel with every row. No silent overwrites.

x-csrf-tokensessions

CSRF and sessions

Token fetched once, reused for every write. The session is kept for you.

$expand@db.rel.*

Relations

Navigations load in the same request as their rows.

$applyaggregate()

Aggregation

Groups and totals with $apply, in one request.

OData v2 + v4one API

Both versions

v2 and v4 look the same to your code.

Code

The model is generated. The screen is yours.

Generated on every build. Imported like any module. Checked by the compiler.

src/odata/sales.asgenerated
atscript
// Generated from $metadata. Do not edit.
@db.table 'SalesOrder'
export interface SalesOrder {
    @meta.label 'Sold-To Party'
    @expect.maxLength 10
    @ui.valueHelp CustomerVH, 'Customer'
    @ui.valueHelp.fill 'SoldToPartyName', 'CustomerName'
    SoldToParty: string

    @db.column.precision 15, 2
    NetAmount?: decimal

    // … one field per property of the entity set
}
src/views/SalesOrders.vueyours
vue
<script setup lang="ts">
import { SalesOrder } from "../odata/sales.as";
// … Atscript UI imports, save()

const { def, formData } = createAsFormDef(SalesOrder);
const fields = createDefaultTypes();
</script>

<template>
  <AsTableRoot url="/odata/sales/SalesOrder"> <AsFilters /> <AsTable /> </AsTableRoot>
  <AsForm :def="def" :form-data="formData" :types="fields" @submit="save" />
</template>

AI agent skill

Your AI already speaks Atscript OData.

One command teaches Claude Code, Cursor, Codex and other agents the whole path, from $metadata to working screens.

  • Fetch and generate typed models
  • Browser client or Moost server
  • Screens, value helps and writes
  • Moving off SAP CAP
What the skill covers

# companion skills

Installs from GitHub once the repository is public.

Use cases

Made for the screens between the standard apps.

  • A screen no floorplan fits

    Dispatcher boards, guided entry, charts next to tables.

    Browser or server

  • Internal tools, no new backend

    Admin and maintenance screens over the services you already run.

    Browser

  • Portals for customers and suppliers

    Your auth on a Moost server. Each user sees only their own rows.

    Server

  • Figures, not only rows

    Small dashboards over $apply.

    Browser or server

  • OData next to your own data

    The OData service and your own tables, side by side on one screen.

    Browser or server

  • Off SAP CAP, one step at a time

    Move the UI first, then the services.

    Both, in turn

For SAP CAP developers

Model-first. Open source. Any host.

One .as model drives the database, the API and the UI. Independent, MIT-licensed, on any Node.js host with PostgreSQL, MySQL, SQLite or MongoDB.

Coming from SAP CAP?

Entities, aspects, associations, services, handlers: the concept map shows the Atscript way for each.

Start with the service you already run.

Save its $metadata, generate the models, build the first screen.

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.