Skip to Content
0

Getting value of dimension in SAP Design Studio

May 03, 2017 at 10:51 AM

109

avatar image

Dear Experts,

I have a following requirement in Design Studio:

  1. I have to select one customer from CROSSTAB_1 and pass this selected customer to another datasource DS_2.
  2. After this filter, I have to get the value of a characteristics "LEVEL" in DS_2 which holds numeric values (1 , 2 or 3).

For point 1, I have written the following code:

DS_2.setFilterExt("0CUSTOMER",CROSSTAB_1.getSelectedMember("0CUSTOMER"));

I don't understand how to write code for point number 2.

Please help me.

Thanks and Regards,

Nitesh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Koen Hesters May 04, 2017 at 01:19 PM
0

Hey,

What do you want exactly? Do you want to retrieve the text of a char where the key is 1, 2 or 3?

Grtz

Koen

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Koen,

Thanks for your reply.

No, my requirement is to find the value of level when I pass some specific customer. Now since the value of level is (1, 2 or 3) a characteristics so I don't understand how to compare this value further with number 1 , 2 and 3.

My ultimate requirement is like below:

if(level == 1)

{

..........

}

else

{

....

}

Means to get value of level and converting in number so that I could compare later.

Please advise.

Thanks,

Nitesh

0

Hi,

I think you would like to play with the formats, can you try out codes like:

var string_value = CROSSTAB_1.getSelectedMember("ZSYDOSTYP").text;
 var int_value = Convert.stringToInt(string_value);

grtz

Koen

0
Mustafa Bensan May 04, 2017 at 02:17 PM
0

Hi Nitesh,

This appears to be a cascading filter scenario. For the second point you should:

a) Make sure that in the datasource Initial View editor the Members for Filtering option of DS_2 is set to "Values with Posted Data Only" for dimensions 0CUSTOMER and LEVEL;

b) Apply the script DS_2.getMembers("LEVEL", 99) after your setFilterExt() script in order to retrieve the filtered values of LEVEL.

Regards,

Mustafa.

Share
10 |10000 characters needed characters left characters exceeded