Calculation of no of days in the period

Hi,
We have a requirement....
1. Calculate Daily material consumption for a period?
Daily material consumption = material consumption for a period / no. of Days in the period
We are using 0FIGL_C01 InfoCube..
My Doubt is How to consider no of days in the period...
Please suggest me...
Thanks in advance..

First you will have to create two customer exit variable for fiscal year/ period(0FISCPER). one for the no of day in the current month and another for the cumulative no of days.
now you would have used a user entry default value variable on 0FISCPER for getting the material consumption for the month. also you would have used another user entry default value variable on 0FISCPER for getting the material consumption YTD.
Then go to t-code CMOD -->select your project --> select enhacement RSR00001 and function exist would be EXIT_SAPLRRS0_001. Double click on include within Fucntion exists.
3) In ABAP screen, you need to write your code
now take the help of an ABAPer and ask him to write the code in the above exit.
the logic for no of days in the mont would have to calculated in the code for the month that user enters for the variable used for current month material consumption.
similarlly the no of days YTD will have to be calculaed by writing the code from the starting month of the fiscal year till the current month. based on the value of the variable that user enter for the YTD material consumption.
There would be some function module available to calculate the no of days, the ABAPER would know that.
Regards !!!

Similar Messages

  • Macro to Unlock the Cell on the start day of the Fiscal period

    Dear Experts
    We are using  fiscal periods for the forecasting.1 period = 15 days.We forecast for 24 fiscal periods.
    We only give chance to some customers to update forecast on  1 day of the fiscal period in the customer planning book .In this regard we have to lock the cell all most all the days except on 1 st day of the fiscal period.If the first of the Fiscal period is Sunday or Saturday, system should not unlock.
    We did not maintained any Time stream ID to the storage bucket profile.
    Example:
    KF1 is used by our customers to update forecast.This keyfigure should always in the unedit mode.On the first day of the Fiscal period system should unlock the keyfigure.If first day of the period is saturday or sunday then system should not unlock this keyfigure.
    Can we use calender in Macro?
    Is it possible to achieve above logic in our case since we did not maintained time stream ID in storage bucket profile.
    Please give your expertise opinion on my requirment.
    regards
    Vicky

    Hi Vicky,
    Whilst other simpler  options are given by others for locking /unlocking a KF with macros, Work around as below,  if feasible in your environment.
    Create two planning books (or with authorization at data view level, 2 data views).
    One planning book PB1 with the KF1 in  non-edit mode. This will be used normally.
    Other planning book PB2 with KF1 in edit mode.
    Create one more authorization profile/ role   for each customer user.
    Assign this additional authorization profile/ role only on specific dates as per background job to give additional authorizations.
    Otherwise, if  no. of user licenses is not an issue, then create an additional user id for each of the customer with additional authorizations and unlock these additional user accounts only on specific dates by background jobs.
    We had in one project, some additional user accounts for similar( not exactly same) requirement. This gave better traceability.
    Regards
    Datta

  • How to get start date of the period for a given date from cube

    I have a situation where i need to find the start day of the period for a given date. is there a way to know that. i want to use that in my report. i enter the date from my report(i have date parameter), depends on the date, i want to display the start day
    of the period. how can i write expression for that in my report?
    ram

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Sales Analysis Tcode MCTE - drilldown per day within a period?

    Hello,
    Current settings in transaction MCTE allow a user to find the total sales figures per organization for the given period.
    Within that period, is there a way to drilldown in order to see the total sales per day within the given period?  If it's not possible in the MCTE transaction, is there another standard transaction that can be accessed to find this information?  Any help would be greatly appreciated.

    Andy
    There is no way to drill down with a period to days after you chose Period,  say Month.
    But there is a workaround to this.
    Make the 'day' as the period unit, in other words, update on a daily basis. T code omo1
    Hope this helps.

  • Calculating the depreciation pro days instead of periods

    Hi All,
    I've to calculate the depreciation pro days instead of periods.
    Is it possble? How to do it?
    Thanks
    G.Rossi

    Hi Rossi,
    you have to make a transfer the values to a asset with a daily calculating depreciation key. You can not change the depreciation key from normal depreciation to daily depreciation on a asset which has already values.
    If you are interested in technical details: If you create a asset ANLB-PERFY is set according to the depreciation key (T090NA-XDAILY). ANLB-PERFY can not be changed in the standard. If you change the depreciation key from normal depreciation to a daily calculating depreciation key (T090NA-XDAILY = initial to T090NA-XDAILY = X) you will get the AA 662.
    regards Bernhard

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Difference Between Current Day and fist day of the payroll period

    Hi,
    How do i find the difference between the current day and the first day of the payroll period with period parameter XX.
    Operation VARSTFDYXX is used to decide if the current day is the first day of the payroll period. But is there any operation available to check the difference in exact number of days.
    I know hrs=y is used to find difference between current day and a date specification record from IT0041, but i need to check difference between current day and first day from a payroll period parameter.
    Any response is greatly appreciated.
    Thanks,
    Imaneul Rajiv

    No! haven't seen it at all! Do I have to drain the battery completely and then charge it? I did that the first day I bought the phone and yet the stats are the same for me
    PS: I am referring to the Call Time stats and not the Usage/Standby stats

  • How to get the last day of the payroll period

    Hi all,
    I need to get the last day of the payroll period e.g. last day of Jan 2007 is 31 Jan 2007. Can anyone suggest as to how to get it?
    Thanks,
    Madhu

    T549S contains the payroll periods with pay date.  T549Q contains the begin and end dates of the payroll period.
    You can select from the appropriate table (or from both depending on your given data) to get the end date of the period.
    Hope that helps.
    Mary

  • How to set the payment Due date calculation as per working days.

    how to make changes in the vendor Payment terms so that while calculating the Payment due date as per Payment terms, system calculates it based on Working Days & not the Calender days ?
    Help is much appriciated.
    Thank you,
    Amit

    Hi,
    This is the standard settings by SAP, normally we couldn't change it to working day.
    Good luck
    Tao

  • Calculating a percentage of change from one day to the other

    I'm working on a report that is grouped by date. What I'm trying to is calculate the difference between one day to the next. But when I try to do the formula it's thinks it's calculating against itself...
    Group by Date: 9/1 = $100
                           9/2 = $80
    Subtotal =              =0.20%

    Please give the formula details to check.  I think you are not multiplied with 100 in your formula.
    Regards,
    Sastry

  • 9th day of the line training period - Router now c...

    Hi,
    I'm on the 9th day of the line training period. My router is now configured to 13.5 Mb but download still very very slow. Please see the stats and if anyone can advise what should I do. Thanks. I'm unable to perform a speed test as it fails.
    DSL Connection
    Link Information
    Uptime:
    1 day, 3:01:19
    Modulation:
    G.992.5 annex A
    Bandwidth (Up/Down) [kbps/kbps]:
    444 / 13,350
    Data Transferred (Sent/Received) [MB/MB]:
    44.49 / 180.89
    Output Power (Up/Down) [dBm]:
    12.0 / 0.0
    Line Attenuation (Up/Down) [dB]:
    9.5 / 18.5
    SN Margin (Up/Down) [dB]:
    31.0 / 16.0
    Vendor ID (Local/Remote):
    TMMB / IFTN
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    3 / 0
    Loss of Power (Local/Remote):
    0 / 0
    Loss of Link (Remote):
    0
    Error Seconds (Local/Remote):
    31 / 0
    FEC Errors (Up/Down):
    0 / 2,290
    CRC Errors (Up/Down):
    0 / 0
    HEC Errors (Up/Down):
    0 / 0
    Line Profile:
    Fast

    Wow my download speed is 21 Kbps!!!!
    1. Best Effort Test: -provides background information.
    Download Speed
    21 Kbps
    0 Kbps
    250 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 21 Kbps
     For your connection, the acceptable range of speedsis 100-250 Kbps.
     Additional Information:
     Your DSL Connection Rate :13350 Kbps(DOWN-STREAM), 444 Kbps(UP-STREAM)
     IP Profile for your line is - 135 Kbps
    The throughput of Best Efforts (BE) classes achieved during the test is - 13.43:28.25:62.15 (SBE:NBEBE)
    These figures represent the ratio while sententiously passing Sub BE, Normal BE and Priority BE marked traffic.
    The results of this test will vary depending on the way your ISP has decided to use these traffic classes.
    2. Upstream Test: -provides background information.
    Upload Speed
    283 Kbps
    0 Kbps
    444 Kbps
    Max Achievable Speed
    >Upload speed achieved during the test was - 283 Kbps
     Additional Information:
     Upstream Rate IP profile on your line is - 444 Kbps
    When will BT consider taking this as a fault??? What's the difference between 21 Kbps and no connection????

  • What is the exact use of 'Day Balance' and 'Period Balance'??

    Hi All,
    Can any body give me a detail and exact description about 'Day Balance' and 'Period Balance' fields used under 'Base Emtitlement' subtree option of V_T559L.
    Thanks,
    Swapnil
    PS : Points will be rewarded for helpful answers...!

    1. First one has to understand that R3 is OLTP system purely used for transactin processing while BW is used for OLAP ie reporting purpose only. At a table level if we do not have  a redundant second table the R3 system will be over loaded when the OLTP & the OLAP systems access the same table for their respective purposes. So we have to take data from the document table with a time lag and put into the statistical tables so that BW will get the data as and when required.
    2. This question is related to 1 and the above answers both.
    3. V3 is a generic process and is used for data extraction from the R3 transaction tables and can be used for any system as such.
    4. Both the processes are independent of each other and there is no relationship.
    Hope this helps
    Cheers
    Viva
    Assign points if this helps.

  • To get the Number of workign days in a period

    Hi All.....I have a requirements where in I need to get the number of working days in a period and also the dates with it. Say there are 28 days in a period ...then the working days would be 20 say...I need to get all the working dates......I know there is a FM "RKE_FACTORY_SELECT_DAYS" which does not exist in my systm.....So whats the other alternative for this......Please reply soon....
    Thank you.
    Madhukar.

    Have the code that is inside the FM.
      DATA: L_V_AKTDAT LIKE SCAL-DATE.
      DATA: L_V_INDICATOR LIKE SCAL-INDICATOR.
      CLEAR  : ETH_DATS.
      REFRESH: ETH_DATS.
      L_V_AKTDAT = I_DATAB.
    * do it for all days in space of time
      WHILE L_V_AKTDAT <= I_DATBI.
        CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
             EXPORTING
                  DATE                         = L_V_AKTDAT
                  FACTORY_CALENDAR_ID          = I_FACTID
             IMPORTING
                  WORKINGDAY_INDICATOR         = L_V_INDICATOR
             EXCEPTIONS
                  CALENDAR_BUFFER_NOT_LOADABLE = 1
                  CORRECT_OPTION_INVALID       = 2
                  DATE_AFTER_RANGE             = 3
                  DATE_BEFORE_RANGE            = 4
                  DATE_INVALID                 = 5
                  FACTORY_CALENDAR_NOT_FOUND   = 6
                  OTHERS                       = 7.
       IF SY-SUBRC NE 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                 RAISING DATE_CONVERSION_ERROR.
       ENDIF.
    * indicator is space if actual day is a working day
    * if indicator is not space the actual day isn't a working day
        IF L_V_INDICATOR EQ SPACE.
          CLEAR ETH_DATS.
          ETH_DATS-PERIODAT = L_V_AKTDAT.
          APPEND ETH_DATS.
        ENDIF.
        L_V_AKTDAT = L_V_AKTDAT + 1.
      ENDWHILE.

  • Help me cancel the 30-day free trial period for Adobe Creative Cloud

    HI, I want to cancel my 30-day free trial period for Adobe Creative Cloud.
    Please, assure me you won't start charging me after the free trial period.
    Thanks

    alexacaesco wrote:
    HI, I want to cancel my 30-day free trial period for Adobe Creative Cloud.
    The customer support should be better. How are we supposed to contact you guys if there is no phone number for the USA?
    Please, assure me you won't start charging me after the free trial period.
    Thanks
    Oh!! just stop using it and after 30 days, it will expire.  No need to to take any action.  It is free so anyway so why bother?
    They cannot start charging you because they don't have your credit card details.  They need to have your express permission to take out a full contract of 12 months.

  • Formula for calculating the average takings for a given day in the week?

    I would like to calculate the average takings for each day of the week for a given financial year.

    Rick,
    I've looked at your document, made some additions and returned it to you. In your document you were not only using AVERAGE, but also MIN and MAX. Unfortunately, MIN and MAX don't have "IF" versions, so they can't be used to selectively operate on data matching criteria in a range.
    What I did to accommodate the need for MIN and MAX was to add a column for each criteria, in this case the different days of the week.
    In your document you also indicated the need for a Chart to graphically summarize the performance by day of the week. I rearranged your summary stats table to facilitate creating a chart from that table. I chose the mixed category chart with Bars for Min and Max and a Line for Average.
    Following are Screen Shots for the modified Data table, the Stats table and the Chart:
    The key expressions are:
    For Monday receipts:
    =IF(WEEKDAY($B)=2, $G, "")
    For Monday Minimum:
    =MIN(INDIRECT("Ledger::"&CHAR(70+ROW())))
    You had pre-filled Column A with 3-letter abbreviations of the Days of the Week. I am not sure this is important, since you could have formatted the Date (Column B) to show the same information, but I didn't like seeing the abbreviations for days that didn't have data entered yet so I replaced the text with an expression...
    =IF(LEN(B)>0, LEFT(DAYNAME(WEEKDAY(B)), 3), "")
    I seems that you may have filled the table with several months worth of rows of Mon, Tue, etc. Now, if you wish, you can trim the blank rows to just a few and add more as you need them.
    Let me know if you have any questions about maintaining the document.
    Jerry

Maybe you are looking for