NULL Members and Totals Members in Scripting APIs

You can use NULL members and Totals membersin scripting APIs in analytic applications and optimized stories.

NULL members often occur in SAP HANA models, where the joining of database tables can produce NULL values. Many existing APIs didn't handle the NULL member correctly.

Totals members are virtual members that play a role in tables
Note

Charts currently don't support totals.

If "Show Totals" is enabled for a dimension in the builder panel of a table, extra data cells showing aggregates are displayed in the table. User want to access the numbers in these cells, or react on clicking them. Until now these cells were only accessible through the ResultSet API, but not via getData.

The Alias enumeration has been enhanced with two new literals: Alias.NullMember and Alias.TotalsMember. These literals should be used in scripts whenever a NULL or Totals member needs to be referenced.

The following DataSource APIs have been enhanced to handle or return NULL or Totals members correctly:
  • getMembers():

    returns Alias.NullMember for the NULL member's ID

  • setDimensionFilter():

    allows to filter on Alias.NullMember

  • setVariableValue():

    allows to set Alias.NullMember as the value of a dimension member variable

  • getData():

    allows to specify Alias.NullMember in the passed selection, and in the Table case, also Alias.TotalsMember to retrieve the value of a totals data cell

  • getResultSet(), getDataSelections():

    allows to specify Alias.NullMember and Alias.TotalsMember in the passed selection

  • getResultMember():

    allows to specify Alias.NullMember in the passed selection

The following Table / Chart APIs have been enhanced:
  • getSelections():

    returns Alias.NullMember and Alias.TotalsMember if the corresponding cells have been selected

The following Planning APIs have been enhanced:

  • setUserInput():

    allows to specify Alias.TotalsMember in the passed selection, in order to plan a totals cell

  • DataLocking.getState()

    allows to specify Alias.TotalsMember in the passed selection
    Note

    Totals cells currently cannot be locked; this means setState() will not work)