Skip to Content
author's profile photo Former Member
Former Member

virtual key figures & charecteristics

hai all,

can anybody pls explain

what are virtual key figures and charecteristics

thanx in adv

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2004 at 01:03 PM

    Hi Vijay !

    Try to do a search..there are a lot of threads in these forums related to virtual char and KF...

    However, I try to do a resume...

    Virtual key figures/chars are populated at query execution time, so they can be very useful because you can apply with some code a filling logic of your object on the basis of the content of every single row of your query...

    In detail, the virtual object need to be included in the data model, so that they can be populated by the exit, and so they can be used in the query.

    Include its in all infocubes, where required.

    Also you can append these fields to existing (already populated) infocubes. It is also possible to include the fields in a multicube, however first they need to be available in at least one of the underlying basic cubes.

    Take a look to -> Services & Implementation -> HOW TO... Guides -> Guide List SAP BW 2.x -> How to ... work around the ‘Single Key Date’ limitation and How to ... Identify Comparable Results

    Also, OSS note 522235 has a good example on use of this this user-exit.

    Look also at the Feb 2004 issue of BWExpertOnline for the article "Virtual Characteristic and Key Figure Make Queries More Dynamic". There is an ABAP source available in the download section of this magazine (see

    Here is some other technical info..

    The enhancement for the virtual objects is the RSR00002 (you can see it in SMOD, where you can find also the info I copied below and also an useful example with the code)

    'BW: Virtual characteristics and key figures in Reporting

    With this enhancement, you can define and evaluate user-specific virtual characteristics and key figures.

    The components for the enhancement are the function modulesn EXIT_SAPMRSRU_001 and EXIT_SAPMRSRU_999.

    Using enhancement 001

    You must firstly define the characteristics, or key figures within the InfoCube.

    You deposit the customer-specific code in include reports. The include ZXRSRU02 is intended for function module EXIT_SAPMRSRU_001. In this include, the fields still to be processed must be listed. The name of a characteristic in field CHANM and of the processing mode in the field MODE is located in the table E_T_CHANM. Characteristics can either be processed reading (constant RRKE_C_MODE-READ) or writing (constant RRKE_C_MODE-NO_SELECTION). Table E_T_KYFNM contains the name for the key figures to be processed.

    In the include ZXRSRTOP, a global variable must be created for each InfoCube for each characteristic. Field information for the structure to be changed is stored in these variables. The name of the variables is formed from the prefix G_POS_, the name of the InfoCube,_ and the name of the InfoObject all together.

    In the include ZXRSRZZZ, a form (routine) must be created for every InfoCube. The name of this form must be made up of USER_ and the technical name of the InfoCube. The specific code for the virtual characteristics, or key figures, for this InfoCube is stored in this form. The individuals fields of the structure C_S_DATA to be changed are accessed using field symbols.

    You should note that the data records transferred can be on a different aggregation level depending on read procedure and drilldown. Moreover, compound information is not automatically changed with compounded characteristics after changing a higher-level characterisic. In addition, the compound characteristic must also be defined in the mode RRKE_C_MODE-NO_SELECTION.

    Furthermore, the fiscal year (0FISCYEAR), the fiscal year period (0FISCPER) and the fiscal year variant (0FISCVARNT) cannot be read or changed in the enhancement.

    Using enhancement 999

    Enhancement 999 may not be changed. Calling up serves to update information via the structure C_S_DATA. This functionality is completely taken over by form USER_INIT_GLOBALS.'

    More important are the performance considerations.

    Once the virtual key figure is included in the query, the OLAP processor will be required to read on the detail level, which is needed to determine the respective value. For example, should the value be determined based on the material number and the calendar day, the OLAP processor will make sure to read data on (at least) that detail level from the database – even if the user did decide not to drilldown to that level, and even if aggregates do exist on the level which the user wants to report against. (The reason for this is quite simple: Since virtual key figures are calculated dynamically at run-time, they cannot be included in aggregates).

    Hope it helps (and some points for all this guide will be really appreciated !!!!9



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Please don't use the exit RSR00002 anymore. It is replaced by the BAdI implementation RSR_OLAP_BADI (if you search these forums you'll find lots of references).

      The BAdI is easier to implement and easier to maintain.

      Best regards


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.