Virtual Key Fig/Char RSR_OLAP_BADI/ RSR00002

Hi guru's,
I am trying to switch from the customer exit RSR00002 to then new RSR_OLAP_BAPI functionily. However, I can't get it working. What I did:
1. Created Implementation (SE19) ZTEST
2. Assigned the infocube
3. Following code in DEFINE:
   METHOD if_ex_rsr_olap_badi~define .
  DATA: l_s_chanm   TYPE rrke_s_chanm,
        l_kyfnm     TYPE rsd_kyfnm.
  FIELD-SYMBOLS:
        <l_s_chanm> TYPE rrke_s_chanm.
  CASE i_s_rkb1d-infocube.
    WHEN 'ZBBC4W_VK'.
*     characteristic
      l_s_chanm-chanm = 'Z_TESTJK'.
      l_s_chanm-mode  = rrke_c_mode-no_selection.
      APPEND l_s_chanm TO c_t_chanm.
  ENDCASE.
ENDMETHOD.
4. Didn't do any thing in INITIALIZE
5. Following code in COMPUTE:
METHOD IF_EX_RSR_OLAP_BADI~COMPUTE .
field-symbols <l_Z_TESTJK> TYPE ANY.
if P_CHA_Z_TESTJK > 0.
  assign component P_CHA_Z_TESTJK of structure C_S_DATA to <l_Z_TESTJK>.
  <l_Z_TESTJK> = 'TEST'.
endif.
ENDMETHOD.
6. Assigned the following attribute to the Class in (SE24):
P_CHA_Z_TESTJK Static Attr Private TYPE i.
7. Included in the Characteristic Z_TESTJK in the cube
8. runned the report and expected to see TEST for the CHAR. Instead I get # Not Assigned
Where did I go Wrong????

Stephan,
Thanks for your response. Yes I did but it didn't work.
I defined it as Private because this is the same as in the SAP document: How to… Realize summarized display of stock values on storage
Any other tips?

Similar Messages

  • Creating BADI for Virtual Key fig: Error: RSR_OLAP_BADI does not exist

    Hi,
    I am following some instructions to test the implementation of virtual key figure and came to the point to create the BADI.
    Intructions on page 5:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e051fda8-71a9-2a10-ac9e-8d17414a8c8c
    SE19
    Create Implementation; New BADI; Enhancement Spot:    RSR_OLAP_BADI
    At this point I get an error that RSR_OLAP_BADI does not exist.
    I then chose at random APB_LAUNCHPAD but this works in the sense that it took me to the next screen
    1. What does it mean by RSR_OLAP_BADI not existing?
    2. I know the instructions points to choose RSR_OLAP_BADI, but why that particular program and how does one gets to know that it is the one to use for virtual key figure/char implementation?
    3. When I tested with APB_LAUNCHPAD, I did not get the same screen on page 5 of the link, is it different for BI 7? Or, am I missing a point?
    Thanks

    Hi,
    thanks for the guidance.
    Yes, I tried to implement exactly as in the article.
    Yes, I defined the filter for the Infoprovider, as ZV*
    Are you suggesting that at this point, if in the method  if_ex_rsr_olap_badi~define, I change the value of
    "ZV_ZIPER" to my DSO or Cube, I should now see the virtual key figure in my query?
    Based on this understanding, I modified the method as follows, (my cube name is 2LIS_11_VASCL):
    method IF_EX_RSR_OLAP_BADI~DEFINE.
      DATA: l_s_chanm TYPE rrke_s_chanm,
      l_kyfnm TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
      <l_s_chanm> TYPE rrke_s_chanm.
    Insert Code
      CASE i_s_rkb1d-infocube.
    CASE i_s_rkb1d-2LIS_11_VASCL.
          WHEN '2LIS_11_VASCL'.
          l_s_chanm-chanm = 'ZVAR_SHPR'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          l_s_chanm-chanm = 'ZVARDT'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          APPEND 'ZV_20DV' TO c_t_kyfnm.
      ENDCASE.
    endmethod. "if_ex_rsr_olap_badi~define
    After activation, I checked the query and still I am not seeing the virtual key figure in the query for selection.
    Any more ideas?
    Thanks
    Edited by: Amanda Baah on May 24, 2009 8:01 AM

  • Documentation How to use Virtual Key fig.

    Hi all ,
    Can u please send me Documentation How to use Virtual Key fig. to [email protected]
    Nice weekend.

    check this doc to get a headsup on Virtual objects - though the doc talks abt the virtual char, the procedure is pretty much similar to KF too.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20use%20variable%20time%20references%20in%20currency%20conversion
    How to implement Virtual Characteristics or Virtual key figures

  • Virtual Key Figs and Virtual Chars......Perf

    Hi,
    Can anybody please brief me on Performance Factor will it increase or decrease when you use virtual chars and virtual key figures?
    Thanks,
    JB

    Hi,
    Perofrmance decreases with the use of virtual key figures and chars as the values of the objects are calculated at the runtime of the query.
    It affects worse if the amount of data thast is going for query processing is huge.
    Since using VKF is like calculating at the runtime of the queires by applying the logic needed.
    It is only reccomended in the case when the users are having no issue with the performance of the queries and are ready to wait for the output.
    Go for it when you have no other option.
    Hope it helps
    Thanks

  • Virtual Key Figures in RSR_OLAP_BADI not re-calculated correctly

    Hello BW/BI Experts!
        Please clarify why is the COMPUTE METHOD of RSR_OLAP_BADI not triggered or executed
    if you remove a drilldown to a certain characteristic.
        For instance, my query is drilled down by customer and material by default. Upon
    opening the query and after entering the appropriate selections, the virtual key figures
    that I have used in the query are correct .
        However, if you remove the drilldown by customer(for example), the virtual key figure
    is not re-computed. I was able to verify this by setting break-point in the COMPUTE
    method. However, if you drilldown by customer again, the re-calculation for the virtual
    key figure is correct likewise, if you refresh query, the results will be correct.
         Is this really the normal behavior of the said BADI? Why is it unstable? If I will
    use RSR00002(the user exit version), will I not have the same issue?
    Thanks in Advance!

    If I will use RSR00002(the user exit version), will I not have the same issue?
    I dont see any reason why this wouldnt behave the same way.
    I assume from ur post that you need to read ur customer and material to derive ur virtual KF in the BAdi. When you remove the drilldown the customer value is no more available for the exit to calculate  the KF, thats when it throws out a wrong number. I havent seen a work around for this. Please update the form if you find a solution to get the customer values into the exit even after removing the drill down.

  • Virtual Key Figures using RSR_OLAP_BADI

    Hi gurus,
    We have been using the RSR_OLAP_BADI to generate some virtual key figures for our queries, now we have a problem creating a virtual key figure...
    We have got 4 key figures in the query, 1 is a normal KF and the last 3 are virtuals, one of the virtuals uses the normal KF and splits it between the total of the same KF. The point here is that the calculations are not coming ok because the COMPUTE method does not bring the information summarized as the KF is defined, because in the same structure of the query ther are some formulas that have the same KF restricted to another level of information.
    If we remove from the query this formulas, the virtual KF works perfect because the normal KF is delivering the information summarized.
    The question is... is it normal that this happened or there may be something wrong in our definition?
    Thanks and best regards to all!!!

    Hi,
    You can get number of threads in SDN search.
    Check in the following blog
    IF_EX_RSR_OLAP_BADI~DEFINE
    https://forums.sdn.sap.com/click.jspa?searchID=23657256&messageID=6776739
    https://forums.sdn.sap.com/click.jspa?searchID=23657256&messageID=6788064
    http://sapbikk.blogspot.com/2008/05/writing-virtual-characteristics-or-key.html
    Thanks
    Reddy
    Edited by: Surendra Reddy on Mar 18, 2009 4:29 AM

  • Virtual Key Figures in RSR_OLAP_BADI COMPUTE Method not recalculated

    Hi,
    Please clarify why is the COMPUTE METHOD of RSR_OLAP_BADI not always 
    triggered or executed.
    For instance, my query is drilled down by customer and
    material by default. Upon opening the query and after entering
    the appropriate selections, the virtual key figures that I have
    used in the query are correct .
    However, if i make any change to the query and run it in RSRT, the BADi method COMPUTE is not executed.
    Is this really the normal behavior of the said BADI? Why is
    it unstable?

    Hi Rohit,
    I have a similar problem the compute method is not trigerring and i am trying to debug it but it is not breaking at all, although when i generate from rsrt it breaks at a breakpoint of define method however i have defined another break at compute method but not breaking.
    I am using the infoobject inside the query but and tried to hard code it  for testing in the compute method but doesnt seem to be getting executed.
    Please help.
    Cheers,
    Jad

  • Virtual Key Figure on Multicube (RSR_OLAP_BADI)

    I've created a virtual key figure (using RSR_OLAP_BADI) for number of days in month [zdays_month].  Everything works perfectly when it's used in a query on a cube cube.  BUT, when I try to use it in  aquery on a multi-cube, it doesn't.  The multi-cube query returns a number = the number of days in the month * the number transactions in that month. 
    Anyone know how I can force the VKF to execute after the data is returned?  I would prefer to not mess with exception aggregation, or key figure properties.  I need to keep this VERY SIMPLE for my query developers.
    Your assistance is greatly appreciated,
    Kenneth

    hi,
    first try to check whether the query access virtual kf or not, use transaction rsrt, type in the query name, and click technical info or properties, there will some line 'virtual char/kf'.
    i think the query may never access the code in BadI because in the code it's set with condition infoprovider technical name, it will cover only the infoprovider, when we access query from multiprovider, which join from one of the infoprovider, it's not automatically have the virtual kf/char, we have to specified the multiprovider name in the BadI, you may change the code as following :
    hope this helps.
    CASE i_s_rkb1d-infocube.
        WHEN '[your infocube name]'.
    ENDCASE.
    to
    IF i_s_rkb1d-infocube = [your infocube name] or
       i_s_rkb1d-infocube = [your multiprovider name].
    ENDIF.
    for other infoproviders
    CASE i_s_rkb1d-infocube.
        WHEN '[other cube name]'
    ENDCASE.

  • Virtual chars/key figs

    Hi BW gurus--
    Let me know the Purpose of Virtual chars and key figs.
    also how to handle and how to create the same.
    Regards,
    Rambo.

    Hi Rambo,
    virual chars/key figs are normally created infoobjects. They will be added to a provider, but there is no value posted to them in the provider. They will stay initial. In the relevant user exit (enhancement rsr000001) you have to implement the coding to populate the values during runtime of your query.
    You can use them
    a) to show movements without having any data posted to your provider (e.g. you can set a flag identifying a sales order for 'in time', 'due' or 'late' if you compare the run date of the query with the desired delivery date of the customer. Of course for order without having the status 'delivered'.)
    b) to create flexible classifications (e.g. sales orders amounts: 0 - 100 = class A, 101 - 1000 = class B.... if you want to change the classification based on the amounts you have to use virtual infoobjects)
    Hope this helps!
    regards
    Siggi

  • Diffrence b/n char date &key fig date

    hi experts,
    what is the diffrence b/n the date field in char &date in key fig
    in what scenario we will use this
    pl give clear idea about how to use
    thanks in advance
    venu

    Hi,
    according to me, the difference between DATE(s) as char. is you can use this
    char. as a display column or as a free char. but you'll not be able to perform any
    restrictions or use as a conditional parameter or perform any calculation on this
    DATE, whereas if the DATE is avaialbe as a keyfigure, could do all the above
    mentioned activities...that's advantage of having date as a keyfigure, to build a
    complex logical query..
    Hope it helps..
    pls. assign points if useful..
    Cheers,
    Pattan.

  • Virtual Key figures and Chars

    Can someone explain me what are virtual key figures and how to populate data for them.
    Regards
    Kunal

    AHP,
    Thanks for the help, one last question, i posted same on sdn week back, there was no proper response. I have standard LO datasource and enhanced with around 25 fields, the major problem is none of these fields are delta capable and they are coming from 13 diff tables, with great difficulty i could tie the relation between them. Most of the fields change and none them are picked,
    is there anyway i can write a program for all this fields for delta enabling. The last option which iam left is to load the data every week as full load though data volume is less, which is not practiced.
    Regards
    Kunal

  • Issue with Virtual Key Figures Using BADI

    Hi,
    We are populating values for a few virtual key figures in a query over a multiprovider through a BADI implementation(RSR_OLAP_BADI). On execution the VKF fields appear blank in the report.
    We tried debugging the methods of BADI by adding Break-Points in specific points. On doing so, we found that the values are properly updated in the 'Field-Symbols' used in the Compute method, but the same values do not appear in the report result and the fields are blank.
    Kindly provide any pointers or suggestions.
    Thanks.

    First check in <b>Technical Information</b> in <b>RSRT</b> , whether the
    <b>Virtual Char/Key</b> Fig is<b> Y</b> or <b>N</b>.

  • Access on aggregated levels with virtual key figures

    Hi all,
    I need access to the aggregated view of a BEx report within user-exit RSR00002 for processing virtual key figures. Currently I only get access to the lowest non-aggregated level.
    My requirements in detail:
    I get certain key-figures (250 historical values)on the lowest aggregation level - so-called folders. Then I have to aggregate this vector of values at the next hierarchy level up to the top-level, say along-side a company's business department structure. Drill-down, slice&dice should be possible. So far so good - this is done easily with standard BEx features.
    Then, on each aggregation level, i.e. hierarchy node, I need to get the third lowest of the 250 aggregated values to assign this to my vkf. This is not an issue of the algorithm but of the internal data representation or access to the OLAP processor because I don't get this vector on the same aggregated level such as I could see it in my BEx report but on the lowest non-aggregated folder level.
    The question is now:
    a. Is data access on aggregated levels and drill-downs because of the internal representation generally not possible within this user-exit and would I have to supply the aggragation logic myself or
    b. do I have overlooked something critical - did I miss the trick?
    Every idea or hint is deeply welcome!!
    Thanks a lot,
    Michael
    Message was edited by: Michael Kronenberger

    First check in <b>Technical Information</b> in <b>RSRT</b> , whether the
    <b>Virtual Char/Key</b> Fig is<b> Y</b> or <b>N</b>.

  • Using Virtual Key Figures/ Characteristics is possible to use in InfoSets

    Hi All,
    Is it possible Using Virtual Key Figures/ Characteristics is possible to use in InfoSets?
    I have tried all the possibilities using the BADI implementation RSR_OLAP_BADI without success.
    The VKF / Characteristics works fine when it is being used with a query based on the ODS however it is not populated when i am using the infoset. Moreover i have used the code for InfoSet as well it is not working.
    I would appreciate any help in this regard.
    Regards
    Noor

    Hi PV,
    r u sure about that, as i have tried all sort of permutation and combinations for using the same in RSR_OLAP_BADI without any luck.
    I have the got felling about the same however if you look into the following SAP note it puts me into doubt.
    Note 657690 - Virtual characteristics and key figures in InfoSets
    Note 618738 - Virtual characteristics or key figures and InfoSets.
    It describe about using the RSR00002.
    Many thanks for the information.
    Kind Regards
    Noor

  • Virtual Key figure not getting populated

    Hi All,
    I have included a virtual key figure in a multiprovider  on which the query is created and its underlying ODS.
    This issue is the virtual key figure is not getting populated . I am not sure what I am missing
    I did the following :
    1) Tried Debugging - Put a break point and execute the query in RSRT.It  did not go to the Exit. I also tried  generating the query from RSRT.
    I am using the BADI (RSR_OLAP_BADI) to populate the Vir Key Fig.
    Please guide me.
    Thanks,
    HM

    Hi All,
    Now that I am able to get the logic to come up in debug. I am faced with another issue.
    I am implementing  avery simple logic . I added a integer type key figure to the ODS and I am tryin to assign value 1 to the the key figure in the code (I am assigning 1 just ot check if the value is passed to query or not. I do have acomplex logic tha i need to implement).
    Here I am able ot see the value in the debug but in the qury the value is not populated.
    N ot sure what might be going wrong.
    code is
    l_z_avg = 1.
    <fs_zavglate> = l_z_avg .
    Appreciate help.
    Thanks,
    HM

Maybe you are looking for

  • Set document to be seen one page at a time but print four to a page?

    I would like to create a pdf (from a PowerPoint presentation) so that when it is viewed on the web it is seen one page at a time but when it is printed it prints four to a page. It is possible to put that in pdf document settings or do I have to rely

  • I downloaded iOS7 and everything went south.

    My text messaging no longer works. I cannot delete voice mails, typing is a nightmare. Please help!

  • F1 Doucmentation not found/not coming

    Please help me out for the following. when i press F1 documentation is not coming. Thanks in advance sameer

  • AppBuilder - Back button

    Hi guys, Hi Pavel, Hi Midhun, I'm having a problem with the "Back" button. It's there because on each page I've activated the "showNavButton" option.But the thing is ... it doesn't work, nothing happens. I didn't modify the default function "backBtnT

  • Slow video without Aero style

    Hi, I have z565 Lenovo notebook with Win7 Home Basic preinstalled. No drivers I didn't install by itself. When I switch display to classic or simplified Win7 display style the rate of drawing of window's frames is more slow then under Aero style. Whe