Altius Community

Altius Consulting Community
Welcome to Altius Community Sign in | Join | Help
in Search

Glen Chambers

June 2008 - Posts

  • Increasing the SAP BI time interval to save long term plan data

    Whilst attempting to save back 10 years Long Term Plan data in a planning enabled workbook I encountered the unusual situation where only the data for the years 2008 - 2011 would save back successfully.  I investigated all the usual potential causes and found nothing obvious wrong, the query was correct the InfoProvider was set to planning mode etc. so I was a little stumped.

    The issue turned out to  be a setting in SPRO (shown in the screen shot below) that dictates the available time intervals.

    image

    You can also get to this transaction directly by using: RSRHIERARCHYVIRT

    Upon loading this screen the time interval was set to 22/04/2011, hence why data would not save back beyond this period.  To solve the issue I increased the year from 2011 to 2020, in my particular case for Calendar Year rather than Fiscal Year.   

    2008-06-10_111310

    All data then proceeded to save as expected, remember to change this setting in each of the servers in your stack (Development, QA and Production etc.) or you will experience the same issue each time.  Its worth adding a task to your system Cutover plan.

  • Listing all queries within a workbook

    I have been working on an unusual and complex planning workbook that has 32 separate queries embedded in it and was recently shown a quick and easy way to list all of them.  We have a naming convention to identify all the queries that should be in the workbook but this technique can be used to validate it because we all know that assumptions can be wrong!

    The required steps are listed below:

    1. Execute transaction SE37 to enter the Function Builder
    2. Enter the function module: RRMX_WORKBOOK_QUERIES_GET
    3. Click the Test/Execute button as highlighted in red below:
      image
    4. Enter in the workbook unique id and click the Execute button
      image 
      You can source the workbook id by clicking open workbook within BEx Analyzer, selecting the workbook and then viewing its properties.
      image
    5. Click the View All Entries button as highlighted in red below:
      image 
    6. All the queries are listed!
      image
  • Calculating the value in a BI solution: saving time & expense

    An Business Intelligence solution can be perceived as expensive but does business really spend enough time calculating the value of the benefits it can bring?

    I recently encountered a business that is replacing its manual Excel based financial reporting solution with a SAP BI 7.0 solution and quizzed an employee about whether he liked the proposed new system at the end of a User Acceptance Testing (UAT) session.  His answered that he would normally spend around a day manually preparing month end reports and more at quarter or year end.  It is a large department and there are many others in the same situation as him so lets do some math:

    • Month end: 1 day saved x 12 = 12
    • Quarter end: 2 days saved x 4 = 8
    • Year end: 2 days saved
    • Total potential days saved = 22 per person

    As an example if there are 10 other analysts in his position then you have 220 days saved per annum - basically the cost of a full time employee.  In addition they can spend more time actually analysing data rather than just compiling and preparing it!

    The solution in question will actually provide nearly all employees with access to reports that affect them and rather than just viewing huge canned reports they can filter to only the areas that they are interested in and drill down interactively.  How many days will that save and how cost savings will it help identify?

    The point is that cost is easy to calculate but value is much harder, over the expected life of a BI solution it should repay itself many times over and be worth any initial outlay.  In the current economic downturn there are many situations when it would actually be more expensive to not implement a solid BI strategy than actually to do it.

  • Dynamic BExGetData & BExSetData formulas using VBA

    If you have ever used BExSetData formulas in an Excel workbook for a planning scenario then you probably have a setup like so:

    image

    A formatted user facing worksheet containing; an area where the user enters their plan data with a BEx save data button, an area containing BExGetData formulas to either retrieve the same saved data to validate the save, bring in some other reference data or both.

    Plus a further hidden worksheet containing the BExSetData formulas that reference the values entered on the user facing worksheet (not shown above).

    Gray cells can be protected using standard Excel functionality and white cells are open for input.

    A hidden column to the left of the product list would contain the technical names or keys for each product.

    image The functional buttons are added using the BEx Analyzer design toolbar.

    Whilst this solution works well it can be quite complicated to setup and maintain in large complex workbooks.  The other downside is you are required to have two separate areas for saving and retrieving data - you can't have BExGetData formulas in the area you want to save, as soon as you entered any values the formulas would be overwritten and lost.  Another issue is that unless you have activated offline mode for your data providers the BEx formulas are shown as #NV (no value) when you open an offline workbook and are only converted back to numeric data after a refresh.

    Another method that I have used in this scenario, providing you have the VBA skills, is to dynamically generate the BExGet/SetData formulas and use the same area for retrieving AND saving data.  When the refresh button is clicked the BExGetData formula are generated, executed and the cell values updated, on save BExSetData formulas save the updated values in those cells.

    image In this way there doesn't have to be any formulas in the workbook; this is advantageous for reporting workbooks that need to be shared with users who do not have BEx Analyzer installed.

    Once built the VBA coding is remarkably generic and can be applied to many situations, all that is required is that the relevant cell ranges containing the BEx formula parameters be updated whenever new rows or columns are added or removed.  These settings can be stored on a hidden worksheet and the time spent maintaining workbooks can be dramatically decreased.

    Having a strong Microsoft programming background I took this concept one step further and developed a toolbar that provided a GUI to editing all of the settings whilst also moving all custom VBA from the workbooks to the Excel add-in.  This means that only a single code base be maintained and upgrades are accomplished simply by rolling out a new add-in to the users.  The only requirement for the workbooks is that you click the Attach Macros button in the Workbook Settings section of the BEx design toolbar, this enables the VBA to call the BExGet/Set Data formulas.

    I hope this inspires some you Excel VBA gurus out there to have a play around and see what can be accomplished with the BEx Analyzer API - my colleague wrote a useful post on the subject a while back, you can read it here: Using BEx Analyzer's API via VBA

  • Distribution via reference data keys in SAP BI Integrated Planning (IP)

    I have recently been using SAP IP distribution based on reference data planning function to perform the allocation of budget and plan expense data based on certain key values.  In my scenario all the costs generated by shared cross company functions such as HR, IT or Transportation are allocated to lower level departments based on 'allocation keys'.  These allocation keys indicate what percentage share of the total cost each department should pay.

    Using the three categories I mentioned earlier as an example the types of allocation methods you could you for each shared function are:

    • HR - Total number of staff in each department
    • IT - Total number of PC's used by each department
    • Transportation - Total number of company cars used by the department

    In some cases different measures can be used together in a formula to create more complex keys, an example would be:

    • Transportation - (Total number of company cars used by the departments * 0.90) + (Total number of staff in the department * 0.10)

    In the example above the total number of staff could be used as an indicator as to how to share out the company wide taxi and train fare costs.  The company cars would have by far the higher cost so that value makes up 90% of the formula and the number of staff just 10%.  This is just a simple and unrealistic example but you get the idea, I have seen accountants create so crazy formulas so it can be a powerful option if used correctly.  One of the hardest parts of this exercise is compiling all the data, accurately and in a format you can work with, once that is done you can start work in the SAP Planning Modeller.

    The basic high level steps are as follows: Firstly step is to create your aggregation level on top of your (likely) Multi-Provider that will join; your financial expenses data, the reference data that contains the allocation keys used to distribute the costs fairly and the key figure that you want to populate once the distribution logic has run.   Next you can create the distribution planning functions, select Distribution by Reference Data as the type. 

    Step two is to select the key figure that will contain the expense amounts you want distributed: 
    (In the example I used previously this would be the shared cross company function costs)

    image image

     

    Then select the key figure that contains the reference data distribution keys and reference values:
    (In the example I used previously this would be the total number of staff, PCs or cars etc.)

    image You also identify the key of reference data to read, that is specify how the reference data differs from the plan data; if you choose year form example the the logic will select all reference data that has the same values, except year.
    Once the planning function is executed the total expense is distributed by all departments using the reference data keys. image

    There are a couple of things worth pointing out about using this method;

    1. If you distribute £100 from HR costs to four departments at £25 each then behind the scenes -£100 is posted to the HR amount key figure, which is understandable and correct as otherwise your data would be doubled up.  If however you are required to report on that original figure at a later date then you need to ensure you have taken a copy of it first, this can easily be achieved in another planning function and the two can be linked together in a planning sequence - you just need to be careful in your reporting that you don't report these and the distributed values together in the same report for the aforementioned reasons. 
    2. It's worth noting that if you allocate by percentages and the total sums to over 100% then that total is taken as 100 and all other values weighted accordingly, for example: 10,90,20 = 120, so the new weighted values are: 8.3, 75, 16.7 = 100.

    And I'll finish with a few troubleshooting tips I picked up:

    1. Ensure that key of reference data is correct whenever the structure of the underlying InfoProviders changes.
    2. Don't go for the big bang approach! Once the planning function is built create a test query on a small sub-set of data and validate it works first.
    3. Any changes to InfoObjects used by the underlying InfoProvider that your Aggregation Level is built on will cause it to de-activate.
  • SAP & Citrix Web Server

    I have recently completed some functional testing running SAP on a remote Citrix Web Server and was pleasantly surprised by the results.  Citrix software enables software to be hosted on central servers and run remotely by the users without having to install anything except the Citrix client application.

    After starting the remote copy of the SAP GUI I was able to login to my usual SAP development system and run all of my usual BI related transactions without any issues.  The one thing I was most impressed with was the ability to run transaction RRMX with some custom parameters, open Citrix versions Excel and BEx Analyzer, automatically open a workbook and connect to my SAP BI server - potentially all without Microsoft Office or any SAP software installed on my local machine.

    I imagine that System Administrators types will be drooling at the prospect of having thousands of users working on thin client laptops without a plethora of software to install and maintain.  Company wide standardisation of software and versions would be as easy as installing or patching a single software instance. 

    There are some downsides; if the Citrix server is down so is the entire workforce and the central server would have to have some serious power to cope with so many users at once, plus you would be paying for both SAP and Citrix licenses (I have no idea what they cost).  If you want to transfer files then you have to use a shared drive rather than your own desktop.

    In summary I think that for certain groups of light use users it could be a good and viable option but a one size fits all company wide approach is unlikely to be suitable for everyone.

  • A BEx input query formula bug, a patch too far and an inelegant solution

    In the past week I created a input enabled query in BEx Analyzer to save back long term plan data over a 10 year period.  To accomplish this I used an offset variable range from the current year to current year +10, simple enough.  I then inserted the query into an Analysis Grid in an Excel workbook and used the convert to formula function as I wanted to adjust the layout of the query, moving each years associated rows into a different locations within the workbook. 

    Then something odd happened, after converting to formulas all the BExGetData cells were returning #NV (no value) with the exception of the current year!?  Also when attempting to save data to all future years using BExSetData formulas nothing would save successfully.  I re-inserted an Analysis Grid, entered some values into all years and used the Save Values function from the right-click context menu, as I had originally expected the data saved successfully, so the problem was isolated to retrieving and saving data using formulas. image

    After some unsuccessful troubleshooting attempts I escalated the issue to SAP, a few days later I got a reply - it was a bug and it is fixed in Front End Patch (FEP) 18, OK so where can I get hold of that... well actually it's not released yet.  For reference I am using Excel 2003 and BEx Analyzer 7.0 with Front End Patch 15.02.  As you can imagine this was not an ideal response, on the one hand I was amused that I had found a new bug so far in to the products release, hopefully a rare occasion by now, I must be using the product in a way that others don't - bleeding edge stuff!  On the other hand it is worrying that at even at this high patch level they haven't got it right, I have higher hopes for new new Business Objects product line.

    In case its of interest I found a solution to my problem using FEP 15.02, in the end I had to create 10 separate queries one for each year, calendar year offset +1, +2, +3 etc.  and that seemed to do the trick functionally, the obvious downside is having to create and maintain 10 queries rather than 1.  As it happens even if the patch was available I doubt I could of used it, my client uses a company wide standard patch version that has been tried and tested and you can't just rollout a new patch to hundreds of users without a serious amount of admin and time lag.

  • Using custom transaction codes as shortcuts to ABAP programs

    A neat trick to easily access a custom ABAP program built in SE38 is to add a custom transaction in SE80.

    To do this select Repository Browser, then Program from the drop down list and enter the ABAP program name.  Next right-click on the Transaction folder and select Create, finally enter in the custom transaction code in the resulting dialog box.

    image

    Then anytime you want to access the program just enter the transaction code, simple and effective.