Month as a key Figure

Hi,
I have a Query where i run it for the Fiscal year suppose my current month is Nov in this case my fiscal month is 8 , so i want this 8 as my key figure.
I need it for some calcualtion .
How can we achive it , any help using replacement path or Exits.
Regards.

This is what I have done.
For Posting period I have created a new variable for which I will calculate value using the exit.
Then I have created a new formula under which I am using a formal variable for which the replacement path is this Posting period variable .
But its not working this way.
While running the report it gives error.
Diagnosis
Variable 43U5V5NNWD805ZH73HXV4BOJU (43U5V5NNWD805ZH73HXV4BOJU) was found in the query but in the meantime it has been deleted, or it has been used incorrectly.
System Response
The query was not executed.
Procedure
Use the Query Designer to change the query. The system provides a repair proposal for the query if the variable is missing.
If the variable exists and is used incorrectly, find out whether or not the variable is used in the correct context.
The faulty variable has variable type . You can use the following variable types in the following contexts:
1.     Characteristic value variable- can be used to restrict (filter) characteristics to values (master data), in other words, in the same places where you can also use constant characteristic values.
2.     Hierarchy node variable - can be used to restrict (filter) characteristics on hierarchy nodes, in other words, in the same places where you can also use constant hierarchy nodes.
3.     Text variable- can be used in the query headers and can be used by structure elements.
4.     Formula variable- can be used in all cases. Note: Formula variables can have units or be without them. Incorrect use can also arise here since the system always calculates in accordance with the units. Formula variables can also be used to create the upper and lower limits in exceptions.
5.     Hierarchy variable- can be used to determine presentation and selection hierarchies, in other words, in the same places where you can also ise constant hierarchy names.
Try to find the faulty variables in the query and analyze the reasons behind their incorrect use.
You can delete the query if you no longer need it.
Additional technical info:
ELTUID = 43U5ZG4X89T6RAM8G50TBTUYY
  Notification Number BRAIN 418 .
Any solution pls help.
Regards.

Similar Messages

  • How to design for YTD, Monthly & Last year Key figures

    Hi Gurus:
    Can you pls tell me how to design a data model, where a user wants to get YTD, Monthly & Last year Key figures say Sales volume...
    Is aggregates the answer?
    Pls let me know...Thanks a lot

    Hi Vijay,
    I am a beginner in BI field.
    I have a problem till now i couldnt get the right answer.
    That the reason why i write you today.
    My Problem is with a Query.
    I'm designed a dynamic query which should look like this:
    12.2005-- Jan06 --- Feb06 --- Mar06 --- Apr06 ... Dec06 --- YTD
    My Problem, if you give per e.g Dezember, all Months have to appear. Or you give may, your going to receive till may.The result i receive till now its only the month i gave.How can i get the correct answer? How i am going to calculate the YTD?
    You can directly answer hier:[email protected]
    Thanks

  • Creating 6 month moving average key figure?

    Hi-
    I have a power user who needs to generate a "complaint rate".  He needs to be able to divide the number of service notifications received in a month by a 6 month moving average of units shipped.  In this same query he needs to show the complaint rate for the past 6 months.  I am not a query writer...I only know the backend.  But I am at a loss of how to select 6 months of data upon a load to calculate the 6 month moving average of units shipped.  Any suggestions/ideas would be greatly appreciated.  (Or is this a calculation that can be created in the query?) 
    Thanks!
    -Jenn

    Hi
    I think this can be done in the Starting Routine of
    the Upd rules.
    If you are using ODS it will be easier.
    for each day you need an avg of the past 6 months, so when ever you load a record you can go to the ODS it resides in via SQL and calculate the 6 months trailing avg.
    to initialize the data you run a repair full load that will make the calculation.
    Reg's
    Edan

  • Key Figure aggregation settings

    Hi Guys,
    Currently I have one Key Figure, its settings are:
    KF: GOD QTY
    aggregation: SUM
    exception aggregation: LAST VALUE
    aggregation ref char: 0CALDAY.
    In the report we have 0CALMONTH in column, so we see last value of the month for the key figure (means whatever last day say 31.08.2009) and not the last value posted say 14.08.2009. In the report see value which is posted on 14.08. but using 0calmonth at report.
    Can you tell me how do I change the above KF settings to get the last value posted for the KF? I still want to put 0CALMONTH at report level. What will be the changes at exception aggregation and aggregation ref char?
    Thanks in advance,
    BMW Z4.

    The exception aggregation of LAST VALUE on calendar day will take the last value of the calendar day that your dataset is restricted to. So if you are drilling across by 0CALMONTH, each column will take the GOD QTY value of the last Calendar Day of each month.
    You could possibly get around this creating your GOD Qty Key Figure in your report as a selection or RKF and choosing the 'Constant Selection' option on the Advanced Tab - with this setting the selection becomes independent of the filter settings. So you may be able to set this as the last value and it will take this value for all columns.
    Nick

  • Will Restricted key figure give no applicable data

    Hi,
    After the query is run it shows no applicable data.
    There is applicable data as far as characterstics and filters are concerned.
    But the key figures are restircted ones and there is no data matching that restirction.
    But shouldnt the query in that case give the output with the char rows which are present and the key figure column as 0.
    Kindly provide pointers to the same.
    Thanks & Regards,
    Rathy

    If there is no data that matches the restrictions on the RKFs, then no data will be displayed. The values are not "0" in this case, they don't exist.
    Perhaps an example will clarify...
    Let's assume there are 3 RKFs restricted by Calendar Month to 01/2007, 02/2007 and 03/2007. If I request data for a date range including these months, then the appropriate data will be displayed. However, if I request data for 07/2007 -> 09/2007, it would not make sense to show "char rows which are present" for those months with "the key figure column as 0".
    However, you can essentially get the result you are looking for by turning off all zero suppression and hiding all of the RKFs.
    Hope this helps...
    Bob

  • Key Figure format in Years and Months..

    Hi,
    Is there any Key figure similar to 0SRVCLENKYF (Length of Service (in Years)) part of Headcount and Personnel Actions, which should give me value in Years and Months..?
    Thanks in Advance,
    Thanks,
    Madhu.

    For curiousity sake...if you use the FIMA_DECIMAL_MONTHS_AND_YEARS Function Module, the output that you'll get is a months and years in fractional amounts. So, how are you going to get the Years and Months from this?
    For example, if the from date is 20000101 and the to date is 20090914, the results from this Function Module will be Months = 116.42740 and Years = 9.70228. If you do use this, I'd suggest taking the whole number from passed value for years (9 in this example) and then calculate months by taking the franctional amount of the passed value for years and multiple it by 12 (0.70228 * 12), you end up with 9 Years, 8 Months (8.42736 to be exact, but you're going to want to truncate it to 8 so that when it goes above 8.5, the value doesn't become 9 when it still should be 8).

  • BEx Query key figure sum different at monthly or at docu number level

    I have a query designed in Query Designer. The report is summarized at the monthly level , but the document number is available for drilling down. What's strange is that the sum of the key figures is different when running at the monthly level or when drilling down at the document number level. Can someone share your insight on what how to solve this problem?
    Thanks,
    Sharon

    Hi Sharon
    Which key figures give you an incorrect picture or discrpancies in the two displays ?
    Check the properties of these key figures. Are any of the key figures posing an issue calculated as 'Formula'. If yes, then what is the Calculate Result as for this KEy Figure ? Is it TOTAL ?
    Cheers
    Umesh

  • Disaggregation of Key figure not in proportion at monthly bucket

    Dear Expert,
    Please find the below case.
    Here Key figure 2 is disaggregated based on Key figure 1 (Calculation Type P) also we maintained Time based disaggregation K.
    The issue is - if you check total, it is 13 for both key figures as shown in below screen shot.
    But region wise (Detail level) if you checked, it is not in 1:1 proportion and it is causing problem for us.
    For example Region 2 having value in KF1 as 2 for Week 11.2015 but after disaggregation it got nothing on KF2.
    (The reason is Key figure 2 is having value in week 12 and week 13 and nothing in Week 11)
    We tried 2 different approach to get 1:1 proportion in Monthly bucket, but it could solve our problem.
    Approach 1-After  Key figure2 calculated in Weekly bucket, Reset Key figure 2 at total level in Monthly data View and enter the Total of Key figure 2 at Total level in Monthly bucket.Check the result at detailed level.
    But in this case it is calculated for week 10, 11, 12 and 13 as 0,  9, 3, 1. (We want Key figure2 as per original calculation i.e it should be 12 and 1 in week 12 and 13 respectively)
    Approach2 -
    Approach 2 - Add another New Key figure as Key figure 1 Total- which sum the Key figure1  at detailed unit at Month level and then disaggregation of Key figure2  based on this new KF.
    Its working for this scenario but different scenario is not working.
    For example- here region 3 and 4 affected.
    If disaggregation at Month level is corrected, our issue will be resolve.
    Waiting for your feed back.
    Thank you
    Sachin

    Hi,
    In Planning Area u2013 Key Figure settings,  did you try to use  u2018N - No disaggregation in timeu2019  for KF2  key figure ?
    This will mean that copying will occur in technical periods of the storage bucket profile and not the way it happens now.
    Other  option:
    Now, you storage bucket profile and also the planning bucket proifile  are  in Days/Weeks/   .Months 
    Is it necessary for your user to view data in daily buckets ?  Can the user view  the data in weekly buckets only (and not in daily buckets) ?
    Your planning bucket profile can be in Weeks/..Months .
    This way your displayed data will be in weekly buckets.
    Regards
    Datta

  • Formula Variables for Key Figure Rolling Averages 3/6 months

    Dear BEx guru! I need dynamic (user selectable range from select options) 3, 6 month averages for Sales, Inventory  Key Figures. I used variable offset alone and I am not getting the results.
    Mar/06 = 120 EACH, Apr/06 = 150 EACH and May/06 = 180 EACH, Jun/06 = 90 EACH, July/06 = 240
    User Calendar Month select options = Mar/06 to May/06
    Mar/06 (Avg) = (120150180)/3 = 150 EACH
    Apr/06 (Avg) = (15018090)/3 = 140 EACH
    May/06 (Avg) = (18090240)/3 = 170 EACH
    PLEASE SEND ME YOUR KIND RESPONSES! I APPRECIATE YOUR HELP!! write to [email protected]

    Hi,
    You may have to use the customer exit.  I am not sure whether there is any sap_exit variable available to provide such a calculation.
    Regards
    Sundar

  • Creation of new key figure at report level depending on the month range

    Dear All,
    I have a requirment where user wants to see the dollar values for the Amount key figure. Data is stored in the INR value in the cube.
    Exchange rate values keep on changing depending upon the quarter. For all four quarters we have four different exchange rate.
    Now system has to identify the applicable exchange rate and show a new column with the USD value just beside the INR values column.
    How best we can achieve this.
    Thanks & Rgds,
    Anup

    Hi
    You can have currency translation at query level for achieving this.
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/600157ec-44e5-2b10-abb0-dc9d06ba6c2f&overridelayout=true
    Translation in Query
    Regards
    Ravi
    Edited by: Ravi Naalla on Aug 17, 2009 11:56 AM

  • Open sales orders key figure in APO

    HI Gurus,
    Can anyone please throw some light as to where i need to be looking in this scenario. Our BW resource extracts open sales order quantity from ECC and loads into APO DP. The issue that i'm seeing is the open sales order quantity key figure is not getting updated properly in APO. For example to begin with we have a quantity of 800 EA in the period of 12/2014 (we go by fiscal period and in this case 12 would represent September 2014), 01/2015(October 2014), 02/2015(November 2014). The customer service group has deleted the quantity completely from period 12/2014 (September 2014) in ECC. But when i look in the planning book in APO, i can still see the quantities in the periods of 12/2014, 01/2015 and 02/2015. I was expecting the quantity from the period of 12/2014 to not showup in APO as it has been deleted in ECC. Our BW resource also confirms that he has loaded it properly in APO. Where can i start looking to resolve this issue.
    Thanks
    Ravi

    Dear Subhash, Thanks for your reply and i apologize as APO DP is new to me and i'm picking up things, can you please guide me to which tcode should i be going and checking this. Also reloading the planning area can you xplain a little more please
    Okay i have checked in the tcode /SAPAPO/TSCUBE and this is setup in the process chain for us which runs once a month on the opening day of the period. I hope this is what you were referring to?
    Under the key figure assignment in TSCUBE tcode, i see that the 'Add data" check box is not checked under Target area.

  • What is diffrernce between key figures and characteristics?

    Hi all,
    I am a newbie to SAP BI....i am doing Masters in ERP(SAP)....I have confusion about what is basic difference between key figures and characteristics?
    Why do we have to define attributes in characteristics?
    If any one can refer me a thread that answers my questions or explain with very lucid example I will highly appreciate it.....please answer this question as I have just spend 4-5 months studying BI and have not really implemented in the Industry but we do have access to SAP BI where we perform tutorials....
    Also please let me know the links to materials where basics of BI are explained in a very simple way.....
    Thanks,
    Regards,
    Rahul

    KF is anything which can quantitatively measured: Amount, Number, Value, Price... whatever you want to measure is called Key Figure. This key figures are also called KPI (Key Performance Indicator). If you want to know the number of sales orders, the number of deliveries, the amount of deliveries... all are key figures
    And to add to that, key figures are also divided into two:
    Cumulative KF: Like I said, amount, value, price
    Non-cumulative KF, this is different kind of key figures which shouldn't be summed up, for example: Age, Inventory, Number of Employees.  When  you measure this key figures, you don't add the age of every body, because that doesn't make any sense, but adding the sum of all deliveries, or adding all Sales does make sense, that is the difference between the two key figures.
    Characteristics: are anything which couldn't be quantitatively measured: material, customer, plant, employee ID and so on...
    Aways, in BI you measure the KF against the Key figures..
    thanks.
    Wond

  • KEY FIGURE: Effective purchase order value & K.F "No. of Purch.Orders"

    Yo my fellow Gurus,
    Got a problem, when executing listcube on the Info-Cube 0PUR_C01 - I see the data/amounts in the column for "Effective purchase order value" / 0ORDER_VAL. But when running the query with the Key Figure I just get "0"
    I tried the option of adding the Process Keys not allocated in the Routine list of keys, yet still nothing has popped in the query, and heres the routine after  additonal keys added:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    INCLUDE RS_BCT_MM_UPDATE_RULES.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-ORDER_VAL
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or     "Bestellung
        COMM_STRUCTURE-PROCESSKEY = '011' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '015' or
        COMM_STRUCTURE-PROCESSKEY = '005' or
        COMM_STRUCTURE-PROCESSKEY = '025' or
        COMM_STRUCTURE-PROCESSKEY = '041' or
        COMM_STRUCTURE-PROCESSKEY = '051' or
        COMM_STRUCTURE-PROCESSKEY = '061' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '021' or
        COMM_STRUCTURE-PROCESSKEY = '004' or       "LP
        COMM_STRUCTURE-PROCESSKEY = '014' or
        COMM_STRUCTURE-PROCESSKEY = '024' )
        AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
        AND COMM_STRUCTURE-ORDER_VAL <> 0.
        perFORM LOC_CURR_CONVERT
               USING    COMM_STRUCTURE-ORDER_VAL
                        COMM_STRUCTURE-DOC_DATE
                        COMM_STRUCTURE-ORDER_CURR
                        COMM_STRUCTURE-LOC_CURRCY
                        COMM_STRUCTURE-EXCHG_RATE
               CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
    else.
        RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    This seems to be also the issue with my other Key Figure "No. of Purch. Orders" except here it the just comes up blank / 0 . This is to some the number of pos per plant for the month. So it's not storing anything but running via an interface and then with the aid of the routine loading the count into the cube:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_HDR
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-NO_PUR_ORD
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      if COMM_STRUCTURE-HDRPROCESS = '01'         "Bestellung
         AND COMM_STRUCTURE-no_hdr <> 0.
    result value of the routine
        RESULT = COMM_STRUCTURE-no_hdr.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
      else.
        RETURNCODE = 4.
      endif.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Please advise the way forward.
    Thanks,
    Ishaam

    what do u want?

  • Aggregates on Non-cumulative InfoCubes, stock key figures, stock, stocks,

    Hi..Guru's
    Please let me know if  anybody has created aggregates on Non-Cumulative Cubes or key figure (i.e. 0IC_C03 Inventory Management.)
    I am facing the problem of performance related at the time of execution of query in 0IC_C03.( runtime dump )
    I have tried lot on to create aggregate by using proposal from query and other options. But its not working or using that aggr by query.
    Can somebody tell me about any sample aggr. which they are using on 0ic_c03.
    Or any tool to get better performance to execute query of the said cube.
    One more clarification req that what is Move the Marker pointer for stock calculation. I have compressed only two inital data loading req. should I compress the all req in cube (Regularly)
    If so there would be any option to get req compress automatically after successfully load in data target.
    We are using all three data sources 2lis_03_bx,bf & um for the same.
    Regards,
    Navin

    Hi,
    Definately the compression has lot of effect on the quey execution time for Inventory cubes <b>than</b> other cumulated cubes.
    So Do compression reqularly, once you feel that the deletion of request is not needed any more.
    And ,If the query do not has calday characterstic and need only month characterstic ,use Snap shot Info cube(which is mentioned and procedure is given in How to paper) and divert the month wise(and higher granularity on time characterstic ,like quarter & year) queries to this cube.
    And, the percentage of improvement in qury execution time in case of aggregates is less for non cumulated cubes when compared to other normal(cumulated) cubes. But still there is improvement in using aggregates.
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • InfoSet in SAP BI 7.10 and Key figure aggregation

    HI SAP Gurus,
    I am new in SAP BI area. I have my first problem.
    I want to create a report for the profit of goods. 
    The cost of goods(cogs) are constant for each material for one month.
    The formula to calculate the profit of goods = sales turn over u2013 cogs of month *sales amount.
    I have defined in BW time dependent infoObejct with attribute cogs.
    I have 2 info Sources.  InfoCube for transactional sales data from R/3 and material cogs master data loaded from csv file each month to infoObject.
    The info Provider for report is InfoSet (transactional Cube and cogs infoObject) .
    My problems are
    1) When I create an InfoSet, SAP BW create automatically new technical name for all characteristics and key figures and the first technical name should be alias fr each InfoCube and InfoObject in the InfoSet.
    2) The new technical name infoSet erased my aggregation references characteristic (=calmonth)
    3) In the report the key figure cogs was aggregated for each customer sales and customers,    that means the value of cogs is not constant, when it is aggregated according to customer sales order.
    Thanks a lot for your support
    Solomon Kassaye
    Munich Germany

    Solomon find some code below for the start routine, change the fields and edit code to suit your exact structure and requirements but the logic is all there.
    4) Create a Start Routine on the transformation from sales DSO to Profit of Goods InfoCube.
    Use a lookup from the the COG DSO to populate the monthly COG field in the COG DSO.
    **Global Declaration
    TYPES: BEGIN OF I_S_COG,
    /BIC/GOODS_NUMBER TYPE /BIC/A<DSO Table name>-/BIC/GOODS_NUMBER,
    /BIC/GOODS_NAME TYPE /BIC/A<DSO Table name>-/BIC/GOODS_NAME,
    /BIC/COG TYPE /BIC/A<DSO Table name>-/BIC/COG,
    /BIC/PERIOD TYPE /BIC/A<DSO Table name>-/BIC/PERIOD,
    END OF I_S_COG.
    DATA: I_T_COG type standard table of I_S_COG,
    wa_COG like line of i_t_COG.
    *Local Declaration
    data: temp  type _ty_t_SC_1.
    *move SOURCE_PACKAGE[] to temp[].
    temp[] = SOURCE_PACKAGE.
    select /BIC/GOODS_NUMBER /BIC/GOODS_NAME /BIC/COG /BIC/PERIOD  from
    /BIC/A<DSO Table name>
    into corresponding fields of table i_t_COG for all entries in
    temp where /BIC/GOODS_NUMBER = temp-/BIC/GOODS_NUMBER.
    sort i_t_COG by /BIC/GOODS_NUMBER.
    loop at SOURCE_PACKAGE assigning <source_fields>.
    move-corresponding <source_fields> to wa.
    loop at i_t_COG into wa_COG where /BIC/GOODS_NUMBER =
    <source_fields>-/BIC/GOODS_NUMBER and /BIC/PERIOD =
    <source_fields>-/BIC/PERIOD.
    modify SOURCE_PACKAGE from wa transporting /bic/COG.
    endloop.
    endloop.
    5) Create an End Routine which calculates Profit using the formula and updates the result set with the value in the Profit column.
    Given your requirement for the profit calculation
    profit of goods = sales turn over u2013 cogs of month * sales amount
    Write a simple end routine yourself
    *Local Declaration
    loop at RESULT_PACKAGE.
    <result_fields>-profit = <result_fields>-sales turn over - <result_fields>-COG * <result_fields>-sales amount.
    modify RESULT_PACKAGE from <result_fields> transporting profit.
    endloop.
    As the above start and end routines are used to enhance your sales DSO, your fields for customer number and the sales order should already be in your DSO for drilldown.
    Let me know how you get on.

Maybe you are looking for