Skip to Content

The application SAP BusinessObjects Planning and Consolidation version for Netweaver (SAP BPC NW) contains delivered functionality to execute allocations.  This functionality differs from the Microsoft based versions of BPC, mainly by the lack of some capability.  Nevertheless, the functionality that is provided allows quick and easy configuration of a variety of allocation scenarios.  This blog identifies the current capabilities of the allocation function for BPC version up to an including BPC 70 NW SP04.  

 

The general format for defining an allocation is:

*RUNALLOCATION

*FACTOR={expression}

*DIM {dim name} WHAT={set}; WHERE={set};[USING ={set};] [TOTAL={set}]

*DIM …

*ENDALLOCATION

 

*FACTOR

This instruction can be used to define any arithmetic expression ( written in the {expression} parameter) and may contain operands, parentheses, constants and one or both of the keywords USING and TOTAL, representing respectively the amount coming from the “USING” region (i.e. the amount of the driver) and the amount coming from the “TOTAL” region (i.e. the sum of the drivers). Another keyword supported by this parameter is COUNT, which represents the number of members into which one amount must be allocated. For example when allocating evenly a yearly value into all months of a year, the administrator may just use the COUNT keyword (defining the factor expression as 1/COUNT). In this case COUNT will automatically contain the value 12 (This keyword will obviously be more helpful in cases where the number of members is not predictable.

If omitted, the factor will always default to 1

 

There are two basic syntax definitions that can be used when defining the allocation function:

 

Format 1: this format is commonly used when an allocation is to be performed once in the script logic file.

 

*RUNALLOCATION

*FACTOR=USING/TOTAL

*DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<</p>

*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<</p>

*DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<</p>

*ENDALLOCATION

 

Format 2: this format is used when it is desirable to call an allocation multiple times within a script logic file.

 

*ALLOCATION ALLOCATE

*FACTOR=USING/TOTAL

*DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<</p>

*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<</p>

*DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<</p>

*ENDALLOCATION

*RUN_ALLOCATION ALLOCATE  

 

***************************************************************

***************************************************************

Delta functionality from the Microsoft version of BPC:

 

*APP

The *APP key word is not available in BPC 70 NW.  This of course implies that the ability to source and/or post data into applications outside of the calling application is not currently supported by BPC 70 NW.  Unfortunately, the *APP keyword is accepted by BPC70NW during script logic file validation; no error message is displayed when using *APP.  Execution of an allocation involving external application references in the *APP command line will still run, however the system will only source and/or post data from/to the home application.

 

In the following example:

*RUNALLOCATION

*FACTOR=USING/TOTAL

*APP WHAT=PLANNING; WHERE=NEWAPP; USING<<<; TOTAL<<<</p>

*DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<</p>

*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<</p>

*DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<</p>

*ENDALLOCATION

 

The intention of the developer was to post the allocated values into the application “NEWAPP”.  However during execution, the allocation function will actually post into the “PLANNING” application.

 

 

*DIM AMOUNT

In previous version of BPC, there was the ability to specify a special case of a dimension name called “AMOUNT“. This AMOUNT dimension was used to set a filter for the amounts to be allocated or to be used as drivers. For example, an allocation is only performed on members where the amount of sales is greater than zero.  As with the *APP command, this keyword is accepted during script logic validation, however it is also ignored during actual execution.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Ethan Jewett
    Sheldon,

    Thanks for that very helpful blog. Another delta from the MS version that I have noticed in my work is that in the NW version (as of SP02) variable replacement within the BAS() function does not work.

    So, for example, your example is USING=BAS(2009.TOTAL) and this works fine. But USING=BAS(%CURRYEAR%) would not replace properly.

    Not sure if this is still an issue, but I haven’t seen any notes that indicate they fix it.

    Ethan

    (0) 
    1. Sheldon Edelstein Post author
      Hi Ethan-

      You are correct in that %CURRYEAR% is not supported in BPC 70 NW, but you can use the variable %YEAR%.
       
      For the same example:
      USING=BAS(2009.TOTAL) can also be written as USING=BAS(%YEAR%.TOTAL).

      Sheldon

      (0) 
      1. Ethan Jewett
        Sheldon,

        I was actually wrong as this must have been fixed at some point. I simply meant code that looks like the following:

        *SELECT(%CURRYEAR%,ID,TIME,[ID]=2009.TOTAL)

        *RUNALLOCATION
        *FACTOR=1
        *DIM ACCOUNT WHAT=1234; WHERE=BAS(1234)
        *DIM TIME WHAT=%CURRYEAR%; WHERE=BAS(%CURRYEAR%)
        *ENDALLOCATION

        This variable replacement now works, which is great news. I’m going to have to go back and retry a bunch of things to see what else was fixed. I suppose replacement on the right side of *FOR statements might be too much to hope, but it’s next on my list to test 🙂

        (0) 
        1. Ethan Jewett
          And … I’ll correct myself again. I went back to my old notes and it’s actually an issue with replacements inside the *FOR statement.

          What I posted above works fine, but try validating this:

          *SELECT(%CURRYEAR%,ID,TIME,[ID]=2009.TOTAL)

          *FOR %CURRACCT%=1234,ABCD

          *RUNALLOCATION
          *FACTOR=1
          *DIM ACCOUNT WHAT=%CURRACCT%; WHERE=BAS(%CURRACCT%)
          *DIM TIME WHAT=%CURRYEAR%; WHERE=BAS(%CURRYEAR%)
          *ENDALLOCATION

          *NEXT

          Now %CURRYEAR% is no longer replaced anywhere. %YEAR% will not be replaced in this context either.

          (0) 
          1. Sheldon Edelstein Post author
            Hi Ethan-

            I tested the scenarios you suggested in my SP04 system, and I’m happy to report that (at least in SP04) FOR / NEXT command works correctly with ALLOCATIONS.

            The test code I used was:
            *FOR %TEST%=CE0004010, CE0004020

            *RUNALLOCATION
            *FACTOR=USING/TOTAL
            *DIM P_ACCT WHAT=%TEST%; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<<br/>*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<
            *DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<<br/>*ENDALLOCATION

            *NEXT

            and the compiled code that was executed was:
            LGX:

            *RUNALLOCATION
            *FACTOR=USING/TOTAL
            *DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<<br/>*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<<br/>*DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<<br/>*ENDALLOCATION
            *RUNALLOCATION
            *FACTOR=USING/TOTAL
            *DIM P_ACCT WHAT=CE0004020; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<<br/>*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<<br/>*DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(2009.TOTAL); TOTAL=<<<<br/>*ENDALLOCATION

            As you can see the allocation was executed for each of the FOR %TEST% variable values.

            ================================================
            ================================================
            I also tested :
            *SELECT(%CURRYEAR%,ID,TIME,[ID]=2009.TOTAL)
            *FOR %TEST%=CE0004010
            *RUNALLOCATION
            *FACTOR=USING/TOTAL
            *DIM P_ACCT WHAT=%TEST%; WHERE=CE0004020; USING=CE0004030; TOTAL=<<<<br/>*DIM ENTITY WHAT=A1000; WHERE=<<<; USING=<<<; TOTAL=<<<
            *DIM TIME WHAT=2009.JAN; WHERE=>>>; USING=BAS(%CURRYEAR%); TOTAL=<<<<br/>*ENDALLOCATION
            *NEXT

            and again found the SP04 system to execute correctly. Both variables, %CURRYEAR% and
            %TEST% was correctly substituted during execution.

            Regards,

            Sheldon

            (0) 

Leave a Reply