cancel
Showing results for 
Search instead for 
Did you mean: 

VIRTUAL KEY FIGURES

Former Member
0 Kudos
1,992

Hi Experts,

I know that the virtual key figures are the info objects defined in an info provider without having any physical data.

So, their values are calculated at query run time and they make the query more dynamic.

I just want to know some business scenarios where the concept of VKF is applicable.

Any input on this is highly appreciated...

Regards,

Fully_tilt

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

A virtual characteristic or a virtual key figure is an InfoObject, which is defined within the InfoProvider as metadata without having any data stored physically

Requirement:

we want to add one Keyfigure/Characteristic to query but donu2019t want to remodel our cube or in other word we want to populate that KF/Char only at query execution in such a way, which is not possible through CKF/RKF/Formula. This will make our query more dynamic and will enable us to do flexible calculations at query runtime.

Here we have a KF called ZVIRTKF; it is an Integer (Decimal type). We want to calculate its values at runtime as Source System is not giving those values and we have a requirement that we have to calculate it at Query Runtime only. So weu2019ll use it as a Virtual KF and will populate it with BAdi.

Glimpse Of BAdi:

The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. BADI's can be used any number of times, where as USER-EXITS can be used only one time.

e.g.:- if you are assigning a USER-EXIT to a project in (CMOD), then you cannot assign the same to other project. But you can use BADI's multiple times as they are Object Oriented Programming based.

In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).

For step by step creation of virtual key fig follow this link:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0c...

Former Member
0 Kudos

Hi,

Here is the Scenario:

Scenario

Virtual Characteristic / Key Figures are used when we want to determine the value of the Infoobject at

runtime for a BEx Query. Virtual Key Figure are not populated while data loading to the Cube/DSO (No

transformation rule exist for the Virtual Characteristic / Key Figure from the underlying Datasource).Virtual

Characteristic/Key Figure values are calculated using either BADI (RSR_OLAP_BADI) or Enhancement

(RSR00002).Below the Virtual Characteristic/Key Figure are used for Infoproviders (Multiprovider/Infoset),

whose values are determined using BADI (RSR_OLAP_BADI):

 Multprovider (Virtual Characteristic/Key Figure): Multiprovider (ZM_SD_O05) built on Infocube

(0SD_C03: Sales: Overview) and DSO (0SD_O05: Order: Condition Data).DSO 0SD_O05 contains

the Virtual Key Figure ZVIRTKEY (Virtual Key Figure) whose value would be calculated at query

execution.

 Infoset (Virtual Characteristic/Key Figure): Infoset (ZSD_O05_I) built on Infocube (0SD_C03:

Sales: Overview), Infoobject 0MATERIAL (Material) and DSO (0SD_O05: Order: Condition Data)

contains the Virtual Key Figure ZVIRTKEY (Virtual Key Figure) whose value would be calculated at

query execution.

See below link for more information:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90b2babc-15ad-2d10-c4b2-bd3af67d8...

Regards

amandeep