Skip to Content
0
Former Member
Sep 28, 2009 at 02:58 PM

Dynamically Reading the Input File

29 Views

Hi All,

We are on BPC 7.0 SP3 Microsoft Platform. My requirement is to do calculation based on the Time Dim Member and its property in the the data file being loaded. Here are some more details and the corresponding script logic I have been working on.

I am trying to load the following record through my data file and my requirement is based on the Time Dim member in the data file which is 20090919 in this case. This dimension member is available in the Time Dimension and has the parent 2010.FP5. 2010.FP5 has a property called "Weeks in Month" and i need to read that value.

I am using the following code (Code_1) to assign the value from the file to the variable and it does not work but if i hard code the value in the script logic(Code_Works) then i am able to get the property value through the Select Statement.

It will be great if you can help me to understand how to assign the value 20090919 to a variable while it is being read from the data file. The reason i need it is because this 20090919 will keep on changing on daily basis and i do now want to hardcode it in the package / current view or in the script logic.

Data File:

Account,Channel,Time,Customer,Plant,Company,Scenario,Signedata,Region

Account1,DC,20090919,00001234,PXXXX,CXXXX,Actual,100.0000000000,RXXXX

Code_1

*XDIM_MEMBERSET DSRACCT=Account1

*XDIM_MEMBERSET SCENARIO=ACTUAL

*XDIM_MEMBERSET Datasrc=SAP

//None of the below two statements work.

*MEMBERSET %VAR1%=%TIME%

*MEMBERSET %VAR1%=2009.SEP19

*when DSRACCT

*is Account1

*Select(%CURR_PERIOD%,"PARENTH1","TIME","[ID]='%VAR1%'")

*Select(%Num_Week%,"Weeksinmonth","TIME","[ID]='%CURR_PERIOD%'")

REC(expression=%NUM_WEEK%%value%/20,ACCOUNT="CALCULATED")

*endwhen

*commit

Code_Works

*XDIM_MEMBERSET DSRACCT=Account1

*XDIM_MEMBERSET SCENARIO=ACTUAL

*XDIM_MEMBERSET Datasrc=SAP

*when DSRACCT

*is Account1

*Select(%CURR_PERIOD%,"PARENTH1","TIME","[ID]='2009.SEP19")

*Select(%Num_Week%,"Weeksinmonth","TIME","[ID]='%CURR_PERIOD%'")

REC(expression=%NUM_WEEK%%value%/20,ACCOUNT="CALCULATED")

*endwhen

*commit

Thanks for looking into this

Regards

Raman