Analytics Legends logoAI & Analytics Legends Sign inSign up
Concept card

SAC Scripting API (Analytic Application Scripting)

SAC Scripting API (Analytic Application Scripting) — AI & Analytics Legends section illustration for the SAP AI & Analytics knowledge base (concepts, studies, Academy)

As of 2026-11-24

What is SAC Scripting API (Analytic Application Scripting)?

SAC scripting only becomes necessary when an application needs to orchestrate widget behaviour beyond what a static Story can express — everything else is easier to govern and hand over as a Story.

What it is

The SAC Scripting API is the JavaScript-based programming surface inside SAP Analytics Cloud Analytic Applications — the engine that turns SAC from a drag-and-drop Story builder into a true application platform. Since the Optimized Story Experience, the same scripting also runs inside stories, and SAP steers new development there rather than to classic Analytic Applications. When a customer needs an interactive analytics application with custom navigation, conditional formatting that no Story can express, programmatic data binding, or integration with external systems, Analytic Applications scripting is the answer.

What scripting actually controls: every widget on the canvas (chart, table, dropdown, input field, image) exposes a properties API and an events API. Properties let scripting code set the widget's data binding, filters, dimensions, measures, visibility, formatting at runtime. Events fire on user actions (onSelect on charts and tables, onClick on buttons) and on lifecycle or data changes (onInitialization, onResultChanged), and let scripting code react. The two surfaces together let an application designer build flows that no static Story can express — e.g. a drill flow where clicking a chart populates a second chart with the selected dimension as a filter, then conditionally enables a forecast widget if the data crosses a threshold.

Why it matters

  • Scripts run in the browser as a restricted JavaScript with no free-form REST calls: external integration still goes through an OData Service on an SAP backend or a multi action API step.
  • Properties and events APIs on every widget let one chart's click populate a second chart and conditionally enable a forecast widget — the classic drill-flow pattern.
  • Over-using scripting produces applications only a developer can maintain, which defeats the point of handing them to a citizen analyst.

Key points

  • Two surfaces — Properties API (set widget data binding, filters, visibility, formatting at runtime) and Events API (react to user actions — onSelect on charts and tables, onClick on buttons — and to lifecycle or data changes: onInitialization, onResultChanged).
  • Restricted JavaScript with a type system — runs in the browser; access to SAC data model, widget collection, Planning service, Smart Predict, R-Visualization.
  • No arbitrary REST — for external integration use an OData Service on an SAP backend (direct CORS connection) or a multi action API step.
  • When to script (in an Optimized Story Experience story or a classic Analytic Application): when interactions must orchestrate beyond static drill, filter or link — e.g. conditional widget activation, programmatic dimension switching, multi-step navigation flows.
  • Over-use risk — scripting-heavy applications are developer concerns; produce unmaintainable artefacts if a Story would have done the job.
  • onResultChanged reacts to a widget's data changing for reasons outside the current script's control; it is the wrong tool for propagating a change the same script just caused, which belongs in the causing handler instead.
  • AI and agent integrations (Joule, AI Core, MCP) are never called directly from a script — they sit behind a BTP service (CAP or Integration Suite) triggered through a multi action API step.
  • First-build economics: a competent developer typically ships a first working drill-flow in under a day, but debugging an unintended cross-widget event cycle can cost more time than the original build.

Terms used on this page

Analytic Application
SAC's developer-grade application surface; canvas with widgets, scripting API, lifecycle events; the answer when a Story is not enough.
Scripting API
The JavaScript-based programming surface inside Analytic Applications; exposes widget properties and events; executed by the browser at runtime.
Widget collection
The set of all widgets on the canvas; iterable from script; each widget addressable by name; the basis of programmatic widget manipulation.
onResultChanged
The event that fires when a widget's underlying data result is recomputed (e.g. after a filter change); the canonical place to react to externally-caused changes, not to propagate a change the same script just made.
onSelect
The event a chart or table raises when the user selects a data point (buttons raise onClick instead); the correct place to set every dependent widget's state in one handler when the script itself is the cause of the change.
Properties API
The half of the Scripting API's contract that lets code read and set a widget's configuration at runtime — data binding, filters, dimensions, measures, visibility, formatting — as opposed to reacting to events.
Event cycle (anti-pattern)
An unintended chain where two or more widgets' event handlers repeatedly re-trigger each other, multiplying data requests and redraws; the fix is consolidating the causing logic into a single handler.

Sources

  1. SAP Help Portal — SAC Analytic Application Scripting
  2. SAP TechEd 2024 — SAC Application Designer sessions
  3. SAP Analytics Cloud — official product page
  4. SAP analytics cloud - Convert a measure to text without coding — SAP Community (Data and Analytics Blog Posts)
  5. Harnessing SAP Analytics Cloud AI Assisted Advanced Formula Generation Capabilities in QRC3.2025 — SAP Community (Technology Blog Posts by SAP)
  6. SAP Analytics Cloud Experience Sharing: How to Batch Edit the Context of Calendar Events — SAP Community (Technology Blog Posts by SAP)
  7. "You and the SAC Gatekeeper" — A Beginner’s Guide to Using OAuth with SAP Analytics Cloud SCIM API — SAP Community (Technology Blog Posts by Members)
  8. Send data from SAP Analytics Cloud to 3rd Party tools using CPI — SAP Community (Technology Blog Posts by Members)
  9. Creating a Sunburst Chart in SAP Analytics Cloud Using R and Plotly — SAP Community (Technology Blog Posts by Members)
  10. Introducing SAP Analytics cloud Widget API — SAP Community (Technology Blog Posts by SAP)
  11. Pass Data Action Parameter Value Directly from Dropdowns through Script in SAP Analytics Cloud (SAC) — SAP Community (Technology Blog Posts by Members)
  12. Guideline to analyze any existing custom transactions to move Fiori App or Embedded Analytics — SAP Community (Application Development and Automation Blog Posts)
  13. Multiple Master and Transactional Data Entries with a single data action call - SAP Analytics Cloud — SAP Community (Technology Blog Posts by SAP)
  14. Create Multiple Dimension Members with the UpdateMembers API - SAP Analytics Cloud — SAP Community (Technology Blog Posts by SAP)
  15. S/4HANA Public Cloud Integration with SAP Analytics Cloud Using Data Import API — SAP Community (Enterprise Resource Planning Blog Posts by SAP)
  16. SAP Analytics Cloud File Repository API — SAP Community (Technology Blog Posts by SAP)
  17. Seamless Navigation in SAP Analytics Cloud: From Dashboards to Business Applications — SAP Community (Technology Blog Posts by SAP)
  18. Analytical Insights in Joule (powered by SAP Analytics Cloud), Controlled release in Q1 2025 — SAP Community (Technology Blog Posts by SAP)
  19. Start Your scripting Journey The Easy Way With SAP Analytics Cloud | Part Four — SAP Community (Technology Blog Posts by SAP)
  20. SAP Analytics Cloud Schedule Publication API's: Getting Started Guide — SAP Community (Blog Posts about SAP Websites)
  21. SAP Analytics Cloud - Deactivating users programmatically — SAP Community (Technology Blog Posts by SAP)
  22. Automating SAP DSP Task Chains with CLI Wrapping: FastAPI Integration with SAP Analytics Cloud — SAP Community (Technology Blog Posts by Members)
  23. Manage Performance in SAP Analytic Cloud Stories - New Learning Journey — SAP Community (Technology Blog Posts by SAP)
  24. Start Your scripting Journey The Easy Way With SAP Analytics Cloud | Part Three — SAP Community (Technology Blog Posts by SAP)
  25. Report on SAP Signavio Process Intelligence data using the new OData API and SAP Analytics Cloud — SAP Community (Technology Blog Posts by SAP)
  26. Combine Display and Filter Parameters with SAP Analytics Cloud URL APIs — SAP Community (Technology Blog Posts by SAP)
  27. How to connect SAP Sustainability Control Tower to SAP Analytics Cloud via API — SAP Community (Sustainability Blog Posts)
  28. Important Notice: Changes in SAP Analytics Cloud Classic Stories & Analytic Applications — SAP Community (Technology Blog Posts by SAP)
  29. SAP Help — About Analytics Designer: scripts are executed by the web browser

Full card with the Consultant plan — €19.90/month. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.

Open in the app →

Open missions

58 live roles and contracts in SAP Analytics Cloud right now — see the SAP Analytics Cloud missions · freelance SAP contracts.