PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

@abapify/acds

A parser for ABAP CDS DDL source — tokenizer, parser and a typed AST covering tables, structures, simple types, service definitions and metadata extensions.

Built on Chevrotain with error recovery, so partial or in-progress source still yields a tree. It is the piece anything that wants to analyse ABAP CDS without a system needs first.

Facts

Latestv0.4.21ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
Static analysisABAPStatic analysiscapabilityCatching problems in code before it runs: naming, obsolete statements, security findings, and compatibility with a target environment. Style linting, security scanning and cloud-readiness checks are often treated as one concern.

Who is behind it

abapifyabapifyOrganisationMaintains this
In the atlas: maintains 9
@abapify
maintainerOpenHandsPersonContributes to this
In the atlas: contributes to 1
@openhands-agent
Petr PlenkovPersonContributes to this
In the atlas: contributes to 13
@ThePlenkov
2 contributors

What it declares

Every artifact

Type
Package
Origin
Independently maintained
Runtime
build time

As a package

Where it runs
does not say
Distributed through
does not say

Connections1

@abapify/acds connections@abapify/acdsPROVIDES→ provides1provides authoredStatic analysis

Install

npm add @abapify/acds

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from abapify/adt-cli under MIT, read
abapify/adt-cli/packages/acds/README.mdOn GitHub

@abapify/acds

ABAP CDS source parser — tokenizer, parser, and typed AST for DDL-based ABAP source types.

Overview

Parses .acds (ABAP CDS DDL) source code into a fully typed Abstract Syntax Tree. Built on Chevrotain for fast, error-recovering parsing.

Supported Definitions
CDS ConstructAST NodeExample
TableTableDefinitiondefine table [entity] ztable { ... }
Root table ent.TableDefinitiondefine root table entity ztable { ... }
StructureStructureDefinitiondefine structure zstruct { ... }
Simple typeSimpleTypeDefinitiondefine type ztype : abap.char(10);
View entityViewEntityDefinitiondefine [root] view entity zv as select ...
Legacy viewViewEntityDefinitiondefine view zv as select ... (legacy)
Abstract entityAbstractEntityDefinitiondefine abstract entity zae { ... }
Custom entityCustomEntityDefinitiondefine custom entity zce { ... }
External entityExternalEntityDefinitiondefine external entity zee { ... } with federated data provided at runtime;
Table functionTableFunctionDefinitiondefine table function ztf returns { ... }
Scalar functionScalarFunctionDefinitiondefine scalar function zsf ...
HierarchyHierarchyDefinitiondefine hierarchy zh as parent child hierarchy(...) { ... }
AspectAspectDefinitiondefine aspect za { ... }
AnnotationAnnotationDefinitiondefine annotation za: Boolean;
Access policyAccessPolicyDefinitiondefine accesspolicy zap { ... }
ServiceServiceDefinitiondefine service zsvc { ... }
ExtensionExtensionDefinitionextend view entity zv with { ... }
Metadata ext.MetadataExtensionannotate entity ZView with { ... }
Role (DCL)RoleDefinitiondefine role zr { grant select ... }
Parser Features
  • Error recovery — returns partial AST + structured errors on invalid input
  • Full annotation support — strings, enums, booleans, numbers, arrays, objects
  • Built-in types — abap.char(10), abap.dec(11,2), abap.dats, etc.
  • Named types — data element and qualified name references
  • Include directives — include <structure> with optional suffix
  • Comments — line (//, --) and block (/* */) comments are skipped
  • Case-insensitive keywords — DEFINE VIEW ENTITY and define view entity both parse; identifiers keep their original spelling
  • FROM clause — join chains, parameterized sources, FROM associations
  • View flavours — define view entity <name> and the legacy define view <name>
  • Projection elements — paths, calls (coalesce(a, b), sum(x)) and cast(x as type [preserving type])

Installation

bun add @abapify/acds

Quick Start

import { parse } from '@abapify/acds';

const result = parse(`
  @AbapCatalog.tableCategory : #TRANSPARENT
  @AbapCatalog.deliveryClass : #A
  define table ztable {
    key mandt : abap.clnt not null;
    key field1 : abap.char(10) not null;
    field2 : some_data_element;
  }
`);

if (result.errors.length === 0) {
  const table = result.ast.definitions[0]; // TableDefinition
  console.log(table.kind); // 'table'
  console.log(table.name); // 'ztable'
  console.log(table.members); // [FieldDefinition, FieldDefinition, ...]
  console.log(table.annotations); // [Annotation, Annotation]
}

API

parse(source: string): ParseResult

Parses a CDS source string through the full pipeline: tokenize → parse → visit.

interface ParseResult {
  /** The parsed AST (may be partial if there are errors) */
  ast: CdsSourceFile;
  /** Lexing and parsing errors */
  errors: CdsParseError[];
}
AST Types
Root
interface CdsSourceFile {
  definitions: CdsDefinition[];
}

type CdsDefinition =
  | TableDefinition
  | StructureDefinition
  | SimpleTypeDefinition
  | ViewEntityDefinition
  | AbstractEntityDefinition
  | CustomEntityDefinition
  | ExternalEntityDefinition
  | TableFunctionDefinition
  | ScalarFunctionDefinition
  | HierarchyDefinition
  | AspectDefinition
  | AnnotationDefinition
  | AccessPolicyDefinition
  | ServiceDefinition
  | ExtensionDefinition
  | MetadataExtension
  | RoleDefinition;
Definitions
interface TableDefinition {
  kind: 'table';
  name: string;
  annotations: Annotation[];
  members: TableMember[]; // FieldDefinition | IncludeDirective
}

interface StructureDefinition {
  kind: 'structure';
  name: string;
  annotations: Annotation[];
  members: TableMember[];
}

interface SimpleTypeDefinition {
  kind: 'simpleType';
  name: string;
  annotations: Annotation[];
  type: TypeRef;
}

interface ServiceDefinition {
  kind: 'service';
  name: string;
  annotations: Annotation[];
  exposes: ExposeStatement[];
}

interface MetadataExtension {
  kind: 'metadataExtension';
  entity: string;
  annotations: Annotation[];
  elements: AnnotatedElement[];
}
Fields & Types
interface FieldDefinition {
  annotations: Annotation[];
  name: string;
  type: TypeRef;
  isKey: boolean;
  notNull: boolean;
}

type TypeRef = BuiltinTypeRef | NamedTypeRef;

// abap.char(10), abap.dec(11,2)
interface BuiltinTypeRef {
  kind: 'builtin';
  name: string;
  length?: number;
  decimals?: number;
}

// Data element or qualified name
interface NamedTypeRef {
  kind: 'named';
  name: string;
}
Annotations
interface Annotation {
  key: string;
  value: AnnotationValue;
}

type AnnotationValue =
  | { kind: 'string'; value: string }
  | { kind: 'enum'; value: string } // #TRANSPARENT → 'TRANSPARENT'
  | { kind: 'boolean'; value: boolean }
  | { kind: 'number'; value: number }
  | { kind: 'array'; items: AnnotationValue[] }
  | { kind: 'object'; properties: AnnotationProperty[] };
FROM clause (view entities)
interface ViewEntityDefinition {
  kind: 'viewEntity';
  name: string;
  annotations: Annotation[];
  legacy?: boolean; // true for the legacy `define view <name>` syntax
  root?: boolean; // `define root view entity`
  writable?: boolean; // `define writable view entity`
  providerContract?: string; // `provider contract transactional_query`
  sourceKind: DataSourceKind; // 'select' | 'projection'
  distinct?: boolean; // `select distinct`
  source: DataSource; // the root data source
  joins: JoinClause[]; // ordered join chain — empty when there are no joins
  fromAssociations?: AssociationDeclaration[]; // associations of the FROM region
  aspectBindings?: AspectBinding[]; // `bind aspect` bindings
  parameters: ParameterDefinition[];
  members: ViewMember[];
  where?: Expression;
  groupBy?: string[];
  having?: Expression;
  setOperations?: SetOperation[]; // union/intersect/except branches
}

interface DataSource {
  name: string;
  alias?: string;
  parameters?: DataSourceParameter[]; // parameterized source
}

interface DataSourceParameter {
  name: string; // e.g. 'P_StartDate'
  value: string; // raw binding: ':P_Key1StartDate', '$session.client', "'X'"
}

type JoinType = 'inner' | 'leftOuter' | 'rightOuter' | 'fullOuter' | 'cross';

// Conditioned joins always carry an ON condition — the grammar enforces it.
interface ConditionedJoinClause {
  kind: 'join';
  joinType: 'inner' | 'leftOuter' | 'rightOuter' | 'fullOuter';
  source: JoinSource; // DataSource | JoinGroup
  on: Expression; // the ON condition (opaque)
  cardinality?: WordCardinality; // `many to one join` / `to one join`
}

// A cross join never carries an ON condition.
interface CrossJoinClause {
  kind: 'join';
  joinType: 'cross';
  source: JoinSource;
}

type JoinClause = ConditionedJoinClause | CrossJoinClause;

// A join source is either a plain data source or a parenthesized group.
type JoinSource = DataSource | JoinGroup;

// `join (A join B on …) on …` — the group acts as a single join source.
interface JoinGroup {
  kind: 'joinGroup';
  source: JoinSource; // nested — may itself be a group
  joins: JoinClause[]; // the join chain inside the parentheses
}

Supported join spellings (normalized to JoinType):

spellingjoinTypeNotes
JOINinner
INNER JOINinner
LEFT JOINleftOuterOUTER is optional
LEFT OUTER JOINleftOuter
RIGHT JOINrightOuterOUTER is optional
RIGHT OUTER JOINrightOuter
FULL JOINfullOuterOUTER is optional
FULL OUTER JOINfullOuter
CROSS JOINcrossmust not carry an ON condition

The ON condition is required for inner and outer joins and not allowed for a cross join — the grammar enforces this.

The accepted join syntax is the same for every view flavour: a CDS view entity (define view entity) and a classic SQL view (define view) accept exactly the same spellings. FULL [OUTER] JOIN is the SQL-standard full outer join — it is not part of the ABAP CDS DDL join syntax, but it is supported so that HANA CDS / CAP CDS sources (which use the standard SQL join syntax) can be read with the same parser.

Example:

const { ast } = parse(`
  define view entity ZC_Cube as select from I_Item as _Item
    left outer join ZI_Other as _Other
      on _Item.key = _Other.key
    association [0..1] to I_Product as _Product
      on $projection.Product = _Product.Product
  {
    key _Item.key
  }
`);

const view = ast.definitions[0] as ViewEntityDefinition;
view.joins[0].joinType; // 'leftOuter'
view.joins[0].source.alias; // '_Other'
view.fromAssociations?.[0].target; // 'I_Product'
Errors
interface CdsParseError {
  message: string;
  line: number;
  column: number;
  offset: number;
  length: number;
}

Architecture

Source string
  → CdsLexer (Chevrotain Lexer)     tokens.ts
  → CdsParser (Chevrotain CstParser) parser.ts
  → CdsVisitor (CST → AST)           visitor.ts
  → CdsSourceFile                     ast.ts
ModuleResponsibility
tokens.tsToken definitions (keywords, symbols, literals)
parser.tsGrammar rules (CST production)
visitor.tsCST → typed AST transformation
ast.tsAST node type definitions
errors.tsError normalization (lex + parse)
index.tsparse() entry point + re-exports

Roadmap

  • ✅ DDL: tables, structures, simple types, view entities (define [root] view entity, projection views + provider contract), legacy define view, abstract/custom/table/external entities, table/scalar functions, hierarchies, aspects (DRAS), DDLA annotation definitions, access policies, services (SRVD), metadata extensions (DDLX), extend view/entity forms, parameters, associations, compositions
  • ✅ DCL: role definitions — switchable, grant-select + where, with optional elements, combination mode and|or|redefinition, inherit, inheriting conditions
  • ✅ Annotations: full value grammar (strings, enums, booleans, numbers, arrays, objects, dotted keys)
  • ✅ Tooling: AST walker helpers, semantic validators (SemanticDiagnostic), grammar coverage metadata
  • ✅ FROM clause: join chains (inner, left [outer], right [outer], full [outer], cross) with word cardinalities and grouped joins, parameterized sources, FROM associations, path-expression data sources (_assoc[ ... ]), bind aspect
  • ✅ Elements: case … end, arithmetic, casts, calls (incl. f()), window over (…), paths, : localized, : redirected to, distinct, where/group by/having, union [all]/intersect/except
  • 🔜 Expression grammar (structured on/where trees — currently opaque { source, tokens })
  • 🔜 BDEF / behavior definitions (owned by epic E10)

Dependencies

  • chevrotain — Parser toolkit (lexer + CstParser + visitor)
MIT, read

History

Latest

v0.4.22

Notes

This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  1. v0.4.21

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  2. v0.4.20

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  3. v0.4.19

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  4. v0.4.18

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  5. v0.4.17

    Features 1, Fixes 7, Other 3

    Notes
    🚀 Features
    • acds: extend the CDS grammar to the full DDL/DCL statement set (5796ebbb)
    🩹 Fixes
    • acds: order Redefinition before Redefine in token list (dc1e5278)
    • acds: round-2 review findings — coverage metadata, walker, docs (6e38c7e5)
    • acds: address review findings — parser robustness, docs, tests (d8a3e2fd)
    • acds: make the join syntax flavour-independent and support FULL OUTER JOIN (557f7c5b)
    • acds: recognize keywords case-insensitively (a8c09d3e)
    • acds: enforce the ON condition in the join grammar (d6df7b93)
    • acds: keep FROM-region starters out of the bare source alias (37d750f1)
    ❤️ Thank You
    • Devin @devin-ai-integration[bot]
    • Rol3333 @Rol3333
    • ThePlenkov @ThePlenkov
  6. v0.4.16

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  7. v0.4.15

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  8. v0.4.14

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  9. v0.4.13

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  10. v0.4.12

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  11. v0.4.11

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  12. v0.4.10

    Fixes 1, Other 1

    Notes
    🩹 Fixes
    • deps: upgrade chevrotain and mastra instead of overrides (1bc31b61)
    ❤️ Thank You
    • ThePlenkov @ThePlenkov
  13. v0.4.9

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  14. v0.4.8

    Features 3, Fixes 3, Other 2

    Notes
    🚀 Features
    • acds: full CDS DDL/DCL grammar + AST walker + validators — E09 (b52ec71b)
    • add adt diff command and fix CDS-to-abapGit serialization (e79ecb8f)
    • abapGit roundtrip - export, deploy, and structure support (29859632)
    🩹 Fixes
    • packages: add repository/homepage/bugs to every published package (85b29310)
    • pr-103: address review comments — type safety, parity, harness, policy (d5b14cd9)
    • resolve SonarQube quality gate failures (security hotspot + duplication) (8de6152a)
    ❤️ Thank You
    • Devin @devin-ai-integration[bot]
    • Petr Plenkov
  15. v0.4.7

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  16. v0.4.6

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  17. v0.4.5

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  18. v0.4.4

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  19. v0.4.3

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  20. v0.4.2

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  21. v0.4.1

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  22. v0.4.0

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  23. v0.3.6

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  24. v0.3.5

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  25. v0.3.4

    Fixes 1, Other 1

    Notes
    🩹 Fixes
    • packages: add repository/homepage/bugs to every published package (e1853e48)
    ❤️ Thank You
    • Petr Plenkov
  26. v0.3.3

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  27. v0.3.2

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  28. v0.3.1

    Notes

    This was a version bump only for @abapify/acds to align it with other projects, there were no code changes.

  29. v0.3.0

    Features 1, Fixes 1, Other 2

    Notes
    🚀 Features
    • acds: full CDS DDL/DCL grammar + AST walker + validators — E09 (51fa799d)
    🩹 Fixes
    • pr-103: address review comments — type safety, parity, harness, policy (#103)
    ❤️ Thank You
    • Devin @devin-ai-integration[bot]
    • Petr Plenkov
  30. v0.2.0

    Features 2, Fixes 1, Other 2

    Notes
    🚀 Features
    • add adt diff command and fix CDS-to-abapGit serialization (130168d)
    • abapGit roundtrip - export, deploy, and structure support (0da189a)
    🩹 Fixes
    • resolve SonarQube quality gate failures (security hotspot + duplication) (12bd3b8)
    ❤️ Thank You
    • Devin @devin-ai-integration[bot]
    • Petr Plenkov
44downloads per week, npm
Weekly downloads for @abapify/acds26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 44.20 Apr – 26 Apr: 50627 Apr – 3 May: 224 May – 10 May: 2711 May – 17 May: 1618 May – 24 May: 3025 May – 31 May: 3621 Jun – 7 Jun: 438 Jun – 14 Jun: 2115 Jun – 21 Jun: 3222 Jun – 28 Jun: 1829 Jun – 5 Jul: 416 Jul – 12 Jul: 4513 Jul – 19 Jul: 2120 Jul – 26 Jul: 2527 Jul – 2 Aug: 173 Aug – 9 Aug: 1110 Aug – 16 Aug: 4217 Aug – 23 Aug: 1124 Aug – 30 Aug: 1731 Aug – 6 Sept: 187 Sept – 13 Sept: 2114 Sept – 20 Sept: 1,16421 Sept – 27 Sept: 31428 Sept – 4 Oct: 9685 Oct – 11 Oct: 3012 Oct – 18 Oct: 44
Static analysis
  1. @abap2ui5/linterCommand-line checker for abap2UI5 app classes and their views
  2. abap2UI5 PlaygroundIn-browser ABAP editor beside the abap2UI5 app it builds
  3. abapcdsgrammarANTLR4 grammar, lexer and parser for ABAP CDS
  4. abaplint-sci-clientABAP client surfacing abaplint checks in Code Inspector and ATC
  5. abaplintStatic analysis for ABAP source outside a system
  6. BellaEclipse plugin bringing Claude into ABAP Development Tools
  7. abapOpenChecksOpen-source rule pack for SAP Code Inspector and ATC
  8. upDOWNciUploads and downloads Code Inspector check variants as XML
  9. abaplint-Ext-for-abapGitShows abaplint results inside abapGit
  10. ABAP remote filesystemVS Code extension editing ABAP systems over ADT as a filesystem
  11. code pal for ABAPATC and Code Inspector checks for Clean ABAP
  12. Clean-Core.ioHosted workspace redrawing custom ABAP as BPMN and grading it
  13. ACESAP GUI tool for static analysis of ABAP call flow and code metrics

Details

Sources4
npm registrydiscovered here, keywords:cdschecked
npm registry, @abapify/acdsversion, releases, installschecked
github.com/git+https://github.com/abapify/adt-cli.gittree, pushes, contributors, CIchecked
packages/acds/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesbuild-time
latestv0.4.21
first release
releases and cadence22, ~1d median
discovered vianpm registry · keywords:cds
first seen in the atlas
ecosystem and domainabap, developer-experience
Contributors2

From the repository’s contributor list, .

History in the atlas2
  1. Placed on data modelling because it deals in ABAP CDS definitions. Reading the capability again moved it: acds does not help you define data, it parses definitions somebody else wrote into a typed AST — which is the substrate static analysis is built on, and it lives in the adt-cli repository. The mistake surfaced when repointing a CAP package away from the ABAP capability left this one holding it alone.
  2. First seen.
For your agent