// |
| name | sap-sac-scripting |
| description | Comprehensive SAC scripting skill for Analytics Designer and Optimized Story Experience. Use when building analytic applications, planning models, or enhanced stories. Covers DataSource API, Chart/Table manipulation, Planning operations, Calendar integration, Bookmarks, Timer API, Container widgets, Layout API, R Visualizations, Custom Widgets, Navigation, variables, event handlers, debugging, performance optimization, and 2025.23 features: comments APIs, Search to Insight, smart grouping, time-series forecast, geo map quick menus, Explorer/Smart Insights, composites scripting. Includes 40 code templates. |
| license | GPL-3.0 |
| metadata | {"version":"1.7.0","last_verified":"2025-11-27T00:00:00.000Z","sac_version":"2025.23","api_reference_version":"2025.14","documentation_source":"https://help.sap.com/docs/SAP_ANALYTICS_CLOUD","reference_files":52,"template_patterns":40,"status":"production"} |
Comprehensive skill for scripting in SAP Analytics Cloud (SAC) Analytics Designer and Optimized Story Experience.
Time series forecast API, Search to Insight, comments APIs, smart grouping, Explorer & Smart Insights, geo map enhancements, and composite scripting support. See references/whats-new-2025.23.md for complete details.
Use this skill when working on tasks involving:
// Event handler example
var selections = Chart_1.getSelections();
if (selections.length > 0) {
Table_1.getDataSource().setDimensionFilter("Location", selections[0]["Location"]);
}
Chart_1.getDataSource() or Table_1.getDataSource()getMembers(), getData(), setDimensionFilter(), refreshData()getResultSet() (no backend) instead of getMembers() (hits backend)Table_1.getPlanning()getPublicVersion(), publish(), copy())addDimension(), addMeasure(), getSelections()addDimensionToRows(), setZeroSuppressionEnabled()showBusyIndicator(), showMessage()getInfo(), getUserInfo(), getTheme()var selections = Chart_1.getSelections();
if (selections.length > 0) {
Table_1.getDataSource().setDimensionFilter("Location", selections[0]["Location"]);
}
ds.setRefreshPaused(true);
// Apply multiple operations
ds.setRefreshPaused(false); // Single backend call
var members = ds.getMembers("Dimension", {accessMode: MemberAccessMode.BookedValues});
console.log("Debug info:", myVariable);
console.log("Selections:", Chart_1.getSelections());
Add URL parameter: ?APP_PERFORMANCE_LOGGING=true
getResultSet() over getMembers()getDataSource() in variableschartB_revenue (Bar), chartL_sales (Line)tbl_transactionspnl_headerbtn_export_pdf/*
* Script: onSelect - chartB_revenue_by_region
* Purpose: Filter detail table when user selects a region
*/
onInitialization: Runs once on load (keep empty!)onResize: Application resizeonOrientationChange: Mobile orientation changeonSelect: Data point selection (Chart/Table)onResultChanged: Data changesonClick: Button clickPlanning_Application/
├── 00_Entry_Point.story
├── 01_Configuration.story
├── 02_Plan_FTE.story
├── 03_Plan_Costs.story
└── 04_Reports.story
var urlParameters = ArrayUtils.create(Type.UrlParameter);
urlParameters.push(UrlParameter.create("page", "0"));
NavigationUtils.openStory(storyId, "", urlParameters, false);
Reference Files (52 files):
references/api-datasource.md, references/api-widgets.mdreferences/api-calendar-bookmarks.md, references/api-advanced-widgets.mdreferences/best-practices-developer.mdreferences/scripting-language-fundamentals.mdTemplates (40 patterns):
templates/common-patterns.js: 40 scripting patternstemplates/planning-operations.js: Planning-specific patternsVersion: 1.7.0 | Last Verified: 2025-11-27 | SAC Version: 2025.23