Skip to Content

Virtual Characteristic using BADI RSR_OLAP_BADI


I am implementing a Virtual Characteristic in a cube using BADI RSR_OLAP_BADI.

I have an Info Object loaded in the cube (ZPMORDER). My virtual characteristic (ZVIRTUAL) should be ZXPMORDER+2(3).


My steps were:

- Transaction SE19

- Definition name: RSR_OLAP_BADI

- Go to\Sample code\ Copy

Does anyone now how to update the Methods DEFINE, INITIALIZE and COMPUTE? Could you please give me samples of code?

Thank you.

Kind regards,


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 08:39 AM

    Next steps:

    Put your cube name into the filter value by adding a new line.

    Create attributes p_cha_zvirtual and p_cha_zpmorder (I assume that the name is zpmorder, if it's zxpmorder you need to replace it here and below).

    The attributes are instance/public/type I.

    The coding for DEFINE is

    DATA: l_s_chanm TYPE rrke_s_chanm,

    l_kyfnm TYPE rsd_kyfnm.


    <l_s_chanm> TYPE rrke_s_chanm.

    • CASE i_s_rkb1d-infocube.

    • WHEN 'MYCUBE'.

    • characteristic

    l_s_chanm-chanm = 'ZVIRTUAL'.

    l_s_chanm-mode = rrke_c_mode-no_selection.

    APPEND l_s_chanm TO c_t_chanm.

    l_s_chanm-chanm = 'ZPMORDER'.

    l_s_chanm-mode = rrke_c_mode-read.

    APPEND l_s_chanm TO c_t_chanm.

    The coding for compute is:

    field-symbols: <f_virt> type /bic/oizvirtual,

    <f_ord> type /bic/oizpmorder.

    if P_CHA_zvirtual > 0.

    assign component P_CHA_zvirtual of structure C_S_DATA to <f_virt>.

    if P_CHA_zpmorder > 0.

    assign component P_CHA_zpmorder of structure C_S_DATA to <f_ord>.

    <f_virt> = <f_ord>+2(3).


    clear <f_virt>.



    clear <f_virt>.


    Activate the implementation and build a query.

    Best regards


    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Dirk,

      The only thing I had to change in the code was:

      field-symbols: <f_virt> type any,

      <f_ord> type any.

      If we use field-symbols: <f_virt> type any /bic/oizvirtual the Abap program shorts dump with type conflict.

      Do you have any documentation regarding Level, Visibility and Associated Type in the Class Builder?

      Thank you very much for the quick response!

      Best regards,


  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 07:49 AM


    Samles for using the OLAP BADI can be found for example in to realize summarized display of stock values on


    Add a comment
    10|10000 characters needed characters exceeded

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.