Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Distribution in script logic

Hello, all.

I'm new in BPC. Please give advice, how can we realize following logic.

We have a application Sales with following dimensions.

Account, Category, DataSrc, Entity, Department, Prodline, RptCurrency, Time

User send data to the DB in view:

Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time

-


NetSales | BUDGET | Input | Company_In | Sales | NoProd | LC | 2008.INP

Where each record NetSales, Budget, etc has no child

and user send data in view:

Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time

-


Coeficient | BUDGET | Input | Company | Sales | NoProd | LC | 2008.INP

Where Entity has 3 childs: Company_1, Company_2, Company_3.

After posting a data to Fact table, it view, is:

Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time | Signed_data

-


NetSales | BUDGET | Input | Company_In | Sales | NoProd | LC |2008.INP| -20

Coeficient| BUDGET | Input | Company_1 | Sales | NoProd | LC | 2008.INP| -0,1

Coeficient| BUDGET | Input | Company_2 | Sales | NoProd | LC | 2008.INP| -0,3

Coeficient| BUDGET | Input | Company_3 | Sales | NoProd | LC | 2008.INP| -0,6

I want to get new records in db such as:

Account | Category | DataSrc | Entity | Department | Prodline | RptCurrency| Time | Signed_data

-


NetSales | BUDGET | Input | Company_1 | Sales | NoProd | LC | 2008.INP| -2

NetSales | BUDGET | Input | Company_2 | Sales | NoProd | LC | 2008.INP| -6

NetSales | BUDGET | Input | Company_3 | Sales | NoProd | LC | 2008.INP| -12

Where NetSales distribute by coefficient for each Entity.

I want do something like (Account ="NetSales",Entity ="Company_1")= (Account="NetSales",Entity="Company_In")*(Account="Coeficient",Entity.Company_1) for each Company_n.

How can I write script logic for this.

Thanks

Former Member
replied

I think there are several options. The easiest option may be simply to construct a template that sends the values directly based on the input of the Coefficients and the Raw data value input of 20. Thus the input process would submit 7 total entries.

Now should you wish to have a repeatable calculation process that updates the Child entities each time either a coefficient or data input point is submit, then you could utilize script logic that was suggested in the thread as an allocation process. Otherwise, you would need to develop sets of properties and script logic for each set of requests such as:

*When Account.ID

*IS COEFFICIENT

*WHEN ENTITY.ID

*IS COMPANY_1

*REC(EXPRESSION = VALUE * GET(ACCOUNT=ACCOUNT.NETSALES,ENTITY=ENTITY.COMPANY_IN), ACCOUNT=ACCOUNT.NETSALES)

*ENDWHEN

*ENDWHEN

*COMMIT

This is not as flexible and there are many approaches that may be taken here, such as using LOOKUP statements and proeprties to manage the calculations and make them more flexible. It will just depend on how much volume there is to calculate, how many statements are required and how often the logic will need to be updated or managed based on hierarchy changes to the entity dimension. Plus, you need to test many options to determine which is the fastest approach during the send process.

Hope this helps.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question