on 2023 Oct 06 5: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.
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":["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"],"memberRelation":"INDEPENDENT"}],"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_CCs"){
ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_Hierarchy:{parentId:array_data2[x].properties.Budget_Holder,
previousSiblingId:""}}});
}
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_Hierarchy:{parentId:"WW_CCs",
previousSiblingId:""}}});
}
}
if(array_data2[x].id === "WW_CCs")
{
ScriptVariable_6.push({"id":array_data2[x].id, hierarchies:{Workflow_Hierarchy:{parentId:"",
previousSiblingId:""}}});
}
}
console.log(ScriptVariable_6);
PlanningModel_1.updateMembers("ZCost_Center_Demo", ScriptVariable_6);
hsthind76
hsthind76The 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.