Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ECC Names and Types in Rust

This book lists SAP ECC tables as Rust types: every ABAP field, the Rust name it becomes, the Rust type that holds it, and the generated struct. It is built from the ABAP Dictionary itself (a DD02T and DD03L export), so a new table is a new row in the export, not a new chapter to write.

DD03L export ─▶ 11ty + lib/naming.js ─▶ site/ddic.json ─▶ src/codegen.rs ─┬─▶ Rust structs (build.rs)
                                                                          └─▶ this book (cargo run --bin book)

The same code writes the structs and these pages, and tests/book.rs fails if the book and the compiled code disagree.

  • What is ABAP?: SAP’s language and its Dictionary, the ABAP types, and the three parsers: DDIC (11ty), Rust (Serde) and the XanoScript generator.
  • Naming: how /ACME/GPC becomes acme_gpc, and every name in this book that needed more than lower-casing.
  • Types: how DATS, NUMC, CURR and the "X" flag become Rust types.
  • Google Merchant Center: which ECC fields feed which product attribute, with machine data (identifiers, amounts, units, dates, stock) highlighted in pink and a worked example.
  • GraphQL: Product and User: a Product shaped like the Merchant API v1 product input (attributes per Google’s product data specification) and a separate User with the customer’s personal data and consent ledger. Every field says where it comes from.
  • Rust structs and GraphQL types: each Product and User field as GraphQL type, converted Rust struct, Merchant API struct and ECC source.
  • Consent gaps, CRM Sync gap fill and Plan: Xano buildout: what ECC can’t say about consent, what Shopify, Google and CRM Sync fill in, the Xano ledger that holds it, and the plan for generating the Xano tables and CSV uploads from this book’s map.
  • ECC direct to Google: what it replaces: why converting ECC straight to Merchant Center takes S/4HANA off the path to Google but replaces neither the upgrade nor the consent layer.
  • An alternative to a full S/4HANA upgrade: a diagram of what moves from ECC to Xano and Cloudflare, what it replaces in S/4HANA and Salesforce, the benefits, and the routes compared.
  • Data layer compared: ECC, Xano, Shopify and Google Cloud against Databricks, Snowflake and Fabric, and how one typed Serde record reaches any destination.
  • ERP programmes in public: Revlon, Nike, Coty, Diageo, AB InBev and Honda: what happened, the reported penalty and the lesson for this layer, plus the next escalation: Shopify’s GraphQL and token changes, and agentic commerce.
  • One page per table, grouped by namespace, with its key, fields, generated struct and a sample record where there is one.
  • Field index: every ABAP field A to Z, with the tables it appears in.

Using a type

use abap_to_rust::sap::Kna1;

let c: Kna1 = serde_json::from_str(r#"{"MANDT":"100","KUNNR":"0000012345","ZZ_MKT_OPTIN":"X"}"#)?;
assert!(c.zz_mkt_optin);                 // "X" -> true
assert_eq!(c.kunnr, "0000012345");       // leading zeros kept
let back = serde_json::to_string(&c)?;   // ABAP names again

Scope

The tables and fields here are illustrative subsets of standard ECC tables, plus a made-up /ACME/ customer namespace. Field lists come from fixtures/dd03l.csv, not from a live system. Export DD03L from your own system to get your fields, your appends and your Z tables.