You are on page 1of 4

1/24/24, 12:23 PM 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.)

Search Questions and Answers

hardeep thind
Oct 06, 2023 at 04:03 PM

Javascript Error - Not updating hierarchy of public dimension


71 Views
0

Follow RSS Feed

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.

We are getting the following errors.

app.chunk.566.c786c16888abe3221b85.js:13 {"message":"The parent of


[101195/101199/101163/101166/101257/101258/101188/101184/101186/101253/101193/101256/101259/101215/
101216/101220/101226/101227/101234/101249/101230/101237/101240/101243/101244/101245/101246/101247
/101223/101228/101233/101238/101239] doesn't exist in the same hierarchy. Please add the parent to the
hierarchy, or select another parent.","stack":"","errorDetails":
[{"messageId":"PARENTID_NOT_EXISTS","message":"The parent of
[101195/101199/101163/101166/101257/101258/101188/101184/101186/101253/101193/101256/101259/101215/
101216/101220/101226/101227/101234/101249/101230/101237/101240/101243/101244/101245/101246/101247
/101223/101228/101233/101238/101239] doesn't exist in the same hierarchy. Please add the parent to the
hierarchy, or select another parent.","bUIMessage":true,"bWarning":false,"memberId":

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}

app.chunk.566.c786c16888abe3221b85.js:13 sap.fpa.ui.infra.common.ServerException {code:


'SERVER_ERROR_500', message: 'The parent of [101195/101199/101163/101166/101257/…arent to the hierarchy, or
select another parent.', severity: 1, stack: 'Error\n at e.exports.sap.fpa.ui.infra.common.Exc…
s/app.chunk.566.c786c16888abe3221b85.js:13:17065)', previous: null, …}

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++) {

if(array_data2[x].id !== Member_ID2[x].properties.Budget_Holder && array_data2[x].id !== "WW_C

ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_Hierarchy:{parentId:array

for(var p = 1; p < array_data2.length; p++){


if (array_data2[x].id === array_data2[p].properties.Budget_Holder){
ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_H

}
}
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);

Add a Comment | Alert Moderator

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

SAP Analytics Cloud

Similar Questions 

1 Answer

Sort by: Votes | Newest | Oldest

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

Add a Comment | Alert Moderator | Share

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 

Know someone who can answer? Share a link to this question.

You must be Logged in to submit an answer.

Please provide a distinct answer and use the comment option for clarifying purposes.

10 characters required.

Submit your Answer

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://answers.sap.com/questions/13980952/javascript-error-not-updating-hierarchy-of-public.html 4/4

You might also like