Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_Kuma
Contributor
2,150

Basic:

In traditional SAP BW, User/Customer Exits allow for centrally managed code that applies to all BEx queries. An efficient, object-oriented approach. This functionality can be built via SAC's Composite Widgets (CW). The main / common functions such as ISO-week, Fiscal YearPeriod, Project specific functions, can be placed into a single / multiple CWs. These CWs will be added to Stories and the Stories can use the CWs – Interfaces (Public-like Methods). CWs use also own functions (Private-like Methods). This approach allows to have all the functions in one place.

 

Use cases:

This solution can be used to centralize and standardize various functions across multiple SAC stories, including:

  • A universal on/off switch for JavaScript logging. Logs are critical for troubleshooting, but also slow down the processing a bit and can provide unwanted details to end-users.
  • A custom function to calculate the ISO Week (not supported by default in SAC optimized stories).
  • Automatic calculation of the current fiscal period based on the current date.
  • A global "maintenance switch" to manage functionalities during version rollouts. Possible to route to an Out-Of-Order Story.
  • Displaying the data loading status from Datasphere.

 

How-To:

  • Create a composite (e.g. COMMON_FUNCTIONS) and move common JavaScript and functions from individual stories into this composite.
  • Expose functionality via interfaces (public) and keep helper logic as Functions (private methods) inside the composite.
  • Add the composite to each required story/page via drag & drop, hide it at design/runtime, and call its interfaces as if they were local story functions.
  • For configuration/switches (similar to TVARVC/P-tables), use SAC acquired models—optionally loaded from DSP via OData—for better performance than live connections.
  • Be aware of library limits inside composites (e.g. Application.getUser()), and pass required context (user, filters, etc.) from the story into the composite.

Possible only with SAC (native or seamless) planning:

Direct write-back from a Story (f.e. last used prompt). This part is not covered as planning is usually limited in SAC due to extra licensing as in BW/4.

 

Main blog: https://community.sap.com/t5/technology-blog-posts-by-members/bw-vs-datasphere-dsp-amp-sac/ba-p/1428...