Skip to Content
0

Get property of a property in Script logic for sap bpc

Aug 02, 2017 at 03:24 PM

120

avatar image
Former Member

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.?

10 |10000 characters needed characters left characters exceeded
Former Member

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)

I hope this helps

0
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)

0

"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!

0
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

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Vadim Kalinin Aug 03, 2017 at 06:11 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

it worked..... As always... thanks a lot

0
Vadim Kalinin Aug 02, 2017 at 03:42 PM
0

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...

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Aug 02, 2017 at 03:49 PM
0

Or I can provide you an answer like your question:

Use LOOKUP and 2 writes using temp entity

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

please cehck the comment section of the question

I have tried to explain it in more details

0

4. Clearly identify the purpose of the script: to run as default.lgf or to be launched by DM package (different calculation logic!). Please, ALWAYS answer this question!!!!

0