Stock closing balance report: per day

Hi
I wonder if someone could help.
I require a report that will show me the closing stock balance over a specified period, but I want it to show the closing balance on each day, even if there is no movement.
I have used, and adapted, the following query from another thread. However I want it to show data for each day within the time period.
Thanks, Andy
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Group nvarchar(10)
Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
Set @Group = (Select s2.ItmsGrpCod from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]')
Select
a.Itemcode,
min(a.Dscription),
((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing
from(
Select
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance],
0 as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
Group By
N1.ItemCode,N1.Dscription
Union All
select
N1.Itemcode,
N1.Dscription,
0 as [Opening Balance],
sum(N1.inqty) as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and
N1.Inqty >0
Group By
N1.ItemCode,N1.Dscription
Union All
select
N1.Itemcode,
N1.Dscription,
0 as [Opening Balance],
0 as [IN],
sum(N1.outqty) as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and
N1.OutQty > 0
Group By
N1.ItemCode,N1.Dscription) a, dbo.OITM I1
where
a.ItemCode=I1.ItemCode and
I1.ItmsGrpCod = @Group
Group By
a.Itemcode
Having sum(a.[Opening Balance]) + sum(a.[IN]) + sum(a.OUT) > 0
Order By a.Itemcode

No, not entirely.  It does show Ins and Out, but only days where there is an In or an Out and it also show ALL the Ins and Outs on one day.
I need the report to show me just the closing balance for each day, and also every day even if there is no In or Out.  Basically I need the query above to show me each day rather than the aggregate for the whole date period.

Similar Messages

  • Cash Journal Day wise Closing Balances Report

    Dear Seniors,
    There is a requirement to have the details of all Closing Balances of Cash Journal.  Is there any table which stores this data or any other method to get this information.
    Regards
    KVKR

    Friends,
    Got the solution.
    We need to enter
    FI_CASH_BB_*       Text for the opening balance
    FI_CASH_CF_*       Text for the balance carried forward
    FI_CASH_EB_*       Text for the closing balance
    FI_CASH_SI_*       Text for the signature line
    Thanks for the help.
    Regards

  • FG Op., Addition, SALE, Closing Balance Report

    Can any one tell me how can i gent the Total Finished Goods Opening, addition/Produced , Sold and Closing Balance for Manufacturing Company ?
    In the same way for the Trading Company, how can i get the details of the Opeing Goods, Purchased, Goods in transit, Goods Sold and Closing Balance ?
    Thanks in Advance,
    Regards,
    SAN2008

    Hi,
    There is no standard report which gives the opening balance of the stock on a particular date. All Inventory reports gives the information of the stock as on today.
    If the LIS structres are updated, you can use S031 and S033 tables to make a custom report.
    Regards,
    Sai

  • Vendor Line item with Opening and Closing Balances report regarding

    Dear All,
    I need a report for vendor line items with Opening and Closing balances.
    Thanks in advance
    Sateesh

    Hi
    Try S_ALR_87012082 - Vendor Balances in Local Currency
    Regards
    Sanil Bhandari

  • How to view the Material Value Involved in the WIP Closing Balance Report

    We are able to see the Itemwise WIP Closing Value using KKAQ. 
    We have one requirement that to know the Material Value & Quantity Involved in the WIP Closing Balance Summary. 
    How to fetch the information for Material Value , Process Value With Quantity on Itemwise from WIP Closing Balance.?
    Thanks in Advance
    Regards
    K.Natarajan

    Dear Premkumar,
    Thankx for your reply.  But when we execute the T-Code KKBC_PKO for an Item, It is giving an error like "No product cost collector exist for material/plan/prod.process <Matl.COde>"
    How to see this report. 
    Regards
    K.Natarajan

  • MARS Incident Report per day

    Hello,
    Is there a way to have a report with all incidents per day?
    If I understood corectly 'Query/Reports' tab allows to generate reports only be events type.
    Thanks a lot.

    I think you are correct, this can't be done. Given the recent EOL statement for mars, I dont think it will be added even if a feature request was made via your local Cisaco account manger.
    MARS EOL at
    http://www.cisco.com/en/US/partner/prod/collateral/vpndevc/ps5739/ps6241/eol_c51-636888.html
    Matthew

  • Inventory Closing Balance Report

    Hi gurus,
    I clients want to see Inventory value report as below:
    Item Opening stock Import Qty (Received) Consumed Closing Stock
    Qty. Value Qty. Value Qty. Value Qty. Value
    Received indicates all incoming Qty into Inventory
    Consumed: All outgoing Qty from Sub Inventory/ Org.
    Is there any standard report to extract above data? there are some reports "inventory value report" but not meeting above criteria
    Please advise best report from Oracle apps? and Table?
    Regards
    Chinnu

    Hi gurus,
    I clients want to see Inventory value report as below:
    Item Opening stock Import Qty (Received) Consumed Closing Stock
    Qty. Value Qty. Value Qty. Value Qty. Value
    Received indicates all incoming Qty into Inventory
    Consumed: All outgoing Qty from Sub Inventory/ Org.
    Is there any standard report to extract above data? there are some reports "inventory value report" but not meeting above criteria
    Please advise best report from Oracle apps? and Table?
    Regards
    Chinnu

  • Opeing and closing balance report for GL account

    i want opeing balance by taking sum of tsl01 ,tsl02.tsl03 up to tsl16 based on posting period abd before that i have to check two internal tables.out of two ,first contains data from table faglflext and second internal table contains the merge data of bkpf and bseg table and if second table contain the gl account no. which is not present in 1st internal table then i have to delete it from second internal table..here is my code ..pls tel where m wrong or whethe rm going correct..thanks ...
    <removed by moderator>
    Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve readable formatting.
    Edited by: Thomas Zloch on Aug 24, 2011 3:25 PM

    Hi,
    As far as i know, you must be getting all required data to be displayed in an internal table.
    What you need to do is just loop on it and use WRITE statement appropriately.
    Please see sample code below : This code is adding 1,2,3.... no before data in work area.. simily, you can add Opn Bal and Cl Bal etc appropriately.
    REPORT  ZTEST_RAHUL.
    DATA : i_no TYPE n.
    TYPES : BEGIN OF t_temp,
            name TYPE char20,
            roll TYPE numc10,
            END OF t_temp.
    DATA : i_temp TYPE STANDARD TABLE OF t_temp,
           wa_temp LIKE LINE OF i_temp.
    CLEAR wa_temp.
    wa_temp-name = 'Rahul'.
    wa_temp-roll = 26.
    APPEND wa_temp TO i_temp.
    CLEAR wa_temp.
    wa_temp-name = 'Mahajan'.
    wa_temp-roll = 27.
    APPEND wa_temp TO i_temp.
    i_no = '1'.
    LOOP AT i_temp INTO wa_temp.
      WRITE : i_no , ',' , wa_temp.
       NEW-LINE.
      i_no = i_no + 1.
    ENDLOOP.
    I know this may not be favourite answer to your question but can be used.
    Also, there is 1 more way to write a custom report and that is by writting a Wrapper report which will be just copying the selection screen from STANDARD CODE and then submitting standard code from wrapper code and return back.
    I hope this will help you.
    Regards,
    Rahul Mahajan

  • Opening and closing balance diff.In T.code FBCJ

    Hi exports,
    While we r checking Fbcj T.code for a day, the the closing balance of the day is difference for the next day opening balance.What is the reason behind that.
    Eg. In FBCJ-
    30.3.2010       closing balance is      46,888.00/-
    31.3.2010       Opening balance is    46,874.00/-
    So how to solve.
    Thanks
    Rohit

    Hello Rohit!
    Run the report RFCJ1 to delete the balance table TCJ_BALANCE. This table
    exists for performance reasons only. The balance table is regenerated   
    when the cash journal is used.                                          
    Now check the balance in the cash journal - the balance displayed       
    corresponds to the actual total of the line items.                      
    The behaviour is explained in the SAP Note:  1309577 - FBCJ: Incorrect balance in cash journal .
    REgards,
    REnan

  • Customer balance report - S_ALR_87012172

    Hi sap gurus, I searched forum but I couldn't get enough knowledge. how does S_ALR_87012172 calculate customer's balance value? based on posting date, clearing date, document date or other date? I'm checking with fbl5n but balances are different.as I understand, other sap users have same problem but there isn't clear information.
    difference between the balance of FBL5N and the balance of S_ALR_87012172
    Difference between FBL5N & S_ALR_87012172
    S_ALR_87012172 when compared with FBL5N does not reconcile
    diff in customer balance in the report S_ALR_87012172 & fbl5n

    Hello,
    You don't need to check clearing date.
    Please select data from BSID and BSAD less equal to key date. Is it equal to total balance report?
    You can balance report per each customer, I think you can check it for wrong balance's customer.
    Please share result to me.
    Regards,
    Burak

  • Daily Report of Opening closing balance & Consumption

    Dear Experts,
         We are implementing for dairy industry (PI) and here is requirement to develop a report which shows daily raw milk consumption ( Movement type 261) and daily opening and closing balances of raw as well as finished milk, Finished milk is produced using strategy 40 by repetitive manufacturing, please suggest me table and fields to get the data for such report.
    Thanks & Regards,
    Karad D D
    Edited by: Devidas Karad on Jun 19, 2010 10:38 AM

    Dear ,
    We had similar kind of report called -Material Balance Report for Finished Product .I am providing you the necessary tabel which I have utlised in my functinal spec.
    You can use the following table for your requirement for developing daily consumption report
    MBEWH - Stock with period and year
    MBEW - Stock wtih current period and year
    MSEG - Material Movement data details
    MKPF - Material Movement data
    You can make use the below tabel and data element to fetch some of the required information for finsihed good :
           AUFNR    AFKO-AUFNR,              "Proc. Order No.
          RSNUM     AFKO-RSNUM,              "Reservation No.
          PLNBEZ    AFKO-PLNBEZ,             "Header Material No.
          GSTRI      AFKO-GSTRI,              "Actual Start Date
          GLTRI      AFKO-GLTRI,              "Actual Finish Date
          WERKS    AUFK-WERKS,              "Plant
          BDMNG    RESB-BDMNG,              "Required Qty.
          ENMNG    RESB-ENMNG,              "Quantity Withdrawn
          EXTISS    RESB-ENMNG,              "Extra Issue
          BALQTY   RESB-ENMNG,              "Balance Qty.
          MATNR    RESB-MATNR,              "Component No.
          MAKTX    MAKT-MAKTX,              "Component Description
    Hope this will be useful
    Regards
    JH

  • Problem in calculating opeing and closing balance in fi report

    Hi all,
    I am developing customised FBL3N report as per our client requirement.I searched standard function module for calculating opeing balance for given gl account but didn't find it. so, for calculating opening balance we are using following logic.
    SELECT
                  A~BUKRS
                  A~HKONT
                  A~AUGDT
                  A~AUGBL
                  A~ZUONR
                  A~GJAHR
                  A~BELNR
                  A~BUZEI
                  A~BUDAT
                  A~BLDAT
                  A~WAERS
                  A~XBLNR
                  A~BLART
                  A~SHKZG
                  A~DMBTR
                  A~WRBTR
                  A~SGTXT
                                   FROM BSIS AS A INNER JOIN SKA1 AS B
                                   ON AHKONT = BSAKNR
                                   INTO TABLE IT_BSIS1
                                   WHERE A~BUKRS IN SO_BUKRS
                                   AND   A~HKONT IN SO_HKONT
                                   AND   A~BUDAT < SO_BUDAT-LOW
                                   AND   A~BLART IN SO_BLART
                                   AND   A~GSBER IN SO_GSBER
                                   AND   B~KTOKS IN SO_KTOKS.
    I am using following code for getting accounting documents for given gl account.
    SELECT
               A~BUKRS
               A~HKONT
               A~AUGDT
               A~AUGBL
               A~ZUONR
               A~GJAHR
               A~BELNR
               A~BUZEI
               A~BUDAT
               A~BLDAT
               A~WAERS
               A~XBLNR
               A~BLART
               A~SHKZG
               A~DMBTR
               A~WRBTR
               A~SGTXT
                       FROM BSIS AS A INNER JOIN SKA1 AS B
                       ON AHKONT = BSAKNR
                       INTO TABLE IT_BSIS
                       WHERE A~BUKRS IN SO_BUKRS
                       AND   A~HKONT IN SO_HKONT
                       AND   A~BUDAT IN SO_BUDAT
                       AND   A~BLART IN SO_BLART
                       AND   A~GSBER IN SO_GSBER
                       AND   B~KTOKS IN SO_KTOKS.
    For closing balance I am doing sum of opening balance and amounts of accounting documents for given gl account.
    the problem we are facing is they want output in following format.I am not able to club all this data as per desired output.
    please help me to achieve this.
    01.06.2011     01.06.2011     Op.Bal.          0835810021     0.00     13,258.00     0.00     13,258.00
    30.05.2011     03.06.2011     0008000005     001     0835810021     24,500.00     0.00     24,500.00     0.00
                   0          0.00     25,000.00-     0.00     25,000.00-
                   003          500.00     0.00     500.00     0.00
    01.06.2011     01.06.2011     Op.Bal.          0835810021     0.00     13,258.00     0.00     13,258.00
    30.05.2011     03.06.2011     0030000072     001     0835810021     72,141.72-     0.00     72,141.72-     0.00
                   0          0.00     73,614.00     0.00     73,614.00
                   003          1,472.28-     0.00     1,472.28-     0.00
    01.06.2011     01.06.2011     Op.Bal.          0835810021     0.00     13,258.00     0.00     13,258.00
    04.06.2011     04.06.2011     0030000084     001     0835810021     25,000.00-     0.00     25,000.00-     0.00
                   0          0.00     24,038.46     0.00     24,038.46
                   003          961.54     0.00     961.54     0.00
    01.06.2011     01.06.2011     Op.Bal.          0835810021     0.00     13,258.00     0.00     13,258.00
    23.06.2011     23.06.2011     0012000089     0     0835810021     0.00     10,000.00     0.00     10,000.00
                   002          10,000.00-     0.00     10,000.00-     0.00
    30.06.2011     30.06.2011     Cl.Bal.     999     0835810021     0.00     82,652.46     0.00     82,652.46
    Thanks in advance.
    Regatds,
    Sheela Patil
    Edited by: Sheela Patil on Nov 1, 2011 8:42 AM

    Hi,
    As far as i know, you must be getting all required data to be displayed in an internal table.
    What you need to do is just loop on it and use WRITE statement appropriately.
    Please see sample code below : This code is adding 1,2,3.... no before data in work area.. simily, you can add Opn Bal and Cl Bal etc appropriately.
    REPORT  ZTEST_RAHUL.
    DATA : i_no TYPE n.
    TYPES : BEGIN OF t_temp,
            name TYPE char20,
            roll TYPE numc10,
            END OF t_temp.
    DATA : i_temp TYPE STANDARD TABLE OF t_temp,
           wa_temp LIKE LINE OF i_temp.
    CLEAR wa_temp.
    wa_temp-name = 'Rahul'.
    wa_temp-roll = 26.
    APPEND wa_temp TO i_temp.
    CLEAR wa_temp.
    wa_temp-name = 'Mahajan'.
    wa_temp-roll = 27.
    APPEND wa_temp TO i_temp.
    i_no = '1'.
    LOOP AT i_temp INTO wa_temp.
      WRITE : i_no , ',' , wa_temp.
       NEW-LINE.
      i_no = i_no + 1.
    ENDLOOP.
    I know this may not be favourite answer to your question but can be used.
    Also, there is 1 more way to write a custom report and that is by writting a Wrapper report which will be just copying the selection screen from STANDARD CODE and then submitting standard code from wrapper code and return back.
    I hope this will help you.
    Regards,
    Rahul Mahajan

  • Opening Closing Stock in transit Report

    Hi,
    I have to get the ABAP development of Stock Report. Report would have following fields
    Opening Stock
    Opening Stock in Transit Quantity
    GR Quantity
    Purchase Value
    Sold Quantity
    Rejection Quantity
    Closing Quantity
    Closing Stock in Transit Quantity
    Consumption Quantity
    In Closing quantity , It should be without stock in transit quantity.
    Could you please help me to understand ,Exact Opening Stock ,Closing sock, In Transit Stock etc? How would these be calculated? from which tables all these data would come from. Thanks in advance.
    Regarda,
    Santosh

    SantoshArya wrote:
    Hi,
    >
    > I have to get the ABAP development of Stock Report. Report would have following fields
    >
    > Opening Stock
    > Opening Stock in Transit Quantity
    > GR Quantity
    > Purchase Value
    > Sold Quantity
    > Rejection Quantity
    > Closing Quantity
    > Closing Stock in Transit Quantity
    > Consumption Quantity
    >
    > In Closing quantity , It should be without stock in transit quantity.
    >
    > Could you please help me to understand ,Exact Opening Stock ,Closing sock, In Transit Stock etc? How would these be calculated? from which tables all these data would come from. Thanks in advance.
    > Regarda,
    > Santosh
    Hi,
    You can also check these standard reports before you proceed to develop a report..
    MB52 - List of Warehouse Stocks on Hand
    MB53 - Display Plant Stock Availability
    MB5B - Stocks for Posting Date
    MB5C - Pick-Up List
    MB5L - List of Stock Values: Balances
    MB5W - List of Stock Values
    MB5T - Stock in transit CC
    MC.9 - INVCO: Material Analysis Selection, Stock
    MC.A - INVCO: Material Analysis Selection, Rec/Iss
    MC.B - INVCO: Material Analysis Selection, Turnover
    You can also consider building a query report which wil also serve your purpose quickly...
    Regards
    Shiva

  • Stock balance Report S_P00_07000139 Wrong quantity

    Hi,
    I have executed the report S_P00_07000139 and found quantity were wrong display.
    Stock card report selection:- Stock balance report summary.
    Scope of List:-No Zero Stock
    Here Quantity appear (98.112) and Amount 1878403.29.THB.
    Though on the posting date 13.02.2014 having two GR document with
    reference to production order.
    13.02.2014 58.957 TO
    13.02.2014 34.989 TO
    It should be include in the above said report and display the closing
    quantity.
    Because in MB5B report were functioning well and included all the
    movement of the said material.The data from MB5B are furnished below.
    Opening stock Total Receipts qty Total issue qty Closing
    stock Bun Closing value Currency
    80.550 106.759 89.197- 98.112 TO 1,878,403.29 THB.
    We have already implemented the SAP Note:-1767220 but still having the same issue.
    Kindly advice.
    Thanks & Regards
    Rakesh

    Hi,
    For your reference i have attached the screen shot details of reports.
    Transaction code:- S_P00_07000139
    FG code:- FRRSGTR24X061000FP
    Plant:-0431
    Company code:-0430
    Datum:-01.02.2010 TO 28.02.2010.
    After Execution of the report.
    Screen shot data from MB51
    Date range:-01.03.2010 to 01.01.2014
    A lots of Data found.
    Again run the stock card report
    Datum:- 01.01.2014 TO 28.02.2014
    Again quantity is the same. How it’s possible.
    Regards
    Rakesh

  • RG1 Register : opening & closing balance does not match with actual Stock

    Hi
    I am working on SAP AFS 6.0.
    The RG1 register for a particular month displays data of only those materials which have been transacted in that month. I checked the tables J_1IRG1 and J_2IRG1BAL found that system retrives all records of the given period from the table J_1IRG1 and picks opening balance of these records from the table J_2IRG1BAL. The records of those materials which have closing balance in J_2IRG1BAL but was not transacted in the given period are not considered in RG1 register.
    I want RG1 register to show opening balance of all materials which have closing balance in J_2IRG1BAL but have not been transacted in the subsequent periods.
    Regards
    Niraj

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

Maybe you are looking for

  • EFT payments config - ACH ID?

    Hi Guys, I would like to know what ACH ID means in EFT payments? is it the bank key ? we have sent the ACH/Wires test files to bank and they came back saying "An incorrect ACH ID was included in the ACH test file" Thanks in advance, God bless

  • Upgrade 2.6 to Solaris 8 OS

    Dear All , I would like to upgrade Sun OS 2.6 to 8 Operating system. if i upgrade a Solaris 2.6 to 8 OS , what will happens to the cron jobs file . will it be there after upgrade ..or should i take any backup and restore . If it so .. please give me

  • Column data restriction based on join condition

    All, SELECT e.ename,   d.dname,   e.job,   e.comm, e.sal FROM emp e,   dept d WHERE e.deptno=d.deptno AND e.empno   =7788 AND e.comm   IS NOT NULL; In this query, if the comm for the empno=7788 is not null, then i am able to retrive the record, If co

  • No option for IPS x220's in india

    My uncle in India wants to buy an x220 because the websites are flooded with news of it's ips panel screen and yet when you try to buy one, there are no models with IPS panels in india. The IPS panel was the main reason why I recommended the x220. Wh

  • Removing voice from a song?

    Does anyone know if you can remove the voice in a song to make it an instrumental??? Thanks