Skip to Content

SAP Design Studio getVariables


We are encountering strange behavior in Design Studio 1.6 SP4 Patch 1 (16.4.1). To simplify the problem for testing, I created a new Analysis Application with two data sources - DS_ENR_BY_SPEC and DS_NO_ADVISOR (both Bex data sources with variables). The only report object is a text box, TEXT_1.

The code below runs on startup, and is designed to populate TEXT_1 with all variable names.

var variables_arr = DS_ENR_BY_SPEC.getVariables(); var variables_str=""; variables_arr.forEach(function(element, index) { variables_str=variables_str+element.text+"\n";


However, when the script runs at start up, TEXT_1 populates with all variables from both datasources - DS_ENR_BY_SPEC and DS_NO_ADVISOR. This seems to be a problem with the getVariables command. We have had this issue happen across numerous Analysis Applications - getVariables will return information about all Bex variables in the report, not just the one referred to in the code.

Has anyone encountered this issue, and is there a solution?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 13, 2017 at 02:28 PM

    Hi Scott,

    I have been able to replicate your issue. It occurs when the Merge Prompts property of the application is set to true. If you set this property to false, then only the variables associated with the specified data source are returned by getVariables() as desired.



    Add comment
    10|10000 characters needed characters exceeded