cancel
Showing results for 
Search instead for 
Did you mean: 

script logic unable to retrive the property value

vinoo_gan
Active Participant
0 Kudos

Hi Expert

I have dimension called GRADE. and AVGCOST as property .

Dimension : GRADE

Property

-


ID AVGCOST

GR7 10000

GR6 5000

In script logic unable to retrieve the property values AVGCOST

Your help appreciated

*XDIM_MEMBERSET Category=FORECAST

*XDIM_MEMBERSET HCM_ACCOUNTS=C0002,HEADCOUNT_FTE

*WHEN GRADE

*IS "GR7"

*REC(FACTOR=1,GRADE=[GRADE].[AVGCOST])

*ENDWHEN

validation error message in valid dimension GRADE

Please advise.

Vinoo g

Edited by: VinooGAN on Oct 29, 2009 5:52 PM

Accepted Solutions (1)

Accepted Solutions (1)

esjewett
Active Contributor
0 Kudos

Vinoo,

I think you need to remove the brackets around GRADE.AVGCOST.

You have:


*REC(FACTOR=1,GRADE=[GRADE].[AVGCOST])

I think you need:


*REC(FACTOR=1,GRADE=GRADE.AVGCOST)

Note that this will write the value of GRADE member "GR7" into the GRADE member in the AVGCOST property. If you want to write the value of the AVGCOST property into the GR7 member, then you'll need to do something different.

Thanks,

Ethan

vinoo_gan
Active Participant
0 Kudos

Ethan

Thanks for you response.

I want to write the value of the AVGCOST property into the GR7 member. Please advice

esjewett
Active Contributor
0 Kudos

The requirement to write a property value using a *REC is a bit difficult. To the extent that it is probably better to find another way to do this. Our approach has been to create statistical supporting accounts (AVGCOST in your case), then to store the value of AVGCOST in that account and use a script logic statement like the following in your script to store the value in the grade member itself (presumably in another account):


*REC(EXPRESSION=([ACCOUNT].[AVGCOST]))

It would be nice if BPC Netweaver supported more MDX syntax (like PROPERTIES) in an expression but this is not currently the case.

An alternative is to use a formula account to read out (or multiply, divide, etc) the value of the AVGCOST property on the grade, as you can access property values in dimension member formulas using MDX syntax like


[GRADE].PROPERTIES("AVGCOST")

The above account will simply read out the value of the AVGCOST property on the current GRADE dimension member.

Hopefully that's helpful.

Ethan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

We're facing a similar issue when trying to read the values of a property for calculation purposes (metric conversion is stored as a propery of material which we want to multiply based on sales volume), in the MS version this was achieved with the FLD() command, but this doesn't appear to be available in the NW version to-date, which is quite frustrating. Whilst the BADI can be used as a workaround this isn't ideal.

It would be good to know whether any benevolent script experts can ride to the rescue on this one!

Stuart