Skip to Content
author's profile photo Former Member
Former Member

Script logic, reading property

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 06, 2010 at 03:38 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.