Virtual char/KF

Hi all,
How to identify Virtual KF and Virtual characteristic at query level ?
Is there any difference (technical properties) in the info object used for virtual characteristic/KF with normal char/ KF ?
Thank you.

Hi,
I do not think there is a way to identify Virtual KF/Char at query level. Because, virt kf/char are available in the Cube but are not updated using the Updaterule/Transformations and are populated at the query runtime. These Chars and KF will have the same technical properties as well.
Thanks,
KR

Similar Messages

  • Virtual Char/KF not populated in the query ????

    Hi,
    Can anybody suggest why Virtual char/KF are not populated in Query. I just want to populate the value from existing cube characterstics/KF value.
    Code as follows:
    Cube : ZDEBC01
    Virtual Char: ZVIRTUAL1
    Virtual KF :  ZVIRTUALK
    *&  Include           ZXRSRU02
    DATA: L_S_CHANM TYPE RRKE_S_CHANM.
    CASE I_S_RKB1D-INFOCUBE.
      WHEN 'ZDEBC01'.
        L_S_CHANM-CHANM = '0SOLD_TO'.
        L_S_CHANM-MODE  = rrke_c_mode-READ.
        APPEND L_S_CHANM TO E_T_CHANM.
        L_S_CHANM-CHANM = 'ZVIRTUAL1'.
        L_S_CHANM-MODE  = rrke_c_mode-NO_SELECTION.
        APPEND L_S_CHANM TO E_T_CHANM.
        APPEND '0INVCD_QTY' TO E_T_KYFNM.
        APPEND 'ZVIRTUALK' TO E_T_KYFNM.
    ENDCASE.
    *&  Include           ZXRSRTOP
    DATA: G_POS_ZDEBC01_ZVIRTUAL1 TYPE /BIC/OIZVIRTUAL1.
    DATA: G_POS_ZDEBC01_ZVIRTUALK  TYPE I.
    DATA: G_POS_ZDEBC01_0SOLD_TO  TYPE /BI0/OISOLD_TO.
    DATA: G_POS_ZDEBC01_0INVCD_QTY TYPE I.
    *&  Include           ZXRSRZZZ
    FORM USER_ZDEBC01 USING    I_S_RKB1D TYPE RSR_S_RKB1D
                               CHANGING C_S_DATA  TYPE ANY.
      FIELD-SYMBOLS <L_ZVIRTUAL1>.
      FIELD-SYMBOLS <L_ZVIRTUALK>.
      FIELD-SYMBOLS <L_0SOLD_TO>.
      FIELD-SYMBOLS <L_0INVCD_QTY>.
      ASSIGN COMPONENT G_POS_ZDEBC01_0SOLD_TO
          OF STRUCTURE C_S_DATA TO <L_0SOLD_TO>.
      ASSIGN COMPONENT G_POS_ZDEBC01_0INVCD_QTY
          OF STRUCTURE C_S_DATA TO <L_0INVCD_QTY>.
      ASSIGN COMPONENT G_POS_ZDEBC01_ZVIRTUAL1
          OF STRUCTURE C_S_DATA TO <L_ZVIRTUAL1>.
      ASSIGN COMPONENT G_POS_ZDEBC01_ZVIRTUALK
          OF STRUCTURE C_S_DATA TO <L_ZVIRTUALK>.
      <L_ZVIRTUAL1> = <L_0SOLD_TO>+0(3).
      <L_ZVIRTUALK> = <L_0INVCD_QTY> + 1000 .
    ENDFORM.                    "USER_ZDEBC01
    Thanks,
    Debasish
    null

    Hi,
    in your code all variables:
    DATA: G_POS_ZDEBC01_ZVIRTUAL1 TYPE /BIC/OIZVIRTUAL1.
    DATA: G_POS_ZDEBC01_ZVIRTUALK TYPE I.
    DATA: G_POS_ZDEBC01_0SOLD_TO TYPE /BI0/OISOLD_TO.
    DATA: G_POS_ZDEBC01_0INVCD_QTY TYPE I.
    must be of type i.
    regards
    Siggi

  • Virtual Char error - UC_OBJECTS_NOT_CONVERTIBLE

    I posted this on BI general, but thought may be this is a better place..please respond..
    Hi all, I am trying to implement a virtual char and I foolowed the how to paper from SAP...My example is a very simple one where I want to test how this concept works. What I wanted to do is to be able to assign a constnt value to the characteristic 0PLANT, but I get the following runtime error when I test the report in RSRT.
    UC_OBJECTS_NOT_CONVERTIBLE - Data objects in Unicode programs cannot be converted.
    The statement
    "MOVE src TO dst"
    requires that the operands "dst" and "src" are convertible.
    Since this statement is in a Unicode program, the special conversion
    rules for Unicode programs apply.
    In this case, these rules were violated.
    here is the code I had in the method: IF_EX_RSR_OLAP_BADI~COMPUTE
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
    field-symbols <fs_0material> type any.
    field-symbols <fs_0plant> type any.
    data: l_plant type /BI0/OIPLANT.
    assign component p_cha_0material of structure c_s_data to <fs_0material>.
    assign component p_cha_0plant of structure c_s_data to <fs_0plant>.
    <fs_0plant> = l_plant.
    endmethod.
    I tried to search in SDN and on Service market place but could not find proper documents. Can someone help?

    Ok I am past the error message and can actually execute it throught RSRT, but I dont see the virtual chars being filled in the output result. I can see through debug mode that the Virtual char in this case ZMRPDATE getting a value and also c_s_data being filled with that value, but finally when it outputs the result in RSRT it shows nothing. Is there any step that I am missing??
    METHOD IF_EX_RSR_OLAP_BADI~COMPUTE .
    field-symbols <fs_zmrpdate> type any.
    field-symbols <fs_0material> type any.
    field-symbols <fs_0plant> type any.
    field-symbols <fs_zberw2> type any.
    data: l_plant(4) type c.
          l_plant = 'ABCD'.
    if p_cha_0plant is not initial.
    assign component p_cha_0material of structure c_s_data to <fs_0material>.
    assign component p_cha_0plant of structure c_s_data to <fs_0plant>.
    assign component p_cha_zmrpdate of structure c_s_data to <fs_zmrpdate>.
    assign component p_kyf_zberw2 of structure c_s_data to <fs_zberw2>.
    endif.
    select single /bic/zmrpdate from /bic/azpur_mdp00 into (<fs_zmrpdate>)
               where
                    material = <fs_0material> and
                    plant    = <fs_0plant>.
    <fs_0plant> = l_plant.
    <fs_0material> = l_plant.
    ******<fs_zmrpdate> = sy-datum.
    <fs_zberw2>  = '999'.
    Write afte the above step I could see that the C_S_DATA has changed, but the output result in RSRT will not the fields filled, they are still blank!!!!!!!!!!!!!!!!
    Edited by: Ram Gowda on Feb 11, 2008 11:15 AM

  • Virtual Char to fetch Navigational Attr of a Navigational Attr

    Hi,
    As per the Data volume I can delete data from my cube to include a Transitive Attribute to get the Navigational Attribute of a Navigational Attribute Information in Report.
    Other option I am considering is Virtual Charu2026.can any one please update me with the logic that I need to use.
    0CUST_SALES --> 0CUST_SALES__0PLANT -->  0PLANT__0PLANTCAT
    0CUST_SALES__0PLANT is a Nav Attribute of 0CUST_SALES
    0PLANT__0PLANTCAT is a Nav Attribute of 0PLANT
    In my cube I had 0CUST_SALES and 0CUST_SALES__0PLANT information available and my requirement is to have a Virtual Char similar to 0PLANTCAT which have to populated at query runu2026
    Thanks

    right click on the particular infoobject and say change (do it in sand box first please and get you supervisor approval because it is a lot of work to do). Know check the navigational arritbute flag, acitvate it. but please note that it will change in all the queries whereever this infoobject is used. Can anybody eloborate this process in detail step by step.
    Sharat.

  • Virtual Char and Keyfigures in Queries

    Hi Experts ,
    I have one basic Keyfigure Constrained forecast (Fc)
    for period X
    and also I have one Field "Equal Numbers" (not present in cube)
    If(FCx1=FCx2=FCx+3;u201DYu201D;u201DNu201D)
    I have to compare the 3 respective period sales.....
    the Equal number Field should be populated according to the above logic ....
    "Equal Numbers" = 'Y' or 'N'
    Fiscal year/period X (single,Mandatory) = 001.2007
    X+1 = 002.2007
    X+2 = 003.2007
    X+3= 004.2007
    How could I do this at Query level ?
    and Pelase let me know if there is any alternative solution...for this.....
    and one more thing ...
    I have one more field "Minimum Sales per a month" in the selection criteria ... Which was not there in the Cube level... and the value for this is 1Metrci Tonn to infinite....
    and also the field "Average coming 3 free periods "
    I have whih should be restricted as below...
    Average(FCx1;FCx2;FCx+3)u201D
    Filter on >Minimum sales a month
    How could I do the above those two at the Query level.....
    In cube level I have only one basic KF Constrained forecast (Fc).....
    is there any possiblity of Virtual Char/ KF .......
    Could any body help me reg this...
    Regards,
    Nagamani

    Hi Shanti,
    this is my id ..
    b.nagamani.2006     gmail
    Thanks in Advance....
    Regards,
    Nagamani

  • Virtual char and keyfig

    HI
    wt is the ue of virtual chars an keyfiures.. how r they created.... how r they different from normal keyfig..... explain .. plzzzzzzz
    <removed>
    Regards
    Rekha

    Hi Rekha,
    Virtual key figures: Will not be stored in the cube. Will be computed at run time when he query is executed. The are virtual in nature and not physical. When you view the cube's contents in listcube, you will not see it there. This is not the same as calc key figures. example: to store sales in your cube and this has o be allocated to all the group companies with a business logic, in this scenario you can code the logic in an exit and derive these virtual key figures. Another example is, when you report on no of days outstanding of your debtors. This will vary depending on when you the run the report. So, a exit can be coded to compute this run time. This is classical example of virtual key figure.
    Virtual characteristics: Same as above. Here you will derive the characteristics while report is run.
    Depending on the requirements, you must decide when to code for a virtual kf or cha and when to store them in the cube physically.
    Virtual characteristics and Key figures are useful if you want to dynamically pouplate data from the fact table to the field.
    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
    Check "how to" doc for virtual characteristic/key figure details.
    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
    Virtual key figures and charecteristcs are populated at query execution time.
    These virtual objects should be included in the modelling level itself,so that it can be used in the query while using exit in that.
    check this step by step doc:
    https://websmp106.sap-ag.de/~sapdownload/011000358700009299362001E/HOWTOIDENTIFYCOMPRESULTS.DOC
    <removed>
    Regards,
    Ravikanth

  • 'How to Do Doc' on Virtual Char & KF

    Can any one please send me How to do document on Virtual Char & KF
    Thanks

    Hi,
    Virtual key figures: Will not be stored in the cube. Will be computed at run time when he query is executed. The are virtual in nature and not physical. When you view the cube's contents in listcube, you will not see it there. This is not the same as calc key figures. example: to store sales in your cube and this has o be allocated to all the group companies with a business logic, in this scenario you can code the logic in an exit and derive these virtual key figures. Another example is, when you report on no of days outstanding of your debtors. This will vary depending on when you the run the report. So, a exit can be coded to compute this run time. This is classical example of virtual key figure.
    Virtual characteristics: Same as above. Here you will derive the characteristics while report is run.
    Depending on the requirements, you must decide when to code for a virtual kf or cha and when to store them in the cube physically.
    Virtual characteristics and Key figures are useful if you want to dynamically pouplate data from the fact table to the field.
    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
    Check "how to" doc for virtual characteristic/key figure details.
    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
    Virtual key figures and charecteristcs are populated at query execution time.
    These virtual objects should be included in the modelling level itself,so that it can be used in the query while using exit in that.
    check this step by step doc:
    https://websmp106.sap-ag.de/~sapdownload/011000358700009299362001E/HOWTOIDENTIFYCOMPRESULTS.DOC
    Regards
    Karthik

  • Urgent!!Virtual Char & KF using customer exit!!

    Hi
    Anyone explain me in easier way the steps for Virtual char & KF & where we use it??H to use it with the help of customer exit & why??
    Pls xplain me .
    thnx
    raj.

    Hi,
    A virtual characteristic / key figure can be used to derive values at
    query run time
    The virtual characteristic / key figure must be added to the cube as a
    characteristic or key figure but not filled in update rules or transfer
    rules
    Useful for determining values that are not known or determined until
    query runtime
    You will find the Doumentation and Example in SMOD for Virtual Characterstics and Keyfigures.
    for Documentation and Example.
    Goto Tcode SMOD -> Enter Enhancement as RSR00002 ,Select the Radio button Documentation -> Click on Display
    check the thread for more info...
    what are Virtual Chars & KFs
    virtual char and keyfig

  • Is it possible to use virtual chars in the aggregation level?

    Hello,
    Is it possible to use virtual chars in the aggregation level?
    thanks

    Hi.
    See answer of Mr. Gregor Dieckmann in [this topic |BI-IP: Copy planning function from virtual key figure;about virtual KF.
    Regards.

  • What are Virtual Chars & KFs

    Hi Friends,
    I am new to BW. I would like to know about Virtual Chars & key figures.
    Where can they be created ? How to create them? Whats the use of them?
    If anyone of you have any document which speaks about them , pls send it to
    [email protected]
    Thanks
    mv_d

    hi,
    A virtual characteristic / key figure can be used to derive values at
    query run time
    The virtual characteristic / key figure must be added to the cube as a
    characteristic or key figure but not filled in update rules or transfer
    rules
    Useful for determining values that are not known or determined until
    query runtime
    Cache not used – Could have performance impact
    Can be used in conjunction with variable userexit
    n The value selection made by the user for the variables can be used in
    the virtual characteristics and key figure exit.
    EXIT_SAPMRSRU_001 - BW: Definition of Virtual Characteristic
    ZXRSRTOP – Global Variable Definition Section
    ZXRSRU02 – Specify if infoobject should be read or populated during
    exit
    ZXRSRZZZ– Enhancement Coding (Update Logic)
    Transaction RSRT can be used to troubleshoot virtual characteristics
    For queries with virtual characteristics or key figures you are able to activate the use of the cache, which is deactivated by default.
    Also look at the following post for a typical scenario,
    How to implement Virtual Characteristics or Virtual key figures
    try out these links for similar issue..
    Virtual Characteristics & Virtual Keyfigures....Scenarios
    virtual chars and keyfigures
    Virtual Keyfigures and Characterisitics
    Virtual Characteristics...
    assign points if it helps....

  • Help on Virtual Chars & KFs

    Hi,
    I need some help on how to create virtual chars & KFs.
    I hv created an Info object in a DSO.
    I donno how to go abt writing the code and where.
    Can some one point me to some material on this?
    Thanks,
    Arun KK

    refer:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6378ef94-0501-0010-19a5-972687ddc9ef
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e051fda8-71a9-2a10-ac9e-8d17414a8c8c
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31

  • Virtual Char/KF Question

    Dear Experts,
       I have the following requirement:
    In my cube I have the following Chars:
    Reference #
    Clearing Date
    Net Date
    Date1
    Date2 => Virtual Charc
    I have a query with input variable as Key Date based on Infoobject Date2 in the cube. I want to restrict a Key Figure based on value of Date2.
    In my query I want to accept user input via Key Date. Then,
    If Reference# <> blank and (Clearing Date = Blank OR Clearing date GT Key Date)
      I want to assign Net Date to Date2
    else
        I want to assign value in Date1 to Date2
    I would really appreciate if someone could point me how to do it.
    I know the characteristics and Key Figures can be accessed in Virtual Char/KF implementation but my question is how can I access the value of Key Date which is a user input value in Virtual Char/KF implementation?
    Thanks.
    Regards,
    bw_newbie

    Try this document:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e473ab90-0201-0010-22ac-fdd925cac167
    It isn't exactly what you are doing, but it should be close enough to get you where you want to go...
    Brian

  • 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 Chars  and Keyfiguers

    Hi friends,
       how can we define  virtual charecterstics and Virtual keyfigures.. in the info object creation screen there is no  option to  define that object as a Virtual.. then how can we define that object as  virtual..
       and in what situation we can declare as  virtual... can you plz  give me a brief explination abt this... plz dont suggest any links... i did't got any conclusion by seeing those links..
        help ful answers  will be  highly appriciated...
    regards
    Babu

    hi babu..
    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 .(or)
    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.
    Virtual Characteristics and Virtual key figures are not part of data targets.
    By Virtual Characteristics and Virtual key figures Query performance is going to impact.because these are not part of the data targets.
    Ex: you have keyfigures profit,sales
    You are going to create a Virtual key figures say COST = sales - profit.
    so these cost is a Virtual key figures which is not part of a data target.
    when you execute particular query your OLAP processor is going to pick the data by caluclating the COST.& it impacts the query performance.
    You can get more information if you review the documentation for enhancement RSR00002.Go to SMOD type in RSR00002 and select the documentation radiobutton..
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    /people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii
    Also check these threads tooo.
    Virtual Characteristics and Virtual keyfigures
    Virtual chars and key figures
    sampel code for virtual key figures
    Virtual Key Figure
    Virtual Key Figure
    Virtual key figure
    Code for Virtual keyfigure
    virtual key figures
    See this:
    https://forums.sdn.sap.com/click.jspa?searchID=3080291&messageID=3366412
    https://forums.sdn.sap.com/click.jspa?searchID=3080291&messageID=3371606
    and
    https://forums.sdn.sap.com/click.jspa?searchID=3080292&messageID=3309795
    In SAP BW, values of key figures and characteristics do not necessarily have to be stored permanently in an InfoCube or in a master data attribute table. Virtual key figures and virtual characteristics allow the dynamic computation or derivation of values for key figures and characteristics at query execution time.
    Examples 4 Virtual Characteristics
    Dynamic categorization of key figure values such as age groups and price ranges, where the basis for calculating the categorical values is variable (as for the age).
    2.Computation of complex compound values, combining information read from the InfoCube
    with current information retrieved from other sources (e.g., master data attributes).
    Virtual key figures can be used to perform complex computations on the fly that are
    beyond the scope of the formulas available in the BEx Query Designer.
    Examples include
    1.Dynamic computation of the current age of a customer based on the current date and the birth date of the customer or the number of days on back order.
    Both virtual key figures and virtual characteristics are rarely used, as they impact query performance and the degree of flexibility in defining aggregates significantly.
    hope this helps..

  • Virtual Chars - a new problem

    Hi folks, new to the forum but been working with BW since version 1.2A!!!!
    Anyway, I have implemented Virtual KF to allow me to rank values within a report. This solution was put in place to give a certain ranking when there are drill down and drill across chars on the same page.
    The issues I have is that I would like to access different Virtual Char code depending on which query is being executed.
    Virtual KF sit at the Cube level and execute the same code whenever a qurey with that KF is executed, I need to be able execute different code for the same Virtual KF for different queries
    any ideas?
    thanks
    alan

    Hi Roberto,
    Thanks for providing Alan with information on how to assign points. This time I gave you points on his behalf.
    Contribution Recognition Program FAQ: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    Cheers,
    Linda

  • 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

Maybe you are looking for