cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC Allocation Logic

Former Member
0 Kudos

Hello Expert ,

Need your help on below scenario for allocation for SKU level Planning.

I have created Dimension hierachy for like

Product Group

    - > Main Group

            ->Sub Group

                 -> SKUs

Requirement is to allocate the Product group %value  to Main Group , Allocation of Main Group %value to Sub group and Allocation of Sub group value to SKUs.

Can anybody please help me to understand how this can be achieve or dummy code for the same ?

Regards,

Ankit Prajapati

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Vadim,

Can you provide the link for that ?

former_member186338
Active Contributor
0 Kudos

Sorry, but it's a standard BPC help! Hope you know where it's located...

Former Member
0 Kudos

Hello Vadim ,

Based on business requirement decided to write the BADI for allocation logic. Could you please send me sample allocation BADI code so I can refere it and developed new one ?

former_member186338
Active Contributor
0 Kudos

BADI for allocation... it's possible but there is no "sample" badi for allocation. You have to develop it yourself. And I think that you requirements can be solved without any custom badi the way I told you before.

Vadim

Former Member
0 Kudos


Hello Vadim ,

can you give the BADI code for the  allocation script which I have developed ?

// Allocate equal values from Product to SKU for Account = VOLUME (AF)
// apr to dec

*SELECT(%VARI2%,"[ID]",U_ENTITY,"[CONTROL_LEVEL]='1'")

*FOR %VARI% = 04,05,06,07,08,09,10,11,12
*FOR %VARI3% = %VARI2%
*XDIM_MEMBERSET TIME = BAS(2014.TOTAL)

*XDIM_MEMBERSET U_CATEGORY = Plan
*XDIM_MEMBERSET U_ENTITY = BAS(INDIA)
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET U_ACCOUNT = BAS(STAT_ACCT)
*XDIM_MEMBERSET U_PRODUCT = F000000000_INP
*XDIM_MEMBERSET U_DISTCH = 10


*RUNALLOCATION
*FACTOR=USING/TOTAL

*DIM U_DISTCH     WHAT=10;              WHERE=<<<;             USING=<<<;  TOTAL=<<<
*DIM U_ACCOUNT    WHAT=VOLUME;          WHERE=<<<;             USING=<<<;  TOTAL=<<<
*DIM TIME         WHAT=2014.%VARI%;     WHERE=<<<;             USING=2013.%VARI%; TOTAL=<<<
*DIM U_CATEGORY   WHAT=Plan;            WHERE=<<<;             USING=<<<;  TOTAL=<<<
*DIM U_ENTITY     WHAT=%VARI3%;       WHERE=<<<;             USING=<<<;  TOTAL=<<<
*DIM RPTCURRENCY  WHAT=LC;              WHERE=<<<;             USING=<<<;  TOTAL=<<<
*DIM U_PRODUCT    WHAT=F000000000_INP;  WHERE=BAS(F000000000); USING=<<<;  TOTAL=<<<

*ENDALLOCATION

*NEXT

*NEXT

// jan to mar

*SELECT(%VARI4%,"[ID]",U_ENTITY,"[CONTROL_LEVEL]='1'")

*FOR %VARI6% = 01,02,03
*FOR %VARI5% = %VARI4%
*XDIM_MEMBERSET TIME = BAS(2014.TOTAL)

*XDIM_MEMBERSET U_CATEGORY = Plan
*XDIM_MEMBERSET U_ENTITY = BAS(INDIA)
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET U_ACCOUNT = BAS(STAT_ACCT)
*XDIM_MEMBERSET U_PRODUCT = F000000000_INP
*XDIM_MEMBERSET U_DISTCH = 10


*RUNALLOCATION
*FACTOR=USING/TOTAL

*DIM U_DISTCH     WHAT=10;              WHERE=<<<;             USING=<<<; TOTAL=<<<
*DIM U_ACCOUNT    WHAT=VOLUME;          WHERE=<<<;             USING=<<<; TOTAL=<<<
*DIM TIME         WHAT=2015.%VARI6%;     WHERE=<<<;             USING=2014.%VARI6%; TOTAL=<<<
*DIM U_CATEGORY   WHAT=Plan;            WHERE=<<<;             USING=<<<; TOTAL=<<<
*DIM U_ENTITY     WHAT=%VARI5%;      WHERE=<<<;      USING=<<<; TOTAL=<<<
*DIM RPTCURRENCY  WHAT=LC;              WHERE=<<<;             USING=<<<; TOTAL=<<<
*DIM U_PRODUCT    WHAT=F000000000_INP;  WHERE=BAS(F000000000); USING=<<<; TOTAL=<<<

*ENDALLOCATION

*NEXT

*NEXT

former_member186338
Active Contributor
0 Kudos

Sorry, but you have to develop it yourself! And it will take you some time... BADI development is not as simple as script creation

Vadim

Former Member
0 Kudos

Hello Vadim ,

Yes you are right I know but I am new to BADI I have never develop any BADI code so if got some idea or how to write or how we can puit allocation logic in BADI then it would be great help from your end.

former_member186338
Active Contributor
0 Kudos

If you are new to BADI then it's better to talk with qualified ABAP developer...

Vadim

Former Member
0 Kudos

If I can do that I will not asked you the same. Thanks anyway.

Former Member
0 Kudos

Hello Vadim ,

Requirment is like

If I have sales revenue at product group level and sales  revenue is say 1000 INR
and i want to allocate this value say 10% to MG1 40% to MG2 and 50% to MG3


Product group is top level node in hierachy - parent of Main group.

Now In Main Group futher it allocate to subgroup

Ex: MG2 in main group ( 40% of Product group value ) allocate to each subgroup 10% SG1 , 20% SG2 , and 10%SG3

same like at SKU level

                             Main Group          Subgroup     SKUs
                 

Product Group    10% (100)  MG1        SG1        SKU1
1000                   40% (400)  MG2        SG2        SKU2
                            50% (500)  MG3        SG3        SKU3
                           

Regards,

Ankit Prajapati

former_member186338
Active Contributor
0 Kudos

But how do you "have sales revenue at product group level and sales  revenue is say 1000 INR"?

Parent level value is a sum of base level values...

If you are talking about some special pseudo parent base level member where you store the total amount then you will also need some special account to store % of allocation. Then you will be able to run allocation of this pseudo parent member to some base members using % account.

Vadim

Former Member
0 Kudos

Hello Vadim ,

Sorry let me correct it its not sales revenue value first its for distrubutation channal

Consider somevalue to be distirbuted like you have said Total amout to be distubuted % of allocation to first product group level then prodcut group level value to be allocated % wise to main group and same like sub group and SKUs.

and Hierachy is like

Product Group->Main group->Subgroup->SKUs. and yes values also get rolled up

so yes you can say that kind of creation of dummy member of parents then store the value and the allocate.

Hope you clear about requirement ?

Any idea how to achive that ?

former_member186338
Active Contributor
0 Kudos

Please read help about *RUNALLOCATION statement in script logic, look on examples. For each parents level you will need to create required pseudo parents and run allocation for pseudo parents of the amount stored in pseudo parent of upper level. At the end allocate subgroup pseudo parents to base SKUs.

Vadim

former_member186338
Active Contributor
0 Kudos

Hi Ankit,

Can you explain what do you want to allocate with some figures! What is the value to allocate, where it's stored etc...

Vadim