SAP BI BO Unit or Currency Logic for unknown units

Published on
10,202 Points
Last Modified:
Community Pick

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 .

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Join & Write a Comment

If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month