Problme in geting result for formula key fig.

Hello Gurus,
i am working on inventory BW report,i request some suggestion,i need to cread 4 period based on 12 month,
and i have some problem i have created formula object
but in query its not giving any value its giving 'X'
in all values of formula object,can u please help me on this.
Thanks.

thanks v much Riccardo for reply,
I have created formula variable based on replacement patch on char(this char is for batch expiry date).
and i have used that formula variable.my problem is that i am working on Inventry query where i have to display material expiry date period wise.every thing is fine except expiry date,

Similar Messages

  • Documentation for Formula Key Figure

    Hi BW Gurus,
    I have a Formula Key Figure which has been defined in a local key figure structure. This key figure is based on a two standard Key figures which exist in the Cube.
    How can I create Documentation for this formula key figure, so that user can see documentation after right click in the Key figure in the query result.
    I have tried followings, but did not work.
    1) Go to Properities of the query and go to Documentation . In the next screen, create documentation directly using the technical name of the Formula key figure.
    2) Go to Documentation in RSA1 and create documentation using the same way(technical name).
    In the query result, I am getting error " Query element does not exist in database".
    Thanks in advance.
    Mridul

    hi ,
      Probably you should go for Cell definitions. But if you use Cell definitions, then query will slow down. But if you need the way which you described, it can be acheived by cell definitions.
    Hope it helps.......

  • BEx report -two different calculations for a result for one key figure how?

    All,
    Maybe someone could help me with the following, we have a requirement to setup for one key figure two calculations for result rows. One result (average) for one level, and on a higher level -grand total have a (sum), as for our business it makes sense to do it this way. We have setup average for this KF, we get correct results (see below values 7,5 & 6,5) however for the grand total (across multiple products) so for one level up we need to have a different calculation. How could we achieve this?
    Here is an example:
    location     product          inventory     
    AAAA     11111          5     
    AAAA     11111          5     
    AAAA     11111          10     
    AAAA     11111          10     
    AAAA     Result          7,5      ---> average
    AAAA     22222          5     
    AAAA     22222          6     
    AAAA     22222          7     
    AAAA     22222          8     
    AAAA     Result          6,5       -
    > average
    AAAA     Result (across products)          14      ---> here I want to have a sum of averages

    This could be achieve only IF you upload a hierarchy for product inventory with different levels, wherein each level show subtotals and finally grand total will be shown at the end of the results.

  • 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

  • BEx formula: Key figure divided by overall result

    Good afternoon
    I need assistance on how to do the following BEx formula please?
    I have "Sales" totals per "Dealers"
    example:
    Dealer: Sales
    A         10
    B          5
    C          6
    Overall Result  =  21
    How do I create the formula in BEx if I want to divide Sales for dealer A (10) with the 'Overall Result' Sales (21)? Note,
    Your assistance will be appreciated.
    Cj Faurie

    Create a <b>Formula</b> below the <b>Sales Key Fig</b> and use the follwoing <b>formula</b>
    <b>Sales / SUMGT ' Sales'</b>
    <b>SUMGT</b> will be available in the <b>Data Functions</b>

  • Add Val.Fld/Key Fig. for use it in KEU2

    Hi,
       Can i add a new Val.Fld/Key Fig., like a Netsales, for use it in a CO-PA cycle in a KEU2?
       Where can i define it?, because i need a formula, the total of two Val.Fld/Key Fig already defined.
    Thanks in advance.

    In method HMAC, you have towards the bottom
    catch(Exception e) {}please change this to
    catch(Exception e)
                e.printStackTrace();
            }Note that using the sun.* classes, including the sun.misc.BASE64Encoder class, requires elevated privileges (see http://forum.java.sun.com/thread.jspa?threadID=483223&messageID=2255882).
    It is not difficult to write your own encoder/decoder class, or borrow one from someone else. Just google on "java base64 encoder".

  • How to get total number of result count for particular key on cluster

    Hi-
    My application requirement is client side require only limited number of data for 'Search Key' form total records found in cluster. Also i need 'total number of result count' for that key present on the custer.
    To get subset of record i'm using IndexAwarefilter and returning only limited set each individual node. though i get total number of records present on the individual node, it is not possible to return this count to client form IndexAwarefilter (filter return only Binary set).
    Is there anyway i can get this number (total result size) on client side without returning whole chunk of data?
    Thanks in advance.
    Prashant

    user11100190 wrote:
    Hi,
    Thanks for suggesting a soultion, it works well.
    But apart from the count (cardinality), the client also expects the actual results. In this case, it seems that the filter will be executed twice (once for counting, then once again for generating actual resultset)
    Actually, we need to perform the paging. In order to achieve paging in efficient manner we need that filter returns only the PAGESIZE records and it also returns the total 'count' that meets the criteria.
    If you want to do paging, you can use the LimitFilter class.
    If you want to have paging AND total number of results, then at the moment you have to use two passes if you want to use out-of-the-box features because LimitFilter does not return the total number of results (which by the way may change between two page retrieval).
    What we currently do is, the filter puts the total count in a static variable and but returns only the first N records. The aggregator then clubs these info into a single list and returns to the client. (The List returned by aggregator contains a special entry representing the count).
    This is not really a good idea because if you have more than one user doing this operation then you will have problems storing more than one values in a single static variable and you used a cache service with a thread-pool (thread-count set to larger than one).
    We assume that the aggregator will execute immediately after the filter on the same node, this way aggregator will always read the count set by the filter.
    You can't assume this if you have multiple client threads doing the same kind of filtering operation and you have a thread-pool configured for the cache service.
    Please tell us if our approach will always work, and whether it will be efficient as compared to using Count class which requires executing filter twice.
    No it won't if you used a thread-pool. Also, it might happen that Coherence will execute the filtering and the aggregation from the same client thread multiple times on the same node if some partitions were newly moved to the node which already executed the filtering+aggregation once. I don't know anything which would even prevent this being executed on a separate thread concurrently.
    The following solution may be working, but I can't fully recommend it as it may leak memory depending on how exactly the filtering and aggregation is implemented (if it is possible that a filtering pass is done but the corresponding aggregation is not executed on the node because of some partitions moved away).
    At sending the cache.aggregate(Filter, EntryAggregator) call you should specify a unique key for each such filtering operation to both the filter and the aggregator.
    On the storage node you should have a static HashMap.
    The filter should do the following two steps while being synchronized on the HashMap.
    1. Ensure that a ConcurrentLinkedQueue object exists in a HashMap keyed by that unique key, and
    2. Enqueue the total number count you want to pass to the aggregator into that queue.
    The parallel aggregator should do the following two steps while being synchronized on the HashMap.
    1. Dequeue a single element from the queue, and return it as a partial total count.
    2. If the queue is now empty, then remove it from the HashMap.
    The parallel aggregator should return the popped number as a partial total count as part of the partial result.
    The client side of the parallel aware aggregator should sum the total counts in the partial result.
    Since the enqueueing and dequeueing may be interleaved from multiple threads, it may be possible that the partial total count returned in a result does not correspond to the data in the partial result, so you should not base anything on that assumption.
    Once again, that approach may leak memory based on how Coherence is internally implemented, so I can't recommend this approach but it may work.
    Another thought is that since returning entire cached values from an aggregation is more expensive than filtering (you have to deserialize and reserialize objects), you may still be better off by running a separate count and filter pass from the client, since for that you may not need to deserialize entries at all, so the cost on the server may be lower.
    Best regards,
    Robert

  • MOVE not used for key figs that can be aggregated (Amount) for InfoSource 0

    Hi Experts,
    I found a thread with the same subject, but the answer there was not fully satisfying to me. I guess there is a bug in delivered Business Content.
    For DataSource 0CO_OM_CCA_9 the delta update method in ROOSOURCE is ADD" that means, the extractor should deliver an additive image with recordmode "A". But in fact the extractor checker delivers the records with recordmode " " which is After-Image.
    On BW-Side the Business Content Update Rules from InfoSource 0CO_OM_CCA_9 to ODS-Object 0CCA_O09 delivers the update mode "overwriting" for the key figures i.e. 0AMOUNT. The plausibility check then shows me the same warning message RSAU198 with the description shown in subject line. But the activation of the update rules was accepted by the system.
    In my opinion the correct update mode for ODS-Object would be "overwriting" for data records with record mode " ".
    May I expect correct results in my key figure with "overwriting"?
    Does anybody have an idea what to do with this issue?
    Thanks for your help.
    Norbert

    Hello Norbert
    This is very strange...as per your issue i checked and found that
    In ROOSOURCE table Delta method is Additive
    But when i checked the extractor output it is After image " ".
    I also feel that it is a bug...
    You can report it to SAP....
    As the extractor is giving after image you can happily use overwritten in KF and that will work absolutely fine....
    Correct me if i am wrong somewhere...
    Thanks
    Tripple k

  • A formula for musical KEYS?

    Has anyone used numbers to create a formula for musical KEYS? So that, in a song with lyrics and chords above the lyrics, I could change the chords in the whole song by changing the key.
    Example:
            C          em
    I see trees of green..........
    Explanation..... I may want to change this to a higher Key for the band and a different singer and it would look like this
            D          f#m
    I see trees of green..........

    Not an insoluble problem, but...
    The major issue is that a cell in a Numbers table may contain a directly entered value or may display a value calculated by a formula in the cell. It can't contain both, and there's the rub.
    Your initial notation is likely going to be made directly into a table superimposed on the lyric sheet. Since the chord type stays the same (a seventh chord is still a seventh chord in the new key), the calculations can be made simpler by separating the note on which the chord is based (and named) from the type modifier.
    After that, the letter identifiers need to be converted to their position (in terms of half-tone count) on the scale (in the key of the original notation). Once that’s known, the last step is to retrieve the new key’s note name for each of those values.
    Here's a sample.
    So far only the simple stuff: Major chords, and no flats.
    Original key and original chords entered on the two tables at the left. Position of the tonic is retrieved from the Lookup table for use in further calculations.
    Center section contains the Lookup table and an intermediate table where the letters identifying the chord roots are translated to a number representing that note's position with respect to the original key. These tables would be on a separate sheet.
    The third section contains two tables. New Key is a copy of the Orig Key table. New chords shows the equivalent chord names for the new key signature.
    Formulas:
    Orig Key :: B2:   =OFFSET(Lookup :: $A$1,0,MATCH(A2,Lookup :: 2:2,0)-1,,)
    New Key :: B2:   =OFFSET(Lookup :: $A$1,0,MATCH(A2,Lookup :: 2:2,0)-1,,)
    (Both are the same.)
    Chord Root Position :: A1: =IFERROR(MOD(12-Orig. Key :: $B+MATCH(Orig chords :: A1,Lookup :: $2:$2)-1,12)+1,"")
    New Chords :: A1:            =IFERROR(OFFSET(Lookup :: $A$1,1,MOD(12+Chord root positions :: A1+New Key :: $B-2,12)+1),"")
    Fill each of these into all cells of its table.
    Enough for tonight. I may get a chance to look at it again tomorrow,
    Regards,
    Barry

  • Restrict Key Fig Value

    Hi,
    I have  two key fig which i want restrict with between value of that key fig and after i want to take that count of the both key fig.
    Ex
    Quantity -
    in between 10 - 20---its count
    Quantity---in between 40 - 80---its count
    Can any one help this
    Thanks
    Rama

    You can create Formula Key Figures for each of this range. Use the Boolean Operators in your formula as below.
    FKF1 : ( 'Quantity' <= 10 ) OR ( 'Quantity' >= 20 )
    FKF2 : ( 'Quantity' <= 40 ) OR ( 'Quantity' >= 80 ).
    And in the propeties of the key figure make the setting, calculate result as summation.

  • Currency Translation for Calculated Key figures

    Hello Friends I want to use the Currency Translation for Calculated Key figures.
    But when I go to Query and go to conversion tab it is always greyed out. Does that mean we can set the fixed conversion type for calculated key figures. like ZSAD Total debit - credit -flow value.
    What is the way to do fixed currency translation in query for calculated key figures.
    All the below is done now just want to specify this in query but I can'nt since it is greyed out.
    All the below is done
    I have created a Currency Translation Type " FiscperConversion" "ZVHGR" now this has Exchange Rate Type from Variable "ZVARN" (Which is a variable single value manual input on 0RTYPE Infoobject for exchange rate.)
    2. Now Currency Tab: Target Currency is selected from Variable placed in the Report. ZRPVAR.
    3. Now the Variable Time Reference is used. Standard Infoobject 0FISCPER
    which is beginning of period.

    Hi soniya
    Your calculated KF is result of some calculation ...so system will not allow u to do any translation on it...to get CT on CKF you should do it on base key figure...still if you wish to do then you can create a formula variable having processing type a customer exit...write code in cmod to rad exchange rate and multiply ur CKF by this formula variable....
    Thanks
    Tripple k

  • No drilldown option for Formulas in structure

    Hi Experts, Could you throw some light on the following issue.
    My char structure is as follows,I have a grouping done on GL and when i drill down I shd see the GL only for selections and not for formula i.e. the formula should not drilldown and show GL's.see the below example.
    Example,
    A - SALES(GL grouping)
    B - TAX &DUTIES(GL grouping)
    C - Formula (SALES  + TAX & DUTIES)
    For summarised report ,the above display is OK but when I drilldown and see GL level data,is there anyway to supress and make the formula as static(no drilldown for formula).
    Kindly guide me if there is any way out .
    Regards
    Raja Premsingh

    I think you only want to see the values for key figures A, B and C in the result rows and not in the details when you have a drilldown on GL, am I right?
    What you could do, is create a new calculated key figure to determine the number of GL's. You could use a formula variable with replacement path for constant 1 on GL, or created a a copy of key figure A with aggregation level GL and counting all values <> 0.
    Once you have a column with the number of GLs, create a formula like ( number of GLs > 1 ) * key figure A. This way, only the result rows will show values.
    Kind regards,
    Alex

  • Problem facing while cumulating the key fig

    Hi to all,Arun & gopi
    The report excecute for current month.
    Forecast values have month starting day to ending date.
    Actual values have month starting date to the present day(system date).
    According to client requirement in layout, i have to show shipmentforecast(day) and shipmenforecast(cumulate) from month starting date to ending date and shipmentactual(day) and shipmentactual(Cumulate) from month starting day to present day(system date).
    shipmentforecast(day) and shipmentactual(day) comes from cube, based on that i created shipmentforecast(cumulate) and shipmentactual(cumulate) using new selection and in properties i selected cumaulte, apply to the result, cumulate along rows.
    while cumulating, shipmentactual(cumulate) is showing corect cumulate values from month staring day to present day(system day), after present day it showing last cumulate value ( present day value) by default to remaining days.
    Even i am restricted the Actual(cumulate) with a customer exit variable( month starting date to system date ), still it showing last cumulate valye to remaing cells ( after present day to end of the month)
    i should not get this.
    In rows i taken 0calday.
    in columns i taken Key figs which are
    1) shipmentforecast(day)
    2) shipmentactual(day)
    3) shpmentforecast(cumulate)
    4) shipmentactual(cumulate)
    5) gap(cumulative) is calculated as ( NODIM ( 'Actual(Day)' ) <> 0 ) * 'Actual(Day)' - 'Foreseen(Day)' and properties i checked the cumulate.
    in filters i taken as Ocalyear/month which is restricted for current month.
    i mean total reprot has to display for  current month  days.
    and forecast(day) and forecast(cumulate) values has to display for whole month.
    actual(day) and actual(cumulate) values has to display for form starting of the month to the current day(system date)
    Please give me help.
    with regards
    m.rajnikanth reddy

    Hi to all,Arun & gopi
    The report excecute for current month.
    Forecast values have month starting day to ending date.
    Actual values have month starting date to the present day(system date).
    According to client requirement in layout, i have to show shipmentforecast(day) and shipmenforecast(cumulate) from month starting date to ending date and shipmentactual(day) and shipmentactual(Cumulate) from month starting day to present day(system date).
    shipmentforecast(day) and shipmentactual(day) comes from cube, based on that i created shipmentforecast(cumulate) and shipmentactual(cumulate) using new selection and in properties i selected cumaulte, apply to the result, cumulate along rows.
    while cumulating, shipmentactual(cumulate) is showing corect cumulate values from month staring day to present day(system day), after present day it showing last cumulate value ( present day value) by default to remaining days.
    Even i am restricted the Actual(cumulate) with a customer exit variable( month starting date to system date ), still it showing last cumulate valye to remaing cells ( after present day to end of the month)
    i should not get this extra values.
    In rows i taken 0calday.
    in columns i taken Key figs which are
    1) shipmentforecast(day)
    2) shipmentactual(day)
    3) shpmentforecast(cumulate)
    4) shipmentactual(cumulate)
    5) gap(cumulative) is calculated as ( NODIM ( 'Actual(Day)' ) <> 0 ) * 'Actual(Day)' - 'Foreseen(Day)' and properties i checked the cumulate.
    in filters i taken as Ocalyear/month which is restricted for current month.
    i mean total reprot has to display for  current month  days.
    and forecast(day) and forecast(cumulate) values has to display for whole month.
    actual(day) and actual(cumulate) values has to display for form starting of the month to the current day(system date)
    Please give me help.
    with regards
    m.rajnikanth reddy

  • Can not retrive total result for 0HDCNT_LAST(number of  employee)

    Dear all:
    We tried to create query from cube 0PA_C01. We used 0ORGUNIT and Number of Employees(0HDCNT_LAST) in the row and column.Also we created a formula to get total result of number employees by SUMGT (0HDCNT_LAST). But when we executed this query, there is no cumulative value appeared in the "total result" of bottom row. And we are not able to catch total result by formula as well. The setting for infoObject of 0HDCNT_LAST is integer and cumulative.
    Can anyone tell me what is going wrong?
    Thank you very much
    BR
    SF

    Hi Jasprit,
    I am loading the headcount (0HR_PA_0) to Actions & Headcount cube. As a part of load I have used all the standard fields of the cube. Apart from that I have populated the functional group value from Employee-Org Masterdata. As this is an time dependent.
    0HDCNT_LAST is an non-Cumulative key figure in the cube which is get populated from the 0HR_PA_0.
    I required a headcount report by functional group. So I have pulled 0HDCNT_LAST & Period into the Columns and Functional Group into Rows.
    When I run the report for headcount by function group it is showing very less value. But if run the same report by including the Employee and the functional group in the rows then it is showing the correct headcount in the result.
    I am not sure where I am missing.
    Regards,
    Tony

  • Results for % calculation with Condition

    I have a condition on my query in BEx Query Designer that limits the customers shown to ones who have a dollar value in a particular column.  I am now trying to get the results rows to take the condition into account.
    For the dollar key figures, I can just set the results calculations to "Total", and that gives me the total dollars for the customers displayed (that fit the condition), as opposed to the total dollars for ALL customers (if I didn't have the condition).  This is correct.
    However, I have another key figure that represents what percentage of one dollar key figure that another dollar key figure is.  I cannot get the result rows for this key figure to correctly show me the results of the calculation for only the values that match the condition, it keeps showing the percentages based on the full dollar quantities outside of the condition.
    Is there a way for me to get the calculation that I want?
    Query without Condition:
    Customer_____Dollars1_____Dollars2_____%
    A_____________5___________20________25
    B____________10___________20________50
    C____________10___________10_______100
    Result________25___________50________50
    Query with Condition (Dollars1 > 5) Current behavior (wrong):
    Customer_____Dollars1_____Dollars2_____%
    B____________10___________20________50
    C____________10___________10_______100
    Result________20___________30________50
    Query with Condition (Dollars1 > 5) Desired behavior (correct):
    Customer_____Dollars1_____Dollars2_____%
    B____________10___________20________50
    C____________10___________10_______100
    Result________20___________30________66
    Please Help!

    Hi,
    As i cannot see invoice document number in output so would suggest to go for nested exception aggregation.
    Create a new formula and put your aggregated keyfigure inside it and repeat the steps which i told in my last post.
    Make sure to apply it on both the keyfigures.
    If this also not works then last approach would be---
    Make a formula variable with replacement path for customer in replacement path tab choose replace variable with infoobject-replace with attribute value-attribute constant 1..in currency/unit ttab choose number..
    Now multiply your both keyfigure with this formula variable.
    Hope it helps.

Maybe you are looking for