WM - Report for stock with storage time

Hi Guru,
How can I get a report with material_name, quantity, and their storage time?
e.g. part A putaway on 2008/1/1,  100 EA
The report will show:
material    Qty          storage time
part A     100 EA     (2008/12/10 - 2008/1/1)
We want to find out the stock which have a long storage time - dead stock.
Thanks,

Hi,
Information that comes from WM can be misleading. Even if you have the stock long ago, WM movements may happen within the WH for that material (and this does not mean IM movement but the quant-data in WM may change).
I think you should consider the use of dead stock and slow moving stock reports (MC46 , MC50). MC.A report can also be used to get information on goods movements.
Of course, depending on your WM strategy and processes you can extract the necessary information. E.g. in LX02 you can see the GR date, SLED/BBD, the already mentioned last movement, last removal, etc - check the layout.
Regards,
Csaba

Similar Messages

  • Report for stocks with no movement

    Hi All,
    I would like to know is there a report / transaction, where i can check for all materials in a particular plant / storage location, which has stock, but there was no movement for a particular period.
    Eg: Mtl-A, stock - 100 nos, Period - Jan 2007 to Oct 2007, no consumption or requirements
    Await inputs.
    Vivek

    Hi Rohit & Vishal,
    Thanks for your inputs, i think MC46 & MC50 should meet my requirement, will carry out a few tests & let you know.
    Note for Mr. Seshagiri: I think that would be a tedious job, so i think i will try MC46 & MC50. But none the less, thank you for your suggestion.
    In the meantime, if you people come across any other standard reports which i can use, please do let me know.
    Vivek

  • Anyone get a huge "Problem Report for iDVD" with hundreds of lines of information?

    Anyone get a huge "Problem Report for iDVD" with hundreds of lines of information? This happens right before the DVD would be finished burning but instead crashes and leaves the long report your have to scroll down several times to read. I had to take several screen captures of the screen to get the WHOLE report. Here is two:
    (If there is another thread on this - just answer the question or refer me to it. I'm past due on a big project. Don't have time to read all 21,000 discussions in the iDVD thread. Be kind. Thanks )

    Some things to try first:
    1. Disconnect any and all 3rd party devices that didn't ship with your mac directly from apple (both FW and USB included). 
    2. Restart your mac without any 3rd party devices attached whatsoever. That includes ext. hard drives, blue tooth devices, and any third party memory product/s. Basically, anything that doesn't come directly from apple has to go (at least while troubleshooting).
    3. Need you to dispose of the plist for iDvd also. Go to you Home folder, the one that looks like a house > Library > Preferences > com.apple.iDvd.plist and drag and drop this file/s to the trash. Make sure to first quit iDvd prior to disposing of this pref. file/s.
    4. Run apple's disc utility and repair permissions. Applicantions > Utilities > Disc Utility > Repair Permissions.
    5. Restart your mac yet again, and try iDvd one more time.
    6. If it's still at issue then please open iDvd from a separate user account and try your project one more time. If you don't know how to create a separate user account then just come on back and one of will show you how.
    Good luck.
    Message was edited by: SDMacuser

  • Report for material with sloc,qty available, and production order

    hi friends, i need advice on getting this report for material with qty and specific sloc with the corresponding Prodn order numbers. in mb51 i could get all these details except the prodn order no. could you advice me please?

    to make sure you know how to do this.
    In the material document list, hit "Ctrl+F8" on your keyboard.
    A window will pop up. Click on the button position and look for "order" in the list of available fields. That should do it.
    Rgds.

  • Report for stock in transit datewise

    I need stock in transit datewise. Is there any report possible for that ? Which table and fields should I refer. please revert.
    Regs,
    Appie

    Hi,
    T.Code: MB5T can be used for Report for stock in transit, but date wise u can't get here. U have to develop areport or by querry u can develop a report.
    U can get date (MKPF-BUDAT) wise details by giving movement type in MSEG table u get all the details in the tables.
    Regards,
    Chinna

  • PR and PO should be display in IWBK report for stock item.

    Hi Exterts,
    Our client requirement is to display PR and PO number in IWBK report for stock item as well.
    I know PR and PO can be display in IWBK report for non-stock item but how we can display PR and PO for stock item,as PR is generated through MRP for stock item.
    Please share your ideas on this.
    Regards
    Vishu

    Vishu,
    In typical MRP settings you "procure to stock" not "procure to order".
    This means that there is no direct link between the PM/CS orders and any PR/POs created via MRP.
    Subsequently you will not be able to show this data in IWBK.
    However, we are currently designing a customer-specific report similar to IWBK that also counts the number of open POs for a given material on a PM/CS work order. The user can then navigate to ME2M (PO list) or MD04 (stock requirements list) to get further details.
    PeteA

  • MULTI LEVEL REPORT FOR STOCK TRANSPORT PURCHASE ORDER

    Hi,
    I will have lot of stock transport purchase orders,like md4c transaction where we get multilevel report for sale order/production order,is there any report for stock transport purchase orders.its urgent kindly help

    goto purchase order history tab
    you can see all the details of PO-deluvery-GI, GR, imvoice. Click on delivery, you can see the billing document throughdocument flow button.
    This function is not availilable for production order, hence we have MD4c.

  • Report for stock transfer from plant to plant

    Hi,
      Is there any standard report for  stock transfer from plant to plant .
      If not is there any enhancements to get the above report.
    Regards,
    Ravindranath.

    Hi Ravi,
    U can use the tcode MB51 and their u can give the input as 301 if it is 1 step in the mvt type or use 303 and 305 for 2 step transfer. and generate the report.
    if u want the list of stock transport orders then use tcode ME2N and the input parameter as  item category "U" and generate the report.
    hope it wud have answered ur question
    Reward if useful
    Shawn

  • Report for Asset with only values (No Zero values)

    Hi All
    There is requirement where in the user wants to genenerate report for assets with  values .There should not be Zero balance assets  included in the output. In short only with values in the asset master the report needs to be generated. Can one have any idea on this .
    regards
    Navin
    Edited by: Naveen Rao on Jan 22, 2009 10:04 AM

    Hi
    Can you  please specify the report name.
    regards
    Navin

  • 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.

  • Reg :  Z report for Stock on given date

    Dear ABAP Guru's,
                                   Iam in need of urgent report inorder to find Stock on given(particular) single date but not SAP standard report.That Stock Value should match the MC.9 value.Pls help me

    Hi,
    This code may help you.
    *& Report  ZDH_ITC_STOREP
    REPORT  ZDH_ITC_STOREP.
    TABLES: T001L.
    type-pools slis.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: GT_HEADER TYPE SLIS_T_LISTHEADER.
    DATA: GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: GT_EVENTS TYPE SLIS_T_EVENT.
    TYPES: BEGIN OF TY_FINAL,
           MATNR TYPE MCHB-MATNR,
           MATDES TYPE MAKT-MAKTX,
           BATNO TYPE MCHB-CHARG,
           UMIL TYPE MCHB-CLABS,
           UCFC TYPE MCHB-CLABS,
           BMIL TYPE MCHB-CSPEM,
           BCFC TYPE MCHB-CLABS,
           TMIL TYPE MCHB-CLABS,
           TCFC TYPE MCHB-CLABS,
           END OF TY_FINAL.
    TYPES: BEGIN OF TY_MCHB,
          MATNR TYPE MCHB-MATNR,      " Material Number
          CHARG TYPE MCHB-CHARG,      " Batch Number
          CLABS TYPE MCHB-CLABS,      " Valuated Unrestricted-Use Stock
          CSPEM TYPE MCHB-CSPEM,      " Blocked Stock
          UCFC TYPE MCHB-CLABS,
          bcfc TYPE MCHB-CLABS,
          END OF TY_MCHB.
    *TYPES: BEGIN OF TY_MARA,
    *     MATNR TYPE MARA-MATNR,
    *     END OF TY_MARA.
    TYPES: BEGIN OF TY_MAKT,
         MATNR TYPE MAKT-MATNR,       " Material Number
         MAKTX TYPE MAKT-MAKTX,       " MATERIAL DESCRIPTION
         END OF TY_MAKT.
    TYPES:BEGIN OF TY_MARM,
         MATNR TYPE MARM-MATNR,       "MATERIAL NUMBER
         UMREN TYPE MARM-UMREN,       "Denominator for conversion to base units of measure
         UMREZ TYPE MARM-UMREZ,       "Numerator for Conversion to Base Units of Measure
       END OF TY_MARM.
    DATA: IT_FINAL TYPE STANDARD TABLE OF TY_FINAL,
          WA_FINAL TYPE TY_FINAL.
    DATA: IT_MCHB TYPE STANDARD TABLE OF TY_MCHB,
          WA_MCHB TYPE TY_MCHB.
    *DATA: IT_MARA TYPE STANDARD TABLE OF TY_MARA,
    *      WA_MARA TYPE TY_MARA.
    DATA: IT_MAKT TYPE STANDARD TABLE OF TY_MAKT,
          WA_MAKT TYPE TY_MAKT.
    DATA: IT_MARM TYPE STANDARD TABLE OF TY_MARM,
          WA_MARM TYPE TY_MARM.
    data: atot, btot type MCHB-CLABS.
    PARAMETERS: PA_FACT TYPE T001W-WERKS OBLIGATORY,                  "FACTORY
                PA_DATE TYPE SY-DATUM OBLIGATORY.                     "DATE
    SELECT-OPTIONS: SO_STLO FOR T001L-LGORT OBLIGATORY.               " STORAGE LOCATION
    * GETTING THE MATERIALS
    SELECT MATNR CHARG CLABS CSPEM
      FROM MCHB
      INTO TABLE IT_MCHB
      WHERE WERKS = PA_FACT
      AND LGORT IN SO_STLO.
    * GETTING THE BRAND DESCRIPTION FROM THE ABOVE SELECTED MATERIAL
    SELECT MATNR MAKTX
      FROM MAKT
      INTO TABLE IT_MAKT
      FOR ALL ENTRIES IN IT_MCHB
      WHERE MATNR = IT_MCHB-MATNR
      AND SPRAS = 'EN'.
    * GETTING THE BATCH CODE FOR THE ABOVE MATERIAL AND BRAND
    SELECT MATNR UMREN UMREZ
      FROM MARM
      INTO TABLE IT_MARM
      FOR ALL ENTRIES IN IT_MCHB
      WHERE MATNR = IT_MCHB-MATNR.
    * CALCULATING THE TOTALS OF BLOCKED AND UNRESTRICTED QTY
    LOOP AT IT_MCHB INTO WA_MCHB.
      READ TABLE IT_MARM INTO WA_MARM WITH KEY MATNR = WA_MCHB-MATNR.
      WA_MCHB-ucfc  = ( ( WA_MARM-UMREN / WA_MARM-umrez ) * wa_mchb-clabs ).
        WA_MCHB-bcfc = ( ( wa_marm-umren / wa_marm-umrez ) * wa_mchb-cspem ).
    *  WA_MCHB-ucfc = atot.
    *  WA_MCHB-bcfc = btot.
      modify IT_MCHB from WA_MCHB TRANSPORTING ucfc bcfc WHERE MATNR = WA_MCHB-MATNR.
      READ TABLE it_makt into wa_makt with key MATNR = WA_MCHB-matnr.
      WA_FINAL-matnr = WA_MCHB-MATNR.
      WA_FINAL-MATDES = wa_makt-maktx.
      WA_FINAL-BATNO = wa_mchb-CHARG.
      WA_FINAL-UMIL = wa_MCHB-CLABS.
      wa_final-UCFC = WA_MCHB-ucfc.
      wa_final-bcfc = WA_MCHB-bcfc.
      wa_final-bmil = WA_MCHB-CSPEM.
      WA_FINAL-tmil = WA_MCHB-clabs + WA_MCHB-CSPEM.
      WA_FINAL-tcfc = WA_MCHB-ucfc + WA_MCHB-bcfc.
    append wa_final to IT_FINAL.
    ENDLOOP.
    perform buildheader USING GT_HEADER[].
    PERFORM FIELDCATINIT USING GT_FIELDCAT[].
    perform alvdisplay.
    PERFORM build_layout USING GS_LAYOUT.
    *&      Form  buildheader
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM buildheader USING RT_HEADER TYPE SLIS_T_LISTHEADER..
    DATA: TP TYPE SLIS_LISTHEADER.
      DATA: TEXT(20) TYPE C,
            DT TYPE SY-DATUM.
      TP-TYP = 'H'.
      TP-INFO = 'STOCK REPORT '.
      APPEND TP TO RT_HEADER.
      CLEAR TP.
      WRITE SY-DATUM TO DT DD/MM/YYYY.
      CONCATENATE 'DATE :' DT INTO TEXT.
      TP-TYP = 'S'.
      TP-INFO = TEXT.
      APPEND TP TO RT_HEADER.
      CLEAR TP.
    ENDFORM.                    " buildheader
    *&      Form  alvdisplay
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alvdisplay .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                 = 'ZDH_ITC_STOREP'
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                          = GS_LAYOUT
       IT_FIELDCAT                        = GT_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_FINAL
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " alvdisplay
    *&      Form  FIELDCATINIT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELDCATINIT USING FINIT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      LS_FIELDCAT-FIELDNAME       =  'MATNR'.
      LS_FIELDCAT-SELTEXT_L       =  'MATERIAL NO'.
      LS_FIELDCAT-KEY        =  'X'.
      LS_FIELDCAT-JUST = 'L'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'MATDES'.
      LS_FIELDCAT-SELTEXT_L       =  'BRAND'.
      LS_FIELDCAT-KEY        =  'X'.
      LS_FIELDCAT-JUST = 'L'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BATNO'.
      LS_FIELDCAT-SELTEXT_L       =  'BATCH NO'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'UMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'RESTRICTED'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'UCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'UCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'BLOCKED'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'BCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'TMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'TOTAL MIL'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'TCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'TCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
    ENDFORM.                    " FIELDCATINIT
    *&      Form  BUILDLAYOUT
    *       text
    *      -->P_GS_LAYOUT[]  text
    FORM BUILD_LAYOUT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      RS_LAYOUT-NO_INPUT = 'X'.
      RS_LAYOUT-ZEBRA = 'X'.
      RS_LAYOUT-COLWIDTH_OPTIMIZE = ' '.
      RS_LAYOUT-NO_COLHEAD = ' '.
      RS_LAYOUT-NO_VLINE = ' '.
      RS_LAYOUT-INFO_FIELDNAME = 'WS_COLOR'.
    ENDFORM.
                        " BUILDLAYOUT
    HTH
    Regards,
    Dhruv Shah

  • Inventory report for stock category B

    Hi everyone,
    We are trying to generate a customer stock inventory report with stock category B. The table MARD is not displaying any values annwe also looked at table MKOL. Its not giving us any. How do i get the inventory report for this stock type B. Kindly Advise.

    it is customer owned stock. We receiver materials from customer for repair and we recondition them and we give it back. for this we maintain it in stock type B. it is specifically used in aerospace industries. We want to make an inventory report for this customer owned stock in our inventory . i am unable to get the table. Kindly advise

  • PO for stock with statistical WBS element

    Dear colleagues,
    My customer wants to create Purchase Orders for regular valuated plant stock with a statistical assignment to a WBS element, so they can report on the total procurement costs per project/WBS.
    They do not wish to use project stock, because of the integration with Demand Planning in APO.
    Does anyone have an idea if this is possible and if so, how to configure this? I am out of ideas.
    Thanks in advance for any help in this matter.
    Edith

    are u posting to some other cost object also. normally they wud have to be posted to a COPA also with the cost element being 11 category.
    the wbs will receive the statistical posting, so there needs to be a real object also.
    see whether the real object is getting derived.
    the system is nt finding the real object and trying to post with the WBS in real, but since its statistical, the error.
    any other calrifications. plz post.
    regards
    anantha

  • Report on Stock in storage bin

    Dear Guru
    My client wants a report where in MF60 they will get the required quantity to be transferred from raw storage location  to production location.They want a report in which the stock to be transferred  from raw storage location is in which storage bin.
    Is there any standard report for this
    regards
    sam

    Hi,
    You can also use this report : LS26 to get an overview display per material.
    Or you can use LS03n per WM,storage stpe, storage bin to get history.
    Thanks
    Silas

  • Report for user with roles

    Dear all
    Please let me know how to get a report for the users created with the roles. I want the users created , roles assigned and the time stamp
    I tried a lot but could'nt get the solution for this.
    thanks and regards
    Raja

    Found the solution finally. Custom report with "*attribute changed contains role"*
    And action =create, bulkcreate, provision
    Thanks and regards

Maybe you are looking for

  • Does Java has CLR checking enabled by default ?

    Hi, I have java application hosted on TOMCAT. I have a custom socketFactory which uses JSSESocketFactory internally in my application. RSA is ending the "RSA Root Signing Service" shortly so wanted to know if CRL check is enabled or not for my applic

  • Problem with Message Bridge

    Hi friends,           I've a strange problem. I've posted a problem on another newsgroup concerning remote lookup as you can see below.           I'm working on WLS8.1sp2. 2 clusters (front-end with webapps and back-end with ejbs with a firewall with

  • Previous month's last date

    Pls help me to retrieve the previous month's last sunday (I mean date) using some query Thanx in advance RAM

  • Sip passing through nat but rtp is not - no audio

    Sip passing through nat but rtp is not I'm looking at traffic leaving my router with a sniffer. I see SIP traffic but I do not see RTP traffic.  The phones ring on both sides but I do not get any audio. interface f0/0.100 ip address 192.168.10.1 255.

  • DNS Lokup fails after waking from sleep

    Since the recent update, whenever my computer wakes from sleep the DNS Lookup fails and I cannot connect to the internet for 30sec-1minute. I've never experienced this problem before. Any thoughts?