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

Similar Messages

  • 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 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.

  • 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

  • Virtual Key Figures its not populated when execute query

    Hi All
    I did a BADI for populate a Virtual Key Figure, I follow the instructions of link
    Link:[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c?quicklink=index&overridelayout=true]
    In addition I add the code section of data declarated on example of: CL_EXM_IM_RSR_OLAP_BADI section define: IF_EX_RSR_OLAP_BADI~DEFINE, only information that said:
      DATA: l_s_chanm   TYPE rrke_s_chanm,
            l_kyfnm     TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
            <l_s_chanm> TYPE rrke_s_chanm.
    I test the query on RSRT and the virtual Key Figure is "0.00" this look like if the virtual key figure is not populated.
    I did other things like:
    Set a Break Point on COMPUTE section of my BADI, I saw that the value is assigned, but I don't know how I can continue reviewing the pass of this value to result of query.
    I generate again the query on RSRT.
    My code is:
    IF_EX_RSR_OLAP_BADI~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 'ZGTO_OB2'.
          append 'ZVIRTKF' to C_T_KYFNM.
      endcase.
    endmethod. 
    IF_EX_RSR_OLAP_BADI~COMPUTE
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
      field-symbols <FS_ZVIRTKF> type any.
      P_KYF_ZVIRTKF = 16.
      assign component P_KYF_ZVIRTKF of structure C_S_DATA
      to <FS_ZVIRTKF>.
      <FS_ZVIRTKF> = 10 .
    endmethod.
    I will appreciate your recommendations, Thanks in advanced.
    Al

    Thank you very much Sanganya
    I saw this:
    I put a break point on P_KYF_ZVIRTKF = 16., then I saw that P_KYF_ZVIRTKF obtain value 16.
    Then on sentence: assign component P_KYF_ZVIRTKF of structure C_S_DATA
    to <FS_ZVIRTKF> , when the system pass this line, I review the sy-subrc and is equal 4, as I understood the ASSIGN sentence did not be complete, the value shoul be 0.
    Then when the system try to run the sentence: <FS_ZVIRTKF> = 10  the system send an Execution error that say:  GETWA_NOT_ASSIGNED...
      Error analysis
        You attempted to access an unassigned field symbol
        (data segment 32780).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    Exactly the line selected with error is:
    >>>>    <fs_zvirtkf> = '10.0'.
    I will appreciate your help
    Thank you
    Al

  • Virtual key figure BADI - does not change value

    I wrote a badi for virtual key figure according to guidelines from an SDN doc on how to create virtual chars and kf's.
    However, the value of the key figure is not changed at all. Below is my code. Please see what I'm doing wrong
    method IF_EX_RSR_OLAP_BADI~DEFINE.
       APPEND 'ZRANKS' TO c_t_kyfnm.
    endmethod.
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
      if P_KYF_ZRANKS > 0.
        assign component p_kyf_zranks of structure c_s_data
        to <fs_ranks>.
        <fs_ranks> = '1.0'.
      endif.
    endmethod.

    There is something you need to do which I have not seen described in any of the documention here.
    You need to copy the source code for the INITIALIZE method directly from the code given in the example class CL_EXM_IM_RSR_OLAP_BAPI. That is where the P_KYF<object> and P_CHA<object> attributes are assigned their values. If you do not copy this code into your own implementation, these attributes have no value in the COMPUTE method and your code will probably not work.
    Bryan

  • 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

  • Virtual Key Figures-  RSRT says Key Figures are not valid

    Hi,
    Getting the following mssg when I try to generate a query in RSRT for the first time after I have coded Virtual Key Figures.
    For the characteristic that I am pulling the user entered data from:
    /BIC/ZNEWEST is not a valid characteristic for InfoProvider 0QM_C08
    Message no. BRAIN122
    Diagnosis
    "Customer enhancement RSR00002 or the implementation of BAdI RSR_OLAB_BADI delivers /BIC/ZNEWEST as the characteristic to be calculated. 1. is however not a valid key figure for Infoprovider 0QM_C08.
    System response
    /BIC/ZNEWEST is ignored.
    Procedure
    Check the exit."
    From the key figure I am using this info to populate value:
    "/BIC/ZKF3 is not a valid key figures for InfoProvider 0QM_C08
    Message no. BRAIN121
    Diagnosis
    Customer enhancement RSR00002 or the implementation of BAdI RSR_OLAB_BADI delivers /BIC/ZKF3 as the key figure to be calculated. 1. is however not a valid key figure for Infoprovider 0QM_C08 or /BIC/ZKF3 references the key figure . In this case, the basic key figure l  is enough to calculate in the exit.
    System response
    /BIC/ZKF3 is ignored.
    Procedure
    Check the exit."
    Any help would be appreciated.
    This is my first time using Virtual KF's.
    Thanks,
    Brandon

    Hi Ajay,
    Here is my code:
          FORM user_0QM_C08                                            *
    -->  L_S_RKB1D                                                      *
    -->  C_S_DATA                                                       *
    FORM user_0QM_C08 USING l_s_rkb1d   TYPE rsr_s_rkb1d
                         CHANGING c_s_data TYPE any.
    *-- Local data
      DATA: l_n TYPE n,
            FIN1 like /bic/azqm_O5000-/BIC/ZPFINNT,
           FIN2 like /bic/azqm_O5000-/BIC/ZPFINNT,
           STAR1 like /bic/azqm_O5000-/BIC/ZPFINNT,
            STAR2 like /bic/azqm_O5000-/BIC/ZPFINNT,
            TASK type STRING.
    *-- Field Symbols
      FIELD-SYMBOLS <ZNEWEST>.
      FIELD-SYMBOLS <ZOLDEST>.
      FIELD-SYMBOLS <ZPSTARNT>.
      FIELD-SYMBOLS <ZPFINNT>.
      FIELD-SYMBOLS <ZKF3>.
      FIELD-SYMBOLS <ZKF4>.
      FIELD-SYMBOLS <0NOTIFICATN>.
    *->>> Initial checks
      SELECT SINGLE * FROM  zvir_reports
             WHERE  infocube  = l_s_rkb1d-infocube
             AND    compid    = l_s_rkb1d-compid.
      CHECK sy-subrc IS INITIAL.
    *->>> Prepare the structure
      ASSIGN COMPONENT g_pos_0QM_C08_ZNEWEST
        OF STRUCTURE c_s_data TO <ZNEWEST>.
      ASSIGN COMPONENT g_pos_0QM_C08_ZOLDEST
        OF STRUCTURE c_s_data TO <ZOLDEST>.
      ASSIGN COMPONENT g_pos_0QM_C08_ZPSTARNT
        OF STRUCTURE c_s_data TO <ZPSTARNT>.
      ASSIGN COMPONENT g_pos_0QM_C08_ZPFINNT
        OF STRUCTURE c_s_data TO <ZPFINNT>.
      ASSIGN COMPONENT g_pos_0QM_C08_0NOTIFICATN
        OF STRUCTURE c_s_data TO <0NOTIFICATN>.
    *~~~>Changeable
      ASSIGN COMPONENT g_pos_0QM_C08_zKF3
        OF STRUCTURE c_s_data TO <ZKF3>.
      ASSIGN COMPONENT g_pos_0QM_C08_zKF4
        OF STRUCTURE c_s_data TO <ZKF4>.
    *do not go thru code if user fields are blank.
      IF <znewest> IS INITIAL OR <zoldest> IS INITIAL.
      Exit.
      Endif.
    *-->>> Read general data
      CLEAR: /BIC/AZQM_O5000, FIN1, FIN2, STAR1, STAR2, TASK.
      TASK = 'SCM'.
    get Start1 time
      SELECT /BIC/ZPSTARNT   FROM  /bic/azqm_O5000 INTO STAR1
             WHERE  notificatn        EQ <0NOTIFICATN>
             AND    /bic/ZNEWEST      EQ <ZNEWEST>.
      ENDSELECT.
    Get Finish1 time
      SELECT /BIC/ZPFINNT   FROM  /bic/azqm_O5000 INTO FIN1
             WHERE  notificatn        EQ <0NOTIFICATN>
             AND    /bic/ZNEWEST      EQ TASK.
      ENDSELECT.
    Get Finish2 time & Start2 time
      SELECT /BIC/ZPFINNT /BIC/ZPSTARNT FROM  /bic/azqm_O5000 INTO (FIN2 ,
    STAR2)
             WHERE  notificatn        EQ <0NOTIFICATN>
             AND    /bic/ZOLDEST      EQ <ZOLDEST>.
      ENDSELECT.
    *- Update key figures
      <zKF3>  = abs( FIN1 - STAR2 ).
      <zKF4>  = abs( STAR1 - FIN2 ).
    ENDFORM.                    "user_0QM_C08
    Thx

  • 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>.

  • Virtual Key Figure ( Currency Problem)

    Hi All,
    I am facing one problem in virtual key figure using BADI. Need your help...
    Scenario: I have a DSO with all many fields. Requirement is to add one more VKF in DSO to get specific period balance of a GL from 0FIGL_O10 DSO and then display it as a column in Bex report. Added VKF is of type amount and unit/currency 0CURRENCY.
    Required Report Format:
    Material --- Col1 u2013 Col2 u2013 Col3(VKF)
    M1--$4, 00-$140, 00u2014<Balance form 0FIGL_O10 for a period>
    Work done so far:
    I have added a virtual key figure ZVKF_BAL in my ZSD_O06 of type amount unit/currency as 0CURRENCY. In RSR_OLAP_BADI I have added a new implementation ZVAR_IMPL.
    In class ZCL_IM_VAR_IMPL there are total three attributes.
    P_KYF_ZVKF_GL u2013 Virtual key figure
    P_CHA_0FISCPER u2013 Period is from ZSD_O06 for which we have to get the balance of a fixed GL account from 0FIGL_O10.
    Given is the code added in define method:
    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 'ZSD_O06'.
        l_s_chanm-chanm = '0FISCPER'.
        l_s_chanm-mode = rrke_c_mode-read.
        APPEND l_s_chanm TO c_t_chanm.
        APPEND 'ZVKF_GL' TO c_t_kyfnm.
      ENDCASE.
    No code added in initialize method
    Given is the code added in compute method:
    FIELD-SYMBOLS <fs_ZVKF_GL> TYPE ANY.
    FIELD-SYMBOLS <fs_0FISCPER> TYPE ANY.
    DATA :LV_FS_ZVKF_GL TYPE /BI0/OIBALANCE,  
    p_cha_0FISCPER = 8.  "ASSINGING POSITIONS TO THE FIELD AS THEY ARE NOT GETTING IT
    p_kyf_ZVKF_GL = 16.
    ASSIGN COMPONENT p_kyf_ZVKF_GL OF STRUCTURE c_s_data
                TO <fs_ZVKF_GL> .
    ASSIGN COMPONENT p_cha_0FISCPER OF STRUCTURE c_s_data
                TO <fs_0FISCPER>.
    Customized function module which will calculate the GL Balance.
      CALL FUNCTION 'ZGLBALANCE'
        EXPORTING
         FISCPER_I    = <fs_0FISCPER>
         GL_ACCOUNT_I = '0000476000'
        IMPORTING
          BALANCE_O    = LV_FS_ZVKF_GL.
    <fs_ZVKF_GL> = LV_FS_ZVKF_GL.
    Code of ZGLBALANCE:
    DATA: lv0_fiscal type /BI0/OIFISCPER.
    DATA :  X TYPE I VALUE 0,
    types: BEGIN OF ty_/BI0/AFIGL_O1000,
           FISCPER type /BI0/OIFISCPER,
           GL_ACCOUNT type /BI0/OIGL_ACCOUNT,
           BALANCE type /BI0/OIBALANCE,
           CURRENCY TYPE /BI0/OICURRENCY,
            END OF ty_/BI0/AFIGL_O1000.
    data: it_/BI0/AFIGL_O1000 type TABLE OF ty_/BI0/AFIGL_O1000, " Internal table
          wa_/BI0/AFIGL_O1000 type ty_/BI0/AFIGL_O1000.          " Work area
    select single FISCPER GL_ACCOUNT BALANCE CURRENCY from /BI0/AFIGL_O1000 into CORRESPONDING FIELDS OF TABLE it_/BI0/AFIGL_O1000 where GL_ACCOUNT eq GL_ACCOUNT_I and FISCPER eq FISCPER_I and CURRENCY = 'USD'.
    BALANCE_O = X .
    Problem:
    We are getting the balance values but it is coming with numeral with postfix ERROR.
    M1--$4, 00-$140, 00u201412,00 ERROR
    M2--$24, 00-$130, 00u201414,00 ERROR
    Is it something to do with currency? Please let us know what is worng in code?
    If yes please let me know how to get the currency along with the numeric values there in the report.
    Thanks & Regards,
    Mayank

    Hello mayankmishra135,
    Were you able to find a solution for this? I am facing the same issue (with the ERROR in the currency field), wuold appreciate your help.
    Best regards,
    Aleksander Dyl

  • Virtual Key Figure - Cumulation

    Hi all,
    I am trying to cumulate a virtual key figure for all fiscal periods one by one but I want to sort the Fiscal periods in the badi RSR_OLAP_BADI as if the fiscal periods are not sorted then the cumulation does not happen correctly.Could anybody please guide how to access the entire data set of the query in the badi COMPUTE method...What I am getting is only a record by record access in the method.
    Rgds
    Amit

    While Generating the Query it goes to the Break Point , but not where key figure is getting calculated.
    But after that if i execute Query still its teh same

  • Problems using virtual key figures

    Hi experts,
    I have got 2 questions regarding virtual key figures, by using the OLAP BADI
    1. Is there a chance to get the variable values out of the variable selection screen in the BADI implemtentation? If so, how?.
    2. In the compute method the assign does not work because the Attributes (p_kyf_ZIMCREDAY, p_cha_0material,p_cha_0calday)  are 0 all the time.
        How does the attribute get a correct assignment to a component name? See my coding of the define and compute method below.
    Thanks and Regards, Mario
    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 'ZD_IMC001'.
    l_s_chanm-chanm = '0MATERIAL'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    l_s_chanm-chanm = '0CALDAY'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    APPEND 'ZIMCREDAY' TO c_t_kyfnm.
    ENDCASE.
    IF_EX_RSR_OLAP_BADI~COMPUTE
    FIELD-SYMBOLS <fs_ZIMCREDAY> TYPE ANY.
    FIELD-SYMBOLS <fs_material> TYPE ANY.
    FIELD-SYMBOLS : <fs_calday> TYPE ANY.
    ASSIGN COMPONENT p_kyf_ZIMCREDAY OF STRUCTURE c_s_data
    TO <fs_ZIMCREDAY>.
    ASSIGN COMPONENT p_cha_0material OF STRUCTURE c_s_data "p_cha_0material
    TO <fs_material>.
    ASSIGN COMPONENT p_cha_0calday OF STRUCTURE c_s_data "p_cha_0calday
    TO <fs_calday>.

    Regarding 1.
    I checked in debugging the variable I_TH_SFC in the initialize method, but there is no information regarding the selections in the variable popup.
    Can you please explain in detail how to access the variable values.
    Regarding 2.
    I changed l_s_chanm-mode to rrke_c_mode-no_selection according to your recommendation.
    Unfortunately it´s still the same. The attributes still does have the value 0. Therefore the assign does not work correct.
    The attributes are defined with type i. But the component names are like 'K____132'. Is this the cause of the problem?
    Thanks, Mario

  • BEX - Virtual key-figure

    Hi gentlemen,
    I am facing a problem with a BADI that I created for populating a virtual key figure.
    I simply want to read a masterdata table and populate a key figure. When executing the query, a dump occurs with a very explicit explanation. Unfortunately, I don't know how to solve it.
    Dump:
    You attempted to assign a field to a typed field symbol,
    but the field does not have the required type.      
    Attributes in the BADI:
    P_CHA_0PLANT     Instance Attribute     Private     Type     I     Plant
    P_KYF_ZSHPQTEUT     Instance Attribute     Private     Type     I     Shipment quantity EUT
    See below.
    Define:
    method IF_EX_RSR_OLAP_BADI~DEFINE.
    DATA: l_s_chanm like line of c_t_chanm.
    DATA: l_kyfnm TYPE rsd_kyfnm.
    CASE i_s_rkb1d-infocube.
        WHEN 'ZFM_M01'.
          l_s_chanm-chanm = '0PLANT'.
          l_s_chanm-mode  = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
    l_kyfnm = 'ZSHPQTEUT'.
    APPEND l_kyfnm TO c_t_kyfnm.
    endcase.
    ENDMETHOD. "if_ex_rsr_olap_badi~define   "
    Compute:
    METHOD if_ex_rsr_olap_badi~compute .
      FIELD-SYMBOLS: <fs_ZSHPQTEUT> TYPE /BIC/OIZSHPQTEUT.
      FIELD-SYMBOLS: <fs_0PLANT> TYPE /BI0/OIPLANT.
      ASSIGN COMPONENT P_CHA_0PLANT OF STRUCTURE c_s_data
      TO <fs_0PLANT>.
      ASSIGN COMPONENT P_KYF_ZSHPQTEUT OF STRUCTURE c_s_data
      TO <fs_ZSHPQTEUT>.
      SELECT /BIC/ZSHPQTEUT
      INTO <fs_ZSHPQTEUT>
      UP TO 1 ROWS
      FROM /BI0/PPLANT
      WHERE PLANT = <fs_0PLANT>.
      ENDSELECT.
    ENDMETHOD.
    Thank you in advance.
    Jacques

    Hi Jacques,
    Please include 2 changes:
    1. As suggested by Jen, declare Field Symbols with type ANY.
    2. Instead of directly using Field symbol values in the select query, create 2 temporary variables of type string and use them.
    After changes the method COMPUTE would look like below:
    METHOD if_ex_rsr_olap_badi~compute.
    FIELD-SYMBOLS: <fs_ZSHPQTEUT> TYPE ANY.
    FIELD-SYMBOLS: <fs_0PLANT> TYPE ANY.
    ASSIGN COMPONENT P_CHA_0PLANT OF STRUCTURE c_s_data
    TO <fs_0PLANT>.
    ASSIGN COMPONENT P_KYF_ZSHPQTEUT OF STRUCTURE c_s_data
    TO <fs_ZSHPQTEUT>.
    DATA tp_shpqty type string.
    DATA tp_plnt  type string.
    IF <fs_0PLANT> is ASSIGNED.
    tp_plnt = <fs_0PLANT>.
    ENDIF.
    SELECT SINGLE  /BIC/ZSHPQTEUT
    INTO tp_shpqty
    FROM /BI0/PPLANT
    WHERE PLANT = tp_plnt.
    IF <fs_ZSHPQTEUT> is ASSIGNED.
    <fs_ZSHPQTEUT> = tp_shpqty.
    ENDIF.
    ENDMETHOD.
    Regards,
    Hemant Khemani

  • Help needed for Virtual Key Figure BADI

    I am trying to implement Virtual Key Figures via BADI.
    Here is what I have done
    Define Method
    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.
    WHEN 'ZMCOPA_02'.
      l_s_chanm-chanm = '0CUSTOMER'.
      l_s_chanm-mode = rrke_c_mode-read.
      APPEND l_s_chanm TO c_t_chanm.
      APPEND 'ZCPRC_FLG' TO c_t_kyfnm.
      APPEND 'ZRTNS_PRC' TO c_t_kyfnm.
    ENDCASE.
    ENDMETHOD. "if_ex_rsr_olap_badi~define
    Compute Method
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
    FIELD-SYMBOLS <fs_ZRTNS_PRC> TYPE ANY.
    FIELD-SYMBOLS <fs_ZCPRC_FLG> TYPE ANY.
    FIELD-SYMBOLS <fs_0customer> TYPE ANY.
    DATA: l_zv_20dv TYPE curr09.
    ASSIGN COMPONENT p_kyf_ZRTNS_PRC OF STRUCTURE c_s_data
    TO <fs_ZCPRC_FLG>.
    ASSIGN COMPONENT p_kyf_ZCPRC_FLG OF STRUCTURE c_s_data
    TO <fs_ZCPRC_FLG>.
    ASSIGN COMPONENT p_cha_0customer OF STRUCTURE c_s_data
    TO <fs_0customer>.
      DATA: l_zrtns_prc TYPE /bic/pzcust_prc-/BIC/ZRTNS_PRC.
      DATA: lt_zcust_prc TYPE TABLE OF /bic/pzcust_prc.
      DATA: ls_zcust_prc TYPE /bic/pzcust_prc.
      IF NOT p_cha_0customer IS INITIAL.
      <fs_0customer> =
      ENDIF.
    SELECT SINGLE *
      INTO ls_zcust_prc
      FROM /bic/pzcust_prc
      WHERE /bic/zcust_prc = <fs_0customer>.
    IF sy-subrc = 0.
      <fs_ZCPRC_FLG> = 1.
      <fs_ZRTNS_PRC> = ls_zcust_prc-/BIC/ZRTNS_PRC.
    ELSE.
      <fs_ZCPRC_FLG> = 0.
      <fs_ZRTNS_PRC> = 0.
    ENDIF.
    endmethod.
    I have commented out line in the Compute method because I was getting an error on my SELECT statement.  I think the error is due to the fact that <fs_0customer> is not being populated.
    In debug mode, p_kyf_ZRTNS_PRC, p_kyf_ZCPRC_FLG and p_cha_0customer all return 0.  Shouldn't they have a different value.  I have to admit that I don't really understand how ASSIGN COMPONENT works.
    I have defined p_kyf_ZRTNS_PRC, p_kyf_ZCPRC_FLG and p_cha_0customer in the Attribute tab.
    Any help would be appreciated.  I have spent several hours trying to figure out how this works.
    Thanks.
    Ryan

    Check this if it helps:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e051fda8-71a9-2a10-ac9e-8d17414a8c8c

Maybe you are looking for

  • WAD - Use NO_OUTPUT parameter on a new window

    I am using BW3.51 I have been requested to build a front end to some BW reports. The design has a web page that acts as the front end, where the user selects the options, and then clicks a button to open a new window which runs the BW report. The des

  • SRMSUS_SELFREG Partner not found

    When EBP business partner is copied to SUS via BBP_SP_SUPP_INI, an email is sent to the vendor with a registration ID that allows this vendor to create an admin user in SUS. This function is standard in SUS and is one of the main reasons we're using

  • Re: Establishing dest DN of a source attribute in source DN form

    jimc wrote: > Message: Code(-8003) Unable to synchronize reference to CN=Mr Howard > Jones,OU=dept1,OU=bld1,OU=ntest,OU=Nth,OU=edir,DC= prlnwdev,DC=surreycc,DC=gov, > DC=uk from attribute Member. Looks like the Howard Jones is not associated - check

  • OWSM problem in OSB 11g

    I'm running Oracle Service Bug 11gR1 PS3 (11.1.1.4). At installation I choose the domain extension options to enable for OWSM and also included EM to act as an OWSM, but in Proxy service i am not able to see policy tab. Please suggest me that any con

  • Why can't iMovie on iOS create portrait movies?

    If I take a video on my iPhone in portrait mode and then import it into iMovie for editing, iMovie always crops it. Why can't iMovie on iOS create portrait videos? Splice can create portrait videos!!! Martin