Let us say you want to add a member to a dimension, in the following example we will be using a dimension called scope and a member along with the attributes will be added, the attributes will define the member. To use the planning APIs you must select a planning model under Planning Models Objects.
Planning apis in this blog:
- createMembers() – Allows you to create Planning Model members. Note that the member ID must not be used before.
- updateMembers() – Updates Planning Model members.
- deleteMembers() – Deletes Planning Model members.
The below image is of the Add New Scope (member) tab in the Scope maintenance interface popup.
![](https://insightcubes.com/wp-content/uploads/2022/09/Add-New-Scope.jpg)
The below code is linked through a Script Object Utils to the Create button of the Add New Member Tab.
The Script Objects Utils “createNewScope” adds the new member after clicking the Create button.
![](https://insightcubes.com/wp-content/uploads/2022/09/CreateNewScope-JS.jpg)
The below image is of the Edit existing Scope (member) tab in the Scope maintenance interface popup.
![](https://insightcubes.com/wp-content/uploads/2022/09/Edit-Existing-Scope.jpg)
The below code is linked through a Script Object Utils to the Update button of the Edit Existing Member tab.
The Script Objects Utils “updateExistingScope” applies all the edits to the member after clicking the Update button
![](https://insightcubes.com/wp-content/uploads/2022/09/UpdateExistingScope.jpg)
![](https://insightcubes.com/wp-content/uploads/2022/09/Delete-Existing-Scope.jpg)
The below code is linked through a Script Object Utils to the Delete button of the Delete Existing Member Tab.
The Script Objects Utils “deleteExistingScope” deletes an existing member after clicking the Delete button.
![](https://insightcubes.com/wp-content/uploads/2022/09/DeleteExistingScope-JS.jpg)
And there you have it—you now know how to use planning APIs to create, update, and delete members. You can find more how-tos for SAP Analytics on our blog. You can also view more of InsightCubes’ SAP Software.