Technical Articles
Update master data of dimension using JavaScript in Analytical Application
In Sap Analytics Cloud at times we need to update the master data for a model’s dimension, so the developer can update it manually. However, how can we do this from SAC Analytical application?
There is an API called updateMembers()
using this API we can update members of any dimension, but note it: its only supported for generic dimension, not for version, account, date and organization
to call updateMembers() API we have to create Planning Model once, follow the below steps.
Syntex:-
g_properties = ({
id: "ID of MEMBER, TO UPDATE",
properties: {
PROPERTY_NAME: "VALUE TO UPDATE"
}
});
PlanningModel_1.updateMembers("DIMENSION_NAME", g_properties);
Example:-
g_properties = ({
id: "USA",
properties: {
CUR: "CA"
}
});
PlanningModel_1.updateMembers("MARKET", g_properties);
1. Create Planning Model, and select your Model
4. Run Application, and click on button, Property will update for USA currency USD to CA
Result in Present Mode:-
Conclusion
As a result, this article has explained how to update the master data of dimensions. However, sometimes dynamic updates are required as well. In such cases, Javascript is required.
Really helpful, thanks