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

Similar Messages

  • Foreign key fields not getting populated in datacontrol palette for EJB app

    Hi,
    I am quite new to ADF and EJB.I developed a jdeveloper application with JSF and EJB tiers.(I am using jdeveloper 10.1.3.5)
    For database the default HR database is used.I created the entities for the EMPLOYEES and DEPARTMENTS table.
    I also created a session bean and a data control for the session bean.
    I am having a JSF page that receives all the details of a new Employee and insert into database (i.e persistEntity)
    But the Employees constructor from the Data control palette is not populating the MANAGERID and DEPARTMENTID fields which are
    the foreign key constraints for the EMPLOYEES table and hence while trying to persist the entity
    with the auto populated fields an error message is thrown.
    If I used ADF BC instead of EJB then i could populate all the fields including MANAGERID and DEPARTMENTID.
    Is it possible to have two text fields for Manager and Department in the jsf to insert the Employee details with EJB as the Model?.
    If possible how do I bind the values of these fields to the Employees entity object in EJB.
    Kindly need your insights on this.
    Thanks,
    Guna.

    Hi,
    How are you using MANAGER_ID and DEPARTMENT_ID fields, are they exposed as Long (or some other numeric type), or did you map them on the entity, something like this
    @ManyToOne
    private Employee manager; // this by default uses the column named MANAGER_ID
    @ManyToOne
    private Department department; // this by default uses the column named DEPARTMENT_ID
    .... If you mapped them (which is the right way), when you create an employee you should set these attributes before persisting the entity, by using employee.setManager(manager) and employee.setDepartment(department). Then, the foreign keys get populated automatically by your persistence provider (Toplink).
    If you are using data controls, it is a little different process to set the department and manager, but you should take a look at this tutorial http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html , it will hopefully answer a lot of your questions.
    Pedja

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

  • BADI for populating virtual Key Figure : Exception Occurs

    Hello,
    I am using BADI for populating virtual Key Figure.
    Since my info provider in a Cube , query is built on it with addition to Virtual Key figure.
    I have used select statement for retrieving data from cube as input for the variables in BADI.
    But after debugging it , it stop or exception occurs at the select statement.
    Need help for the same.
    My code :  Cube name : ZGMR_C01
    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.
    Insert Code
      CASE i_s_rkb1d-infocube.
        WHEN 'ZGMR_C01'.
          l_s_chanm-chanm = 'ZEC_PLOAD'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          l_s_chanm-chanm = 'ZCOM_BLM'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          APPEND 'ZVKF_TTBL' TO c_t_kyfnm.
      ENDCASE.
    endmethod.
    DEFINE ******
    COMPUTE *****
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
    FIELD-SYMBOLS <fs_ZVKF_TTBL> TYPE ANY.   -
    Virtual Key Figure
    FIELD-SYMBOLS <fs_ZEC_PLOAD> TYPE ANY.  -
    Variable 1
    FIELD-SYMBOLS <fs_ZCOM_BLM> TYPE ANY.   -
    Variable 2
    DATA: l_ZVKF_TTBL TYPE /BIC/OIZVKF_TTBL.
    TYPES : BEGIN OF TY_ITAB,
    PLOAD TYPE /BIC/OIZEC_PLOAD,
    BLMONTH TYPE /BIC/OIZCOM_BLM,
    TOTBL TYPE /BIC/OIZKF_TOTBL,
    END OF TY_ITAB.
    data: IT_ITAB TYPE STANDARD TABLE OF TY_ITAB,
          WA_ITAB type TY_ITAB.
    data: IT_ITAB1 TYPE STANDARD TABLE OF TY_ITAB,
          WA_ITAB1 type TY_ITAB.
    ASSIGN COMPONENT P_KYF_ZVIR_TOT OF STRUCTURE c_s_data
    TO <fs_ZVKF_TTBL>.
    ASSIGN COMPONENT P_CHA_ZVIR_POL OF STRUCTURE c_s_data
    TO <fs_ZEC_PLOAD>.
    ASSIGN COMPONENT P_CHA_ZVIR_MON OF STRUCTURE c_s_data
    TO <fs_ZCOM_BLM>.
    break-point id z_routines.
    SELECT  /BIC/DZGMR_C011SID_ZEC_PLOAD  /BIC/DZGMR_C01TSID_0CALMONTH /BIC/VZGMR_C01F~/BIC/ZKF_TOTBL
    FROM /BIC/VZGMR_C01F
    INNER JOIN /BIC/DZGMR_C011 ON /BIC/VZGMR_C01FKEY_ZGMR_C011 = /BIC/DZGMR_C011DIMID
    INNER JOIN /BIC/DZGMR_C01T ON /BIC/VZGMR_C01FKEY_ZGMR_C01T = /BIC/DZGMR_C01TDIMID
    INTO TABLE IT_ITAB
    WHERE /BIC/DZGMR_C011~SID_ZEC_PLOAD = <fs_ZEC_PLOAD>
    AND /BIC/DZGMR_C01T~SID_0CALMONTH = <fs_ZCOM_BLM>.
    break-point id z_routines.
    LOOP AT IT_ITAB INTO WA_ITAB.
    WA_ITAB1-PLOAD = WA_ITAB-PLOAD.
    WA_ITAB1-BLMONTH = WA_ITAB-BLMONTH.
    WA_ITAB1-TOTBL = WA_ITAB-TOTBL.
    COLLECT WA_ITAB1 INTO IT_ITAB1.
    CLEAR : WA_ITAB1 , WA_ITAB.
    ENDLOOP.
    break-point id z_routines.
    IF sy-subrc EQ 0.
    <fs_ZVKF_TTBL> = WA_ITAB1-TOTBL.
    endif.
    endmethod.
    COMPUTE *****

    Exception :
    Exception CX_SY_NO_HANDLER triggered
    An exception with the type CX_SY_OPEN_SQL_DB occured, but was not handled
    This comes when i debug the BADI.

  • Assignment field is not getting populated in KSB1 for posting key 50

    Hi All,
    We are uploading entries thru excel in SAP.
    For posting key 50 assignment field is not getting populated in KSB1.
    But for posting key 40 it is getting populated correctly.
    All setting (FSG, posting key details) are same for both the keys.
    No substitution defined in SAP.
    There is no issue for FBL3N for both the posting keys, only issue with KSB1.
    Any idea what could be the reason for this?
    Thank you.
    Akash

    KSB1 is CCtr report..
    if it is revenue normally it will be treated as statistical posting in CCtr accounting- for the cost element when it is defined as revenue element.. - check Cost elements - whether it is Cost and cost reducing or revenue element--
    possibility this can be one of the reason.
    check and confirm

  • 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

  • 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

  • BW : Virtual key figures

    Hii  experts  ,
    What are virtual key figures .
    Plz explain .
    Thanks & regards ,
    Madhavi S Bichakal

    Dear Madhavi,
    Virtual Key figure
    virtual key figures are key figures within an InfoProvider that are not filled with data. Instead the key figure value is determined at runtime of the query using custom ABAP coding .
    this keyfigure is not populated with the data by using update rules. but this virtual keyfigures will detemine the value only at the runtime of the query.
    nomally when we store the key figure value in the cube as we do it for a normnal keyfigure it gives us the fact(Fixed truth ) information but by using virtual keyfigures we can show the present truth in the report.
    for example :- let say we have a transaction on 01/01/2007 for material M100 @ price of 100 and on 02/01/2007 the price of material M100 has changed to 200.
    when we store price as a normal keyfigure in the cube it will give fact i.e, 100
    but if we design the price as a virtual keyfigure it will give out present truth as 200.
    Virtual characteristics and Key figures are useful if you want to dynamically pouplate data from the fact table to the field which doesn't have any data in the fact table and also used to build an internal security model before the data gets passed to DATA_PROVIDER.
    You can get more information if you review the documentation for enhancement RSR00002.Go to SMOD type in RSR00002 and select the documentation radiobutton..
    Some ABAB coding samples:
    Virtual Characterstics & Key Figures
    Virtual Characteristic problem
    how to read characteristic variable value into virtual characteristic
    How to implement Virtual Characteristics or Virtual key figures
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5#search=%22SAP%20Customer%20Exit%20virtual%20key%20figure%22
    For more info
    You can go through the following links.
    Virtual Key Figures
    sampel code for virtual key figures
    Virtual Key Figure - ZXRSRU02
    Virtual Keyfigures and Characterisitics
    How to implement Virtual Characteristics or Virtual key figures
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20use%20variable%20time%20references%20in%20currency%20conversion
    Search for the keyword virtual keyfigure in the following link :
    https://www.sdn.sap.com/sdn/developerareas/bi.sdn?page=BW_How_To.htm
    Creating Virtual keyfigures
    you create virtual keyfigure just like create normal keyfigure (RSD2),
    populate not via transformation/transfer/update rules, but when query execution via user exit, take a look
    Virtual Characteristic problem
    virtual key figure
    http://www.bwexpertonline.com/downloads/Nissen.doc
    Also
    How to implement Virtual Characteristics or Virtual key figures
    Check post by Sree Rama Tata 
    Hope it helps
    Regards
    Bala

  • Type conflict with ASSIGN in BADI for Virtual Key Figures

    We get the below error dump in ST22 when executing BEx queries that contain virtual key figures.
    error message - 'Type conflict with ASSIGN in
    program "ZCL_IM_THR_RSR_OLAP_BADI======CP".'
    We have a BADI implementation that calculates few virtual key figures included in some infocubes & multiproviders. The error would arise if we execute two queries (containing common Virtual Key figures) one after the other without closing the first query.
    We found a note "Note 1237689 - Virtual chars. and key figures in input-ready querys" that could be relevant to our issue and wanted to apply this note but unfortunately the note is only applicable to SAPKW70016 to SAPKW70018 and we are support pack 15.
    Can you please advise what the problem could be/suggest corrections for the same.

    Hi Kulmohan,
    Did you fix your issue? We are facing the same issue. Could you please let me know if you have any solution for this issue,
    Thank you,
    Mike

  • Problems with creating badi implementation for virtual key figures

    Hi,
    I'm running BI 7.0 (unicode).
    I have been trying to follow this blog to calculate the virtual keyfigure in my infoset - Using Virtual Key Figure and Characteris in an InfoSet
    My infoset includes 1 infocube, and 3 master data infoobjects. I have created everything the blog was referring to, and activated fine. However, it seems that when the field symbols are assigned from the c_s_data structure, they do not get referenced correctly, so that no correct memory area is assigned and instead the whole c_s_data structure is assigned to the field symbol, which prevents me from referencing the right mem area correctly.
    For example, in this statement
    ASSIGN COMPONENT P_CHA_ZMYINFOSET___F120 OF STRUCTURE c_s_data
                                                                           TO  <fs_ZMYINFOSET___F120>.
    the component p_cha_zmyinfoset___F120 of c_s_data supposed to be assigned to the field symbol (point to the correct place in structure c_s_data). In other words when this statement is executed, the program looks at structure c_s_data, finds the component zmyinfoset___F120 in it, and assignes the position of that component in the structure to the field symbol, so that it could be referenced in the code. However, the correct assignment does not happen.
    When I debug the code and view the structure c_s_data, I can never find any component with any of the names I can find in my BEX query like ZMYINFOSET___F120. All I see are the components that are named like these: Z____5179 (C_S_DATA-Z____5179), C_S_DATA-S____5150, etc. I see the correct values, but components all have weired names like that. I thought in Infosets the components are named in the following fashion: INFOSETNAME___FXXX which you can see from your BEX query designer. Why is this happening? Why don't I see the correct names in the c_s_data structure? If instead I try to assign those components with their weired names directly, I still get incorrect assignment.
    what am I doing wrong?
    I was reading abap help on this statement:  assign COMPONENT comp OF STRUCTURE struc
    and the following I found:
    With this expression for mem_area, the memory area of a component comp of a structure struc is assigned to the field symbol. While the structure struc is specified directly, a data object must be specified for comp. The evaluation depends on the data type of comp:
    If the field comp has a non-text, elementary type, the content is converted to the type i and interpreted as a position of the component in the structure. if the value for comp is 0, the storage area of the entire structure is assigned to the field symbol.
    From what it says above, my value for comp is always 0, so that the entire structure is always assigned to my field symbol instead of a specific position in that structure.
    please let me know what is wrong here.
    thanks.
    Edited by: AG on Oct 11, 2008 10:41 AM
    Edited by: AG on Oct 11, 2008 10:42 AM

    Hi,
    I am facing the similar issue. Can you please tell me how you solved this problem in more details?
    which sample code and how u can find that in SE24 and where to copy that code.
    Thanks in advance..
    vamsi.

  • 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

  • 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

Maybe you are looking for

  • Help with Adobe Photoshop elements 10 download

    I have been trying for 3 days to download a copy of PSE 10. I have tried everything suggested in the forums with no luck. I even tried the direct download links and they did't work. I received a copy of PSE 10 from a promotion with EVGA. I can't unde

  • Trigger not firing in linux OS

    Hi All: Initially i am developed a form using form builder and i deployed this form in Windows OS this is working fine when i am deploying this same form in Linux OS that is not working even small trigger also not firing.so here we need to change any

  • SXMB_GET_MESSAGE_PAYLOAD Function Module

    HI Everybody, I was trying to test function module SXMB_GET_MESSAGE_PAYLOAD in SE37. I input message id from sxmb_moni. It is unable to get the payload of message for me.. Any help ? Does anyone have existing program for it ? I also want input parame

  • Integrating the drivers for the Intel WiFi Link 4965AGN in the kernel.

    Hello, I trying to build a custom kernel with only the needed things and I'm almost done; but if I try to include the drivers for that wireless card there is a message at boot time saying that the microcode could not be found. If the driver is compil

  • Lost settings and preferences on startup

    I had a very unusual problem this AM. On computer start up all my FF settings, preferences, tool bar settings, homepage were lost and FF reverted back to it's default settings. My bookmarks were still there. I've never seen that before. I did a syste