cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Script logic to call the values saved in different scope and combination

BalaValluru
Participant
0 Likes
1,027

Hi Experts

In the example shown below, we have two sets of source data and to calculate the logic Total Expenses multiply with Ratios with Product combinations and to post the target with product combination and country

Source Data : 1 Total EXP with the combination of some products having value ex:37000

Source Data : 2 To save the Ratio in BPC. I have taken some dummy members and saved in different scope.

Could you please help me in below logic to call the (source data 2 )[AUDIT].[RATIO] to in to logic which is saved in different scope

  • Source Data 1 (scope)
*WHEN ACCOUNT
*IS  TOTAL EXPENSE
*WHEN PRODUCT
*IS ABC
*IS DEF
*IS GHI
*REC(EXPRESSION =(source data 1) %VALUE%* (source data 2 )[AUDITIDM].[RATIO] = Target members)
*ENDWHEN
*ENDWHEN

Thanks

Kishore V

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member186338
Active Contributor
0 Likes

Requirements:

We have 3 products AAAA, BBBB, CCCC (base or parent??)

On the account TOTAL_EXPENSE (parent?) sum of the mentioned 3 products have to be allocated to products like A1_123_PROD (how to select all products like A1_123_PROD???)

Allocation have to be done using account RATIO for each product like A1_123_PROD.

Result of allocation to be stored in account 6701000

All other dimensions have to be described in details!

BalaValluru
Participant
0 Likes

Hi vadim.kalinin

Attached results

Thanks

KishoreV

BalaValluru
Participant
0 Likes

Hi vadim.kalinin

After running the script, results are showing zero values.

Above script we have scoped for Source data 1 table.( Total expenses with product data)

How are we calling Source data 2 table ( Ratios are having with different scope members not are equal to Source Data 1)

Can we use lookup in script to call Ratios (source data 2 table)

Thanks

Kishore V

former_member186338
Active Contributor

"After running the script, results are showing zero values" - sorry, but I am unable to see what you are doing!

How do you run the script?

What is the script text?

What about log?

What data you have?

Please read:

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

former_member186338
Active Contributor
0 Likes

OK, you have 5 Product members. (ex: A1_123,A1_345)

And in ACCOUNT you have:

AMOUNT - original amount

RATIO - ratio stored

RESULT - target result to be saved

Then the script will be:

*WHEN ACCOUNT
*IS AMOUNT
  *WHEN PRODUCT
  *IS A1_123,A1_345 //list of required products
    *REC(EXPRESSION=%VALUE%*[ACCOUNT].[RATIO],ACCOUNT=RESULT)
  *ENDWHEN
*ENDWHEN
former_member186338
Active Contributor
0 Likes

P.S. If you want to run this script using DM package then it can be:


//Scope source data 
*XDIM_MEMBERSET ACCOUNT=AMOUNT
*XDIM_MEMBERSET PRODUCT=A1_123,A1_345 //list of required products

*WHEN ACCOUNT
*IS * //already scoped
  *REC(EXPRESSION=%VALUE%*[ACCOUNT].[RATIO],ACCOUNT=RESULT)
*ENDWHEN

My previous code was for default.lgf

former_member186338
Active Contributor
0 Likes

Correct setup has to be:

1. Only single member for Product

2. Ratio - has to be member of account dimension

3. Target has to be different account then source