Cumulated KeyFigure.

Hi: Here is my question:
The user enters a Year/Month.
Then in the query i must show a KF with this values:
- Cumulated from January to Month entered, Year-1
- Cumulated from January to Month entered, Year
Lets say the user entered: June 2009
The KF must be shown:
- Cumulated from January to June, 2008
- Cumulated from January to June, 2009
How can this be done?
Thanks.

Suppose your first variable is ZMON1 and other is ZMON2...and the user inputs ZCMON then use the code below..
WHEN 'ZMON1'.
    IF I_STEP = 2.
      CLEAR: L_S_RANGE, LOC_VAR_RANGE.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT  = 'BT'.
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZCMON'.
       concatenate LOC_VAR_RANGE-LOW+0(4) '01' into l_s_range-low.
       l_s_range-high = loc_var_range-low.
      APPEND L_S_RANGE TO E_T_RANGE.
      ENDLOOP.
    ENDIF.
WHEN 'ZMON2'.
    IF I_STEP = 2.
      CLEAR: L_S_RANGE, LOC_VAR_RANGE.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT  = 'BT'.
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZCMON'.
       year = LOC_VAR_RANGE-low+0(4).
       year = year - 1.
       concatenate year '01' into l_s_range-low.
       concatenate year loc_var_range-low+4(2) into l_s_range-high.
      APPEND L_S_RANGE TO E_T_RANGE.
      ENDLOOP.
    ENDIF.
Edited by: mansi dandavate on Jul 2, 2009 8:43 AM

Similar Messages

  • Non-Cumulative vs. Cumulative KeyFigures for Inventory Cube Implementation?

    A non-cumulative is a non-aggregating key figure on the level of one or more objects, which is always displayed in relation to time. Generally speaking, in SAP BI data modeling, there are two options for non-cumulative management. First option is to use non-cumulative management with non-cumulative key figures. Second option is to use non-cumulative management with normal key figures (cumulative key figures). For SAP inventory management, 0IC_C03 is a standard business content cube based upon the option of non-cumulative management with non-Cumulative key figures. Due to specific business requirements (this cube is designed primarily for detailed inventory balance reconciliation, we have to enhance 0IC_C03 to add additional characteristics such as Doc Number, Movement type and so on. The original estimated size of the cube is about 100 million records since we are extracting all history records from ECC (inception to date). We spent a lot of time to debate on if we should use non-cumulative key figures based upon the  standard business content of 0IC_C03 cube. We understand that, by using Non-Cumulative key figures, the fact table will be smaller (potentially). But, there are some disadvantages such as following:
    (1) We cannot use the InfoCube together with another InfoCube with non-cumulative key figures in a MultiProvider.
    (2) The query runtime can be affected by the calculation of the non-cumulative.
    (3) The InfoCube cannot logically partition by time characteristics (e.g. fiscal year) which makes it difficult for future archiving.
    (4) It is more difficult to maintain non-cumulative InfoCube since we have added more granularity (more characteristics) into the cube.
    Thus, we have decided not to use the Cumulative key figures. Instead, we are using cumulative key figures such as Receipt Stock Quantity (0RECTOTSTCK) ,  Issue Stock Quantity(0ISSTOTSTCK)
    , Receipt Valuated Stock Value (0RECVS_VAL) and Issue Valuated Stock Value (0ISSVS_VAL). All of those four key figures are available in the InfoCube and are calculated during the update process. Based upon the study of reporting requirements, those four key figures seems to be sufficient to meet all reporting requirements.
    In addition, since we have decided not to use cumulative key figures, we have removed non-cumulative key figures from the 0IC_C03 InfoCube and logically partitioned the cube by fiscal year. Furthermore, those InfoCube are fiscally partitioned by fiscal year/period as well.
    To a large extent, we are going away from the standard business content cube, and we have a pretty customized cube here. We'd like to use this opportunity to seek some guidance from SAP BI experts. Specifically, we want to understand what we are losing here by not using non-cumulative key figures as provided by original 0IC_C03  business content cube. Your honest suggestions and comment are greatly appreciated!

    Hello Marc,
    Thanks for the reply.
    I work for Dongxin, and would like to add couple of points to the original question...
    Based on the requirements, we decided to add Doc Number and Movement type along few other characteristics into the InfoCube (Custom InfoCube - article movements) as once we added these characteristics the Non Cumulative keyfigures even when the marker was properly set were not handling the stock values (balance) and the movements the right way causing data inconsistency issues.
    So, we are just using the Cumulative keyfigures and have decided to do the logical partitioning on fiscal year (as posting period is used to derive the time characteristics and compared to MC.1 makes more sense for comparison between ECC and BI.
    Also, I have gone through the How to manual for Inventory and in either case the reporting requirement is Inception to date (not just weekly or monthly snapshot).
    We would like to confirm if there would be any long term issues doing so.
    To optimize the performance we are planning to create aggregates at plant level.
    Couple of other points we took into consideration for using cumulative keyfigures are:
    1. Parallel processes possible if non-cumulative keyfigures are not used.
    2. Aggregates on fixed Plant possible if non-cumulative keyfigures are not used. (This being as all plants are not active and some of them are not reported).
    So, since we are not using the stock keyfigures (non cumulative) is it ok not to use 2LIS_03_BX as this is only to bring in the stock opening balance....
    We would like to know if there would be any issue only using BF and UM and using the InfoCube as the one to capture article movements along with cumulative keyfigures.
    Once again, thanks for your input on this issue.
    Thanks
    Dharma.

  • Non- Cumulative KeyFigures

    Hello Forum.
    We have a non cumulative key figures with and Inflow keyfigure and an outflow with the aggregartion propery to SUM.
    Can you please suggest how to verify the output of the non cumulative keyfigure ?
    Is there any way to check the values of this non cumulative keyfigure ?
    Thank you in advance .
    Regards

    Hello,
    Possible verification methods are described below.
    We recommend verification at plant/material number level (MatNo).
    I. Verification of data from the 2LIS_03_BX or 2LIS_40_S278 DataSource
    - Execute a corresponding query in BW.
    - Use transaction code (TAC) LISTCUBE in BW to select the corresponding MatNo or plant (see Note 629451) and compare the data.
    -> If problems occur at this point, there may be a BW technology problem (OLAP processor).
    - Now compare the data with R/3 TAC MC.9 and MB5B.
    -> If problems occur here, you should also check the PSA contents:
       -> TAC SE16
       -> Table RSTSODS
       -> Selection in the ODSNAME field: "2LIS_03_BX*"
        -> The ODSNAME_TECH field specifies the name of the database table in the PSA - if there are several hits, you can find the corresponding suffix of the source system in the PSA tree.
       -> TAC SE16
       -> PSA database table
       -> Select the data of the corresponding request (you can find this in the InfoCube administration view)
    Differences between PSA and InfoCube contents indicate problems in the update (you can use the debugging for the update to check this in more detail).
    Differences between PSA and TAC MC.9/MB5B suggest incorrect data extraction. Duplicate or missing stocks indicate technical problems during the data transfer.
    I. Verification of data from the 2LIS_03_BF/UM DataSource
    - Execute a corresponding query in BW.
    - Select the corresponding MatNo or plant in BW using TAC LISTCUBE (see Note 629451) and compare the data.
    -> If problems occur at this point, this suggests a BW technology problem (OLAP processor).
    - Now compare the data with the R/3 TAC MC.9
    - If there is a difference between the stocks, compare the movements, preferably take of note of the month in question and whether it is a receipt or an issue.
    - Now compare TAC LISTCUBE in BW with TAC MB5B in R/3, a comparison for exact days should identify incorrect, duplicate or missing documents (select the "Valuated stock" option in TAC MB5B to find records in the BW where the storage location is empty)
    - Now check in which format the document number is found in the PSA.
    -> In this case also, the reason may be an error in the update or problems in the data extraction.
    Consider the logic for determining the transaction keys of receipts/issues (Note 492828).
    See these OSS Notes,
    SAP Note 745788 Non-cumulative mgmnt in BW: Verifying and correcting data
    SAP Note 352344 Process key + reversals in Inventory Management
    Thanks
    Chandran

  • Non-cumulative keyfigures in virutual multi providers in BI-7.

    Is it possible to use non-cumulative keyfigures in virutual multi providers in BI-7? The Non-cumulative KFs are working in the cube. But when we create a virutual MP that contains this cube. They all are showing zero. Is this supported at all? Is there a note that we need to apply? Please help! This is BI-7.
    Thanks.

    Hi,
    Do not use more than one InfoCube with non-cumulative key figures in a MultiProvider since this may result in incorrect numbers in the query.
    Refer to SAP Note 690475 on SAP Support Portal.
    Refer
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/5617d903f03e2be10000000a1553f6/frameset.htm
    Thanks,
    JituK

  • Non-Cumulative keyfigure example

    Hi all,
          To test for non-cumulative keyfigures I have modeled a keyfigure noofemployees and below is my model
    <b>Infocube has following characteristics, timecharacteristics and keyfigures</b>
    Charteristics: Companycode
    TimeChar: 0calmonth
    Keyfigures: salesrevenue and noofemployees
    <b>My infosource has following infoobjects</b>
    Companycode,0calday,salesrevenue,nofoemployees
    In update rules, I wrote a formulae(0calmonth2) to convert 0calday to 0calmonth.
    I want to generate a report to know for every company, its monthly sales and number of employees.
    I created numberofemployees as a cumulative keyfigure with exception aggregation as Maximum(to get the maximum number of employees in one month instead of aggregating the values).  I don't know if I am doing something wrong, but my keyfigure noofemployees is aggregated for each month. 
    Please let me know if I created the keyfigure noofemployees correctly.
    thanks,
    Sabrina.

    Hi Sabrina,
    A non-cumulative keyfigure can be modeled in BW either using
    -a cumulative keyfigure that stores the non-cumulative value changes of the non-cumulative keyfigure or
    -Two cumulative keyfigures which represent the inflow and outflow values of the non-cumulative keyfigure.
    The keyfigures used to define the non-cumulative keyfigure - keyfigure for non-cumulative value change or keyfigures for inflow and outflow - should themselves be cumulative keyfigures and have the following properties.
    •     Standard aggregation -> Summation
    •     Exception aggregation -> Summation
    So as per the definition you first create a cumulative Key figure to capture the non-cumulative value changes of the non-cumulative keyfigure.Say ZKF1 and assign following properties:
    Aggregation: Summation
    Exception Aggregation:Summation.
    Now create a Non-cummulative Key Figure say ZKF2 and assign following properties:
    Aggregation: Summation
    Exception Aggregation:Last Value
    Non Cummulative Value Change:ZKF1.
    This will give you non-cumulative keyfigures "number of employees" correctly.
    Hope this helps.Please grant points if it solves your purpose.
    Regards,
    Ashish

  • Cumulative and Non Cumulative Keyfigures

    Hi,
    What are Cumulative and Non Cumulative Keyfigures..? and
    what is   the lik betwqeen these keyfigures and the option " NO MARKER UPDATE " in the manage tab of infocube?
    Can you please tell  eloborately?
    Regards
    Naresh.

    Hi,
    Cumulative values are those key figures that are cumulated using all characteristics, thus also using time.
    Non-cumulative values are those key figures that are measured in relation to a period in time;  Non-cumulative values are summarized over time using so-called exception aggregation.
    In Inventory, When you initialize the stock by using BX Data source. It will bring the current status of the stock by calculating the past transactions happens in all the storage locations.
    After loading the Data into Cube you compress the cube with Marker update, then system will take a reference point for the marker. Next when you load BF for the historical data, you compress with "No marker update". This may not be necessary in all the cases. If the client requires reporting on the past data you need to extract this. This time you run the info package with init Delta. If historical data is not required you can run the info pack INIT t without Data transfer.
    In the above case you use No marker update, because you have initialized the stock by calculating all the historical data and then you are loading historical data, there would be data mismatch happen to avoid that use no marker so that it will not add to the reference point. Later you can run the delta loads by using BF data source. This time you need to use "Marker update" because all the delta movements are new they should be updated to reference point. Similarly UM also With marker updated  for Price revaluations. Why Reference point: When you use Non Cumulative KF in the Cube, During query execution the data will come from Reference point which is set by marker update
    Regards,

  • Non Cumulative keyfigure

    Hello Gurus,
    what customisation should i have to do if i have to use non-cumulative keyfigure in cube.
    What is the validity table for non-cumulative keyfigure of non-cumulative cube.
    hope to have details..
    Regards,
    BPNR

    BPNR
    You just need to do check mark in your cube under keyfigur tab detail View.
    Hope this helps
    Thanks
    Sat
    Check this link if it helps
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62ebe07211d2acb80000e829fbfe/frameset.htm

  • Issue due to Non Cumulative Keyfigures

    Hi All,
    I have created a ZCube that gets data from Purchasing and Stocks Cubes. This Zcube has got the Non cumulative Keyfigures 0TOTSTK and 0VALSTCKVAL that are mapped from the Stocks cube in the transformations.
    Apart from standard cubes, I have got Transformations from a DSO to the ZCube, I defined these Keyfigures as No transformations.
    Data loads are done and data comes into report with an error.
    The Validity Interval has the inital value as lowerlimit.
    Diagnosis
    The initial value has been found as the lower limit of a validity area. This can lead to performance problems and cause queries to terminate, because potentially, non-cumulatives can be reconstructed at any point within the validity interval.
    This error occurs if data is loaded to a non-cumulative cube, where the time-reference characteristic is intial (blank).
    This error message can also appear when the non-cumulative cube is completely empty.
    System Response
    Procedure
    Check the data in the InfoCube and if there is a request containing data records where the time-reference characteristic is initial (blank), delete this request and reload the request data, with the appropriate time, into the InfoCube.
    Is there any chnge to be done in the transformations at DSO level for the non- cumulative keyfigures to overcome this error.
    Plz Help.
    Thanks in Advance
    Regards,
    Sudha

    Hi all,
    Thanks for the Info.
    I have mapped all the fields from DSO to cube.Dso doent hold the non cumulative keyfigures.so they are left blank.
    I have loade the data to zcube now by deleting the earlier requests. Data is loaded.
    I can find entries now in RSDV.
    I just have one question to be clarified.. I suspect the issue is with the time Reference char's.
    When I do mappping from 0IC_C03 to ZIC_C03 i don't see the mapping for 0CALWEEK, 0CALMONTH, 0CALYEAR. I don't see these fields for doing a mapping though these fields are present in the cube.
    Same is the issue wit the DSO also. I dont see the above fields to map in the target.
    I don't understand why there are not displayed while creating transfformations though they are in the target.
    Please let me know if you understand where I am going wrong.
    Sudha

  • What is the difference between cumulative and non cumulative keyfigures?

    Hi Friends
    What is the difference between cumulative and non cumulative keyfigures, when we r using  the cumulative and non cumulative
    Regards
    Ravindra

    Hi Ravindra,
    Have a look at the help:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/frameset.htm
    Go through these.
    Re: Types of non-cumulative keyfigures
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/da1640dc88e769e10000000a155106/content.htm
    See the following threads
    non-cumulatives KF in reporting
    Re: use of non cumulative keyfigure
    Re: When do we use Non-Cumulative values?
    Key figures:
    1. Cumulative Vaules
    2. Non – Cumulative Values
    Cumulative Values:
    Cumulative Values are Keyfigures for which Keyfigure Values are must posted in every time unit that reported on (= time period – specific Values).
    Example:
    Revenue
    Non – Cumulative Values:
    Non – Cumulative Values are Keyfigures for which KeyFigures are only evaluated for selected time Periods.
    Cumulative Keyfigures With Exception Aggregation:
    It's a 'normal' KF (with summation, min or max as aggregation behaviour), but you set some exception in this behaviour...for example, you can say that a KF, normally aggregated by 'summation', have to show the max value (or the average, or '0' or something else), that is the 'exception aggregation' when you use it in combination with 0DOC_DATE (or other char), that is the 'exception aggregation char reference'...in this case OLAP processor give to you the possibility to see your KF with different behaviour depending from you use 0DOC_DATE (in our example, MAX) or something else (SUMMATION).
    Non – Cumulative keyfigure with Associated Single Delta:
    If you have a stock KF that is fed from only one (other) movement KF that can assume positive and negative sign.
    KF1 (initial) STOCK (non-***.) = 100
    KF2 flow = -30
    KF2 flow = 70
    KF1 (final) STOCK (non-***.) = 140
    Non-cumulative key figure with associated in and outflow:
    This is the case of 2LIS_03_BF KF stocks fields.
    Here, we have the same situation in point 2, but you will have not only ONE flow KF, but TWO, one dedicated to in and another one dedicated to out !
    You have to use this scenario if you have no KF that have positive and negative sign, but two KFs each one representing positive (in) and negative (out) logical sign!
    KF1 (initial) STOCK (non-***.) = 100
    KF2 (out))flow = 30
    KF3 (in)flow = 70
    KF1 (final) STOCK (non-***.) = 140
    Website Addresses For Non – Cumulative KeyFigures:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.html
    http://help.sap.com/saphelp_nw04/helpdata/en/82/f2dc37f0f12313e10000009b38f8cf/content.html
    http://help.sap.com/saphelp_bw31/helpdata/en/82/f2dc37f0f12313e10000009b38f8cf/content.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/d2/e0173f5ff48443e10000000a114084/content.html
    Re: Non-Cumulative keyfigure example
    Re: Types of non-cumulative keyfigures
    /community [original link is broken]
    http://help.sap.com/saphelp_bw32/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.html
    /community [original link is broken]?forumID=131&threadID=29557&messageID=273049
    /community [original link is broken]?forumID=131&threadID=111914&messageID=1248243
    Check this very useful docu.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31
    ****Assign Points If Helpful****
    Regards,
    Ravikanth

  • Cumulative keyfigure value based on condition

    Hi All,
    I have a requirement where in I need to display cumulative results on keyfigures. At present I am displaying  keyfigures values for fiscal year & fiscal period included in query at column level.
    But, If user add  comapny code (from filter) & removes fiscal period at run time (in BEx screen), the data is displayed cumulative across company codes.
    The requirement is: data should get displayed cumulative based on company code codes. 
    Kindly suggest your inputs.
    -Thanks
    Shamkant

    Hi Shamkanth,
    In general we will use time char for calculation of time fields but when we are using for calculation purpose ,we have to consider key figures for developing time fields.
    The reason why we have to use is: at the time of dril down with respect ton other fields across the report,it will show exact result but we if we use time char it will show wrong counter.
    Hope this helps you..
    Best Regards,
    maruthi

  • How does Non-cumulative KeyFigure Works ?

    Hi, experts !
    What's the difference between the non-cumulative values of summation and of last value?
    And how does non-cumulative value with in-flow and out-flow works?
    Does anyone have relative documents?
    Plz post a copy to my e-mail: [email protected]
    Thank you very much !!!
    Looking forwards !

    Hi, Can you also send me the doc.  My Id is [email protected]
    Thanks,
    Sam

  • Cumulated Keyfigure and Non-Cumulated Keyfigure

    Hi Guy`s,
    Can we load Cumulative Key Figure and Non-Cumulative Key Figures in the Inventory InfoCube? Please explain with Scenario Urgent client requirement.
    thanks in advance,
    Venkat.

    Hi,
    Check the following link.
    How To…Handle Inventory Management Scenarios in BW
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
    Cheers
    Pagudala

  • Unserrialized delta for non cumulative keyfigure

    Hello Friends ,
    Why the update mode is unserillized delta at the time of non cumulative KF extraction ?
    Regards,

    Hi..
    As per my knowledge there is no such rule........
    There are three Update modes :
    V1 - Synchronous update{DIRECT DELTA}
    V2 - Asynchronous update{QUEUED DELTA}
    V3 - Batch asynchronous update{UNSERIALIZED V3 UPDATE}
    V1 >> Synchronous Update Method – When we use this type of update method after the first successfully entered the signal comes back as the first record is entered successfully. Then only the next record will enters into the file. If the first record fails, then there is no further process. Even though the first record enters into the file successfully, the 2nd record will wait until the signal comes back. So here a performance is decreases. One more point is that there is no background process for V1 update method.
    V2 >> Asynchronous Update Method –When we use this type of method there no need to the signal comes back to enter the second record. It automatically the 2nd record will enters into the file. If there is any in the first record, it will not wait until it is corrected; the 2nd record enters into the file. Here the first drawback is over comes here. But the 2nd one is there i.e. here also there no background process.
    V3 >> is specifically for BW extraction. The update LUW for these is sent to V3 but is not executed immediately. You have to schedule a job (eg in LBWE definitions) to process these. This is again to optimize performance.
    Check this link :
    /people/sap.user72/blog/2004/12/16/logistic-cockpit-delta-mechanism--episode-one-v3-update-the-145serializer146
    Hope this helps you.....
    Regards,
    Debjani.......

  • Purpose of Non Cumulative key figures

    Whatu2019s the purpose of Non Cumulative key figures?

    Hi....
    There is an explanation of advantages and disadvantages of using non-cumulative key figures in "How to handle inventory management scenarios in BW" white paper:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/how%20to%20handle%20inventory%20management%20scenarios.pdf
    Also Check..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0b8dfe6-fe1c-2a10-e8bd-c7acc921f366
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/80/1a6305e07211d2acb80000e829fbfe/frameset.htm
    Re: Non-Cumulative keyfigure example
    Hope this helps.....
    Regards,
    Debjani........
    Edited by: Debjani  Mukherjee on Oct 27, 2008 3:46 AM

  • Maintaining non-cumulative values in Mlti provider

    Can we maintain non ucmulative values inteh multi ptovider   Extras - > Maintain non cumulative values section.
    I created few new cubes which has non cumulative keyfigures . In the cube I made 0CAL DAY as reference characteristic and selected  Company code (0COMP_CODE) and Posting date in the document (0PSTNG_DATE) as characteristics of validity table for non-cumulatives.
    Now I inlcude the new cubes and identified the non cumulative key figures in the multi provider.
    Now here also do I need to   make 0CAL DAY as reference characteristic and selected  Company code (0COMP_CODE) and Posting date in the document (0PSTNG_DATE) as characteristics of validity table for non-cumulatives.I did not find an option in Extras - > Maintain non cumulative values in multi provider. CAn we maintain non cumulatives in MP ?

    Hello,
    You dont need to maintain it at the MP level also.
    Non-cumulative parameters are manitained only at the cube level.This was the case in 3.x so it should be the same in 7.0 also.
    Regards
    Ajeet

Maybe you are looking for