cancel
Showing results for 
Search instead for 
Did you mean: 

Set Version Properties In a Model Through Script

former_member790242
Discoverer

Hi,

My question is simple, or at least I think so. Is there any way to set the properties of a version in a model using script in an analytic application?

*Screenshot of the dimension "Version" with two members and some properties.

I want to ask to the user for some info by input text widgets, and then input this data as version properties in the model. I am currently copying an existing version and publishing it.

Table_1.getPlanning().getPublicVersion("Actual").copy(versionName, PlanningCopyOption.NoData, PlanningCategory.Planning);

Table_1.getPlanning().getPrivateVersion(versionName).publishAs(versionName, PlanningCategory.Planning);

Then using the function modelName.updateMembers("Version", {id: versionName, properties: {CloseDate: "202102"}};

The message shown if i consol.log the result of this function is: "Dimension type VersionDim is not supported".

I don't know what to do. Any help?

Thank you so much in beforehand 🙂

moshenaveh
Community Manager
Community Manager
0 Kudos
Welcome and thanks for visiting SAP Community to get answers to your questions. Check out our tutorial to get started in SAP Community: https://developers.sap.com/tutorials/community-start.html
By adding a picture to your profile you encourage readers to respond to your question. Learn more about your profile here: https://developers.sap.com/tutorials/community-profile.html

Accepted Solutions (0)

Answers (1)

Answers (1)

roy_jin
Participant

Hi Marc,

So far the member update APIs only support generic dimension, which means you can't update the Version dimension right now. You may find the details from the below help document:

https://help.sap.com/doc/958d4c11261f42e992e8d01a4c0dde25/2022.2/en-US/index.html#PlanningModel_Mupd...

Please check it.

best regards, Roy

former_member790242
Discoverer

Hi Roy,

Thank you for you help. Is there any way to change the version properties through script?

Thanks