Skip to Content
Author's profile photo Tammy Powlas

Design Studio Best Practices Scripting – ASUG Webcast Part 4

SAP’s Jie Deng covered this part of the webcast.  See Design Studio Best Practices Design Experience – ASUG Webcast Part 3  CSS Design Studio Best Practices ASUG Webcast Part 2 andDesign Studio Best Practices Webcast – Platform Specifics– ASUG Webcast, Part 1

Note the usual legal disclaimer applies that things in the future are subject to change.


Figure 1: Source: SAP

Figure 1 covers chart data selection capabilities

In property window, select the data source and select the key figures (“measures”)

In Figure 1 shows selecting only period 1 and 4

Use the data interface shown in Figure 1


Figure 2: Source: SAP

In the start-up event, you can use the chart to set data selection

What do you want to initiate for the chart, you can set the script as shown in Figure 2


Figure 3: Source: SAP

A third option for chart data selection is if you want to select dimension here, you implement with scripting and the value is result member. I finally tried this myself and understand this, thanks to this webcast.


Figure 4: Source: SAP

Figure 4 shows the crosstab where if click OPEX and product margin, it should both display

A global variable is used in the code above


Figure 5: Source: SAP

Figure 5 shows Top 10 customers in the pie chart, based on those customers, they are assigned to a particular country and a customer hierarchy.  They belong to hierarchy node Russia.  The script sets field to get Russian

Get Data Source to get Russian as hierarchy node and do the filtering (note: I have not tried this)


Figure 6: Source: SAP

Figure 6 shows the Line Break – \n – add to text field

More to come.


Stay Ahead : Attend TechEd && d-code – Win Big SAP BI BusinessObjects HANA Hands-on Sessions

Join SAP at the end of October for Reporting & Analytics 2014 INTERACTIVE conference – register here

Upcoming related ASUG webcasts – you need to be logged on to to register:

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Jeroen van der A
      Jeroen van der A

      Great posts,

      I was wondering about the country example for the customer selection though: here a foreach function is used although the dimension is only filled with one country as the first step was a filter on customer.

      Did you hear anything in the 1.4 that includes new options for working with arrays?


      Author's profile photo Tammy Powlas
      Tammy Powlas
      Blog Post Author

      Hi -

      Thank you for commenting.

      we didn't get into the details of the scripting updates in yesterday's webcast.  I expect we'll hear/see more at SAP TechEd (&& d-code) Las Vegas

      Author's profile photo Former Member
      Former Member

      Hi Tammy,

      Nice Post 🙂
      I have one scenario where I need your advice.

      I have a datasource in my application in which there are five keyfigures and one dimension. I have one chart in application which I need to display on five different pages. For each time I have to use the dimension and a Key figure.
      Can I do that in script?

      Basically I want to use the same Chart and same data source but different KF everytime.

      Keyfigures: KF1, KF2, KF3, KF4, KF5
      Dimension: Region

      Chart: CHART_1
      Button: Button_1

      Case 1: CHART_1 will display KF1 for  all values of dimension Region.
      Case 2: CHART_! will display KF2 for  all values of dimension Region.
      and so on...


      Author's profile photo Tammy Powlas
      Tammy Powlas
      Blog Post Author

      Hi Atul - I think this is something you should try yourself and if you experience issues post your question as a new discussion in the forum.  I also encourage you to search before you post per SCN rules

      Author's profile photo Former Member
      Former Member

      I tried and I was able to do that runtime. Thanks. 🙂

      Author's profile photo Alfons Gonzalez Comas
      Alfons Gonzalez Comas

      Hi Tammy,

      Just a question. I am trying to follow the sample you provide to use Chart component setDataSelection method to select dimensions to display in different charts. The idea sounds great, as effectively would allow us to decrease dramatically the number of data source we are using on our apps, but I am not sure of have undertsood how it works. In our case (we are using a UNX universe)  we are not able to execute the code properly.

      My intial data view has 5 dimensions and the purpose is to show only 2 of them in a graph.

      This is the code I am writing


        "_eizOFGZ9EeWIkOXYgpWw7Q" : "(RESULT_MEMBER)",

        "_ejr-5WZ9EeWIkOXYgpWw7Q" : "(RESULT_MEMBER)",

        "_732s4Y-YEeWxu6eov64bAg" : "(RESULT_MEMBER)"


      but does "(RESULT_MEMBER)" really means? It is somekind of variable ? In my case DS manage it as the key corresponding to a memebr dimension and shows nothing.

      Could you clarify it?


      Author's profile photo Tammy Powlas
      Tammy Powlas
      Blog Post Author

      Hi Alfons - RESULT_MEMBER, as far as I can tell, is just a parameter (not a variable in the application) to use in the method (looks like the JSON format)

      I just tried it - it works with BEx queries; when I can I will try against a universe as well.

      Author's profile photo Tammy Powlas
      Tammy Powlas
      Blog Post Author

      Hello Alfons - I could not get this to work with the universe as a datasource.  But please note I am not an experienced coder nor am I that experienced with the universe.

      The code works with the BEx queries - and I agree it is a nice feature

      Author's profile photo Alfons Gonzalez Comas
      Alfons Gonzalez Comas

      Hi Tammy,

      Thanks. Effectively I was suspecting that the feature does not work on UNX universes......I have already submitted as idea

      Please, if some one reads the thread an has same issue using UNX and setDataselection would be nice to vote it.


      Author's profile photo Lijun Shen
      Lijun Shen

      Hi Alfrons,

           I'm using universe data source. Using data selection to specify the total by means of RESULT_MEMBER is working for me. Maybe it is just a bug with specific DS version./wp-content/uploads/2015/12/2015_12_02_8_51_14_843050.png

      Best Regards,