This manual describes how to use local extensions in SAP Variant Configuration and Pricing.
This document explains how to implement local and remote extensions for SAP Variant Configuration and Pricing. Local extensions use JavaScript and are executed in a secure environment, while remote extensions call REST endpoints. The guide covers administration, implementation, restrictions, tracing, and logging for both extension types.
It also details the naming conventions for functions, supported languages (ECMAScript 2021), and how to handle errors and timeouts. Extensions are limited to variant functions and pricing formulas, with no direct access to underlying database tables.
Local extensions are JavaScript-based implementations executed in a secure environment within the cloud. They can extend variant functions and pricing routines but do not have direct access to underlying database tables.
Enable local extensions via a toggle switch in the Extensions page under Configuration or Pricing -> Extensions -> Extension Enabling.
Use the global object sap.log() with methods debug(...) and error(...) to write logs, which appear in the same trace file as extension traces.