cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic, reading property

Former Member
0 Kudos

Hi

I have a rookie question to BPC.

In my script logic I am transferring data to another App (which works fine). Here I add a dimension, which I want to be equal to a property of on of my dimensions in the source App. This doesn't work for me, please see script and result below.

The assignment is performed in the line: *ADD_DIM Profitcenter_Entity = Material.Profitcenter_Entity. When I debug (see at the bottom), it simply says that Profitcenter_Entity is equal to "Material.Profitcenter_Entity". Also no records are written to the App.


// Perform Currency translation

*INCLUDE FXTrans

// MIJ Calculation of revenue = quantity * price

// The price is found in the Application "Prices" for the current record
*LOOKUP PRICES
*DIM PRICE1: ACCOUNT = "PRICE"
*ENDLOOKUP

//The calculation is performed
*When Account 
*IS "Quantity"

*REC(FACTOR=LOOKUP(PRICE1), ACCOUNT = "300020")

*ENDWHEN

//////////////////////////////////////////////////////////

// KBL: Transfer records to Finance App
 
*COMMIT

*DESTINATION_APP = Finance

//*ADD_DIM Profitcenter_Entity = DA101
*ADD_DIM Profitcenter_IntCo = yyy
*ADD_DIM Profitcenter_Entity = Material.Profitcenter_Entity

*SKIP_DIM = Country, Employee, Material

*When *
*IS *
*REC(FACTOR=4)
*ENDWHEN 

*COMMIT


App: FINANCE - Records to be posted are 12  (calc diff = 1)

PROFITCENTER_INTCO,PROFITCENTER_ENTITY,CATEGORY,RPTCURRENCY,ACCOUNT,DATASRC,TIME,SIGNEDDATA

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,300020,INPUT,2009.JAN,-3000

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,300020,INPUT,2009.FEB,-3000

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,300020,INPUT,2009.JUL,-29970000

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.JAN,1633

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.FEB,25449.0322580645

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.MAR,3084

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.APR,1400

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.MAY,100

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.JUN,1199

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.JUL,30100

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2009.OCT,1000000

YYY,MATERIAL.PROFITCENTER_ENTITY,BUDGET,LC,QUANTITY,INPUT,2010.MAY,1000

Time to validate records: 0.0 sec.

 

Post Record Status

Submit count : 12

Accept count : 12

Reject count : 0

Posting ok

Time to post records:3.4 sec.

Hope you can help!

/Karsten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I will look to cconfirm, but think you may only ADD a specific dimension member as a named member. You may, however, try to use the statement you added in the ADD, to the Expression as the location to WRITE to in the REC statement. USE ADD with a named member, but override it by specifying a new locationin the REC statement.

Hope this helps.

Former Member
0 Kudos

Hi Petar

Thanks for your answer...it lead me in the right direction. I ended up with the following code which works.


*SKIP_DIM = Country, Employee
*RENAME_DIM  Material = Profitcenter_Entity

*When *
*IS *
*REC(FACTOR=1, EXPRESSION=%VALUE%, Material = Material.Profitcenter_Entity)

Br Karsten

Answers (0)