on 05-23-2016 4:46 PM
When creating a global script variable you have the option to define the variable type like INT, Boolean, String, Float but there is no
option to define a variable as an ARRAY. Is this be design or a miss by SAP?
I want to be able to store a list of dimension values to use it various scripts in my application without having to fetch it from
the data source and without having to create a listbox or something. Why can't you create a global variable as an array?
Thanks
Abdul
Hi Abdul,
Yes, this is a limitation of global script variables at the moment. What you can do as a workaround is as follows:
1) Define a global script variable of type String
2) Populate the value of this variable with your dimension members as a comma separated string
3) Convert the array string to an array object by applying the split() method to the array string
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Mustafa.
The way I am doing this is creating a local array variable and populating it with the members;
var equipment_array = DS_2.getMembers("EQUIPMENT", 25);
and then just picking out a member using a loop.
It works for me but I want to know if populating a local array with members is making a call
to the database every time or no? My understanding is that DS_2 is already loaded at startup
so it shouldn't be another trip to the database, correct?
Abdul
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.