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

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

    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

  • 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

  • HT204411 How can I get a tv show from the Canadian iTunes store from the United States Store?

    I have been trying to find the tv show the Listener and a few others everywhere. I can only find them in the Canadian iTunes Store. How can I get it in the United States Store?

    Ask whomever makes the show to sell it in the U.S Store.

  • How do I buy a song from the UK store if I use the United States store?

    I use the United States store and I noticed that one of my favorite bands, Busted, has some songs I want but they are in the UK store. I tried to buy them but it said I couldn't. Is there anyway to get these songs?

    *i can go into any country and purchace anything with an american credit card*
    And you will pay and VAT/duty/customs that were levied on that item when it was brought into that country.
    And you may have to pay VAT/duty/customs when you leave that country with that item.
    Besides, certain items available in one country on one label, may be on a different label in another country.

  • 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

  • HT1904 I purchased an iTunes card in the United States yesterday. I arrived home in the Bahamas today and tried to redeem the card  but got an error message stating that  I can only redeem  my card in a United States store. How to redeem a card outside th

    I purchased an iTunes card in the United States yesterday. I arrived home in the Bahamas today and tried to redeem the card but got an error message stating that  I can only redeem  the card in a United States store. How to redeem a card outside the US?

    Sorry - iTunes cards can only be redeemed in the country in which they were purchased.
    GB

  • Request User State Store Fails with error code 0x00004005

    I am trying to get a machine refresh working in SCCM and am running into a road block with the user state migration. The Task sequence hits Request user state store and then fails. In the logs on the machine it shows it downloads the cert from the SMP but it fails to verify the cert. The thing is that this was working and then stopped for no apparent reason. I have added a second SMP and it has the same issue so its got to be something environmental causing this. I have found no references to the errors I am recieving that relate to the issue so I am stumped. We have a SCCM 2007 site in mixed mode. The error log is:
    The task sequence execution engine failed executing the action (Request User State Storage) in the group (Capture User Files and Settings) with the error code 16389 Action output: ployment\osdsmpclient\smpclient.cpp,1743) Request to SMP 'ATXFREPSMS01.NA.atxglobal.com' failed with error (Code 0x80090006). Trying next SMP. FALSE, HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\osdsmpclient\smpclient.cpp,1698) pClientRequestToSMP->Execute(migInfoFromMP.saSMPs), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\osdsmpclient\smpclient.cpp,2713) ExecuteCaptureRequestToSMP(migInfoFromMP), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\osdsmpclient\smpclient.cpp,2755) ExecuteCaptureRequest(), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\osdsmpclient\main.cpp,72) OSDSMPClient finished: 0x00004005 Failed to verify certificate signature for 'ATXFREPSMS01.NA.atxglobal.com' (0x80090006) ClientKeyRequestToSMP failed (0x80090006). ClientRequestToSMP:oRequest failed. error = (0x80090006). Failed to find an SMP that can serve request after trying 4 attempts. ExecuteCaptureRequestSMP failed (0x80004005). ExecuteCaptureRequest failed (0x80004005).. The operating system reported error 16389:

    Hi
    I am getting the same issue.
    More info:
    The same task works ok for one client - an xp machine that was upgraded to vista sp1 using sccm but without usmt.
    If I send this machine a task which includes usmt and os deploy it works.
    On 2 other machines ( so far) , the request store fails with the same error  - 0x80090006. (one of them existing vista and the other xp)
    I have tried removing and adding the client from the domain but it did not help.
    Any idea?
    David

  • 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

Maybe you are looking for

  • Non-English characters File issue with RSEINB00 Program

    Hi, We use RESEINB00 program to process IDoc files - to create Master data such as Material Master. Our IDoc file has some special characters - like crème. This letter 'è' would be treated as 'e#' and the Program terminates. Inside the program RSEINB

  • How can I attach a document to an iCal event invitation?

    I tried doing some research on this and tried the "Help" part of iCal.  The option given there said Attach a file to an event If you want to associate a particular file with an event (for example, a document you need to remember to take to an appoint

  • Chinese character in the csv file

    Hi all, I have code below , I am using OpenCSV API to write data to csv. I am using jdk1.4 and NetBean 6.1 and database is DB2. The DB2 encoding is UTF-8 , the chinese data is inserted correct to database , but when i tried to retrieve it using rs.ge

  • Why does my computer self-assign an IP address whenever I rest the network?

    All of a sudden both my wife's and my MacBook Pro dropped their internet connections (Verizon FIOS).  I spent a long time with the Verizon tech person and he suggested that I post here. My computer is running Mountain Lion and my wife's is running Li

  • Resume Download after sleep

    Hi, When mbp is sent to sleep, safari stops all downloads but doesnt clear from list. When waking up, you click resume download but it starts downloading the file again right from the start despite the fact that it had already downloaded part of it b