Javascript Error - Not Updating Hierarchy of Public Dimension - SAP Community
Javascript Error - Not Updating Hierarchy of Public Dimension - SAP Community
Community
Launch Delayed
The migration of content is taking longer than
anticipated, so we won't go live on Jan. 24. The
Learn more about the migration
site remains read-only and inaccessible. We'll
provide a new launch date as soon as we can.
(Partners, please see
community.sap.com/resources/partners.)
hardeep thind
Oct 06, 2023 at 04:03 PM
We are using JavaScript to update the public dimension "Cost Center" in SAP Analytics Cloud. This update includes
modifications to the hierarchy structure within the dimension. There are two hierarchies in the dimension, one is
filled with data load from BW and the other one we are updating with the attached Java Script code.
https://answers.sap.com/questions/13980952/javascript-error-not-updating-hierarchy-of-public.html 1/4
1/24/24, 12:23 PM Javascript Error - Not updating hierarchy of public dimension | SAP Community
["101195","101199","101163","101166","101257","101258","101188","101184","101186","101253","101193","101256","1
01259","101215","101216","101220","101226","101227","101234","101249","101230","101237","101240","101243","10
1244","101245","101246","101247","101223","101228","101233","101238","101239"],"memberRelation":"INDEPENDE
NT"}],"status":500,"bUIMsg":true,"bWarning":false}
array_data2 = PlanningModel_1.getMembers("ZCost_Center_Demo");
Member_ID2 = PlanningModel_1.getMembers("ZCost_Center_Demo");
for (var x = 1; x < array_data2.length; x++) {
ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_Hierarchy:{parentId:array
}
}
if(array_data2[x].id === "WW_CCs")
{
ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_H
console.log(ScriptVariable_6);
PlanningModel_1.updateMembers("ZCost_Center_Demo", ScriptVariable_6);
https://answers.sap.com/questions/13980952/javascript-error-not-updating-hierarchy-of-public.html 2/4
1/24/24, 12:23 PM Javascript Error - Not updating hierarchy of public dimension | SAP Community
Assigned Tags
Similar Questions
1 Answer
Best Answer
Nikhil Anand
Oct 07, 2023 at 06:42 PM
hardeep thind
0
The error is very clear " The parent of [101195/101199/ .........doesn't exist in the same hierarchy.
Please add the parent to the hierarchy, or select another parent.","stack":"","errorDetails":
[{"messageId":"PARENTID_NOT_EXISTS",
The parent member which you are trying to assign should also exist as member within the hierarchy
either as root or as child of another parent member within the hierarchy.
Br.
Nikhil
Before answering
You should only submit an answer when you are proposing a solution to the poster's problem. If you want
the poster to clarify the question or provide more information, please leave a comment instead, requesting
additional details. When answering, please include specifics, such as step-by-step instructions, context for
the solution, and links to useful resources. Also, please make sure that your answer complies with our Rules
of Engagement.
https://answers.sap.com/questions/13980952/javascript-error-not-updating-hierarchy-of-public.html 3/4
1/24/24, 12:23 PM Javascript Error - Not updating hierarchy of public dimension | SAP Community
Rules of Engagement
Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.
Find us on
Newsletter Support
https://answers.sap.com/questions/13980952/javascript-error-not-updating-hierarchy-of-public.html 4/4