✆ UAE: +971 58 5616 616, ✆ USA:+14099168409,   ✉ info@insightcubes.com

Using the getMembers() API with SAP Analytics Designer

How to use the getMembers() API with SAP Analytics Designer.

getMembers() method returns a set of members from a specified dimension. This method conducts “a round house trip to the backend”, which is a heavier process than the getResultSet(). However in this blog we will be using getMembers() and specifying a condition (example: if statement) to filter the returned set of members in a finer level of details.

There are several ways of getting members with SAP Analytics Designer but in the below blog we will be getting members from a table/chart, and a planning model using conditions. getDataSource().getMembers() exposes the description, dimension Id, display Id, Id, and model Id, allowing you to set conditions to filter the exposed member information, as shown in the below screenshot.

When you use the getMembers() method from a widget (table or chart) you will be able to get description, dimension Id, display Id, Id, model Id and set conditions to filter the members that we would like to get in the list as shown in the below screenshot.

getMembers() from a data source

The selected members will be added to two check box groups called CBG_AddScope_GroupCurrency and CBG_EditScope_GroupCurrency, using a Global Script Variable called SV_MemberInfo_allCurrencies, and only their displayIDs will be shown in a Checkbox group. They have been populated with the list of currencies excluding NotInHierarchy, # and LC. Allowing the user to select multiple currencies to add them as an attribute to the scope as discussed in the How To Create, Update And Delete Members With SAP Analytics Designer blog.

Scope Group Currency populated using the getMembers() API

You can also use options in the getMembers() after mentioning the target dimension to refine the result. In the below examples you will see how we can use getMembers() options to refine our results.

Using accessMode:MemberAccessMode allows you to specify whether to get members with “Booked Values”, as shown in the below screenshot, or MasterData . This also helps in reducing the list of members before further processing is done in subsequent code.

We can also use toExponential, toFixed, toPrecision and toString to explicitly state the format of the result list, prior to compiling and subsequent logic.

By default, the member limit is 200 and MasterData is the access mode.

Another approach to using getMembers() method is from a planning model instead of a widget, and without the preceding getDataSource(). By using this method, we directly expose the member descriptions, Id’s, properties, and other criteria to further refine the set of members that we want to include in our selection. In the below example we will be getting all of the members from the Audit Trail dimension (default limit 200), and then further refining our list of members by using a criteria based on the property of the dimension.

getMembers() from Planning Model

To proceed with the above, first add a planning model to the SAP Analytic Designer. (In our case, we called the Planning Model OwnershipModel). The above code will allow us to get only Members that have a property values “Y” or “G” under Property IS_STAGING. These specific member IDs are added to the Global Script Variable SV_PlanningModelMember_allAudit, compiled and populated in the DD_EditScope_StagingAuditMember dropdown.

The Staging Audit member dropdown is populated by the Audit Trail members that have a property value of either “Y” or “G” under the property IS_STAGING

Recent Posts

account configuration guide for the consolidation extension

Account Configuration Guide

Consolidation Extensions’ Account Configuration Guide The Account Configuration Guide serves as a preconfigured administrative tool designed to guide users with specific roles to effectively manage

Configuration Starter Kit

Consolidation Extensions’ Configuration Starter Kit The configuration of the Consolidation Extension for SAP Analytics Cloud can be conducted using a preconfigured toolkit. The purpose is

Audit Trail Configuration Toolkit for the consolidation extension

Audit Trail Configuration Toolkit

Audit Trail Configuration Toolkit Audit Trail Configuration Toolkit provides a comprehensive set of tools and resources to help developers easily configure the behavior of the

Scope configuration guide for the consolidation extension

Scope Configuration Toolkit

Scope Configuration Toolkit With our Scope Configuration Toolkit, you can take control of your consolidation scopes with confidence and precision. This interface makes it extremely

Get in Touch

Learn more and ask us About Our Cloud Consolidation Solution

Share This Post

Share this Page!

Share this with your network.

Want to Know More?

Get In Touch

Something isn’t Clear?

Feel free to contact us, and we will be more than happy to answer all of your questions.