<

SAP BI BO Unit or Currency Logic for unknown units

Published on
10,140 Points
4,140 Views
Last Modified:
Approved

Problem Statement

In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereby the developer won’t be able to display the unit of that particular key figure in any BO report.  

Some key figures won’t make any sense unless there is a unit associated with it.  For ratios and number of days, no unit is expected.  But if the calculation is of a Revenue then Revenue getting displayed as 500 instead of 500 USD (or any other valid currency) will not be meaningful.  Also it would be OK to display 500 * (calculated revenue is in multiple currencies); i.e, if
    Revenue =A+B+C
and if A and B are in different currencies, then resultant currency should be shown as *.  But not displaying any unit/currency at all would be an issue.

Proposed Solution

In the above mentioned scenario, if Revenue is created as a local formula in a BEx query, then there is a possibility that the unit and formatted value objects of Revenue not getting generated in BO Universe.  In this case, we can still arrive at the unit or currency of Revenue by identifying the individual key figures which are part of the Revenue formula. That is, if we have the unit objects of A, B, C key figures available in the universe, then we can arrive at the unit or currency of Revenue.

The table below shows the possible scenarios for currencies of any two key figures and based on their currency values what should be the final currency:

(* indicates multiple currencies;  Null indicates no value;  Not Null indicates some valid currency)
Scenario  Currency 1  Currency 2  If C1=C2  Expected Output
========  ==========  ==========  ========  ===============
1         *           Null        False     *
2         Null        *           False     *
3         *           Not Null    False     *
4         Not Null    *           False     *
5         *           *           True      *
6         Null        Null        True      Null
7         Not Null    Not Null    True      Currency 1
8         Not Null    Not Null    False     *
9         Not Null    Null        False     Currency 1
10        Null        Not Null    False     Currency 2

Open in new window

                                                                 
The following code has been implemented in a Web Intelligence report and covers all the possible above mentioned scenarios.  Here is the formula to be used to evaluate the result of currency combination between two known currencies:
=If(Currency 1="*" Or Currency 2="*" Or (Not (IsNull(Currency 1)) And Not (IsNull(Currency 2)) And (Currency 1<>Currency 2));"*";If((Currency 1=Currency 2) Or IsNull(Currency 2);Currency 1;Currency 2)).

Open in new window

Considering the above example of Revenue=A+B+C, the above logic has to be used twice, once between A and B and a second time between C and previous result of A and B to arrive at the unit/currency of Revenue .
0
Comment
0 Comments

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

Integration Management Part 2
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month