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'

Similar Messages

  • Material opening and closing stock for a given day- Tables or FM

    Dear Friends
             i have to make a report  , related to Material opening and closing stock for a given day  , i check the T-Code- MB5B ,
    it is not giving correct date . is any functional module is available  ? . i checked some table like mbew , mard . it is also not giving correct requirement . Please help

    Hi
    Goto transaction MC.9, Give your Material and,Plant and the date which you need to know the closing stock. Do make sure that in the high and low values you are giving the same date there. I guess no such FM are available for this. You can refer the  [Link|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=15856]  for some help.
    Regards
    Vinodh
    Edited by: Vinodh_AN on Dec 15, 2010 9:19 AM
    Edited by: Vinodh_AN on Dec 15, 2010 9:25 AM

  • Calculate Avg  for the given months based on the no. of days in months

    Dear Experts
    I  have a report in which there is a characterictic claenderyr/month.The Input paramter is claenderyr/month which is restricted by a variable of type interval. i mean user will enter calenderyr/month as interval say 012010 to 06.2010. Now I have to calculate Avg sale Qty for the given months based on the no. of days for the given range of months. How I can achieve this in BW Query. Pl. advice
    Dinesh Sharma

    Hi,
    Create formula for the sales qty.
    maintain the exception aggregation as average based on calday
    Best Regards,
    M.H.REDDY

  • Pivot Day wise closing stock report

    Expert,
    we need same report from SAP
    Pivot report day wise closing stock
    Item Code - Item Description - UoM - Warehouse - Item Group - Days 1-2-3-4-31
    Selection criteria
    From Date
    To Date
    Item Group
    Please help and send Pivot query.
    Thanks in advance
    Mukesh

    Hi Nagarajan Sir,
    The above link query is showing a particular date stock status
    but my requirement is different below sample format
    Date     -    Item Code - Item Description - UoM - Warehouse - Item Group - Closing Stock
    15/03/14   F00012       TMT BAR 10 MM     KG        KRY01          FINISHED      230.35
    16/03/14   F00012       TMT BAR 10 MM     KG        KRY01          FINISHED      265.65
    17/03/14   F00012       TMT BAR 10 MM     KG        KRY01          FINISHED      356.35
    Can i get this format
    Selection criteria
    From date
    To Date
    Warehouse
    Please think about this format and suggest
    Regards
    Mukesh Singh

  • CLOSING STOCK FOR A GIVEN PERIOD

    hi all,
    I have to design a report to find out the closing stock.How to find out closing stock for say 1st nov to 15th nov.In MBEW and MCHB , i am getting closing stock as on date. please help me out if there are any tables or any other way out through function modules.
    Regards,
    Devina

    hi,
    I will check that t code.
    thanks and regards,
    Devina

  • Calculating Average stock for the given period

    Hi,
    I need to calculate the average stock based on given date range given by user.
    Total stock is also calculating in report only. So it wil get divide by differnce between the date range.
    How can we do that?

    Using formula variable you can find difference between 2 dates .
    -create two formula variables for 2 dates .
    -create a formula to differenciate them
    -create formula variable and divide that by stock it will give the average stock ..
    some example ..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f15839-0cf1-2b10-c6a7-ebe68cc87cdc?quicklink=index&overridelayout=true
    Ravi

  • Stock at Vendor Materialwise for the given postingdate

    Hi,
    I got a requirement to develop a report which lists the Stock at Vendor materialwise for the given postingdate.
    How to calculate the opening & closing stock for the given date for a vendor materialwise?
    Regards,
    VK.

    Hello
    MSLB - Special Stocks with Vendor
    And for stock on specific date you need calculate with tables MKPF and MSEG.

  • How to find the Day on a Week for any given Date

    Hi..... I need your help to find out the Day on a Week for any given Date .
    Say if the Date is 31/12/2009 , what would be the Day on a Week for this Date.
    Are there any fucntions available to determine the same?
    Please let me know....Thanks in Advance
    Regards
    Smita

    Hi ,
    You can using the following peice of code to get the Day of a Week for the given date :
    Calendar now = Calendar.getInstance();   
    System.out.println("Current date : " + (now.get(Calendar.MONTH) + 1)  
         + "-" + now.get(Calendar.DATE) + "-" + now.get(Calendar.YEAR));
    //create an array of days  
    //Day_OF_WEEK starts from 1 while array index starts from 0        
    String[] strDays = new String[]{"Sunday",  "Monday", "Tuesday", "Wednesday",  "Thusday",   "Friday",  "Saturday" };   
    String day_of_week = strDays[now.get(Calendar.DAY_OF_WEEK) - 1];     
    System.out.println("Current day is : " + strDays[now.get(Calendar.DAY_OF_WEEK) - 1]  );
    Edited by: Ritushree Saha on Jun 4, 2009 1:09 PM

  • FM that gives number of day in the week for the given date

    Hi,
    I have a requirement to find the number of the day in a week for the given date. For example, 07/09/2009 is Thursday & 4th day of the week. Is there any FM to accomplish this task?
    Appreciate your help in Advance.
    Thanks,
    Kannan.

    Hi Kannan,
    ISH_GET_DAY_OF_WEEK.
    Regards,
    Dilek

  • TO GET WEEKS for a given MONTH AND YEAR

    Is there any FM to get the no of weeks for a given month, say 01 2005.
    Can i get the week numbers say 1 2 3 4 5 for the given month and year.
    Please let me know.
    Happy Holidays.
    Regards,
    Manohar E

    Hi Manohar,
       Use FM DATE_GET_WEEK twice; first time pass first day of the month and again pass the last day of the month as a parameter. So u will be having week number(yyyyxx) for the first week of the month and week number for the last week of the month. From these two, in between week numbers u can easily fetch. I hope this will help u out.
    Regards,
    Kavya Shah

  • Batch wise stock for a given period or month

    Hi,
    My company wants to implement stock ageing report in MM.
    We manage the stocks in Batches. For us the main criteria for stock ageing is batch creation date.
    The report should run stock ageing based upon the date range given as an input screen
    For ex : date range in input can be of today or as of 30.06.2010.
    If the report is run as of today then I am able to get the batch stock from table MCHB . Quantity from field "CLABS"  and the batch creation date from the field "ERSDA"
    But if the report to be run as of 30-06-2010. Then I am not able to get the data from MCHBH as of 30.06.2010.
    I have checked for one material in the table and as per stock it should be 351 as of 30-06-2010 but in the MCHBH table for the month 06. year 2010 it is showing as 136 pcs only.
    As our LIS tables are not getting populated correctly I am not able to check those tables too.
    Can any one guide me with the logic or the table where I can get the batch stocks for a particular month.
    I need Material, Batch, Quantity month and year .
    Please advice how can i get the data and from which table.
    Thanks you for your support in advance.
    Regards
    Fazal

    Hi Jurgen,
    Thanks for your reply. I am not looking for any analysis report or LIS report.
    i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
    The report output format to be
    stock <=30 days
    stock>30 and <=90
    stock>90 and <=180
    stock>180 days
    The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
    Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
    If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
    I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
    Thanks
    Fazal.

  • Tables/FM for opening/closing stock for material on given posting date

    Hi All,
    I had requirement of find the opening/closing stock for material on given posting date. The values we can find out using TCode - MB5B.
    But I cannt use MB5B to extract data because I need to find detials for thousands of material.
    Can you please adivce if their is any FM or tables through which i can find this detial on any given date apart from current date.
    Thanks & Regards,

    Hi,
    [https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6593903]
    [https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6630975]

  • 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

  • How to load stocks for the months prior to initialization ?

    Hello,
    We load a cube stock from 3 ODS for BF,BX and UM extractors.
    We are in a monthly snapshot scenario(we have read the specific how to but we must use 3 ODS one for each datasource because of data integrity (strong customer architecture contrainst).
    For opening stock and the future month the solution is ok.
    How to load the data for the 12 month prior the loading of opening stock ?
    Specific datasources, full loading ?
    Thanks to share our experiences
    Best regards
    Christophe

    your previous months closing stock becomes opening stock for current month. Try the infostructure S039,this holds the closing stock of each month. You can populate this infostructure with program rmbs039. create a generic data source on this and populate opening and closing stock for each month.

  • Month for the given Week

    Can anybody tell me how to get the month for the given week..
    In my requirement I have week(201026).
    For this input, i nedd the month for this 26th week .
    Thanks in Advance.
    Moderator Message: Basic Date-related questions are not allowed since they are FAQ.
    Edited by: kishan P on Dec 17, 2010 1:17 PM

    Here's that code modified to something much more like what you specified. It prints the number of weeks between to dates inclusive, eg. there are 4 weeks between "Feb 1, 2003" and "Feb 28, 2003" not 3.something.
    I am now using the number of milliseconds in a day instead of in a week. The value 86400 is 24*60*60.
    I've also changed the input format to support days like
    June 1, 2003. Note you will need to put the args in "" when you run it because of the spaces.
    import java.util.Date;
    import java.text.*;
    public class TestTP
         static double MILLIS_PER_DAY = 86400*1000;
         public static void main( String args[ ] ) {
              double weeks;
              Date d0,d1;
              for (int i = 0; i<(args.length-1); i+=2)
                   d0 = parseDate(args);
                   if(null == d0)System.out.println(args[i]+" is bad");
                   else
                        d1 = parseDate(args[i+1]);
                        if(null == d1)System.out.println(args[i+1]+" is bad");
                        else
                             double days = dayDiff(d0,d1); // get difference in days
                             weeks = (1+days)/7;               // make it inclsive in weeks
                             System.out.println(args[i+1]+" is "+weeks+" weeks after "+args[i]+" inclusive");
         static Date parseDate(String ds)
              Date dt;
              SimpleDateFormat sdf = new SimpleDateFormat("MMM d, yyyy");
              sdf.setLenient(false);
              try{dt = sdf.parse(ds);}
              catch (ParseException e){dt = null;}
              return dt;
         static double dayDiff(Date d0, Date d1)
              return (d1.getTime()-d0.getTime())/(MILLIS_PER_DAY);

Maybe you are looking for

  • Error message while copying from iTunes to iPod

    My daughter's iPod shuffle (1st gen) was not charging so I updated it to the lastest software (1.1.5). While doing so, iTunes required an upgrade as well (7.5). Both are updated. But it is still not charging. That's my first problem. I decided to see

  • MACBOOK PRO CAN FAIL TO RESTART ITS VIDEO AFTER BEING CLOSED, LOGGED OFF

    Most of the time, if I log off and close the lid, things are fine when I open it again. But, from time to time, I'll have to restart to get the display back. As for more information: I recently got a secondary display (not because of this) and now, w

  • JSF in Weblogic Portal

    Hello Friends, I am using first time JSF portlets in weblogic portal 10.2 I created jsf page and generated portlet based on it. I added the portlet to my first page. When I try to access the portal app I get below error. I spent almost 3days on this

  • Remote callable function modules in SAP R/3.

    Hi All, Can you please let me know approx number of remote callable function modules in available SAP R/3. Thanks TG

  • Help with error message opening lightroom 5 on macbook?

    I downloaded lightroom 5 on my macbook. i have os-lion. When I open the program and error message appears  saying " error switching modules". I am missing all the options to import photos. When I try to click on lightroom preferences at the top of th