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

Periodic Runallocation in YTD model

Former Member
0 Likes
2,222

data.jpgscrip-allocation.txt

Hi BPC experts:

Its posible to run a periodic allocation on YTD model in SAP BPC?

SAP BPC NW 10.1 SP12

DIMENSIONS detail in logic script

Purpose: We want to allocate all indirect costs based on products revenue/Customer Sector. The allocation process should consider the monthly sales by product and customer sector.

Now, logic scritp its working to YTD values (Sales), just like data file.

AUD001 - Original Values;

AUD002 - Allocation Value

AUD003 - Allocation Cost in MATERIAL by % revenue material

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Sorry, but still the detailed requirements are not explained!

The idea in general:

1. Convert YTD values to periodic using script logic (current month - prev month) to some special audittrail member.

2. Perform allocation of periodic values and save result to the same special audittrail member.

3. Using script logic add results of allocation to the YTD values.

Answers (5)

Answers (5)

Former Member
0 Likes

I update my question, sorry by missing information. Is my first question

Former Member
0 Likes

I update my question.

Former Member
0 Likes

new-sript-periodic-values.txt

Vadim,

Thank you for your advice.

I just changed my scrip to your idea, and the periodic allocation is working:

1. Convert YTD values to periodic using script logic (current month - prev month) to some special audittrail member. (AUD002)

2. Perform allocation of periodic values and save result to the same special audittrail member.(AUD003)

I don't know how perform the third point of the process:

3. Using script logic add results of allocation to the YTD values.

I try this:

*XDIM_MEMBERSET AUDITTRAIL = AUD002, AUD003

*XDIM_MEMBERSET CATEGORY = TESTE

*XDIM_MEMBERSET SCOPE = G_XPTO

*XDIM_MEMBERSET RPTCURRENCY = EUR

*XDIM_MEMBERSET TIME = %TIME_SET%, TMVL(-1,%TIME_SET%)

*XDIM_MEMBERSET FLOW = BAS(DPL_BASIC_PROD_COSTS)

*WHEN TIME /

*IS TMVL(-1,%TIME_SET%)

*WHEN AUDITTRAIL

*IS AUD002

*REC(FACTOR = 1, TIME = %TIME_SET%, AUDITTRAIL = "AUD002")

*WHEN AUDITTRAIL

*IS AUD003

*REC(FACTOR = 1, TIME = %TIME_SET%, AUDITTRAIL = "AUD003")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

Thank you for your help!!!

former_member186338
Active Contributor
0 Likes

Unable to understand what are you doing:

1. Convert YTD values to periodic using script logic (current month - prev month) to some special audittrail member. (AUD002)

2. Perform allocation of periodic values and save result to the same special audittrail member.(AUD003)

Not same!

Former Member
0 Likes

I just put the periodic result in the same special audittrail member (AUD002)

Now i need to transfer the results of AUD002 to YTD variable.

former_member186338
Active Contributor
0 Likes

To many dimensions used... Not sure I can provide the correct full script.

1 and 2 has to be:

*XDIM_MEMBERSET AUDITTRAIL = AUD001 //orig YTD values
*XDIM_MEMBERSET CATEGORY = TESTE
*XDIM_MEMBERSET SCOPE = G_XPTO
*XDIM_MEMBERSET RPTCURRENCY = EUR
*XDIM_MEMBERSET TIME = %TIME_SET%, TMVL(-1,%TIME_SET%) //%TIME_SET% - single member!!!
*XDIM_MEMBERSET FLOW = BAS(DPL_BASIC_PROD_COSTS)

*WHEN TIME
*IS TMVL(-1,%TIME_SET%) //prev month
*REC(FACTOR = -1, TIME = %TIME_SET%, AUDITTRAIL = "AUD002")
*IS %TIME_SET% //Current month
*REC(FACTOR = 1, AUDITTRAIL = "AUD002")
*ENDWHEN

*XDIM_MEMBERSET AUDITTRAIL = AUD002 //Calculated PERIODIC values
*XDIM_MEMBERSET ACCOUNT = XRATEIO001
*XDIM_MEMBERSET AGING_DIAS = NONE
*XDIM_MEMBERSET BANK_ID = GEN
*XDIM_MEMBERSET CO_ORDER = GEN
*XDIM_MEMBERSET CUSTOMER = GEN
*XDIM_MEMBERSET CUST_COUNTRY = GEN
*XDIM_MEMBERSET CUST_RESP = GEN
*XDIM_MEMBERSET DOC_CURR = EUR
*XDIM_MEMBERSET ENTITY = PT01
*XDIM_MEMBERSET INTERCO = I_NONE
*XDIM_MEMBERSET MAT_SALES = GEN
*XDIM_MEMBERSET PROFITCTR = GEN
*XDIM_MEMBERSET PROJECT = GEN
*XDIM_MEMBERSET PROJECT_RESP = GEN
*XDIM_MEMBERSET RPTCURRENCY = EUR
*XDIM_MEMBERSET STAT = C
*XDIM_MEMBERSET VENDOR = GEN
*XDIM_MEMBERSET TIME = %TIME_SET%

*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM FLOW               WHAT = PL_LINE                 ; WHERE = <<<                ; Using = DPL_SALES    ; Total = <<<
*DIM MATERIAL           WHAT = GEN                     ; WHERE = BAS(TOTAL)         ; Using = <<<          ; Total = <<<
*DIM CUST_SECTOR    WHAT = GEN                     ; WHERE = BAS(TOTAL II)      ; Using = <<<          ; Total = <<<
*ENDALLOCATION<br>

Please check it

P.S. What do you mean by member "TOTAL II" of CUST_SECTOR? Space inside member????

Former Member
0 Likes

Vadim,

The periodic allocation is working!

This process is to allocate the costs in Flow DPL_BASIC_PROD_COSTS to MATERIAL and CUST_SECTOR (base in % of revenue).

*DIM FLOW               WHAT = PL_LINE                 ; WHERE = <<<                ; Using = DPL_SALES    ; Total = <<<
*DIM MATERIAL           WHAT = GEN                     ; WHERE = BAS(TOTAL)         ; Using = <<<          ; Total = <<<
*DIM CUST_SECTOR    WHAT = GEN                     ; WHERE = BAS(TOTAL II)      ; Using = <<<          ; Total = <<<

Now I need to transfer the periodic results of AUD002 to cumulative results:

Flow: DPL_BASIC_PROD_COST February (in AUD002) I have to have the result of the February and January allocation. Its posible?

former_member186338
Active Contributor
0 Likes

Repeating:

P.S. What do you mean by member "TOTAL II" of CUST_SECTOR? Space inside member????

Former Member
0 Likes

This process is to allocate the costs in Flow DPL_BASIC_PROD_COSTS to MATERIAL and CUST_SECTOR (base in % of revenue).

MATERIAL - BAS(TOTAL) - Hierarchy

CUST_SECTOR - BAS(TOTAL II) - Hierarchy 2

former_member186338
Active Contributor

In order to sum results starting from the beginning of year use:

*SELECT(%Y%,YEAR,TIME,ID=%TIME_SET%)
*SELECT(%TID%,TIMEID,TIME,ID=%TIME_SET%)
*SELECT(%MONTHS%,ID,TIME,TIMEID<=%TID% AND YEAR=%Y% AND CALC=N)
*XDIM_MEMBERSET TIME=%MONTHS% //list of months from the beginning of year

*WHEN TIME
*IS *
*REC(FACTOR=1,TIME=%TIME_SET%,AUDITTRAIL=AUD001)
*ENDWHEN
former_member186338
Active Contributor
0 Likes

Space in member ID is a disaster! Can result in error at any moment. Never use.

Former Member
0 Likes

It's working 🙂

Thank you Vadim!

former_member186338
Active Contributor
0 Likes

It's absolutely strange idea to accept your own answer!

Former Member
0 Likes

Yes, but the answer to my question is in your comments....

former_member186338
Active Contributor
0 Likes

You can accept my answer with "...The idea in general: ..."

To my mind it will be correct!

former_member186338
Active Contributor
0 Likes

Sorry, but still:

1. Incorrect tag not changed

2. No BPC version: SAP BPC 10.1 SP12 - can be NW or MS????

3. No required logic described (only incorrect script provided)

4. No data sample

...

Do you really think it's possible to answer your question?

former_member186338
Active Contributor
0 Likes

P.S. Please read again:

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

1. Incorrect tag not changed - the correct tag has to be: SAP Business Planning and Consolidation, version for SAP NetWeaver

3. No required logic described (only incorrect script provided)

"Purpose: We want to allocate all indirect costs based on products revenue/Customer Sector. The allocation process should consider the monthly sales by product and customer sector." Look on the sample!

4. No data sample - Excel screenshot with data before and after allocation

And please, don't update the original question text - not possible to compare versions! Use comments to provide info!

former_member186338
Active Contributor
0 Likes

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

Describe the required logic in words and demonstrate some data sample!