Skip to Content
avatar image
Former Member

Get property of a property in Script logic for sap bpc

Hello Experts,

I have a typical problem....

I am having a value in a DRIVER R_001 for some statistical GL account and say entity is WR01

now i want to post this amount from to an entity WR02, logic to derive this is as below

R_001 driver has property profit_center, and profit_center is a dimension which has a property as entity which would be WR02.

now how do i achieve this in script logic.?

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Posting with some format change in the data section of the example

    SAP BW 7.4 SP 15

    BPC 810 SP 009

    Engine is JAVASCRIPT (didnt get the error as said)

    Model is for Financial Planning with dimension as DRIVER,ENTITY, PROFIT_CTR, ACCOUNT and other necessary.

    Driver has a property as PC (in which the profit center is maintained)

    PROFIT_CTR has property as COMP( in which entity is maintained)

    Below is the Data

    Account - DRIVER - ENTITY- PROFIT_CTR - AMOUNT

    ACC1- R001- WR01- WR0112- 100

    Now using the script can i post this to

    ACC1- R001- WR01- WR0212- 100

    Logic for this change in Entity is as below

    DRIVER Master data

    ID- PC

    R001- WR0212

    PROFIT_CTR Master data

    ID- COMP

    WR0212- WR02

    As you can see this the entity is derived from driver (R001)-->PC(WR0212)-->PROFIT_CTR(WR0212)-->COMP(WR02)

  • "Account - DRIVER - ENTITY- PROFIT_CTR - AMOUNT

    ACC1- R001- WR01- WR0112- 100

    Now using the script can i post this to

    ACC1- R001- WR01- WR0212- 100"

    I see no change in ENTITY! WR01 in both lines!

  • Former Member Vadim Kalinin

    "Account - DRIVER - ENTITY- PROFIT_CTR - AMOUNT

    ACC1- R001- WR01- WR0112- 100

    Now using the script can i post this to

    ACC1- R001- WR02- WR0212- 100"

    Sorry my mistake.....

    I want to use this in Datamanger package

  • Get RSS Feed

3 Answers

  • Best Answer
    Aug 03, 2017 at 06:11 AM

    Something like:

    *XDIM_MEMBERSET DRIVER=R001
    *WHEN DRIVER
    *IS *
    *REC(EXPRESSION=%VALUE%,PROFIT_CTR=DRIVER.PC,ENTITY=DUMMY)
    *ENDWHEN
    
    *XDIM_MEMBERSET ENTITY=DUMMY
    *WHEN DRIVER
    *IS *
    *REC(EXPRESSION=%VALUE%,ENTITY=PROFIT_CTR.COMP)
    *REC(EXPRESSION=0) //clear DUMMY ENTITY
    *ENDWHEN

    First write to dummy ENTITY with correct PROFIT_CTR, then to correct entity.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 02, 2017 at 03:42 PM

    Please! Read https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

    And provide the required info! I really don't want to ask endless questions to understand what do you want to achieve...

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 02, 2017 at 03:49 PM

    Or I can provide you an answer like your question:

    Use LOOKUP and 2 writes using temp entity

    Add comment
    10|10000 characters needed characters exceeded