cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC NW 7.5 SCRIPT LOGIC DYNAMIC SELECT STATEMENT

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

And please, explain the idea of your script, it's not clear from the code you provided. What and where you want to copy?

Vadim

former_member182709
Contributor
0 Kudos

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.