Stock Statement

Hi,
As our customer requirement we need a report "Stock Statement" for given period (From date - To date) with the following columns
Item
Opening Stock Qty
Opening stock Value
Receipt Qty
Receipt Value
Issue (Consumption) Qty.
Issue (Consumption) Value
Closing stock qty
Closing stock value.
Expecting your valuable solutions and it would be rewarded fully.
Thanks & Regards,
Venkatesan G.

Hi,
I had this problem last week (to know the initial stock for a given item and a past date). The only way which I found to solve it ,was to recalculate the initial stock.
To do it, I used two tables (OINM and OITW). Here is an excerpt of my query, which does only what you asked for:
DECLARE @ItemCode varchar(15)
DECLARE @StartDate smalldatetime
SELECT @ItemCode = $[$38.1.0], @StartDate = $[$12.1.Date]
-- Before inserting the misc. operations, we have first to recalculate the initial stock
-- We have to do the following:
-- - Add or deduce, from the actual stock, all the movements which are stored in the OINM table
SELECT W0.ItemCode, @StartDate, W0.WhsCode, W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0), 0
FROM OITW W0 LEFT OUTER JOIN OINM I0 ON W0.ItemCode = I0.ItemCode AND W0.WhsCode = I0.Warehouse
WHERE I0.DocDuedate >= @StartDate
GROUP BY W0.ItemCode, W0.WhsCode, W0.OnHand
HAVING W0.ItemCode = @ItemCode AND W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0) >= 0
UNION
SELECT W0.ItemCode, @StartDate, W0.WhsCode, 0, -(W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0))
FROM OITW W0 LEFT OUTER JOIN OINM I0 ON W0.ItemCode = I0.ItemCode AND W0.WhsCode = I0.Warehouse
WHERE I0.DocDuedate >= @StartDate
GROUP BY W0.ItemCode, W0.WhsCode, W0.OnHand
HAVING W0.ItemCode = @ItemCode AND W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0) < 0
Just don't forget to give correct values to the two variables, since in my case they were taken from the Invoice window.
In my case, I was in need of this to show the evolution of an item's stock during time.
Regards,
Eric

Similar Messages

  • Report for stock statement

    hi guy's,
       i am doing report for the stock statement .... my issue is in MB5B if i reverse some document it shows as it move's to issue QTY and my receipt is same but my closing stock is correct ...is there any std report avalible ....
    thank's in advance

    Use this code :
    TABLES : MSEG,MKPF,MARA,MAKT,BEWART,MSLB,BSIM.
    TYPE-POOLS : SLIS.
    DATA : IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
           IT_LIST_HEADER TYPE SLIS_T_LISTHEADER,
           IT_EVENTS TYPE SLIS_T_EVENT,
           GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
           WA_SORT TYPE SLIS_SORTINFO_ALV,
           IT_SORT TYPE SLIS_T_SORTINFO_ALV,
           REPID LIKE SY-REPID,
           FRM_DATE(10),TO_DATE(10),
           DISPTEXT(255),DISPTEXT2(255).
    TYPES : BEGIN OF ST_OPBAL,
             MATNR LIKE MSEG-MATNR,
             MAKTX LIKE MAKT-MAKTX,
             BATCH LIKE MSEG-CHARG,
             BWART LIKE MSEG-BWART,
             MENGE LIKE MSEG-MENGE,
             ZEILE LIKE MSEG-ZEILE,
             WERKS LIKE MSEG-WERKS,
             SOBKZ LIKE MSEG-SOBKZ,
             BUDAT LIKE MKPF-BUDAT,
             SHKZG LIKE MSEG-SHKZG,
             DMBTR LIKE MSEG-DMBTR,
             MBLNR LIKE MSEG-MBLNR,
             LGORT LIKE MSEG-LGORT,
           END OF ST_OPBAL.
    DATA : OPBAL TYPE ST_OPBAL OCCURS 0 WITH HEADER LINE,
           TMP_OPBAL TYPE ST_OPBAL OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF BAL_NOREF OCCURS 0,
              MATNR LIKE MARA-MATNR,
              SHKZG LIKE MSEG-SHKZG,
              DMBTR LIKE MSEG-DMBTR,
           END OF BAL_NOREF.
    DATA : BEGIN OF OPBAL2 OCCURS 0,
             SNO(3)      TYPE N,
             MATNR       LIKE MSEG-MATNR,
             MAKTX       LIKE MAKT-MAKTX,
             OP_BAL      LIKE MSEG-MENGE,
             OP_STKVAL   LIKE MSEG-DMBTR,   "NEW
             REC         LIKE MSEG-MENGE,
             T_OPBAL_REC LIKE MSEG-MENGE,
             REC_STKVAL  LIKE MSEG-DMBTR,   "NEW
             ISS         LIKE MSEG-MENGE,
             ISS_STKVAL  LIKE MSEG-DMBTR,   "NEW
             SALES       LIKE MSEG-MENGE,
             T_ISS       LIKE MSEG-MENGE,
             CL_BAL      LIKE MSEG-MENGE,
             BATCH       LIKE MSEG-CHARG,
             SUBCON      LIKE MSEG-MENGE,
             CL_STKVAL   LIKE MSEG-DMBTR,
           END OF OPBAL2.
    DATA  SERNO(4) TYPE C.
    DATA OPTOT  TYPE P DECIMALS 3.
    DATA RECTOT TYPE P DECIMALS 3.
    DATA ISSTOT TYPE P DECIMALS 3.
    DATA TOTALL TYPE P DECIMALS 3.
    DATA FLG        TYPE N.
    DATA FLAG       TYPE N.
    DATA STOCKVAL        TYPE MSEG-DMBTR.
    DATA REC_STOCKVAL    TYPE MSEG-DMBTR.
    DATA ISS_STOCKVAL    TYPE MSEG-DMBTR.
    DATA CL_STKVAL       TYPE MSEG-DMBTR.
    SELECTION-SCREEN BEGIN OF BLOCK X WITH FRAME.
         SELECT-OPTIONS: P_MATNR FOR MSEG-MATNR,
                         P_MGRP  FOR MARA-MATKL,
                         P_DATE FOR MKPF-BUDAT,
         P_PLANT FOR MSEG-WERKS DEFAULT  'NB01' OBLIGATORY NO INTERVALS
                                                    NO-EXTENSION .
         SELECT-OPTIONS: P_STLOC FOR MSEG-LGORT NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK X.
    INITIALIZATION.
       REPID = SY-REPID.
       PERFORM FILL_FLDCAT USING IT_FLDCAT.
       PERFORM FILL_EVENTS USING IT_EVENTS.
       PERFORM FILL_LAYOUT USING GS_LAYOUT.
    START-OF-SELECTION.
      CONCATENATE P_DATE-LOW6(2) '.' P_DATE-LOW4(2) '.' P_DATE-LOW+0(4)
      INTO FRM_DATE.
      CONCATENATE P_DATE-HIGH6(2) '.' P_DATE-HIGH4(2) '.' P_DATE-HIGH+0(4)
      INTO TO_DATE.
      CONCATENATE TEXT-003 FRM_DATE' TO : ' TO_DATE INTO DISPTEXT.
      CONCATENATE TEXT-004 P_PLANT-LOW ' Storage Location : ' P_STLOC-LOW
      INTO DISPTEXT2.
      PERFORM FILL_HEADER USING IT_LIST_HEADER.
      SELECT  A~MATNR
              F~MAKTX
              A~CHARG
              A~BWART
              A~MENGE
              A~ZEILE
              A~WERKS
              A~SOBKZ
              D~BUDAT
              A~SHKZG
              A~DMBTR
              A~MBLNR
              A~LGORT
              INTO TABLE OPBAL
       FROM MKPF AS D JOIN MSEG AS A
               ON DMBLNR = AMBLNR  AND
                  DMJAHR = AMJAHR
            JOIN MARA AS E
               ON EMATNR = AMATNR
            JOIN MAKT AS F
               ON FMATNR = AMATNR
       WHERE   A~MATNR IN P_MATNR
         AND   A~WERKS IN P_PLANT
         AND   A~KZBEW IN (' ','B')
         AND   E~MATKL IN P_MGRP
         AND   A~BWART NOT IN ('541','542','321','322','121')
         AND   A~KZVBR NOT IN ('A')
         AND   D~BUDAT LE P_DATE-HIGH.
    LOOP AT OPBAL WHERE BWART EQ '544' AND LGORT EQ ''.
       TMP_OPBAL = OPBAL.
       APPEND TMP_OPBAL.
    ENDLOOP.
    DELETE OPBAL WHERE ( BWART EQ '309' AND DMBTR EQ 0  ).
    DELETE OPBAL WHERE ( BWART NE '543' AND LGORT EQ '' ).
    LOOP AT TMP_OPBAL.
       OPBAL = TMP_OPBAL.
       APPEND OPBAL.
    ENDLOOP.
    STOCKVAL = 0.
    SORT OPBAL BY MATNR BATCH BUDAT.
    LOOP AT OPBAL.
      SELECT SINGLE LBLAB INTO MSLB-LBLAB FROM MSLB
                            WHERE MATNR = OPBAL-MATNR.
      IF OPBAL-BUDAT LT P_DATE-LOW.
         IF OPBAL-SHKZG = 'H'.
            OPTOT = OPTOT - OPBAL-MENGE.
         ELSEIF OPBAL-SHKZG = 'S'.
            OPTOT = OPTOT + OPBAL-MENGE.
         ENDIF.
    For the duration   II part  *****************
      ELSEIF OPBAL-BUDAT IN P_DATE.
         IF OPBAL-SHKZG = 'H'.
            ISSTOT      = ISSTOT + OPBAL-MENGE.
         ELSEIF OPBAL-SHKZG = 'S'.
            RECTOT = RECTOT + OPBAL-MENGE.
         ENDIF.
      ENDIF.
    AT END OF BATCH. " modified for chek
       READ TABLE OPBAL INDEX SY-TABIX.
       CLEAR BAL_NOREF. REFRESH BAL_NOREF.
       SELECT MATNR SHKZG SUM( DMBTR )
         INTO TABLE BAL_NOREF
         FROM BSIM
        WHERE BUDAT LT P_DATE-LOW  AND
              MATNR EQ OPBAL-MATNR AND
              BWTAR EQ OPBAL-BATCH AND
              BWKEY IN P_PLANT     AND
              BLART IN ('RE','WE','WA','PR')
        GROUP BY MATNR SHKZG.
       LOOP AT BAL_NOREF.
          IF BAL_NOREF-SHKZG = 'H'.
             STOCKVAL = STOCKVAL - BAL_NOREF-DMBTR.
          ELSE.
             STOCKVAL = STOCKVAL + BAL_NOREF-DMBTR.
          ENDIF.
       ENDLOOP.
       CLEAR BAL_NOREF. REFRESH BAL_NOREF.
       SELECT MATNR SHKZG SUM( DMBTR )
         INTO TABLE BAL_NOREF
         FROM BSIM
        WHERE BUDAT IN P_DATE AND
              MATNR EQ OPBAL-MATNR AND
              BWTAR EQ OPBAL-BATCH AND
              BWKEY IN P_PLANT     AND
              BLART IN ('RE','WE','WA','PR')
        GROUP BY MATNR SHKZG.
       LOOP AT BAL_NOREF.
          IF BAL_NOREF-SHKZG = 'H'.
             ISS_STOCKVAL = ISS_STOCKVAL + BAL_NOREF-DMBTR.
          ELSE.
             REC_STOCKVAL = REC_STOCKVAL + BAL_NOREF-DMBTR.
          ENDIF.
       ENDLOOP.
       " MSLB-LBLAB (STOCK WITH SUBCONTRACTOR).
       CL_STKVAL       = STOCKVAL + REC_STOCKVAL - ISS_STOCKVAL.
       TOTALL =  OPTOT + RECTOT - ISSTOT.
       IF OPTOT = '0'   AND RECTOT = '0'  AND ISSTOT = '0'.
          FLG = 1.
       ENDIF.
       IF FLG = 1.
          CLEAR FLG.
       ELSE.
          SERNO = SERNO + 1.
          OPBAL2-SNO         = SERNO.
          OPBAL2-MATNR       = OPBAL-MATNR.
          OPBAL2-MAKTX       = OPBAL-MAKTX.
          OPBAL2-OP_BAL      = OPTOT.
          OPBAL2-REC         = RECTOT.
          OPBAL2-T_OPBAL_REC = OPTOT + RECTOT.
          OPBAL2-ISS         = ISSTOT.
          OPBAL2-T_ISS       = ISSTOT.
          OPBAL2-CL_BAL      = TOTALL.
          OPBAL2-BATCH       = OPBAL-BATCH.
          OPBAL2-SUBCON      = MSLB-LBLAB.
          OPBAL2-OP_STKVAL   = STOCKVAL.
          OPBAL2-ISS_STKVAL  = ISS_STOCKVAL.
          OPBAL2-REC_STKVAL  = REC_STOCKVAL.
          OPBAL2-CL_STKVAL   = CL_STKVAL.
          APPEND OPBAL2.
       ENDIF.
      OPTOT = 0.
      RECTOT = 0.
      ISSTOT = 0.
      STOCKVAL = 0.
      ISS_STOCKVAL = 0.
      REC_STOCKVAL = 0.
      CL_STKVAL    = 0.
    ENDAT.
    ENDLOOP.
      WA_SORT-SPOS = 1.
      WA_SORT-FIELDNAME = 'MATNR'.
      WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = REPID
          IT_FIELDCAT        = IT_FLDCAT
          IT_EVENTS          = IT_EVENTS
          IS_LAYOUT          = GS_LAYOUT
          IT_SORT            = IT_SORT
        TABLES
          T_OUTTAB           = OPBAL2.
    FORM FILL_FLDCAT USING P_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
       PERFORM FILL_PARAM_FLDCAT USING  1 'SNo'          'SNO'       ' ' 'X'
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  2 'Material No.' 'MATNR'     ' ' 'X'
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  3 'Description'  'MAKTX'     ' ' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  4 'Op.Bal'      'OP_BAL'     'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  5 'Op.Stock Val' 'OP_STKVAL' 'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  6 'Receipts'     'REC'       'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  7 'Total'     'T_OPBAL_REC'  'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  8 'Rect.Val.' 'REC_STKVAL'   'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING  9 'Issues'    'ISS'          'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING 10 'Iss. Val.' 'ISS_STKVAL'   'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING 11 'Cl. Bal.'     'CL_BAL'    'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING 12 'Cl.Stock Val' 'CL_STKVAL' 'X' ' '
       'OPBAL2' P_FLDCAT.
       PERFORM FILL_PARAM_FLDCAT USING 13 'BATCH '       'BATCH'     ' ' ' '
       'OPBAL2' P_FLDCAT.
    ENDFORM.
    FORM FILL_PARAM_FLDCAT USING VALUE(P_COL) VALUE(P_TEXT) VALUE(P_FLDNAME)
                           VALUE(P_DOSUM) VALUE(P_NOZERO) VALUE(P_TABNAME)
                           PP_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
       DATA : WA_FLDCAT TYPE SLIS_FIELDCAT_ALV.
       CLEAR WA_FLDCAT.
         WA_FLDCAT-COL_POS   = P_COL.
         WA_FLDCAT-SELTEXT_M = P_TEXT.
         WA_FLDCAT-FIELDNAME = P_FLDNAME.
         WA_FLDCAT-TABNAME   = P_TABNAME.
         WA_FLDCAT-DO_SUM    = P_DOSUM.
         WA_FLDCAT-NO_ZERO   = P_NOZERO.
       APPEND WA_FLDCAT TO PP_FLDCAT.
    ENDFORM.
    FORM FILL_HEADER USING P_IT_LIST_HEADER TYPE SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-INFO = TEXT-002.
      APPEND LS_LINE TO P_IT_LIST_HEADER.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-INFO = DISPTEXT.
      APPEND LS_LINE TO P_IT_LIST_HEADER.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-INFO = DISPTEXT2.
      APPEND LS_LINE TO P_IT_LIST_HEADER.
    ENDFORM.
    FORM FILL_EVENTS USING P_IT_EVENTS TYPE SLIS_T_EVENT.
       DATA LS_EVENT TYPE SLIS_ALV_EVENT.
       MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
       MOVE 'TOP_OF_PAGE' TO LS_EVENT-NAME.
       APPEND LS_EVENT TO P_IT_EVENTS.
    ENDFORM.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         IT_LIST_COMMENTARY       = IT_LIST_HEADER.
    ENDFORM.
    FORM FILL_LAYOUT USING P_GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
       P_GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
       P_GS_LAYOUT-ZEBRA             = 'X'.
       P_GS_LAYOUT-FLEXIBLE_KEY      = 'X'.
    ENDFORM.
    FOR TESTING PURPOSE.
    *SORT OPBAL BY BUDAT.
    *CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM = REPID
         IT_FIELDCAT        = IT_FLDCAT
         IT_EVENTS          = IT_EVENTS
       TABLES
         T_OUTTAB           = OPBAL.
    *FORM FILL_FLDCAT USING P_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
      PERFORM FILL_PARAM_FLDCAT USING  1 'MBLNR'        'MBLNR'
      'OPBAL' P_FLDCAT.
      PERFORM FILL_PARAM_FLDCAT USING  2 'CREDIT/DEBIT' 'SHKZG'
      'OPBAL' P_FLDCAT.
      PERFORM FILL_PARAM_FLDCAT USING  3 'MOV.TYP.'     'BWART'
      'OPBAL' P_FLDCAT.
      PERFORM FILL_PARAM_FLDCAT USING  4 'ST.LOC.'     'LGORT'
      'OPBAL' P_FLDCAT.
      PERFORM FILL_PARAM_FLDCAT USING  5 'STOCK VAL'    'DMBTR'
      'OPBAL' P_FLDCAT.
      PERFORM FILL_PARAM_FLDCAT USING  6 'POS.DATE'     'BUDAT'
      'OPBAL' P_FLDCAT.
    *ENDFORM.

  • Re:Query for Stock Statement for a particular item..!!!!

    Dear SAP Experts,
    I need a stock statement query  for a particular item which contains:
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    1.Warehouse code
    2.Item Name
    3.Posting Date
    Plz give me a good solution for this issue.
    With Regards,
    Revathy

    Check this
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bala

  • Query for Stock Statement

    Hi Members,
    My customer needs an report "Stock Statement" with selection criteria as Date, ItemGroupwise and warehouse wise with following columns namely.
    Itemcode
    ItemName
    Opening Stock Qty
    Receipt Qty
    Issue Qty.
    Price.
    Kindly help me in this regard,
    Thanks in advance,
    Venkatesh.R

    Hi!
    Check these threads
    Re: Item Stock Report (2nd page)
    Item Stock Report

  • Daily stock statement by location in dp value

    hi guys,
    iam using the t.code mb52 for daily stock statement by location in dp value report. i have to dipspaly the date wise 4 locations i.e ( snt,sabh,sarawak,departement). these are the 4 locations and i want total sum of snt sabah etc of cost in date wise. so how to find out the cost of particular locations.
    Thanks & Regards,
    praveen.

    Perfect - many thanks for the quick response. Points have been awarded.

  • Daily Stock Statements by location  in dp value report

    hi guys,
    iam using the t.code mb52 for daily stock statement by location in dp value report. i have to dipspaly the date wise 4 locations i.e ( snt,sabh,sarawak,departement). these are the 4 locations and i want total sum of snt sabah etc of cost  in date wise. so how to find out the cost of particular locations.
    Thanks & Regards,
    praveen.

    Perfect - many thanks for the quick response. Points have been awarded.

  • STOCK STATEMENT STORAGE LOCATION WISE

    Dear All,
    Ca we able to take Stock Value on storage location wise for the particular date.
    Thank You,
    Warm Regards
    Mani.

    Hi,
    Stock statement storage location wise can be get, by using T-Code MB5B.
    But Quantity can be gettable on storage location basis. However value can be gettable on Plant level.
    First you have to take the plant stock on any particular date in which you can get Plant Qty and Plant Value. Please divide Plant value by Plant Qty, you can get Rate of each material. After that take storage location wise stock and multiply with Rate.
    Please note that in SAP prices are maintained on Plant level basis. Hence, it is a small workaround.
    Secondly you get Monthend Stock of any month at storage location level with value using T-code mc.9
    Hope this will help you.
    Please reward if useful.
    Ishu

  • AGE WISE CLOSING STOCK STATEMENT

    Dear All,
    Kindly send me your valuable inputs with regard to getting the detailed closing stock statment with AGE wise details ( above 60 days / 90 days / 120 days / 180 days,
    etc ) - if it is possible immediately.
    Thanks & regards
    G. Janarthanan
    Edited by: N-Power FI TEAM on Feb 11, 2008 6:17 AM

    Hi,
    Please send me the details with regard to getting the AGE wise Stock statement as mentioned in my earlier mail.
    Thanks
    G. Jana

  • Stock Statement Query

    Hi All,
    Can some one help me in writing the stock statement query which includes
    Warehouse Code, Inventory Transfer No, Inventory Transfer Date, Item Code, Item Description, Batch No/Serial No, Expiry date, Delivery Note No if any
    We have add on which links the Inventory Transfer to Delivery. We can copy the inventory transfers to delivery where inventory transfer no will be stored in the item level UDF (u_delno)
    Thanks in advance

    Try from here to start:
    Select T1.WhsCode, T0.DocNum, T0.DocDate, T1.ItemCode, T1.Dscription, T1.SerialNum, T1.u_delno
    FROM dbo.OWTR T0
    INNER JOIN dbo.WTR1 T1 ON T1.DocEntry = T0.DocEntry
    Thanks,
    Gordon

  • STOCK STATEMENT (STORES)

    hi abapers
    pls help me abt stock statement (stores)
    output fields are
    1. S.no.
    2. Item Description.
    3. Item Code.
    4. Opening Balance.
    5. Received Qty.
    6. Issued to
    x. y z
    7. Sold Qty.
    8. Closing Balance.
    pls help me abt the table name and field names for that report.
    Points will be rewarded.
    thnks
    pardeep

    dear sir
    check with t code : S_P00_07000139
    stock card report, you will get
    regards
    jrp

  • General stock statement query.

    hi ,
         can anybody help me in getting stock statement query.... no selection criteria it has to disply all the ware house with Opening stock......inward qty, outward qty,closing stock . (this general) and like this i have to get stock details date wise

    Hi Vignesh......
    I'm in confusion. You are asking the same question with different meanings.
    As you are already suggested to use Inventory Posting List. You get all of your answers to your question.
    It will give you the stock Opening, In, Out, Closing Warehouse Wise (Particular/All), Date wise, Transaction wise...
    Please check this path to refer This Report.
    Inventory->Inventory Reports-->Inventory Posting List......
    If you have different requirement then please do mention.
    Regards,
    Rahul

  • Stock statement query--- help

    Have any one got the stock statement query report in the folowing format....
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    3.Posting Date
    from wh
    to wh
    help me in making stock statement query
    regards,
    Vignesh

    Hi
    Check This
    select w0.itemcode, i0.docdate, w0.whscode, w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0), 0
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) >= 0
    union
    select w0.itemcode, i0.docdate, w0.whscode, 0, -(w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0))
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) < 0
    or
    SELECT T0.ITEMCODE, T0.DSCRIPTION,T0.OPENQTY, T0.OPENVALUE, T0.INQTY, T0.INQTY*T0.PRICE AS 'RCPT VAL', T0.OUTQTY,T0.OUTQTY*T0.PRICE AS 'ISS. VAL', T0.INQTY-T0.OUTQTY AS 'CLOSING STOCK QTY',((T0.INQTY-T0.OUTQTY)*(T0.CALCPRICE)) AS 'CLOSING STOCK VAL' FROM OINM T0 WHERE T0.DOCDATE >=[%0] AND T0.DOCDATE <=[%1]
    Thanks
    Kevin
    Edited by: Kevin Shah on Oct 23, 2010 5:37 PM

  • Stock Statement - Opening & Closing Values

    Hi Guys,
    I am using the below query for  opening & Closing Stock Report.
    select a.ItemCode,a.Des, a.WareHouse , (SELECT (sum(t1.inqty - t1.outqty))
    FROM OINM t1 
    WHERE (T1.DocDate < '[%1]') and (t1.itemcode = a.itemcode) and
    (t1.warehouse = a.whs) ) as 'OB',
    a.Price,a.inqty as 'Goods Receipt',a.outqty as 'Goods Issue',
    (SELECT (sum(t1.inqty) - sum(t1.outqty))
    FROM OINM t1  
    WHERE (T1.DocDate <= '[%2]') and
    (t1.itemcode = a.itemcode) and (t1.warehouse = a.whs)) as 'Closing',
    (SELECT (sum (t1.transvalue))
    FROM OINM t1  
    WHERE (T1.DocDate <= '[%2]') and (t1.itemcode = a.itemcode) and
    (t1.warehouse = a.whs)) as 'ClosingValue'
    from (SELECT max(T0.[ItemCode]) as 'ItemCode',
    max(T0.[Dscription]) as 'Des',sum(T0.[InQty]) as 'InQty', sum(T0.[OutQty]) 'OutQty',
    t0.warehouse as 'whs' ,
    (select w1.whsname from owhs w1 where w1.whscode = t0.warehouse) as 'Warehouse',
    avg(T0.[Price]) as 'Price'
    FROM OINM T0 
    inner join oitm o1 on o1.itemcode = t0.itemcode
    inner join oitb o2 on o2.itmsgrpcod = o1.itmsgrpcod 
    WHERE (T0.[DocDate] >= '[%1]' and  T0.[DocDate] <= '[%2]')  and
    (TransType != '10000071'  and Transtype !='67' ) and
    (o2.itmsgrpnam >= '[%3]' and o2.itmsgrpnam <= '[%4]' )
    group by T0.[ItemCode],t0.warehouse)a
    But i need some changes in the Report and  below is the selection criteria,
    Pls somebody help me in achieveing this.
    Report 1:
    Item Group: Group B
    u2022 Column: Goods Issue
    Field to be fetched: Invoice Qty. for the respective FG items
    From Ware House No.: 02
    Fetching type: Cumulative for given date range
    u2022 Column: Goods Receipt
    Field to be fetched: Receipt from Production for FG items
    Receipt Warehouse: 02
    Fetching type: Cumulative for given date range
    Report 2:
    For Item Groups- Accessories, Consumables & Raw materials:
    Column: Goods Issue
    Issue from Warehouse No.: 08 ,33
    Field to be fetched: Issue for Production (BoM qty-Back-flush & Manual issue by system)
    Fetching type: Cumulative for given date range
    Column: Goods Receipt
    Receiving Warehouse No.: 08 ,33
    Field to be fetched: GRPO qty. against respective Purchase Order.
    Fetching type: Cumulative for given date range
    Report 3:
    For Item Group-WIP
    Column: Goods Issue
    Issue from Warehouse No: 04,09,17,18,20,21,23,28,29,30,31,32,34,38,39,44,45,46
    Fields to be fetched: All types of issues ( Issue for prodn. through Prodn.order, GI &
    Inventary Transfer)
    Fetching type: Cumulative for given period.
    Column: Goods Receipt
    Receiving Warehouse Nos:04,09,17,18,20,21,23,28,29,30,31,32,34,38,39,44,45,46
    Fields to be fetched: All types of Receipt (Receipt from Prodn. through Prodn.order, GR )
    Fetching Type: Cumulative for given period.
    Regards,
    Vamsi

    Dear Srini,
    Yes of-course Tally shows OB,and Closing balance at a particular time, SAP B1 Shows them too, but in a different manner.
    1. Suppose , you have given OB to SAP on 01/04/10.(which is actually the closing balance of Tally as on 31/03/10).
        Under trial balance report OB Column is there.
         If you are trying to populate Tally's OB of 01/04/09, You Can't.
    2. Getting the OB at a particular time in SAP, depends how you are maintaining your Posting Periods.
    For Closing balance in SAP, The last column -'Balance' is actually the Closing balance as on the date for you are running Trial Balance Report.
    Hope this will help you.
    Best Regards
    Ashutosh T

  • Stock Statement Report

    Hi,
    I am trying to get a report with the following columns:
    Material
    Opening Balance
    Total Receipt
    Total Issue
    Closing Balance.
    Using MB5B, I am able to get the data.
    But we have come confusion over the data. For example, we do a MIGO (Mov Type 101) of a Material, say 100 Pcs. Here the RECEIPT is 100 in MB5B. But we come to know that the MIGO was done for the wrong Material, and it was an error from the Operator. We then do the REVERSAL of the MIGO (Mov Type 102).
    Here at this stage, in MB5B shows:
    Opening Balance - 0
    Total Receipt - 100
    Total Issue - 100
    Closing Balance - 0.
    Stock has become ZERO. But physically we have not received any Material, hence the MB5B should not shown either RECEIPT or ISSUE.
    Is there any other option to handle the situation.
    Mov Type 261 is reflected in ISSUE where as Mov Type 262 is reflected as RECEIPT in MB5B.
    What exactly REVERSAL means is SAP?
    Can we customize MB5B?
    Regards,
    P K Karn

    Dear Naveen,
    I am sorry if I am putting a wrong question with u.
    My scenario is something like this:
    I do MIGO (Mov Type 101) for a Material, say 100 PCS dt. 01.01.2007
    On 01.01.2007, MB5B shows the following data:
    Opening Balance: 0
    Receipt: 100
    Issue: 0
    Closing Balance: 100
    On dt 02.01.2007, we come to know that the MIGO is done for wrong Material, and hence we have to reverse the MIGO document.
    After reversing the MIGO (Mov Type 102), MB5B shows the following data:
    Opening Balance: 0
    Receipt: 100
    Issue: 100
    Closing Balance: 0
    When we talk of the Stock, it is ZERO now.
    When we see the MB5B for the above Material, we can conclude that we have received 100 PCS, and the 100 PCS has been issued, and the Stock is NIL.
    But in real scenario, the Materials was neither physically received nor issued. It was the error from the Data Entry Operator.
    We are a EXPORT house, and we have to submit the above report to the Goverment Official for some processing.
    How to handle this situation in SAP.
    Thanks & Regards,
    P K Karn

  • Finished goods stock statement report for production

    Hi guys,
    i want to create a report showing these fields:-
    Product Code,
    Description,
    UOM,
    Opening Balance,
    Receipts From Production,
    RMA Receipts (Rejections),
    Total,
    Dispatched,
    Closing Balance,
    Physical Stock,
    Variance.
    With org. code and date range parameters
    Pls i need ur inputs on d tables to use and how to link them.
    The query basically.
    I am using 10g rpts develper.
    thank u

    and how should we know your table-structure? If you are using the eBusiness-suite, try an eBusiness-related forum, maybe this OA Framework

Maybe you are looking for