Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
marouferchichi
Product and Topic Expert
Product and Topic Expert

Introduction

In order to increase the usage and the adoption of Custom Widgets within the Optimized Story Experience, excitingly, we introduce with QRC2 2024 the support of the Universal Account Model (UAM) with Custom Widget. 

Goal

As a story designer, you can connect a custom widget to the universal account model and depending on the selected model type the built-in builder panel will display Accounts, Measures, or both.

Screenshot 2024-04-25 at 14.13.38.png

For the Custom Widget which contains the data binding, it can smoothly support the UAM model. The developer of the Custom Widget does not need to update the contribution JSON file. When you link the Custom Widget with an UAM model, the data returned to the custom widget will maintain the same structure.

For example:

 

{
    "data": [
        {
            "dimensions_0": {
                "id": "Amount",
                "label": "Amount"
            },
            "mainStructureMembers_0": {
                "raw": 3776499582.02,
                "formatted": "3,776,499,582.02"
            }
        },
        {
            "dimensions_0": {
                "id": "Quantity",
                "label": "Quantity"
            },
            "mainStructureMembers_0": {
                "raw": 21557566,
                "formatted": "21,557,566"
            }
        }
    ],
    "metadata": {
        "feeds": {
            "mainStructureMembers": {
                "values": [
                    "mainStructureMembers_0"
                ],
                "type": "mainStructureMember"
            },
            "dimensions": {
                "values": [
                    "dimensions_0"
                ],
                "type": "dimension"
            }
        },
        "dimensions": {
            "dimensions_0": {
                "id": "@MeasureDimension",
                "description": "Measures"
            }
        },
        "mainStructureMembers": {
            "mainStructureMembers_0": {
                "id": "[Account].[parentId].&[Total Assets]",
                "label": "Total Assets",
                "isNode": true,
                "isCollapsed": false
            }
        }
    },
    "state": "success"
}

 

Scope

  • Support both model types: Model with measures and an account dimension, and Model with measures and no account dimension.
  • No extra work for Custom Widget developers if they will use the SAC built-in Builder Panel
  • When a model includes both measures and an account dimension, the API DataBinding.getMembers, DataBinding.addMemberToFeed and DataBinding.removeMember functions only apply to the account dimension. Therefore, it's impossible to manipulate measure feeding with the Custom Builder Panel.

More blogs to check out 👇