on 11-23-2011 2:59 PM
Hi,
Below is my code to transfer data within application.
In my last Select statement i want to pass %ETY% value so that it can filter for Cost center dimension on ETY variable which is the output of my first SELECT statement .
Can i pass ETY variable in select statement for cost center?
It doesnt give any error but it is not generating any record too. If i hardcode any Entity against the select statement of cost center it gives me the desired output.
pls help....
*XDIM_MEMBERSET P_Category= 50
*XDIM_MEMBERSET P_CostCenter= allcc
*XDIM_MEMBERSET P_DataSrc=MANUAL
*XDIM_MEMBERSET P_DistChannel = alldistchnl
*XDIM_MEMBERSET P_Entity = allentities
*XDIM_MEMBERSET P_Region = allregions
*XDIM_FILTER P_ExpAccount = [P_ExpAccount].properties("STATUS")="T"
*XDIM_MEMBERSET P_Time = ANNUAL
*WHEN P_TIME.ID
*IS "ANNUAL"
*SELECT(%ETY%,"[ID]",P_Entity,"[GROUPTYPE]='T'")
*SELECT(%DSCH%,"[ID]",P_DistChannel,"[GROUPTYPE]='T'")
*SELECT(%RRGN%,"[ID]",P_Region,"[GROUPTYPE]='T'")
*SELECT(%YR%,"[ID]",P_Time,"[GROUPTYPE]='T'")
*SELECT(%CCTR%,"[ID]",P_CostCenter,"[ETY]='%ETY%'")
*FOR %ENTY%=%ETY%
*FOR %DISTCH%=%DSCH%
*FOR %RRGNN%=%RRGN%
*FOR %MNTH%= %YR%
*FOR %CSTCTR%=%CCTR%
*WHEN P_COSTCENTER.ENTITY
*IS %ENTY%
*REC(FACTOR = 1,P_ENTITY="%ENTY%", P_DISTCHANNEL="%DISTCH%", P_REGION="%RRGNN%", P_TIME="%MNTH%", P_COSTCENTER="%CSTCTR%")
*ENDWHEN
*NEXT
*NEXT
*NEXT
*NEXT
*NEXT
*ENDWHEN
*COMMIT
Thanks in advance.
Hi,
You have to rewrite you logic, trying to avoid usage of *FOR/*NEXT. *SELECT statements are calculated before script execution and can't reference to another *SELECT.
In general if you want to redirect the *REC to some other member you can use member property directly:
*REC(FACTOR=1, P_COSTCENTER=[P_Entity].[COSTCENTER])
In this case you need a COSTCENTER property of P_Entity dimension where you store the appropriate costcenter ID.
B.R. Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See note 1650623 - BPC Script Logic using %DIMENSIONNAME_SET% Variables
if the script logic is in default.lgf, please use the 2nd solution of this note. Otherwise, please use 1st solution of this note.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.