cancel
Showing results for 
Search instead for 
Did you mean: 

Crosstab1 row selection data should be displayed in crosstab2

Former Member
0 Kudos

Hi Experts,

I need to display data corresponding to the string clicked in crosstab

crosstab1 to crosstab2

but crossstab2 displaya all the data.

both datasources are differnet but have common filed as account grp.

top table is crosstab2 downtable is crosstb1

that is when i click on reseerves and surplus ,only that data should be dispalyes in crosstab2.

for which i have used the code as follows

var str= Convert.subString(CROSSTAB_1.getSelectedMember("9PSJM003IJB6EUXBALJERWHSC").text,2,100);

DS_3.setFilter("0GL_ACCOUNT__ZPFC_RG",test2);

GLLCROSSTAB.setVisible(true);

Please help me out!!!!

Regards

sushma

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

It looks like you have attached the Account Group ZPFC_RG as a custom attribute of characteristic 0GL_ACCOUNT.  Is that right?  Are you using BW as your backend?

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa Bensan,

Iam using BW as backend.Account Group ZPFC_RG is navigational attribute for 0GL_ACCOUNT.

Regards

sushma

Former Member
0 Kudos

HI Mustafa Bensan

Iam using BW as backend.Account Group ZPFC_RG is navigational attribute for 0GL_ACCOUNT.

and ZPFC_RG is a prompt.

Regards

sushma

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

Assuming that both of your data sources include the dimension 0GL_ACCOUNT__ZPFC_RG and your data source DS_3 is assigned to CROSSTAB_2, please define the following script in the OnSelect event of CROSSTAB_1:

var selAccountGroup = CROSSTAB_1.getSelectedMember("0GL_ACCOUNT__ZPFC_RG").internalKey;

DS_3.setFilter("0GL_ACCOUNT__ZPFC_RG",selAccountGroup);

Also, can you confirm what you mean by "ZPFC_RG is a prompt"?  Do you have this defined as a BEx variable?

Regards,

Mustafa.

Message was edited by: Mustafa Bensan - updated script code and added prompt question.

Former Member
0 Kudos

Hi Mustafa,

I have already written that code

but croostab1 datasource is differnet and crosstab2 datasource is differnet and capturing the text from crosstab1 and passing that string into crosstab2.

var str= Convert.subString(CROSSTAB_1.getSelectedMember("9PSJM003IJB6EUXBALJERWHSC").text,2,100);

DS_3.setFilter("0GL_ACCOUNT__ZPFC_RG",str)

iam able to diaply the captured text in a text field

Regards

sushma

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

The setFilter method requires an internal key but it looks like you are passing it a text description instead, so this will not work.  The setFilterExt method will probably not provide the desired result either because it still requires a key value (external key) rather than a text description.

Can you provide more information about the definition of the Account Group dimension shown in CROSSTAB_1 as well as a screenshot of the Edit Initial View screen of the data source assigned to CROSSTAB_1?

Thanks,

Mustafa.

Former Member
0 Kudos

Hi Mustafa,

Thanks a lot for the reply,

Please find the screen shot below of edit intial view of crosstab1

EDIT INTIAL VIEW OF CROSSTAB2

if iam not using as text it displays in this manner

Please help me out!!

Regards

Sushma

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

The filtering you are trying to achieve is not directly possible because the key values between the data sources are not compatible.  As I understand it from the screenshots, the query behind DS2 has a row structure that replicates the account groups.  However, because this is a different object to the Account Group navigation attribute in DS3, the internal keys will not match and this is why you are trying to filter by the text description instead.  The problem is that the setFilter method filters based on key values only, not text descriptions.

So, as a workaround, since I would expect your row structure in DS2 to be fixed you can manually map the structure internal keys to the Account Group internal keys via an if then statement block in the OnSelect event script of CROSSTAB_1 something like this:

var myDS2key = CROSSTAB_1.getSelectedMember("9PSJM003IJB6EUXBALJERWHSC").internalKey;

var myDS3key ="";

if (myDS2key == <Internal Key of DS2 structure element for "Capital">) {

  myDS3key = <Internal Key of DS3 0GL_ACCOUNT__ZPFC_RG for "Capital">;}

else {

if (myDS2key == <Internal Key of DS2 structure element for "Reserves & Surplus">)

  {myDS3key = <Internal Key of DS3 0GL_ACCOUNT__ZPFC_RG for "Reserves & Surplus">;}

else {

if (myDS2key == <Internal Key of DS2 structure element for "Grants, donations and benefactions">)

  {myDS3key = <Internal Key of DS3 0GL_ACCOUNT__ZPFC_RG for "Grants, donations and benefactions">;}

  }

}

DS_3.setFilter("0GL_ACCOUNT__ZPFC_RG",myDS3key);

You'll need to map each combination in the if then statements.

Regards,

Mustafa.

Message was edited by: Mustafa Bensan Corrected dimension name for DS_3.setFilter.

Former Member
0 Kudos

Hi Mustafa,

Thanks a lot ,

I have tried the the above code.

i have tested for only one code bit its not wrkng,

the second crosstab is displaying all the values.

if iam palceing the key, its throwing error .

still iam unable to achieve.

var strKEY=CROSSTAB_1.getSelectedMember("9PSJM003IJB6EUXBALJERWHSC").internalKey;

var eg="";

if(strKEY=="9PSJM003IJB6EUXBALJERY2OC")

{

eg=" Reserves and Surplus";

DS_3.setFilter("0GL_ACCOUNT__ZPFC_RG",eg);

}

Need Help

Regards

sushma

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

You need to replace " Reserves and Surplus" with the technical ID of the corresponding structure element.  You can look this up from the properties in BEx Query Designer.

Regards,

Mustafa.

MustafaBensan
Active Contributor
0 Kudos

Hi Sushma,

Just to clarify, you need to replace " Reserves and Surplus" with the corresponding characteristic value of 0GL_ACCOUNT__ZPFC_RG.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Bensan,

Thanks a lot ,its working for me now.

Regards

sushma.

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

Hi - have you looked at threads like this that may help you with this?

Former Member
0 Kudos

Hi Tammy,

Thanks for the reply.

I have gone through that blog ,

that ,means it can only read the last column instaed of any other columns in crosstab.but in my last column i have keyfigures .

Regards

Sushma.

TammyPowlas
Active Contributor
0 Kudos

Sushma - I was looking at your screenshot - to clarify, are you selecting by account group and is that your last characteristic?

Former Member
0 Kudos

HI Tammy,

Thanks for the reply,

Account group is the first characteristic  and keyfigures are in the column.

Regards

sushma