Opening balance and closing stock balance

Hi,
What is the way to calculate opening balance and closing stock balance.
Thanks
krishna

have a look Calculate Opening and Closing Stock
Opening and closing balance
Opening Stock and Closing Stock fields and Calculation

Similar Messages

  • Opening and closing stock balances

    Hi
    What report can i use to show the opening and closing stock balances of materials for the last 12 months.
    Thanks
    Vinesh

    You can view the report in MMBE.
    other than this you can try
    MBEWH and MARDH
    Also follow the link:
    Re: op.& closing stock detail in MM
    Thanks
    Nisha

  • How is carry forward balance and closing balance stored in BW

    Hello all,
    I am working with the new G/L cube...and as per one of the reporting needs I need to display the carry forward balance and closing amount balance that comes from R/3.
    Can someone tell me how can this be achieved in BW.
    Thanks,

    if you are in 2006 ...execute the report for 2005...and at the end of the year whatever amount shows up in your cumulative balance key figure, is the balance that has been carried forward into 2006...
    assign points if it helps...
    P.S: Check if tcode fs10n helps in R/3

  • RG1 register opening balance and closing balance updation

    Hi All,
    We are using the RG1 register recently i.e. after the Functional Upgrade (ECC 6.0). While executing J2I6 RG1 Excel report, opening balance and closing balance is not appearing in the report even though we have done the J1I5 extraction.
    Is it mandatory to update the J_2IRG1BAL table with zero stock as and when the new material codes are created.
    Regards,
    Praveen

    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

  • Opening Balances and Closing Balance of customer

    Hi,
    Does SAP provide any standard customer account statement for Opening Balances and Closing Balance for specific date range have given in selection screen?
    The statement also contains reference number, order, and Delivery number.
    Note: FBL5N Transaction code will not sufficient for the requirement, so looking for any other transaction code / report provided by SAP already for it.
    Thanks in advance,
    Shwetha

    Hi,
    There are several standard reports which could be easily accessed through the menu (Accounts Receivable - Information systems). If none of these reports does not suit your requirement, you have to develop your own.
    Regards,
    Eli

  • Opening Balance and closing balance

    Dear All,
                 Can i create a calculated field for ledger opening balance and closing balance. we are using  epicor. I dont know the exact table which captures opening balance and closing balance, where as i got credit balances and debit balances for the segments, i could not find opening and closing balances in this table. table name is GLjrntdtl . Any ideas on this subject please.
    Thanks & Regards,
    Akram

    hi Akram,
    this is a question that you may wish to ask at the epicor forums
    -jamie

  • REGARDING OPENING BALANCE AND CLOSING BALANCE

    Hi, All
    After executing the TCode - FBL3N, we get the details list. There we also need to display the OPENING BALANCE AND CLOSING BALANCE according to G/L Account and Company Code.

    Hi
    For opening balance, please use transaction F.01.
    Then go to special evaluations and choose balance sheet type 4 (opening balance)
    Kind regards
    JeVe

  • Opening balance and closing balance on Receivables Customer Statement repor

    I need an opening balance and closing balance of the customer statement in one report. Currently I developed a custom Customer statement report in report builder 6i. I developed a custom procedure to retrieve the previous statement balance. I’m able to successfully retrieve ending balance statement with sysdate but if I go back to previous date or previous statement date then I’m not getting the right ending balance of the report.
    Even the seeded api arp_customer_aging provides the ending balance for sysdate but not for previous dates because this api always looks back to amount due remaining column(ar_payment_schedules_all).
    Did any one ever develop a custom logic to get previous balance and ending balance on one single customer statement?

    Hi,
    I am working on the same logic. My program loads opening and closing balance and a list of items everyday. The GL_balances table gives you current balance but if you want the previous balance, you have to use : "gl_daily_balances" table and provide accounting_date for which you want the balance.
    Hope this Helps!
    Yogini

  • Reg:Opening and Closing Stock For Plant

    Hi All,
      i want to calculate the opening stock and closing stock for plant wise for the given Posting Period Date.
    Am having the opening balance and closing balance for all months but i need it as month wise.
    considering this example,
    the date is from 15.01.2010 to 15.03.2010 and for one plant
    considering this example,
    am having the opening stock from as 15.01.2010  to 15.03.2010 as 10,000 and the closing stock as 15,000.
    but i need in month wise like below,
    from 15.01.2010 to 31.01.2010 what is the opening stock and closing stock?
    from 01.02.2010 to 28.02.2010 what is the opening stock and closing stock?
    from 01.03.2010 to 15.03.2010 what is the opening stock and closing stock?
    this is purely based on plant wise and not material wise?
    could anybody say clearly how can i acheive this scenario?
    i have referred MB5b,mc.9 transaction programs but still confused how to go with plant wise for a particular period?
    Thanks & Regards,
    Suresh
    Edited by: suresh suresh on Mar 24, 2010 10:15 AM

    Hi,
    Refer to link below:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c1/3766e7449a11d188fe0000e8322f96/frameset.htm
    Regards,
    Venkat.

  • Opening and Closing Stock -Calendar Day Interval

    Dear All,
                Regards.I got a requirement where I need to calculate the Opening and Closing stock -Daywise..Did checked the related threads which stated to create 2 Restricted KF's upon Calmonth.Hence i tried the same replacing Calmonth with Calday,but those 2 Restricted KF's are empty at the Query output level!!!!!!!!(Note : 0TotalQtystock shows the Closing stock by default)..It would be really helpful if someone could take time to update on this..
    Manythanks
    Arun

    Hi,
    Stock key figures are normally set to calculate closing stock with respect to time. e.g. day end stock, week end stock, month end stock.
    To calculate Opening balance -
    1. create a new calculated KF on your stock key figure with no calculations.
    2. Set  exception aggregation as "First Value" for this calculated key figure in the query definition.
    3. Use this calculated key figure instead of main key figure.
    This setting works for all the time characteristics present in the cube.
    Regards,
    Anup

  • Opening Stock and Closing Stock fields and Calculation

    Hi,
    My report requirement is to display the material, opening stock for the lower date, closing stock for the higher date and the in between all stock operations..how to fetch the opening stock and closing stock for a particular material ???.. what are the tables and fields for calculating them??..
    Thanks,
    Sri

    this is the code i wrote..
    I had selected the data for the date entered and the previous date(l_date) also..
    previous date for the opening stock.
    now i am getting only receipts and issues correctly.. opening stock and the remaining
    balance fields are not coming properly..please help me..
    here rmenge for receipts,imenge for issues.
    REPORT  ZSTOCK no standard page heading line-size 180.
    types: begin of ty_date,
           budat type budat,
           end of ty_date,
           begin of ty_mard,
            matnr type matnr,
            lgort type lgort_d,
            labst type labst,
            UMLME TYPE UMLMD,
            INSME TYPE INSME,
            EINME TYPE EINME,
            SPEME TYPE SPEME,
            RETME TYPE RETME,
           end of ty_mard,
           begin of ty_makt,
            matnr type matnr,
            maktx type maktx,
           end of ty_makt,
           begin of ty_mbew,
           matnr type matnr,
           bwkey type bwkey,
           lbkum type lbkum,
           salk3 type salk3,
           end of ty_mbew,
           begin of ty_mkpfmseg,
            mblnr type mblnr,
            budat type budat,
            bwart type bwart,
            matnr type matnr,
            lgort type lgort_d,
            shkzg type shkzg,
            dmbtr type dmbtr,
            menge type mseg-menge,
           end of ty_mkpfmseg,
           begin of ty_opstock,
           matnr type matnr,
           rdmbtr type dmbtr,
           idmbtr type dmbtr,
           bdmbtr type dmbtr,
           bmenge type menge_d,
           end of ty_opstock,
           begin of ty_output,
            mblnr type mblnr,
            budat type budat,
            matnr type matnr,
            maktx type maktx,
            bwart type bwart,
            lgort type lgort_d,
            shkzg type shkzg,
            rmenge type mseg-menge,
            rdmbtr type dmbtr,
            imenge type mseg-menge,
            idmbtr type dmbtr,
            dmbtr type dmbtr,
            bdmbtr type dmbtr,
            bmenge type menge_d,
           end of ty_output.
    data: t_date type standard table of ty_date initial size 0,
          t_mard type standard table of ty_mard initial size 0,
          t_makt type standard table of ty_makt initial size 0,
          t_mkpfmseg type standard table of ty_mkpfmseg initial size 0,
          t_opstock type standard table of ty_opstock initial size 0,
          t_out type standard table of ty_output initial size 0,
          w_date type ty_date,
          w_mard type ty_mard,
          w_makt type ty_makt,
          w_mkpfmseg type ty_mkpfmseg,
          w_opstock type ty_opstock,
          w_out type ty_output,
          g_matnr type mara-matnr,
          g_lgort type t001l-lgort.
    selection-screen begin of block b1 with frame.
    parameters:p_werks type t001l-werks obligatory memory id pw.
    select-options:s_lgort for g_lgort no-extension no intervals.
    select-options: s_matnr for g_matnr.
    parameters:p_date type mkpf-budat obligatory.
    selection-screen end of block b1.
    at selection-screen.
    perform sub_validate_date.
    start-of-selection.
    data: l_date type sy-datum,
          l_row type i.
    refresh t_date.
    select budat from mkpf into table t_date.
    sort t_date.
    delete adjacent duplicates from t_date.
    clear w_date.
    read table t_date into w_date with key budat = p_date.
    l_row = sy-tabix.
    l_row = l_row - 1.
    clear w_date.
    read table t_date into w_date index l_row.
    l_date = w_date-budat.
    select    k~mblnr
              k~budat
              s~bwart
              s~matnr
              s~lgort
              s~shkzg
              s~dmbtr
              s~menge
              into table t_mkpfmseg
              from mkpf as k inner join mseg as s
              on kmblnr = smblnr and
                 kmjahr = smjahr
              where k~budat between l_date and p_date and
                    s~matnr in s_matnr and
                    s~werks = p_werks and
                    s~lgort in s_lgort.
    if t_mkpfmseg is not initial.
    sort t_mkpfmseg by budat ascending
                       matnr ascending.
    select     matnr
               lgort
               labst
               umlme
               insme
               einme
               speme
               retme
               from mard
               into table t_mard
               for all entries in t_mkpfmseg
               where matnr = t_mkpfmseg-matnr and
                     werks = p_werks and
                     lgort in s_lgort.
    select    matnr
              maktx
              from makt
              into table t_makt
              for all entries in t_mkpfmseg
              where matnr = t_mkpfmseg-matnr.
    endif.
    loop at t_mkpfmseg into w_mkpfmseg where budat = l_date.
       loop at t_mard into w_mard where matnr = w_mkpfmseg-matnr.
          w_opstock-matnr = w_mkpfmseg-matnr.
          if w_mkpfmseg-shkzg = 'S'.             " Receive
               w_opstock-rdmbtr = w_mkpfmseg-dmbtr.
               w_opstock-bmenge = w_mard-labst + w_mard-insme + w_mard-speme
                                    + w_mard-einme +               w_mard-retme
                                    - w_mkpfmseg-menge.
          elseif w_mkpfmseg-shkzg = 'H'.         " Issue
               w_opstock-idmbtr = w_mkpfmseg-dmbtr.
               w_opstock-bmenge = w_out-bmenge + w_mkpfmseg-menge.
          endif.
              w_opstock-bdmbtr = w_out-rdmbtr - w_out-idmbtr.
                   append w_opstock to t_opstock.
                  clear w_opstock.
       endloop.
    endloop.
    loop at t_mkpfmseg into w_mkpfmseg where budat = p_date.
       loop at t_mard into w_mard where matnr = w_mkpfmseg-matnr.
         clear w_makt.
         read table t_makt into w_makt with key matnr = w_mkpfmseg-matnr.
         if sy-subrc = 0.
          w_out-budat = w_mkpfmseg-budat.
          w_out-matnr = w_mard-matnr.
          w_out-maktx = w_makt-maktx.
          w_out-lgort = w_mard-lgort.
          w_out-mblnr = w_mkpfmseg-mblnr.
          w_out-bwart = w_mkpfmseg-bwart.
          w_out-shkzg = w_mkpfmseg-shkzg.
            if w_mkpfmseg-shkzg = 'S'.             " Receive
               w_out-rmenge = w_mkpfmseg-menge.
               w_out-rdmbtr = w_mkpfmseg-dmbtr.
               w_out-imenge = 0.
               w_out-bmenge = w_mard-labst + w_mard-insme + w_mard-speme
                                    + w_mard-einme + w_mard-retme
                                    - w_mkpfmseg-menge.
            elseif w_mkpfmseg-shkzg = 'H'.         " Issue
               w_out-imenge = w_mkpfmseg-menge.
               w_out-idmbtr = w_mkpfmseg-dmbtr.
               w_out-rmenge = 0.
               w_out-bmenge = w_out-bmenge + w_mkpfmseg-menge.
            endif.
               w_out-bdmbtr = w_out-rdmbtr - w_out-idmbtr.
                   append w_out to t_out.
                  clear w_out.
    endif.
       endloop.
    endloop.
    write: / 'Material' , 12 'Description' ,40 'Location', 50 'Opening stock',70 'MvT',
              83 'Receipts' , 102 'Issues', 118 'Amount',135 'Balance Quan', 155 'Balance Amount'.
    loop at t_out into w_out.
       write: / w_out-matnr, 12 w_out-maktx, 40 w_out-lgort.
       clear w_opstock.
       read table t_opstock into w_opstock with key matnr = w_out-matnr.
       if sy-subrc = 0.
         write: 45 w_out-bmenge.
        endif.
       write: 70 w_out-bwart,75 w_out-rmenge,92  w_out-imenge,
             110 w_out-bdmbtr, 130 w_out-bmenge, 150 w_out-bdmbtr.
    endloop.
    *&      Form  SUB_VALIDATE_DATE
    FORM SUB_VALIDATE_DATE.
        select budat
               from mkpf
               into table t_date
               where budat = p_date.
        if t_date is initial.
           message e001(zks) with 'select another date range'.
        endif.
    ENDFORM.                    " SUB_VALIDATE_DATE
    Edited by: Sri on Feb 18, 2009 8:31 AM

  • Query for Opening And  Closing Stock

    Hi Experts...
    I need a report for Opening and Closing stocks and Goods Receipt and Goods Issue for Raw Materials and Finished Goods and Consumbles ..instead of going for different reports for each we need a combined report which can display for all Raw Materials, Finished Goods and Consumbles and we need it for a specific date range Material type(Raw MAterials,Finished Goods, Consumbales)
    and below is the format i needed.
                                                                           RAW MATERIALS /FINISHED GOODS/CONSUMBALES
                            Opening Stock                      Closing Stock         Goods Receipt                  Goods Issue
                             Qty   Value                             Qty   Value                     Qty   Value                      Qty   Value
    Item Name
    Regards,
    Vamsi.

    Hi Guys.
    I need an Inventory stock report with Item name, Opening Stock,Goods issue Quantity,Goods Received ,Item Price,Location ,(Closing Stock)Total Value.
    We need the input by Date Range and Item Group and Location(if Possible) Below is the Code i used to run the report.
    Pls Update the Query...
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @Group nvarchar(10)
    Declare @Whse 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 Max(s2.ItmsGrpCod) from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]')
    Set @Whse = (Select Max(s3.Warehouse) from dbo.OINM S3 Where S3.Warehouse = '[%3]')
    Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription), sum(a.[Opening Balance]) as [Opening Balance], sum(a.[IN]) as [IN], sum(a.OUT) as OUT,max(a.Price) as 'Price', ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing from dbo.OITM I1
    Left JOIN (Select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.Price, (sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance], 0 as [IN], 0 as OUT
    From dbo.OINM N1
    Where N1.DocDate < @FromDate and N1.Warehouse = @Whse
    Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.Price
    Union All
    select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.price, 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 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price
    Union All
    select N1.Warehouse, N1.Itemcode, N1.Dscription,N1.price, 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 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription,N1.price) a ON a.ItemCode=I1.ItemCode
    where  I1.ItmsGrpCod = @Group
    Group By a.Itemcode
    Order By a.Itemcode
    Regards,
    Vamsi.

  • Diff. of Opening and Closing Stock versus Diff. of Incrs and Decrs in Stock

    Hi Gurus,
    Ideally Difference of Opening and Closing Stock should match with the difference of Increase and Decrease in stock.
    But in our system Difference of Opening and Closing Stock is greater than difference of Increase and Decrease in stock.
    Please tell me how can we solve this issue and where we are going wrong.
    Thank You

    Hi frnd,
    I think u will have non-valuated order stock also...
    it will show difference in ur balance sheet....
    Pls check it..
    ASSIGN POINTS IF USEFUL
    Regards,
    Jigar

  • Calculate Opening and Closing Stock

    Hi all,
          Plz tell me logic how to calculate Opening Stock and Closing Stock of material of any particular date of month...........
    Thanks in Advance.
    Pradip Pawar

    Hi Pradeep
    for a particular month for calculating opening stock is
    use this logic
            SELECT MBLNR BWART ZEILE MATNR WERKS LGORT SHKZG ERFMG ERFME
           FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_QUAN FOR
              ALL ENTRIES IN IT_FINAL WHERE MATNR = IT_FINAL-MATNR.
      IF IT_QUAN[] IS NOT INITIAL.
    GETTING THE MATERIAL DOCUMENTS FOR SPECIFIED PERIOD
          SELECT MBLNR BUDAT FROM MKPF
                     INTO CORRESPONDING FIELDS OF TABLE IT_BUDAT
                     FOR ALL ENTRIES IN IT_QUAN
                     WHERE ( BUDAT GE DATE1 AND BUDAT LT DATE2 )
                     AND MBLNR = IT_QUAN-MBLNR.
          SELECT MBLNR BUDAT FROM MKPF
                     INTO CORRESPONDING FIELDS OF TABLE IT_BUDAT1
                     FOR ALL ENTRIES IN IT_QUAN
                     WHERE MBLNR = IT_QUAN-MBLNR
                     AND BUDAT LT DATE1.
        ENDIF.
        CLEAR INDEX.
    IF THE MATERIAL DOCUMENT NUMBER IS NOT FOUND IN THE SPECIFIED PERIOD
    *REMOVE IT
        IT_QUAN1[] = IT_QUAN[].
        LOOP AT IT_QUAN.
          INDEX = SY-TABIX.
          READ TABLE IT_BUDAT WITH KEY MBLNR = IT_QUAN-MBLNR.
          IF SY-SUBRC NE 0.
            DELETE IT_QUAN INDEX INDEX.
          ENDIF.
          CLEAR IT_QUAN.
          CLEAR IT_BUDAT.
        ENDLOOP.
        SORT IT_QUAN BY MATNR.
        LOOP AT IT_FINAL.
          INDEX = SY-TABIX.
          LOOP AT IT_QUAN WHERE MATNR = IT_FINAL-MATNR
                            AND WERKS = IT_FINAL-WERKS
                            AND LGORT = IT_FINAL-LGORT.
            IF SY-SUBRC = 0.
    IF IT IS IN CALCULATE QUANTITY
              IF IT_QUAN-SHKZG = 'S'.
    check the unit if it is gram then devide by 1000.
                IF IT_QUAN-ERFME = 'G'.
                  IT_QUAN-ERFMG = IT_QUAN-ERFMG / 1000.
                ENDIF.
                IN_QTY = IN_QTY + IT_QUAN-ERFMG.
              ENDIF.
    IF IT IS OUT CALCULATE QUANTITY
              IF IT_QUAN-SHKZG = 'H'.
                IF IT_QUAN-ERFME = 'G'.
                  IT_QUAN-ERFMG = IT_QUAN-ERFMG / 1000.
                ENDIF.
                OUT_QTY = OUT_QTY + IT_QUAN-ERFMG.
              ENDIF.
            ENDIF.
          ENDLOOP.
          IT_FINAL-IN = IN_QTY.
          IT_FINAL-OUT = OUT_QTY.
          MODIFY IT_FINAL INDEX INDEX.
          CLEAR: IN_QTY,OUT_QTY.
          CLEAR IT_FINAL.
          CLEAR IT_QUAN.
          CLEAR INDEX.
        ENDLOOP.
        CLEAR: IN_QTY,OUT_QTY.
        CLEAR IT_FINAL.
        CLEAR IT_QUAN.
        CLEAR INDEX.
    FOR OPENING BALANCE
        CLEAR INDEX.
        LOOP AT IT_QUAN1.
          INDEX = SY-TABIX.
          READ TABLE IT_BUDAT1 WITH KEY MBLNR = IT_QUAN1-MBLNR.
          IF SY-SUBRC NE 0.
            DELETE IT_QUAN1 INDEX INDEX.
          ENDIF.
          CLEAR IT_QUAN1.
          CLEAR IT_BUDAT1.
        ENDLOOP.
        SORT IT_QUAN1 BY MATNR.
        LOOP AT IT_FINAL.
          INDEX = SY-TABIX.
          LOOP AT IT_QUAN1 WHERE MATNR = IT_FINAL-MATNR
                            AND WERKS = IT_FINAL-WERKS
                            AND LGORT = IT_FINAL-LGORT.
            IF SY-SUBRC = 0.
    IF IT IS IN CALCULATE QUANTITY
              IF IT_QUAN1-SHKZG = 'S'.
                IF IT_QUAN1-ERFME = 'G'.
                  IT_QUAN1-ERFMG = IT_QUAN1-ERFMG / 1000.
                ENDIF.
                IN_QTY = IN_QTY + IT_QUAN1-ERFMG.
              ENDIF.
    IF IT IS OUT CALCULATE QUANTITY
              IF IT_QUAN1-SHKZG = 'H'.
                IF IT_QUAN1-ERFME = 'G'.
                  IT_QUAN1-ERFMG = IT_QUAN1-ERFMG / 1000.
                ENDIF.
                OUT_QTY = OUT_QTY + IT_QUAN1-ERFMG.
              ENDIF.
            ENDIF.
          ENDLOOP.
          OPEN_QUAN = IN_QTY - OUT_QTY.
          IT_FINAL-OPEN_QUAN = OPEN_QUAN.
          MODIFY IT_FINAL INDEX INDEX.
          CLEAR: IN_QTY,OUT_QTY.
          CLEAR IT_FINAL.
          CLEAR IT_QUAN1.
          CLEAR OPEN_QUAN.
          CLEAR INDEX.
        ENDLOOP.
        LOOP AT IT_FINAL.
          IT_FINAL-CLOS_QUAN = IT_FINAL-OPEN_QUAN +
                                       IT_FINAL-IN - IT_FINAL-OUT.
          MODIFY IT_FINAL INDEX SY-TABIX.
          CLEAR IT_FINAL.
        ENDLOOP.
    reward points to all helpful answers
    kiran.M

  • Opening and closing stock figure

    Hi Experts,
    How can i get the opening stock figure and closing stock figure for one month in SAP Buiness one 8.8?

    Hi,
    I found this on the forum; try this:
    DECLARE @FromDate DateTime
    DECLARE @ToDate DateTime
    /* SELECT T0.DocDate FROM OINM T0 where T0.DocDate >=[%0] */
    SET @FromDate = [%0]
    /* SELECT T0.DocDate FROM OINM T0 where T0.DocDate <=[%0] */
    SET @ToDate = [%1]
    Select X.DocDate, X.ItemCode,
    ((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) As 'OpeningStock',
    IsNull(max(X.price),0) as 'OpeningUnitPrice',
    ((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) *
    IsNull(max(X.price),0) AS 'OPENING VALUE',
    IsNull(sum(X.InQty),0) As 'Received Qty',
    IsNull(max(X.price),0) as 'Purchase  Unit Price',
    IsNull(sum(X.InQty),0) *
    IsNull(max(X.price),0) as 'PURCHASE VALUE',
    IsNull(sum(X.OutQty),0) As 'Consumed Qty',
    IsNull(max(X.price),0) as 'Sale Unit Price',
    IsNull(sum(X.OutQty),0) *
    IsNull(max(X.price),0) AS 'SALE VALUE',
    ((Select isnull(sum(InQty-OutQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)+
    (Select isNULL(sum(T0.InQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And T0.DocDate<=X.DocDate And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate = X.DocDate)-
    (Select isNULL(sum(T0.OutQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And T0.DocDate<=X.DocDate And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate = X.DocDate)) As 'ClosingStock',
    ((((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) *
    IsNull(max(X.price),0)) + (IsNull(sum(X.InQty),0) * IsNull(max(X.price),0)) - (IsNull(sum(X.OutQty),0) *
    IsNull(max(X.price),0))) as 'Final Balance Value'
    FROM OINM X Where ItemCode=X.ItemCode And
    (X.DataSource='I' or X.DataSource='N')
    Group by X.DocDate,X.ItemCode
    Order by X.DocDate
    Hope this helps.
    Thanks,
    Joseph

Maybe you are looking for

  • Why cant i drag and drop music

    i have been trying to add music to my library by drag and drop system, but it does not work. only way i can add any more music is by doing a full system search. can anyone help plz

  • Windows 7 - 64 Bit Driver Needed For Sound Blaster Live! 5.1 Model SB0100

    I am having trouble finding a working driver for Windows 7 - 64 Bit for a Sound Blaster Li've! 5. Audo Card Model# SB000 I downloaded driver file SBL_PC64DRVBETA_LB_2_03_0005.exe which I think is a 64 Bit Sound Blaster Li've! update, but Windows 7 do

  • Attachment in forms 9i

    hi all, i'm developing application using forms 9i,and i need in some forms to have attachment(word processing,image,..etc)is better to store just the file path in the database(where the files are stored in folders in the server) or the whole document

  • MBA with Photoshop CS4

    Is anyone using Photoshop CS4 with the new MBA 11". How is it working and did you upgrade the processor and RAM? I'm thinking of getting one but it must work at a decent speed on the road with Photoshop. Final Cut Pro would be great to use as well, b

  • Navigation buttons missing from BSP iView

    Hello, We have a BSP iView that we are displaying in our Portal (EP7).  ISSUE: The Back and Forward buttons are not displayed. When we access this BSP application directly from browser, both buttons are visible!  (These buttons are located in the Top