YTD & MTD day wise while input is month

Hi,
In a report I have to provide selection as a month & plant.
Output should contain day wise sales detail with YTD & MTD.
I am not getting how to calculate YTD & MTD day wise while selection input is Month.
Plz suggest me wt to do.
Regards,
Kiran

Hi,
Check in SDN
MTD and YTD fig calculations
It works based on SY-DATUM.
* First Month Of Current Fiscal year comment*
    WHEN 'FMYEAR'.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZMONTH'.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
             EXPORTING
               i_date               = sy-datum
*         I_MONMIT             = 00
               i_periv              = 'V3'
            IMPORTING
              e_buper              =  zbuper
              e_gjahr              =  zbdatj.
      CLEAR: l_s_range.
      l_s_range-low+4(2) = '04'.
      l_s_range-low+0(4) = zbdatj.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
     ENDLOOP.
Note: In the above code  I passed i_date = sy-datum, so you pass your month as input for  i_date.
i.e. Fix the DD = '01'  and concatename your Input month with DD teh you get YYYYMMDD so pass that to i_date.
Thanks
Reddy
Edited by: Surendra Reddy on Feb 24, 2009 5:50 AM

Similar Messages

  • Day wise MTD values

    Hi,
    In a report I have to provide selection as a month.
    Output should contain day wise sales detail with MTD figure also.
    I am not getting how to calculate  MTD day wise while selection input is Month.
    Input is Calmonth = 02.2009
    Output format is
    DATE              TTD               MTD      
    01.02.2009     374.78     374.78     
    02.02.2009     308.58     683.36    (     308.58  + 376.78 )
    03.02.2009     323.32     1006.68  (     683.36  + 323.32 )     
    04.02.2009      273.87     1280.55  ( 1006.68 + 273.87 )
    Plz suggest me what to do.

    Create a RKF with User Exit Variable ( TO get First Day of month ) & MTD
    Put Date in Coloum
    User Offset,
    But it will be static report.
    No drill down is possible
    Regards,
    Viresh

  • Day wise Closing stocks for the given month

    Hi,
    Please suggest me your valuable ideas for Closing Stocks Calender day wise for the given month.
    Ex : User Input 03.2013 , now report has to show daywise closing stock like below
                                            01.03.2013    140 MT
                                             02.03.2013     150 MT
                                              31.03.2013    230 MT.

    I like recursive with clause B-)
    with rec(StaV) as(
    select extract(day from date '2011-01-01')
      from dual
    union all
    select StaV+1
      from rec
    where StaV+1 <= extract(day from last_day(date '2011-01-01')))
    select ListAgg('''' || to_char(StaV) || '''',' ')
           within group(order by StaV) as days
    from rec;
    DAYS
    '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' '29' '30' '31'

  • Forecast by each day wise

    Hi,
    I got a requirement to do a forecast on the stock values.
    I have created a Real-Time InfoCube  in which the daily stock Issues and Receipt values are update from the Stock InfoCube  which are actual Values.
    I need to create a Ready-input query doing forecast values based on each day wise of the current month.
    The business case is..assume that today date is 10th of the current month.
    The report should display the actual values from 1 - 10th  and from 11 to last day of the current month it need to be ready-input query to enter the values.
    How to get the each day as column of the current month and how do we restrict the actual and forecast values at each  column.
    Please advice how to meet the requirement.
    Regards
    Jagannadha Raju

    Hi David,
    Thanks for the reply and for your time...
    i want to explain in little bit.
    My stock cube contains the data only upto day (10th). if i put cal day in the column it is display the only upto 10th day. But it should display the columns from 11 to 31 as input query also.
    Please advice on this... even if we don't have data also how would we display all the days as columns.
    Regards
    Jagannadha Raju

  • Day wise sales Vs Production report - Urgent

    Dear Guru's
    My client require a new report, Material A is producing in plant 1000 and they want to know day wise production Vs day wise sales, week wise production, week wise sales and month wise prodution and month wise sales.. all these in one format so that they take necessary steps.. please provide me some inputs which i need to give to ABAPers, and is there any standard report for these...
    Thanks
    Ramki

    I am sorry Ram Ki, these are client restricted documents and i am not haing authorization to email you.
    Sorry again...I think this is not big job just sit with abaper and search the fields requires for your report from the said tables. You have to design the format in excel and explain the same to abaper... if your abaper is good then he will do this without any problem.
    Regards
    TAJUDDIN

  • How to Display YTD ,MTD

    Hi,
    can any one telme,
    How to Display YTD ( Year to date ) and MTD (Month to date ) in Reports,
    <b>what is the Logic,on which Time Char..i have to cerate YTD, MDT.</b>in my Cube i have All time Char..
    Thank U
    jashaik

    Hi Shaik,
    If you want to populate YTD and MTD based on users selection then you need to create customer exit variables to achieve this.
    Create two customer exit (YTD, MTD) variable for 0DATE. Read the selection screen variable and populate YTD and MTD.
    here are some sample codes: -
    MTD
    data: l_first_day_of_month type D,
            l_s_var_range type rrrangeexit,
            l_s_range type RSR_S_RANGESID.
      if i_step = 2.
        read table i_t_var_range into l_s_var_range
                                 with key vnam = 'WZR_V009'.
        if sy-subrc = 0.
          concatenate l_s_var_range-low+0(6) '01' into l_first_day_of_month.
          clear l_s_range.
          l_s_range-low  = l_first_day_of_month.
          l_s_range-high = l_s_var_range-low.
          l_s_range-opt  = 'BT'.
          l_s_range-sign = 'I'.
          append l_s_range to e_t_range.
        else.
          exit.
        endif.
      endif.
    YTD
    DATA:
      l_s_range TYPE rsr_s_rangesid,
      l_s_var_range TYPE rrrangeexit,
      l_first_date_of_year TYPE d,
      l_indxkey(20) TYPE c VALUE 'WZR_V009',
      l_date TYPE d,
      l_last_date TYPE d,
      l_month TYPE i,
      l_last_month(2) TYPE n,
      l_parameter type d.
      IF i_step = 2.         " after the popup
        READ TABLE i_t_var_range INTO l_s_var_range
                     WITH KEY vnam = 'WZR_V009'.
        IF sy-subrc = 0.
    *---  store content of WZR_V009 in sap memory
          SET PARAMETER ID l_indxkey FIELD l_s_var_range-low.
    *--- clear other parameter to avoid confusion
          GET PARAMETER ID 'WZR_V026' FIELD l_parameter.
          CLEAR l_parameter.
          SET PARAMETER ID 'WZR_V026' FIELD l_parameter.
          CONCATENATE l_s_var_range-low+0(4) '0101'
          INTO l_first_date_of_year.
    *--- fill variable
          CLEAR l_s_range.
          MOVE 'BT' TO l_s_range-opt.
          MOVE 'I' TO l_s_range-sign.
          MOVE l_first_date_of_year TO l_s_range-low.
          MOVE l_s_var_range-low TO l_s_range-high.
          APPEND l_s_range TO e_t_range.
        ELSE.
    *--- variable not found
          EXIT.
        ENDIF.
      ENDIF.
    WZR_O009 is the selection screen variable populated by user entry while qurey is refreshed.
    Hope it helps.
    Thx.
    Soumya

  • Day wise cal of FI report...cl/bal..open..bal

    Dear friends,
                   I am working in FI report (vendor balance for date ranges) .Its a ALV report. I want to fetch the datas for debit ,
    credit,opening balance,closing balance,for the paticular vendor or all vendors for date ranges.the table for this iam using is BSIK AND LFC1.
    all the datas stored in the table is for month wise,but my programe (my user needs even for day wise) how to calculate this,
    or is there any function modules avaliable  or can u konw any other table storing day wise balances...this report is urgent ..
    any one pls suggest me .advance thanks..
    regards
    veera

    y u posted again ? u already closed the prev.thread.
    u have to take BSAK+BSIK also .
    BSAK :Accounting: Secondary Index for Vendors (Cleared Items)
    BSIK:Accounting: Secondary Index for Vendors
    Regards
    Prabhu

  • GL account opening balance day wise

    HI,
        I am working on FI report, where i need to calculate the G/L account closing balance on a daily basis, which will be used as the opening balance for the next day, please help me out with some sample report or logic to claculate the closing balance day wise.
    u can mail me to :[email protected]
    Regards
    Soyunee.

    Hi,
    You have to make use of many tables for this purpose.
    1. You have to claculate the previuos period and finscal year for the given date..
    2. You have to calculate the G/L balances for this period for the given G/L account from table GLT0.(You can use some of the standard function modules for the same)
    3. You have get the line items from the various tables like BSIS,BSAS,BSIK, BASK, BSID and BSAD for the dates from the begining of the month to the given date-1. sum upthis amount with the amount retrieved from step 2 .This will be the opening balance for the given date.
    4.retrieve the data from he same tables like step 3 for the given date. This will the transactions of the given date.
    5. sum up  the amounts from step 4 with step 3. this will be the closing balance for that date.
    let me know id you want any further info..
    Reward the points if i answered your question..

  • CO Profitability report day wise

    Hi Gurus,
    My client wants to see the Profitability report at company code level day wise, Sale order and Product, is it possible.
    If its possible, then how the data will flow day wise and what are the pre-requisits to get this done.
    Does SAP has any standard report to get the required.
    Day wise i mean, if i take the COPA report on 2nd Feb, it should display only the amounts which were posted on 2nd Feb and activites confirmed etc.
    Thanks & Regards,
    Praveen

    Hi All,
    Can you tell me what is Line item report, and how is it different from KE30 summarised report.
    What i understand from your saying is, Line item report will give us the particular dates information when the report is executed, leaving out the info till previous date.
    Even if the line item report is created, can u tell me how the data will flow into it. Because we have Sale order cost estimate for the client. If i create a seperate value field for the cost component then it will give me the Sale order cost estimate info which is again standard. How is it possible to get actual data.
    What about the other cost centers amount. How this data is passed onto it.
    If i have to get this data into the reports then each day I should do Assessment cycles, settlements of the order and reverse the same the next day. But even if i do that i wont be able to get the day wise report as the data will get posted on month end date and again will be summarized one.
    Pls clarify me on this. My clients expectation is to bring out the daily report to see the progress of each day and wats the cost he is incurring so that he can compare it with sterdays and also the plan data.
    Thanks & Regards,
    Praveen

  • No of days elapsed for a given month

    Hello,
    I am trying to find number of days elased for a given month. How do I write this in CMOD.
    My input variable is CALMonth/Year  - 06/2010. If I run the report today, I should get numbers of days up to today. Please advise.
    thanks for your help in advance.
    AG..

    Following thread might help you with this
    No. of days in a month

  • Report display will be 2010,2011 year wise display and 2012 Month display

    Hi,
           I want to Create Report, output will be 2010,2011 year wise display, 2012,2013 month wise display and Fiscal year quarter display, all are display based on input value of Fiscal year data, please anyone guide me, How to do?
    Thanks,
    Nandish

    Hi, 
          How to assign KF to Time Characteristics,My report dsplay will be like this, For example
          Input Fiscal YEAR=2010 to 2013
                        Material              2010   2011  APR.2012 to MARCH 2013 
    Quantity              A1              200      300        *                    *
    Quantity              A2              300      400        *                    * 
    Also Display quarter wise display. How to do
    Thanks,
    Nandish

  • Day Wise Reports in BI

    Hi Experts,
      How to create daywise reports in BW.if the end user enters the from date as 01/05/2009 to 10/05/2009, in report, i need to show data that is aggregated as daywise.It should display on daywise. I have created query on Infoset,which is pulling data from 2 ODS.
    Can u pls help on this issue.
    Thanks,
    Ram.

    Hi..
    for displaying day wise report, you need a field having date of the record. ex. posting date. Now in query restrict that date field with a variable to allow user input interval for that date field. It will automatically show fields (which you have put in row & col section including date field) day wise.
    hope it helps. if still you have problem in it, pls give more detail about your fields.

  • Day wise balance report

    Hi,
    I WANT A REPORT FOR ALL VENDOR S DAY WISE BALANCE.
    CAN ANYONE GUIDE ME ON THIS.
    Sudhanshu

    Hope this will help you..
    ACCOUNTS PAYABLE
    (Note : Similar Reports available for A/R are available for A/P also)
    1. Vendor Balances                                                                      S_ALR_87012082
        i) Advance to staff register – Monthly (S_ALR_87012082)
           For Loan to Staff  - Enter Sp.GL Ind.2 and Tick Special GL Balance
        ii) For Balances in Employee Accounts – enter Reconciliation Account No.35300
       iii) For Cumulative & Non-Cumulative Fixed Deposits Choose Reconciliation  
           Number 31001 or 31002 as the case may be.
      1v) For Sundry Creditors Balances-  Enter Recon No.35001/35100
    2.     Vendor Debit/Credit Memo Register                                       S_ALR_87012287
         In SAP Credit Memo debits the Vendor A/c – Document Type is KG.
         There is no Debit Memo concept in SAP. For crediting the Vendor other than by
         regular invoice procedure, Document  Type KA is to be selected.
         Choose Transaction Code S_ALR_87012287 ( of Document Journal ) and enter
         the above mentioned Document Types under Dynamic Selections for running the
         registers)
    Satish
    Assign points if useful

  • Day wise in MD61

    HI,
           I ahve a requirement for every month 10 pieces, but i ahve saved this scenario. How to change by day wise?
    Can u give me some idea.
    Regards,
    NSR.

    Hi Reddy,
    In transaction MD62 enter the material & plant & then goto the schedule line tab page.
    Choose the requirements & then goto menu Edit->Split perd online. In the pop-up screen enter "D" Day format & then click enter.
    Regards,
    Senthilkumar

  • Day Wise Depreciation Calculation Issue

    Hi Team,
    I have an issue regarding day wise depreciation calculation. I have selected Dep for the Day check box and it is calculating day wise depreciation but here it is taking as 366 days for base it should be 365 days (2011 is we have only 365 days) do ineed to change any settings from Asset accounting side? Entire year wise depreciation is correct but if i see month wise there is small difference due to 366 days. How can i control this setting?
    Regards,
    Nagaraju

    Hi,
    2012 is a leap year.  Therefore 366 days.
    regards Bernhard

Maybe you are looking for