Program to check inventory report

Hi guys,
I need to send inventory report as  idoc to customer on daily basis, bt they need customized fields located in SAP .. so i need is to extend the idoc.. insert the required segments and modify the user exit .. to pop the required fields in idoc.. untill here everything is fine..
Now my question is.. how should i configure to trigger the idoc to be sent daily... and to define output type as idoc...
Normally, if its standard application .....we  will configure in NACE and schedule the program rseout00 .. bt in this case .. what should i do??

Hi,
Go to program RSVTPROT in se38 transaction. There enter customzing object table as V_T001B and T001B. Thern enter the date range you want to evaluate,also customizng object or tables, select all output options BUT not archived logs and execute.
You will get the ALV report with user name,date and changes done
cya
udayakumar

Similar Messages

  • URGENT inventory reports

    Hi friends,
    I would like to see a report by Product line/Profit center,
    I checked these reports, MCBE,MMBE,MCBC,ME80AN. Where I don’t see any field that can show Profit center,
    And also I would like to see a inventory report  by material, qty, batch, and serial number.
    Please let me know if we have any report like that ,

    this will help you
    *& Report  Z_OPEN_CLOSE                                                *
    REPORT  Z_OPEN_CLOSE MESSAGE-ID YW2 LINE-SIZE 231 LINE-COUNT 45
    NO STANDARD PAGE HEADING.
    Type Declaration *
    TYPE-POOLS SLIS.
    Tables *
    TABLES: MKPF, " Material Document: Header Data
            MSEG, " Material Document: Item Data
            MARA,
            MARD,
            S031,
            EKKO,
            EKPO,
            LIKP,
            MAKT,
            J_1IWRKCUS,
            T001W,
            WB2_V_MKPF_MSEG2,
            MMIM_REP_PRINT,
            YW2_STKMOVEMENTS,
            YPLNT,
            MARDH.
    Internal Tables *
    DATA: I_WERKS LIKE J_1IWRKCUS OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF I_YPLNT OCCURS 0,
             PPLNT LIKE YPLNT-PPLNT,
             WPLNT LIKE YPLNT-WPLNT,
          END OF I_YPLNT.
    DATA: BEGIN OF I_MKPF OCCURS 0,
            MBLNR LIKE MKPF-MBLNR,
            MJAHR LIKE MKPF-MJAHR,
            BUDAT LIKE MKPF-BUDAT,
            VGART LIKE MKPF-VGART,
            BWART LIKE MSEG-BWART,
            MATNR LIKE MSEG-MATNR,
            WERKS LIKE MSEG-WERKS,
            LGORT LIKE MSEG-LGORT,
            MENGE LIKE MSEG-MENGE,
            MEINS LIKE MSEG-MEINS,
            KUNNR LIKE MSEG-KUNNR,
            ZEILE LIKE MSEG-ZEILE,
            XAUTO LIKE MSEG-XAUTO,
            SHKZG LIKE MSEG-SHKZG,
            MATNR1 LIKE MSEG-MATNR,
          END OF I_MKPF.
    DATA: BEGIN OF I_MARDH OCCURS 0,
           WERKS LIKE MARDH-WERKS,
           MEINS LIKE MARA-MEINS,
           MATNR LIKE MARDH-MATNR,
           LGORT LIKE MARDH-LGORT,
           LABST LIKE MARDH-LABST,
           LFGJA LIKE MARDH-LFGJA, "Added -MB
           LFMON LIKE MARDH-LFMON, "Added -MB
           PERIO(6),
           INSME LIKE MARDH-LABST,
           EINME LIKE MARDH-LABST,
           SPEME LIKE MARDH-LABST,
           RETME LIKE MARDH-LABST,
           O_STK LIKE MARDH-LABST, " Opening Stock
           C_STK LIKE MARDH-LABST, " Closing Stock
          END OF I_MARDH.
    DATA: BEGIN OF I_MARD OCCURS 0,
           WERKS LIKE MARD-WERKS,
           MATNR LIKE MARD-MATNR,
           LGORT LIKE MARD-LGORT,
           LABST LIKE MARD-LABST,
           INSME LIKE MARD-LABST,
           MEINS LIKE MARA-MEINS,
           EINME LIKE MARD-LABST,
           SPEME LIKE MARD-LABST,
           RETME LIKE MARD-LABST,
          END OF I_MARD.
    DATA: I_MARD1 LIKE I_MARD OCCURS 0 WITH HEADER LINE.
    DATA: I_MARDH1 LIKE I_MARDH OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF I_MKPF1 OCCURS 0,
            MBLNR LIKE MKPF-MBLNR,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BUDAT LIKE MKPF-BUDAT,
            BWART LIKE MSEG-BWART,
            MJAHR LIKE MKPF-MJAHR,
            VGART LIKE MKPF-VGART,
            LGORT LIKE MSEG-LGORT,
            MENGE LIKE MSEG-MENGE,
            MEINS LIKE MSEG-MEINS,
            XAUTO LIKE MSEG-XAUTO,
            SHKZG LIKE MSEG-SHKZG,
          END OF I_MKPF1.
    DATA: BEGIN OF I_MKPF2 OCCURS 0,
           WERKS LIKE MSEG-WERKS,
           MATNR LIKE MSEG-MATNR,
           BUDAT LIKE MKPF-BUDAT,
           BWART LIKE MSEG-BWART,
           MJAHR LIKE MKPF-MJAHR,
           VGART LIKE MKPF-VGART,
           LGORT LIKE MSEG-LGORT,
           MENGE LIKE MSEG-MENGE,
           MEINS LIKE MSEG-MEINS,
           XAUTO LIKE MSEG-XAUTO,
         END OF I_MKPF2.
    DATA: BEGIN OF I_FINAL5 OCCURS 0,
           WERKS LIKE MSEG-WERKS, " Plant
           MATNR LIKE MSEG-MATNR, " Material
           LGORT LIKE MSEG-LGORT, " Storage Location
           BUDAT LIKE MKPF-BUDAT, " Posting Date
           MTART LIKE MARA-MTART, " Material Type
           SPMON LIKE S031-SPMON, " Month
           MAKTX LIKE MAKT-MAKTX, " Description
    meins(3), " UOM
            MEINS LIKE MSEG-MEINS,
            O_STK LIKE MARDH-LABST, " opening stock
            TRECEP LIKE MARDH-LABST, " total receipts
            PRODU LIKE MARDH-LABST, " Net Receipts - Production
            RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
            SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
            TDISP LIKE MARDH-LABST, " total dispatches
            CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
            OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
            TLOSS LIKE MARDH-LABST, " Total Loss
            TRLOSS LIKE MARDH-LABST, " Transit Loss
            WHLOSS LIKE MARDH-LABST, " Warehouse Loss
            C_STK LIKE MARDH-LABST, " Closing Stock
            TRFSTK LIKE MARDH-LABST, "Transfer stock
            MENGE LIKE MSEG-MENGE,
            OTHADJ LIKE MARDH-LABST,
          END OF I_FINAL5.
    DATA: BEGIN OF I_FINAL OCCURS 0,
            WERKS LIKE MSEG-WERKS, " Plant
            MATNR LIKE MSEG-MATNR, " Material
            BUDAT LIKE MKPF-BUDAT, " Posting Date
            MTART LIKE MARA-MTART, " Material Type
            SPMON LIKE S031-SPMON, " Month
            MAKTX LIKE MAKT-MAKTX, " Description
    meins(3), " UOM
            MEINS LIKE MSEG-MEINS,
            O_STK LIKE MARDH-LABST, " opening stock
            TRECEP LIKE MARDH-LABST, " total receipts
            PRODU LIKE MARDH-LABST, " Net Receipts - Production
            RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
            SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
            TDISP LIKE MARDH-LABST, " total dispatches
            CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
            OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
            TRFSTK LIKE MARDH-LABST, "Material Transfer stock
            TRLOSS LIKE MARDH-LABST, " Transit Loss
            WHLOSS LIKE MARDH-LABST, " Warehouse Loss
            TLOSS LIKE MARDH-LABST, " Total Loss
            C_STK LIKE MARDH-LABST, " Closing Stock
            OTHADJ LIKE MARDH-LABST,
           END OF I_FINAL.
    DATA: I_FINAL1 LIKE I_FINAL OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF I_FINAL_TEMP OCCURS 0,
            WERKS LIKE MSEG-WERKS, " Plant
            MATNR LIKE MSEG-MATNR, " Material
            MTART LIKE MARA-MTART, " Material Type
            MAKTX LIKE MAKT-MAKTX, " Description
            MEINS LIKE MSEG-MEINS,
            O_STK LIKE MARDH-LABST, " opening stock
            TRECEP LIKE MARDH-LABST, " total receipts
            PRODU LIKE MARDH-LABST, " Net Receipts - Production
            RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
            SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
            TDISP LIKE MARDH-LABST, " total dispatches
            CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
            OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
            TRFSTK LIKE MARDH-LABST, "Material Transfer stock
            TRLOSS LIKE MARDH-LABST, " Transit Loss
            WHLOSS LIKE MARDH-LABST, " Warehouse Loss
            TLOSS LIKE MARDH-LABST, " Total Loss
            C_STK LIKE MARDH-LABST, " Closing Stock
            OTHADJ LIKE MARDH-LABST,
          END OF I_FINAL_TEMP.
    For Materials
    DATA: BEGIN OF I_MARA OCCURS 0,
           MATNR TYPE MARA-MATNR,
           MTART TYPE MARA-MTART,
           MEINS LIKE MARA-MEINS,
           LABST TYPE MARD-LABST,
           MAKTX LIKE MAKT-MAKTX,
          END OF I_MARA.
    DATA: BEGIN OF I_STKMVMNTS OCCURS 0,
           BWART LIKE MSEG-BWART,
           SHKZG LIKE MSEG-SHKZG,
           VZBEW LIKE YW2_STKMOVEMENTS-VZBEW,
          END OF I_STKMVMNTS.
    DATA: BEGIN OF I_FINALT OCCURS 0,
           WERKS LIKE MSEG-WERKS, " Plant
           MATNR LIKE MSEG-MATNR, " Material
           BUDAT LIKE MKPF-BUDAT, " Posting Date
           MTART LIKE MARA-MTART, " Material Type
           SPMON LIKE S031-SPMON, " Month
           MAKTX LIKE MAKT-MAKTX, " Description
    meins(3), " UOM
           MEINS LIKE MSEG-MEINS,
           O_STK LIKE MARDH-LABST, " opening stock
           TRECEP LIKE MARDH-LABST, " total receipts
           PRODU LIKE MARDH-LABST, " Net Receipts - Production
           RECEP LIKE MARDH-LABST, " Net Receipts - Receipts
           SAL_RET LIKE MARDH-LABST, " Net Receipts - Sales Return
           TDISP LIKE MARDH-LABST, " total dispatches
           CUSTMR LIKE MARDH-LABST, " Net Dispatches - Customers
           OPLANT LIKE MARDH-LABST, " Net Dispatches - To Other Plant
           TRFSTK LIKE MARDH-LABST, "Material Transfer stock
           TRLOSS LIKE MARDH-LABST, " Transit Loss
           WHLOSS LIKE MARDH-LABST, " Warehouse Loss
           TLOSS LIKE MARDH-LABST, " Total Loss
           C_STK LIKE MARDH-LABST, " Closing Stock
           OTHADJ LIKE MARDH-LABST,
           MONTH(8) ,
          END OF I_FINALT.
    DATA: IMKPFT LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
    DATA: IMKPFT1 LIKE I_MKPF1 OCCURS 0 WITH HEADER LINE.
    DATA: IMARDT LIKE I_MARD OCCURS 0 WITH HEADER LINE.
    DATA: IMARDHT LIKE I_MARDH OCCURS 0 WITH HEADER LINE.
    DATA: T_FINAL LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
    DATA: IMKPFT2 LIKE I_MKPF OCCURS 0 WITH HEADER LINE.
    FCAT is used for the field catalog
    DATA: FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE DEFAULT KEY
                      WITH HEADER LINE INITIAL SIZE 0,
    for excluding the ICONs from the application toolbar
          FEXC TYPE TABLE OF SLIS_EXTAB WITH NON-UNIQUE DEFAULT KEY
                     WITH HEADER LINE INITIAL SIZE 0,
    FS_LAYO is used for Grid Layout
          FS_LAYO TYPE SLIS_LAYOUT_ALV,
    FEVENTS to handle the events TOP OF PAGE & USER_COMMAND
          FEVENTS TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
                     WITH HEADER LINE INITIAL SIZE 0,
    FHEADER is used for List header
          FHEADER TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT KEY
                     WITH HEADER LINE INITIAL SIZE 0,
    sort is used for sorting
          FSORT TYPE TABLE OF SLIS_SORTINFO_ALV WITH NON-UNIQUE DEFAULT KEY
                     WITH HEADER LINE INITIAL SIZE 0,
          FCAT1 TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE DEFAULT KEY
                    WITH HEADER LINE INITIAL SIZE 0,
          FS_LAYO1 TYPE SLIS_LAYOUT_ALV,
          GT_LIST_TOP_OF_PAGE1 TYPE SLIS_T_LISTHEADER,
          FEVENTS1 TYPE TABLE OF SLIS_ALV_EVENT WITH NON-UNIQUE DEFAULT KEY
                 WITH HEADER LINE INITIAL SIZE 0,
           FHEADER1 TYPE TABLE OF SLIS_LISTHEADER WITH NON-UNIQUE DEFAULT  
                  KEY WITH HEADER LINE INITIAL SIZE 0,
           G_STATU_071 TYPE SLIS_FORMNAME VALUE 'Z_PFSTATUS',
           ALV_VARIANT1 LIKE DISVARIANT.
    Variable Declaration *
    TYPES: TRFF_TYPE_DEC_6_5(6) TYPE P DECIMALS 5.
    DATA: FYEAR(4),
          MON(2),
          FYEAR1(4),
          MON1(2),
          OBAL LIKE MARD-LABST,
          CBAL LIKE MARD-LABST,
          INDEX TYPE I,
          COUNT,
          COUNT1 TYPE I,
          O_STK TYPE P DECIMALS 3,
          C_STK TYPE P DECIMALS 3,
          V_MJAHR LIKE MKPF-MJAHR,
          MONTHS TYPE TRFF_TYPE_DEC_6_5,
          MONTH TYPE I.
    Global variables for handling ALV functionality
    DATA: ALV_KEYINFO TYPE SLIS_KEYINFO_ALV,
          ALV_VARIANT LIKE DISVARIANT,
          ALV_LAYOUT TYPE SLIS_LAYOUT_ALV,
          ALV_REPID LIKE SY-REPID,
          ALV_PRINT TYPE SLIS_PRINT_ALV,
          ALV_DETAIL_FUNC(30),
          ALV_DEFAULT_VARIANT LIKE DISVARIANT-VARIANT,
          ALV_COLOURIZE_FIELDS LIKE MMIM_REP_PRINT-COLOR.
    RANGES: R_BUDAT FOR MKPF-BUDAT.
    *Added by Prabhu for year on 26.4.05.
    DATA: IDATE LIKE R_BUDAT OCCURS 0 WITH HEADER LINE.
    Selection Screen Elements *
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
      SELECT-OPTIONS: S_WERKS FOR MARD-WERKS OBLIGATORY NO INTERVALS.
      PARAMETER: P_SPMON LIKE S031-SPMON NO-DISPLAY .
      SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY,
                      S_LGORT FOR MSEG-LGORT NO-EXTENSION NO INTERVALS,
                      S_MBLNR FOR MKPF-MBLNR,
                      S_BUDAT FOR MKPF-BUDAT OBLIGATORY .
    SELECTION-SCREEN END OF BLOCK BLK.
    SELECTION-SCREEN BEGIN OF BLOCK BLK3 WITH FRAME TITLE TEXT-004.
          PARAMETER : MTART LIKE MARA-MTART DEFAULT 'FERT' NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK BLK3.
    SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN END OF BLOCK BLK2.
    ADDED BY PRABHU FOR DAY-WISE REPORT.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-007.
      PARAMETERS: D1 RADIOBUTTON GROUP P1 DEFAULT 'X',
                  M1 RADIOBUTTON GROUP P1,
                  Y1 RADIOBUTTON GROUP P1.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-006.
    PARAMETERS: ALV_DEF LIKE DISVARIANT-VARIANT.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: S_BUDAT1 LIKE S_BUDAT OCCURS 0 WITH HEADER LINE."prabhu
    Initialization *
    INITIALIZATION.
      PERFORM ALV_INIT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ALV_DEF.
      PERFORM ALV_F4.
    At Selection Screen
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_spmon.
    PERFORM monat_f4.
    At Selection Screen *
    AT SELECTION-SCREEN.
    checking for the layout
      PERFORM ALV_CHECK.
    authorisation check for the Plant
    PERFORM auth_check.
    Validation for the Plant
      PERFORM VALIDITY_CHECK.
      IF MTART NE 'FERT'.
        MESSAGE E041 WITH 'Material Type must be FERT Only...'.
      ENDIF.
      IF D1 = 'X'." On 26.4.05.
        P_SPMON0(4) = S_BUDAT-LOW0(4).
        P_SPMON4(2) = S_BUDAT-LOW4(2).
      ELSE.
        P_SPMON0(4) = S_BUDAT-LOW0(4).
        P_SPMON4(2) = S_BUDAT-LOW4(2).
      ENDIF.
      LOOP AT S_BUDAT.
        IF S_BUDAT-HIGH IS INITIAL.
          S_BUDAT-HIGH = S_BUDAT-LOW.
          MODIFY S_BUDAT.
        ENDIF.
      ENDLOOP.
      IDATE-LOW = S_BUDAT-LOW.
      IDATE-HIGH = S_BUDAT-HIGH.
      CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
        EXPORTING
           I_DATE_FROM = IDATE-LOW
           I_DATE_TO = IDATE-HIGH
       IMPORTING
    E_DAYS =
          E_MONTHS = MONTH
    E_YEARS =
      DATA: I(3) TYPE C.
      I = S_BUDAT-LOW+4(2).
      CLEAR: R_BUDAT.
      REFRESH: R_BUDAT.
    *added by Prabhu for Only for Oneday.on 18.5.5
      IF MONTH EQ '0'.
        MONTH = MONTH + 1.
      ENDIF.
    *added by Prabhu for Only for Oneday.on 18.5.5
      DO MONTH TIMES.
        R_BUDAT-LOW = S_BUDAT-LOW.
        APPEND R_BUDAT.
      ENDDO.
      I = 0.
      LOOP AT R_BUDAT.
        R_BUDAT-LOW4(2) = S_BUDAT-LOW4(2) + I.
        I = I + 1.
        R_BUDAT-LOW+6(2) = '01'.
        MODIFY R_BUDAT.
      ENDLOOP.
      LOOP AT R_BUDAT.
        CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
           EXPORTING
             DAY_IN = R_BUDAT-LOW
           IMPORTING
             LAST_DAY_OF_MONTH = R_BUDAT-HIGH
          EXCEPTIONS
            DAY_IN_NO_DATE = 1
            OTHERS = 2
        MODIFY R_BUDAT.
      ENDLOOP.
      LOOP AT R_BUDAT.
        IF R_BUDAT-LOW4(2) = S_BUDAT-LOW4(2).
          R_BUDAT-LOW = S_BUDAT-LOW.
          MODIFY R_BUDAT.
        ENDIF.
        IF R_BUDAT-HIGH4(2) = S_BUDAT-HIGH4(2).
          R_BUDAT-HIGH = S_BUDAT-HIGH.
          MODIFY R_BUDAT.
        ENDIF.
    For Summary on 26.4.05.
        IF Y1 = 'X'.
          CLEAR R_BUDAT.
          REFRESH R_BUDAT.
          R_BUDAT-LOW = S_BUDAT-LOW.
          R_BUDAT-HIGH = S_BUDAT-HIGH.
          APPEND R_BUDAT.
          CLEAR R_BUDAT.
        ENDIF.
      ENDLOOP.
    At Selection Screen *
    AT SELECTION-SCREEN OUTPUT.
    Start of Selection *
    START-OF-SELECTION.
      V_MJAHR = P_SPMON+0(4).
    Get plant distinction warehouse/production
      PERFORM GET_PLANT_DISTINCTION.
    Collect the data from various tables
      PERFORM GETDATA_FG_STOCK.
    here the number of rows in the output table is found
      PERFORM OUTPUT_TABLE_CHECK.
    here the top of the page code is written, that is to be displayed
    in the output
      PERFORM Z_TOP_OF_PAGE.
    here ALV layout properties are set
      PERFORM Z_LAYOUT_SETTINGS.
    ALV EVENTS for TOP OF PAGE and for USER COMMAND
      PERFORM Z_ALV_EVENTS.
    The field catalog is defined for the Primary List is defined in
    the subroutine CREATE_FIELD_CATALOG include program ZPRRDOCR_FCAT
      PERFORM Z_CREATE_FIELD_CATALOG.
    This is for displaying the output
      PERFORM Z_REUSE_ALV_GRID_DISPLAY.
    *& Form getdata_fg_stock
    Getting data from standard tables
    FORM GETDATA_FG_STOCK.
    For getting the Start date & end date of the month
    PERFORM get_month_dates.
    Getting the Opening Stock from MARDH table
      IF MON EQ '01'.
        MON1 = MON.
        FYEAR1 = FYEAR.
        MON = '12'.
        FYEAR = FYEAR - 1.
      ELSE.
        MON1 = MON.
        FYEAR1 = FYEAR.
        MON = MON - 1.
        FYEAR = FYEAR.
      ENDIF.
      PERFORM GET_RECORDS_FROM_DB.
    *added for Month Summary on 26.4.05.
      LOOP AT R_BUDAT.
        S_BUDAT-LOW = R_BUDAT-LOW.
        S_BUDAT-HIGH = R_BUDAT-HIGH.
    *for Month
        P_SPMON0(4) = S_BUDAT-LOW0(4).
        P_SPMON4(2) = S_BUDAT-LOW4(2).
    *for summary.
        IF Y1 = 'X'.
          LOOP AT S_BUDAT.
            S_BUDAT1-SIGN = 'I'.
            S_BUDAT1-OPTION = 'NB'.
            S_BUDAT1-LOW = S_BUDAT-LOW.
            S_BUDAT1-HIGH = S_BUDAT-HIGH.
            APPEND S_BUDAT1.
            CLEAR S_BUDAT1.
          ENDLOOP.
        ENDIF.
        IMKPFT[] = I_MKPF[].
        IMKPFT2[] = I_MKPF[].
        IMARDT[] = I_MARD[].
        IMARDHT[] = I_MARDH[].
        PERFORM MONTH_WISE.
        PERFORM PROCESS_MOVEMENTS.
        PERFORM CALCULATE_OPENING_STOCK.
        PERFORM UPDATE_NON_TRANSACTION_ITMS.
        PERFORM DELETE_EMPTY_RECORDS.
        CLEAR: IMARDHT,IMARDT,IMKPFT1,IMKPFT,I_FINAL,I_FINAL5.
        REFRESH: IMARDHT,IMARDT,IMKPFT1,I_FINAL,I_FINAL5,IMKPFT.
      ENDLOOP.
      CLEAR: R_BUDAT.
      REFRESH: R_BUDAT.
    *end of changes for month.
    ENDFORM. " getdata_fg_stock
    FORM MONAT_F4 *
    F4-Hilfe für Monat *
    FORM MONAT_F4.
      DATA: BEGIN OF MF_DYNPFIELDS OCCURS 1.
              INCLUDE STRUCTURE DYNPREAD.
      DATA: END OF MF_DYNPFIELDS.
      DATA: MF_RETURNCODE LIKE SY-SUBRC,
             MF_MONAT LIKE ISELLIST-MONTH,
             MF_HLP_REPID LIKE SY-REPID.
      FIELD-SYMBOLS: .
    Wert von Dynpro lesen
      GET CURSOR FIELD MF_DYNPFIELDS-FIELDNAME.
      APPEND MF_DYNPFIELDS.
      MF_HLP_REPID = SY-REPID.
      DO 2 TIMES.
        CALL FUNCTION 'DYNP_VALUES_READ'
          EXPORTING
            DYNAME               = MF_HLP_REPID
            DYNUMB               = SY-DYNNR
          TABLES
            DYNPFIELDS           = MF_DYNPFIELDS
          EXCEPTIONS
            INVALID_ABAPWORKAREA = 01
            INVALID_DYNPROFIELD  = 02
            INVALID_DYNPRONAME   = 03
            INVALID_DYNPRONUMMER = 04
            INVALID_REQUEST      = 05
            NO_FIELDDESCRIPTION  = 06
            UNDEFIND_ERROR       = 07.
        IF SY-SUBRC = 3.
    Aktuelles Dynpro ist Wertemengenbild
          MF_HLP_REPID = 'SAPLALDB'.
        ELSE.
          READ TABLE MF_DYNPFIELDS INDEX 1.
    Unterstriche durch Blanks ersetzen
          TRANSLATE MF_DYNPFIELDS-FIELDVALUE USING '_ '.
          EXIT.
        ENDIF.
      ENDDO.
      IF SY-SUBRC = 0.
    Konvertierung ins interne Format
        CALL FUNCTION 'CONVERSION_EXIT_PERI_INPUT'
          EXPORTING
            INPUT         = MF_DYNPFIELDS-FIELDVALUE
          IMPORTING
            OUTPUT        = MF_MONAT
          EXCEPTIONS
            ERROR_MESSAGE = 1.
        IF MF_MONAT IS INITIAL.
    Monat ist initial => Vorschlagswert aus akt. Datum ableiten
          MF_MONAT = SY-DATLO(6).
        ENDIF.
        CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
          EXPORTING
            ACTUAL_MONTH               = MF_MONAT
          IMPORTING
            SELECTED_MONTH             = MF_MONAT
            RETURN_CODE                = MF_RETURNCODE
          EXCEPTIONS
            FACTORY_CALENDAR_NOT_FOUND = 01
            HOLIDAY_CALENDAR_NOT_FOUND = 02
            MONTH_NOT_FOUND            = 03.
        IF SY-SUBRC = 0 AND MF_RETURNCODE = 0.
    ASSIGN (MF_DYNPFIELDS-FIELDNAME) TO <MF_FELD>. " ==>> note 148804
    <MF_FELD> = MF_MONAT.
          CALL FUNCTION 'CONVERSION_EXIT_PERI_OUTPUT'
            EXPORTING
              INPUT  = MF_MONAT
            IMPORTING
              OUTPUT = MF_DYNPFIELDS-FIELDVALUE.
          COLLECT MF_DYNPFIELDS.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              DYNAME               = MF_HLP_REPID
              DYNUMB               = SY-DYNNR
            TABLES
              DYNPFIELDS           = MF_DYNPFIELDS
            EXCEPTIONS
              INVALID_ABAPWORKAREA = 01
              INVALID_DYNPROFIELD  = 02
              INVALID_DYNPRONAME   = 03
              INVALID_DYNPRONUMMER = 04
              INVALID_REQUEST      = 05
              NO_FIELDDESCRIPTION  = 06
              UNDEFIND_ERROR       = 07. "<<== note 148804
        ENDIF.
      ENDIF.
    ENDFORM.                                                    "MONAT_F4
    *& Form get_month_dates
    Calculating the Month Start & End Date
    FORM GET_MONTH_DATES.
      IF M1 = 'X'.
        FYEAR = P_SPMON+0(4).
        MON = P_SPMON+4(2).
        CONCATENATE FYEAR MON '01' INTO R_BUDAT-LOW.
        R_BUDAT-SIGN = 'I'.
        R_BUDAT-OPTION = 'BT'.
        CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
          EXPORTING
            I_DATE = R_BUDAT-LOW
          IMPORTING
            E_DATE = R_BUDAT-HIGH.
        APPEND R_BUDAT.
        CLEAR S_BUDAT.
        REFRESH S_BUDAT.
        S_BUDAT-SIGN = 'I'.
        S_BUDAT-OPTION = 'BT'.
        S_BUDAT-LOW = R_BUDAT-LOW.
        S_BUDAT-HIGH = R_BUDAT-HIGH.
        APPEND S_BUDAT.
      ELSE.
        FYEAR = P_SPMON+0(4).
        MON = P_SPMON+4(2).
        CONCATENATE FYEAR MON '01' INTO R_BUDAT-LOW.
        R_BUDAT-SIGN = 'I'.
        R_BUDAT-OPTION = 'BT'.
        CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
          EXPORTING
            I_DATE = R_BUDAT-LOW
          IMPORTING
            E_DATE = R_BUDAT-HIGH.
        APPEND R_BUDAT.
      ENDIF.
    ENDFORM. " get_month_dates
    *& Form output_table_Check
    checking for records for output
    FORM OUTPUT_TABLE_CHECK .
      DESCRIBE TABLE I_FINALT LINES INDEX.
      IF INDEX EQ 0.
        MESSAGE I041 WITH TEXT-005.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM. "OUTPUT_TABLE_CHECK
    *& Form Z_TOP_OF_PAGE
    for setting the details in the top of page *
    has no formal paramters *
    FORM Z_TOP_OF_PAGE.
      DATA: V_MON(2),
      V_YR(40),
      V_FIN(18),
      V_FIN1(48),
      LOW(10),
      HIGH(10).
      V_MON = P_SPMON+4(2).
      V_YR = P_SPMON+0(4).
      FHEADER-TYP = 'H'.
      FHEADER-INFO = 'Stock Register Report (FG Stock)'.
      APPEND FHEADER.
      CLEAR FHEADER.
    *if m1 = 'X'.
    CONCATENATE 'Month = ' v_mon '.' v_yr INTO v_fin.
    fheader-typ = 'H'.
    fheader-info = v_fin.
    APPEND fheader.
    CLEAR fheader.
    *endif."prabhu on 18.5.5
      IF D1 = 'X'.
        CLEAR S_BUDAT.
        LOOP AT S_BUDAT.
          CONCATENATE S_BUDAT-LOW6(2) '/' S_BUDAT-LOW4(2) '/'
          S_BUDAT-LOW+0(4) INTO LOW.
          CONCATENATE S_BUDAT-HIGH6(2) '/' S_BUDAT-HIGH4(2) '/'
          S_BUDAT-HIGH+0(4) INTO HIGH.
          CONCATENATE 'Date = ' LOW ' - ' HIGH INTO V_FIN1.
          FHEADER-TYP = 'H'.
          FHEADER-INFO = V_FIN1.
          APPEND FHEADER.
          CLEAR FHEADER.
        ENDLOOP.
      ENDIF.
    ENDFORM. " Z_TOP_OF_PAGE
    *& Form Z_LAYOUT_SETTINGS
    this is done for setting the properties for the layout of the *
    grid *
    has no formal paramters *
    FORM Z_LAYOUT_SETTINGS.
      FS_LAYO-ZEBRA = 'X'. " Output in Zebra pattern
      FS_LAYO-DETAIL_POPUP = 'X'. " A popup window appears to give
      FS_LAYO-DETAIL_TITLEBAR = TEXT-022.
      FS_LAYO-COLWIDTH_OPTIMIZE = 'X'.
    ENDFORM. " Z_LAYOUT_SETTINGS
    *& Form Z_ALV_EVENTS
    This is used for handling the events TOP OF PAGE and the USER *
    COMMAND event *
    has no formal paramters *
    FORM Z_ALV_EVENTS.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 0
        IMPORTING
          ET_EVENTS   = FEVENTS[].
      READ TABLE FEVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC = 0.
        FEVENTS-FORM = 'Z_TOPOFPAGE'.
        MODIFY FEVENTS INDEX SY-TABIX.
        CLEAR FEVENTS.
      ENDIF.
      READ TABLE FEVENTS WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC = 0.
        FEVENTS-FORM = 'Z_USER_COMMAND'.
        MODIFY FEVENTS INDEX SY-TABIX.
        CLEAR FEVENTS.
      ENDIF.
    ENDFORM. "Z_ALV_EVENTS
    *& Form Z_CREATE_FIELD_CATALOG
    here the field catalog is created for the primary list *
    no formal parameters *
    FORM Z_CREATE_FIELD_CATALOG.
    for the Plant
      FCAT-FIELDNAME = 'WERKS'.
      FCAT-KEY = 'X'.
      FCAT-OUTPUTLEN = '000005'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Plant'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'CHAR'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Material Type
      FCAT-FIELDNAME = 'MTART'.
      FCAT-KEY = 'X'.
      FCAT-OUTPUTLEN = '000006'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'MatTyp'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'CHAR'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Material No.
      FCAT-FIELDNAME = 'MATNR'.
      FCAT-KEY = 'X'.
    fcat-hotspot = 'X'.
      FCAT-OUTPUTLEN = '000018'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Material'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'CHAR'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Material Description
      FCAT-FIELDNAME = 'MAKTX'.
      FCAT-KEY = ''.
      FCAT-OUTPUTLEN = '000040'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Description'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'CHAR'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Unit of Measure
      FCAT-FIELDNAME = 'MEINS'.
      FCAT-KEY = ''.
      FCAT-OUTPUTLEN = '03'.
      FCAT-JUST = 'C'.
      FCAT-SELTEXT_M = 'UOM'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'UNIT'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Plant
      FCAT-FIELDNAME = 'MONTH'.
      FCAT-KEY = 'X'.
      FCAT-OUTPUTLEN = '08'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'MONTH'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'C'.
      FCAT-DATATYPE = 'CHAR'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Opening Stock
      FCAT-FIELDNAME = 'C_STK'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Opening Stock'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
    fcat-do_sum = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Total Receipts
      FCAT-FIELDNAME = 'TRECEP'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Total Receipts'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
      FCAT-DO_SUM = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Production
      FCAT-FIELDNAME = 'PRODU'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Production'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
      FCAT-DO_SUM = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND FCAT.
      CLEAR FCAT.
    for the Other Plant Receipts
      FCAT-FIELDNAME = 'RECEP'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Othr Plnt Recpts'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
      FCAT-DO_SUM = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND FCAT.
      CLEAR FCAT.
    Sales Return
      FCAT-FIELDNAME = 'SAL_RET'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Sales Return'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
      FCAT-DO_SUM = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND FCAT.
      CLEAR FCAT.
    Total Dispatches
      FCAT-FIELDNAME = 'TDISP'.
      FCAT-HOTSPOT = ' '.
      FCAT-OUTPUTLEN = '000016'.
      FCAT-JUST = 'L'.
      FCAT-SELTEXT_M = 'Total Dispatches'.
      FCAT-DDICTXT = 'M'.
      FCAT-INTTYPE = 'Q'.
      FCAT-DATATYPE = 'QUAN'.
      FCAT-DO_SUM = 'X'.
      FCAT-JUST = 'R'.
      FCAT-NO_ZERO = 'X'.
      APPEND

  • Analyse zenworks inventory reports

    Hello,
    We want to use the zenworks inventory to check whick user is installing
    "illegal software" on his pc.
    This by running a software inventory report and comparing the results of
    this inventory.
    This software inventory report give us a very large listing of exe files and
    versions, for example querying all software of Microsoft Incorporated gives
    us 33 pages of different programs.It is nearly inpossible to interpret this
    listings.
    Is there a way to bundle this information of are there programs who can do
    it ?
    Thanks,
    Bearelle Jacques

    Jacques,
    It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at http://support.novell.com in both the "free product support" and "paid product support" drop down boxes.
    - You could also try posting your message again. Make sure it is posted in the correct newsgroup. (http://support.novell.com/forums)
    If this is a reply to a duplicate posting, please ignore and accept our apologies and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Pls some one send me mm inventory report

    hi all,'
                pls some one send me mm inventory report.
                      i m facing problem in mm  report.
    regards
    vikas saini.

    Hai.
    check the examople codes.
    MM Process flow
    The typical procurement cycle for a service or material consists of the following phases:
    1. Determination of Requirements
    Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
    2. Source Determination
    The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
    3.Vendor Selection and Comparison of Quotations
    The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
    4. Purchase Order Processing
    The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
    5. Purchase Order Follow-Up
    The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
    6. Goods Receiving and Inventory Management
    Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and underdeliveries of ordered goods.
    7. Invoice Verification
    The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
    example code.
    REPORT ZMMBDC1_1 NO STANDARD PAGE HEADING MESSAGE-ID ZT.
          Declaration of internal tables
    internal table for selecting data from flat file
    DATA : BEGIN OF IT_DATA OCCURS 0,
             MBRSH,                    " Industry sector
             MTART(4),                 " Material type
             KZSEL,                    " Checkbox
             MAKTX(40),                " Material description
             MEINS(3),                 " Base unit of measure
             MATKL(9),                 " Material group
             BISMT(18),                " Old material number
           END OF IT_DATA.
    internal table for bdcdata
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    internal table to handle messages
    DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    Variables &  Flag declaration
    variables declaration
    DATA : V_MESG(50).
    flag declaration
    DATA : FG_BDC,
           FG_FLAG1 TYPE I.
    selection screen
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
    parameter
    PARAMETERS : P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK BLK1.
    initialization
    INITIALIZATION.
    peform to initialize parameter
      PERFORM INIT_PARM.
    start of selection
    start-of-selection.
    perform to upload it_data
      PERFORM UP_LOAD_IT_DATA.
    perform transfer data
      PERFORM TRANSFER_DATA.
    end of selection
    END-OF-SELECTION.
    *&      Form  INIT_PARM
    Initializing parameter
    FORM INIT_PARM.
    P_FILE = 'C:\'.
    ENDFORM.                    " INIT_PARM
    *&      Form  UP_LOAD_IT_DATA
    Transfering data from file to internal table
    FORM UP_LOAD_IT_DATA.
      CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
               FILENAME                = P_FILE
               FILETYPE                = 'ASC'
           TABLES
                DATA_TAB                = IT_DATA
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                FILE_OPEN_ERROR         = 2
                FILE_READ_ERROR         = 3
                INVALID_TABLE_WIDTH     = 4
                INVALID_TYPE            = 5
                NO_BATCH                = 6
                UNKNOWN_ERROR           = 7
                GUI_REFUSE_FILETRANSFER = 8
                OTHERS                  = 9.
        IF SY-SUBRC = 2 .
           FG_FLAG1 = 1.
           MESSAGE I001.
        ENDIF.
    ENDFORM.                    " UP_LOAD_IT_DATA
    *&      Form  TRANSFER_DATA
       Processing the data
    FORM TRANSFER_DATA.
    FG_BDC = 'N'.
    LOOP AT IT_DATA.
    perform to fill it_bdcdata.
    PERFORM FILL_IT_BDCDATA.
    CALL TRANSACTION 'MM01' USING IT_BDCDATA MODE 'N' UPDATE 'S'
                                       MESSAGES INTO IT_MESSAGES.
       IF SY-SUBRC <> 0.
         FG_FLAG1 = 1.
    if error occurs in transaction mode run bdc session for that data
         PERFORM BDC_PROCESS.
       ENDIF.
    Handles error messages
          PERFORM ERROR_MESSAGES.
         CLEAR : IT_BDCDATA,IT_DATA,IT_MESSAGES.
         REFRESH : IT_BDCDATA,IT_MESSAGES.
    ENDLOOP.
    IF FG_FLAG1 = 0.
       MESSAGE I003.
    ENDIF.
    IF FG_BDC = 'O'.
    close bdc if it is open
       PERFORM CLOSE_BDC.
    ENDIF.
    ENDFORM.                    " TRANSFER_DATA
    *&      Form  FILL_IT_BDCDATA
    Filling Bdcdata structure with it_data
    Some fields have been commented for future updations
    FORM FILL_IT_BDCDATA.
    PERFORM BDC_DYNPRO USING : 'SAPLMGMM' '0060'.
    PERFORM BDC_FIELD  USING : 'BDC_OKCODE' '/00',
                             : 'BDC_CURSOR' 'RMMG1_REF-MATNR',
                             : 'RMMG1-MBRSH' IT_DATA-MBRSH,
                             : 'RMMG1-MTART' IT_DATA-MTART.
    PERFORM BDC_DYNPRO USING : 'SAPLMGMM' '0070'.
    PERFORM BDC_FIELD  USING : 'BDC_OKCODE' '=RESA'.
    PERFORM BDC_DYNPRO USING : 'SAPLMGMM' '0070'.
    PERFORM BDC_FIELD  USING : 'BDC_OKCODE' '=ENTR',
                             : 'MSICHTAUSW-KZSEL(01)' IT_DATA-KZSEL.
    PERFORM BDC_DYNPRO USING : 'SAPLMGMM' '4000'.
    PERFORM BDC_FIELD  USING : 'BDC_OKCODE' '=BU',
                             : 'BDC_SUBSCR' 'SAPLMGMM' & '  2000TABFRA1',
                             : 'BDC_SUBSCR' 'SAPLMGD1' & '  1002SUB1',
                             : 'BDC_CURSOR' 'MAKT-MAKTX',
                             : 'MAKT-MAKTX' IT_DATA-MAKTX,
                             : 'BDC_SUBSCR' 'SAPLMGD1' & '  2001SUB2',
                             : 'MARA-MEINS' IT_DATA-MEINS,
                             : 'MARA-MATKL' IT_DATA-MATKL,
                             : 'MARA-BISMT' IT_DATA-BISMT,
                             : 'BDC_OKCODE' '=BU'.
    *perform bdc_field       using 'MARA-EXTWG'  ''.
    *perform bdc_field       using 'MARA-LABOR' ''.
    *perform bdc_field       using 'MARA-KOSCH' ''.
    *perform bdc_field       using 'MARA-MSTAE' ''.
    *perform bdc_field       using 'MARA-MSTDE' ''.
    *perform bdc_field       using 'BDC_SUBSCR' 'SAPLMGD1' & '  2561SUB3'.
    *perform bdc_field       using 'MARA-BEGRU' ''.
    *perform bdc_field       using 'BDC_SUBSCR' 'SAPLMGD1' & '  2007SUB4'.
    *perform bdc_field       using 'MARA-NTGEW' ''.
    *perform bdc_field       using 'MARA-BRGEW' ''.
    *perform bdc_field       using 'MARA-GEWEI' ''.
    *perform bdc_field       using 'MARA-VOLUM' ''.
    *perform bdc_field       using 'MARA-VOLEH' ''.
    *PERFORM BDC_FIELD       USING 'MARA-GROES' ''.
    *perform bdc_field       using 'MARA-EAN11' ''.
    *perform bdc_field       using 'MARA-NUMTP' ''.
    *PERFORM BDC_FIELD       USING 'BDC_SUBSCR' 'SAPLMGD1' & '  2005SUB5'.
    *perform bdc_field       using 'BDC_SUBSCR' 'SAPLMGD1' & '  2011SUB6'.
    *perform bdc_field       using 'MARA-MAGRV' ''.
    ENDFORM.                    " FILL_IT_BDCDATA
    *&      Form  BDC_DYNPRO
    Filling the it_bdcdata table with program name & screen number
    FORM BDC_DYNPRO USING    PROGRAM LIKE BDCDATA-PROGRAM
                             DYNPRO LIKE BDCDATA-DYNPRO.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
      CLEAR IT_BDCDATA.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
      Filling it_bdcdata with field name and field value
    FORM BDC_FIELD USING FNAM LIKE BDCDATA-FNAM
                         FVAL.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND IT_BDCDATA.
      CLEAR IT_BDCDATA.
    ENDFORM.                    " BDC_FIELD
    *&      Form  ERROR_MESSAGES
    Displaying error messages
    FORM ERROR_MESSAGES.
        CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
                 ID        = SY-MSGID
                 LANG      = '-D'
            IMPORTING
                 MSG       = V_MESG
            EXCEPTIONS
                 NOT_FOUND = 1
                 OTHERS    = 2.
      LOOP AT IT_MESSAGES WHERE MSGTYP = 'E'.
        WRITE : / 'Message :'(I06) ,V_MESG.
        CLEAR IT_MESSAGES.
      ENDLOOP.
    ENDFORM.                    " ERROR_MESSAGES
    *&      Form  BDC_PROCESS
    Open bdc session if call transaction fails
    FORM BDC_PROCESS.
      IF FG_BDC = 'N'.
    open bdc session
       PERFORM OPEN_BDC.
       FG_BDC = 'O'.
      ENDIF.
      IF FG_BDC = 'O'.
    insert data into bdc session
        PERFORM INSERT_BDC.
      ENDIF.
    ENDFORM.                    " BDC_PROCESS
    *&      Form  OPEN_BDC
      Calling function module to open bdc session
    FORM OPEN_BDC.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          CLIENT              = SY-MANDT
          GROUP               = 'SMM1'
          KEEP                = 'X'
          USER                = SY-UNAME
        EXCEPTIONS
          CLIENT_INVALID      = 1
          DESTINATION_INVALID = 2
          GROUP_INVALID       = 3
          GROUP_IS_LOCKED     = 4
          HOLDDATE_INVALID    = 5
          INTERNAL_ERROR      = 6
          QUEUE_ERROR         = 7
          RUNNING             = 8
          SYSTEM_LOCK_ERROR   = 9
          USER_INVALID        = 10
         OTHERS              = 11.
    ENDFORM.                    " OPEN_BDC
    *&      Form  INSERT_BDC
      Insert it_bdcdata into bdc by calling function module bdc_insert
    FORM INSERT_BDC.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE            = 'MM01'
        TABLES
          DYNPROTAB        =  IT_BDCDATA
        EXCEPTIONS
          INTERNAL_ERROR   = 1
          NOT_OPEN         = 2
          QUEUE_ERROR      = 3
          TCODE_INVALID    = 4
          PRINTING_INVALID = 5
          POSTING_INVALID  = 6
          OTHERS           = 7.
    ENDFORM.                    " INSERT_BDC
    *&      Form  CLOSE_BDC
    Closing bdc session
    FORM CLOSE_BDC.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
         EXCEPTIONS
           NOT_OPEN    = 1
           QUEUE_ERROR = 2
           OTHERS      = 3.
    ENDFORM.                    " CLOSE_BDC
    example code.
    report ZMMBDCP_MATERIAL_PRICE
           no standard page heading
           line-size 255.
                         Includes
    include zbdcrecx1.
                         Tables
    TABLES : MARA.
                       Internal Tables
    *--Internal Table To hold Material Price data from flat file.
    Data: begin of it_mat_price occurs 0,
           key(4),
           f1(10),   " date
           f2(4),    " Company Code
           f3(4),    " Plant
           f4(18),   " material
           f5(15),   " Price
          end of it_mat_price.
    *--Internal Table To hold Material Price header Data .
    data : begin of it_header occurs 0,
             key(4),
             f1(10),
             f2(4),
             f3(4),
           end of it_header.
    *--Internal Table To hold Material Price details data .
    data : begin of it_details occurs 0,
            key(4),
            f4(18),
            f5(15),
           end of it_details.
                          Variables
    data : v_sno(2),              " Serial Number
           v_rows type i,         " Number of Rows
           v_fname(40).           " To store Field Name
                          Start of Selection
    start-of-selection.
    clear    it_mat_price.
    refresh  it_mat_price.
    clear    it_header.
    refresh  it_header.
    clear    it_details.
    refresh  it_details.
    WRITE : / 'Upload Material Price Change from ',
                P_FNAME, ' on ', SY-DATUM.
    *--To Upload Material Price Data from Flat file.
    CALL FUNCTION 'UPLOAD'
          EXPORTING
               FILENAME                =
                            'C:\WINDOWS\Desktop\mat_price_change.txt'
               FILETYPE                = 'DAT'
          TABLES
               DATA_TAB                = it_mat_price
          EXCEPTIONS
               CONVERSION_ERROR        = 1
               INVALID_TABLE_WIDTH     = 2
               INVALID_TYPE            = 3
               NO_BATCH                = 4
               UNKNOWN_ERROR           = 5
               GUI_REFUSE_FILETRANSFER = 6
               OTHERS                  = 7.
        OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.
      IF SY-SUBRC NE 0.
        WRITE : / 'File could not be opened. Please check file name.'.
        STOP.
      ENDIF.
      CLEAR : it_mat_price[], it_mat_price.
      DO.
        READ DATASET P_FNAME INTO V_STR.
        IF SY-SUBRC NE 0.
          EXIT.
        ENDIF.
    write v_str.
    translate v_str using '#/'.
        SPLIT V_STR AT ',' INTO  it_mat_price-key
                                 it_mat_price-F1   it_mat_price-F2
                                 it_mat_price-F3  it_mat_price-F4
                                 it_mat_price-F5.
        APPEND it_mat_price.
        CLEAR it_mat_price.
      ENDDO.
      IF it_mat_price[] IS INITIAL.
        WRITE : / 'No data found to upload'.
        STOP.
      ENDIF.
    *--Separating Header & Details Records
      loop at it_mat_price.
        At new key.
          read table it_mat_price index sy-tabix.
          move-corresponding it_mat_price to it_header.  " Header
          append it_header.
          clear it_header.
        endat.
          move-corresponding it_mat_price to it_details.   " Details
          append it_details.
          clear it_details.
      endloop.
    *--Perform to open Session
      perform open_group.
    *--To get Number of rows for Table Control
      v_rows = sy-srows - 13.
    *--Looping on Header record
      loop at it_header.
        perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'MR21HEAD-WERKS'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=ENTR'.
        perform bdc_field       using 'MR21HEAD-BUDAT'
                                       it_header-f1.
        perform bdc_field       using 'MR21HEAD-BUKRS'
                                       it_header-f2.
        perform bdc_field       using 'MR21HEAD-WERKS'
                                       it_header-f3.
        perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'
                                      'MR21_LAGERMATERIAL_0250'.
        v_sno = 0.
    *--Looping On detials record.
        loop at it_details where key eq it_header-key.
          SELECT SINGLE MATNR INTO IT_DETAILS-F4
                 FROM MARA
                 WHERE BISMT EQ IT_DETAILS-F4.
          if v_sno le v_rows.
            v_sno = v_sno + 1.
          endif.
          perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
          perform bdc_field       using 'BDC_OKCODE'
                                          '=ENTR'.
          clear v_fname.
          CONCATENATE 'CKI_MR21_0250-MATNR(' V_SNO ')' INTO V_FNAME.
          perform bdc_field       using v_fname
                                        it_details-f4.
          clear v_fname.
          CONCATENATE 'CKI_MR21_0250-NEWVALPR(' V_SNO ')' INTO V_FNAME.
          perform bdc_field       using v_fname
                                        it_details-f5.
        endloop.
        perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SAVE'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'MR21HEAD-SCREEN_VARIANT'.
        perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'
                                      'MR21_LAGERMATERIAL_BWKEY_0250'.
    *--Call Transaction to upadate New price
        perform bdc_transaction using 'MR21'.
      endloop.
      perform close_group.
    regards.
    sowjanya.b

  • Every time I TRY to start firefox 18-19 I get an error message : Firefox has stopped working - close the program and check online for a solution - or - close th

    Every time I TRY to start firefox 18-19 I get an error message : "Firefox has stopped working" - "close the program and check online for a solution" - or - "close the program" this happens TWICE every time I try to start firefox. Eventually after a random number of tries firefox will start normaly. I am useing firefox 19.0.2 now bit I belive it started when I upgraded to firefox 18 but am not sure, it might have been when I upgraded to firefox 19 ... but it has been happening for a very long time and I cannot find any helpfule solutions online.

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • INVENTORY REPORT for customer but not consignment company owned

    HI Everyone,
    I am working on creating an inventory report and sending it out to a customer.
    We have a customer who needs to see their inventory we are going to ship. we are making materials for them on an MTS scenario based on a forecast... So the customer before placing a PO should be able to look at the inventory levels we make for them. on a daily basis.... No what I am trying to is execute a program that sends out an inventory report (the programs I am using are( RSMIPROACT and ROEMPROACT)... I try to fill in the fields and save as a variant and we run it as a background job every morning and we send out an idoc to the customer...
    The above process is a scenario that still needs to be worked on...
    THe customer should be able to look at only his stock and not any other stock....
    Now can we use a display of listing/exclusion function to send out the material stock report.... we need to send the total inv as well as the mat numbers... can we acheive it with the listing/exclusion funtion..
    Or is there a program that pulls all the data from the tables which store the customer material info record where we maintain all the materials for a customer...
    If there i a better way through which this can eb done please suggest me... thank you..
    Once again the above stock is not consignent stock... we are manufacturinng based on the forecasts and we need the customer t be able to look at the stock on a daily basis.... Please help...

    There is no report / funtionality is SAP to acheive this. Custom program is the only solution. Your logic looks ok, where there is a CMIR maintained, you may pick the total stock from table MARD put into a format/layout and transfer via idoc to the customer.
    Thanks & regards
    AHP.

  • Inventory report for Previous Periods

    Hi Experts ,
    I would like to have an inventory report for all materials in a Particular Plant for the Periods Sep 2009 and Sep 2010 . Could you please help me in providing the reports for the same .
    Thanks
    Moderator message: Basic frequently asked question - Please search forum for answers and read the docu in help.sap.com 
    See as well our rules of engagement: http://scn.sap.com/docs/DOC-18590
    A good way to search the forum is with google. See this blog with details for a good search
    http://scn.sap.com/community/support/blog/2012/04/16/getting-the-most-out-of-google-optimizing-your-search-queries
    This blog describes how to use the SCN search: http://scn.sap.com/community/about/blog/2012/12/04/how-to-use-scn-search
    The discussions are not a replacement for proper training
    Thread locked
    Message was edited by: Jürgen L

    You can well run these reports on background..
    Go to SE38 Enter the program name "J_1HSTCD"
    Then press Execute / F8.
    Enter you selection date as 01.09.2009 to 31.09.2010 and enter the plant and leave the all selection as per SAP standard..
    Then press F9 or Go to Program

  • Inventory report for the selection of requisitioner and MRP controller

    Hello Experts,
                           Can someone please help me with a standard  Inventory report in which we can give input thr requistioner and MRP controller
    regards,
    YK

    Hi,
    You will get the requisition no. from EKKO (provided PO has been created otherwise you won't get any record). Find out PO & item no. for the requisition item. Then you can check EKBE table whether GR has been posted or not. If GR has not been posted then there won't be entry in EKBE for that PO & item.
    Regards,
    Rakesh

  • Urgent: regarding physical inventory report display

    hi,
    i had made a report in which i have to display the physical inventory report details in which details about the material is to be given.
    I want to check the details which are present in the tcode MI07 . Can anybody tell me any tcode in which i can see the details of mi07 tcode(including the reason of it).

    Greetings,
    It might shed some light to read about the display in your portable computer: http://en.wikipedia.org/wiki/LCD
    LCDs are primarily plastic panels with various layers inside.  Pressure applied to those panels can cause them to crack, leaking the liquid crystal components about.  Pressure could be heavy books in a bag pushing against the screen, heavy cat sitting on a closed lid, dog, other animal, someone slamming the lid, child running through the room, etc.  This applies to any LCD whether it be in a computer or in a Television (don't press too hard on your TV screen!!).
    Displays don't exhibit the type of damage you indicate by themselves.  A single pixel might go dead in an LCD but zig zag lines indicates cracking of the layers inside the panels themselves.  Something from the outside world made an impact on the display resulting in the damage you see.  You may not have been the one pressing hard on it and you may not have seen it happen, but something happened.
    The 1 year limited warranty and AppleCare protection plan offer coverage for component failures, not damage.
    Coverage for damage would be provided by something along the lines of insurances (home owners, renters, etc.)  If you purchased this computer with a Credit Card you may wish to contact your Credit Card company.  Many cards have included insurance for purchases you make so even if an item is damage during your use of it, they will cover it.
    Best of luck.

  • Create a program, based on a report painter query issue continues

    Hi!
    I would like to create a program, which contains the same data, what I can get from a report, which is made by report painter in transaction GRR2. The given report is for checking the service orders.
    This report has a key (order number) and additional columns, like material cost, personal cost, external service cost, money income, etc...
    I found the COSP table, which can be very useful. Unfortunately COSP table contains only the costart (KSTAR) and I don't know, which costarts can be attached to the material costs, which costarts to the services, which costarts belong to the money income, etc...
    Could you please tell me, where can I find this assignment?
    Thank you
    Tamá

    Solved, here:
    Create a program, based on a report painter query

  • -ve values in the inventory report

    Hi gurus,
    we r facing a typical problem in Inventory.
    we have the data from 2002 in R/3 and loaded to the resp to infocubes successfully with all the procedures like first BX then BF and UM. Did the compression with marker and w/o marker.
    Then we created a report based on the cube. And we r getting a scary result.
    In report it is showing the data from 2001. In R/3 the first movement occured in 2002 and there are no records
    in 2001. checked the tables and MB5B,MB51,MMBE all and it shows the records starting from 2002 and in the cube also same we have the data from 2002. But we r getting the data from 2001 in the report with -ve total quantity stock values for all the records.
    why does BW show -ve stock quantity and where the 2001 data is coming.
    We really scared after checking the report.
    Appreciate ur help in this regard.
    Thanks
    - BK

    Hi
    Did you checked the Noncumulative Keyfigure like it is Exception aggregation or nsomething else?
    and also u can check in the validity table aginst that Palnt combination what was the timecharecterstic entry done in the validity table.
    And then we can check in the front end part
    also If you want to do cross check u can do Plant level analysis in R/3 Tr Code is: MCBA
    Also check how the Time charecterstic is behaving in the Front end Query Design??????

  • -ve values in inventory report

    Hi Experts,
    I have inventory report, this report shows total stock, in this report some materials are showing '-ve' values,but in cube total issue stock and total received stock both are same, that means this inventory report should show '0' value.
    for example: in cube total issues stock: 13.60, total received stock: 13.60. That means total stock is = 0 (13.60-13.60), but in report it is showing -13.60.
    I am not understanding what is the problem,
    Pl help to do this,
    good answer will be appriciated.
    thanks in advance,
    Venkat

    Hi Venkat,
    The calculation's of Inventory total stock is not as simple as we understand them. To calculate total stock it consider different Movement type's, reversal entries, blocked stock etc. as well into consideration.
    There is no -ve stock and there can be no as well, but still u r getting that (i also got that ) then this is how u can analyze at various points where exactly the problem is.
    1. Try to run some standard report for total stock (based on inventory Cube 0IC_C03 i guess this is u usign probably). Check the stock value for 1 or two particular Material and cross check the stock of same material in your R/3 system through some tr MMBE.
    2. If standard report gives u rite result then probably some logic problem in ur report.
    3. Apart from that the main problem of this situation is data loading issue.
    Please follow proper inventory data loading steps. If not done step by step u will end up with wrong data.
    Hope these steps will help you out in tracking the situation.
    Thanks
    Dipika Tyagi

  • How to generate Inventory Report to display all details at end of mon/yr?

    Hi Guys..
    I would like to know how we can generate a
    Inventory report to display all inventory details at the end of every
    month or year?
    Also, another question.How can we create a PO past delivery date report?
    Any help is appreciated.
    Thanks,
    Sri Harsha;

    Hi,
    Pls the code here-
    TYPES :
            BEGIN OF ty_mard,
              matnr TYPE matnr,
              werks TYPE werks_d,
              lgort TYPE lgort_d,
              labst TYPE labst,
              retme TYPE retme,
              umlme TYPE umlme,
            END OF ty_mard.
    TYPES :
           BEGIN OF ty_mska,
              matnr TYPE matnr,
              kalab TYPE labst,
              vbeln TYPE vbeln,
              posnr TYPE posnr,
            END OF ty_mska.
    TYPES :
            BEGIN OF ty_vbap,
              matnr TYPE matnr,
              kwmeng TYPE kwmeng,
              pstyv TYPE pstyv,
            END OF ty_vbap.
    TYPES :
            BEGIN OF ty_mbew,
              matnr TYPE matnr,
              salk3 TYPE salk3,
              stprs TYPE stprs,
            END OF ty_mbew.
    TYPES :
            BEGIN OF ty_mchb,
              matnr TYPE matnr,
              charg TYPE charg_d,
            END OF ty_mchb.
    TYPES :
            BEGIN OF ty_mara,
              matnr TYPE matnr,
              mfrpn TYPE mfrpn,
            END OF ty_mara.
    TYPES :
           BEGIN OF ty_makt,
             matnr TYPE matnr,
             maktx TYPE maktx,
           END OF ty_makt.
    TYPES :
            BEGIN OF ty_ekpo,
             matnr TYPE matnr,
             netpr TYPE bprei,
             meins TYPE bstme,
            END OF ty_ekpo.
    DATA :
           BEGIN OF final OCCURS 0,
            matnr LIKE mard-matnr,
            maktx LIKE makt-maktx,
            werks LIKE mard-werks,
            lgort LIKE mard-lgort,
            mfrpn LIKE mara-mfrpn,
            usp LIKE mbew-stprs,
            labst LIKE mard-labst,
            salk3 LIKE mbew-salk3,
            kalab LIKE mska-kalab,
            vbeln LIKE mska-vbeln,
            sov LIKE ekpo-netpr,
            uom LIKE ekpo-meins,
            posnr LIKE mska-posnr,
            pstyv LIKE vbap-pstyv,
            kwmeng LIKE vbap-kwmeng,
            retme LIKE mard-retme,
            umlme LIKE mard-umlme,
           END OF final.
    DATA :
          BEGIN OF itab OCCURS 0,
            matnr LIKE mard-matnr,
            werks LIKE mard-werks,
            lgort LIKE mard-lgort,
            labst LIKE mard-labst,
            retme LIKE mard-retme,
            umlme LIKE mard-umlme,
            charg LIKE mchb-charg,
          END OF itab.
    DATA :
           i_mard TYPE STANDARD TABLE OF ty_mard,
           i_mbew TYPE STANDARD TABLE OF ty_mbew,
           i_mchb TYPE STANDARD TABLE OF ty_mchb,
           i_mara TYPE STANDARD TABLE OF ty_mara,
           i_vbap TYPE STANDARD TABLE OF ty_vbap,
           i_mska TYPE STANDARD TABLE OF ty_mska,
           i_makt TYPE STANDARD TABLE OF ty_makt,
           i_ekpo TYPE STANDARD TABLE OF ty_ekpo.
    DATA :
           wa_mard TYPE ty_mard,
           wa_mbew TYPE ty_mbew,
           wa_mchb TYPE ty_mchb,
           wa_mara TYPE ty_mara,
           wa_vbap TYPE ty_vbap,
           wa_mska TYPE ty_mska,
           wa_makt TYPE ty_makt,
           wa_ekpo TYPE ty_ekpo.
    DATA :
           sov_total TYPE currency,
           urestrict_total type currency.
    *Select options:
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR gf_matnr, " Material No.
                     s_werks FOR gf_werks, " Plant
                     s_lgort FOR gf_lgort, " Storage Location
                     s_charg FOR gf_charg. " Batch No.
    SELECTION-SCREEN END OF BLOCK a.
    *Validation of Selection Fields
    AT SELECTION-SCREEN.
      IF     s_matnr IS INITIAL
         AND s_werks IS INITIAL
         AND s_lgort IS INITIAL
         AND s_charg IS INITIAL.
        MESSAGE e001(zcir).
      ENDIF.
    *Function Module for Checking the inputs
      CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN'
        TABLES
          it_matnr = s_matnr
          it_werks = s_werks
          it_lgort = s_lgort.
    *Checking of input values for S_CHARG
      IF NOT s_charg-low IS INITIAL OR NOT s_charg-high IS INITIAL.
        SELECT charg FROM mchb into table LT_charg WHERE charg IN s_charg.
        IF sy-subrc NE 0.
          MESSAGE e002(zcir).
        ENDIF.
        clear wa_mchb.
      ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
      FORMAT COLOR COL_HEADING.
      WRITE sy-uline(105).
      WRITE :/ '|',2 text-101, "MATERIAL NO:
             16 text-102,    "MATERIAL DESCRIPTION
             52 text-103,    "PLANT
             60 text-104,    "STORAGE LOCATION.
             74 text-105,    "MANUFACTURE PARTNER NO.
             88 text-106,    "VALUATED STOCK.
             95 text-107.    "STANDARD PRICE.
            105 '|'.
      FORMAT COLOR COL_GROUP.
      WRITE :/ '|',2 text-108, " UNRESTRCTED STOCK
              16 text-109,     " SALES DOCUMENT NO:
              20 text-110,     " ITEM NO:
              27 text-111,     " UNIT
              32 text-112,     " NET VALUE
              39 text-113,     " ITEM CATEGRY
              50 text-114,     " QUANTITY
              60 text-115,     " BLOCKED STOCK
              79 text-116,     " TOTAL STOCK
              95 text-117.     " STOCK TRANSFER
             87 '|'.
      FORMAT COLOR OFF.
      WRITE sy-uline(105).
    *START OF SELECTION
    START-OF-SELECTION.
      IF NOT s_matnr IS INITIAL
        OR NOT s_werks IS INITIAL
        OR NOT s_lgort IS INITIAL.
        PERFORM select1.
      ELSEIF NOT s_charg IS INITIAL.
        PERFORM select2.
      ELSEIF NOT s_matnr IS INITIAL
        OR NOT s_werks IS INITIAL
        OR NOT s_lgort IS INITIAL
        AND NOT s_charg IS INITIAL.
        PERFORM select3.
      ENDIF.
      PERFORM final1.
      PERFORM collect.
    *END OF SELECTION
    END-OF-SELECTION.
      LOOP AT LT_FINAL.
        FORMAT COLOR COL_KEY.
        WRITE :/2 LT_FINAL-matnr,
               14 LT_FINAL-maktx,
               52 LT_FINAL-werks,
               58 LT_FINAL-lgort,
               69 LT_FINAL-mfrpn,
               73 LT_FINAL-labst,
               87 LT_FINAL-usp.
        FORMAT COLOR OFF.
        FORMAT COLOR COL_NORMAL.
        WRITE :/2 LT_FINAL-kalab,
                14 LT_FINAL-vbeln,
                17 LT_FINAL-posnr,
                24 LT_FINAL-uom,
                28 LT_FINAL-sov,
                36 LT_FINAL-pstyv,
                46 LT_FINAL-kwmeng,
                57 LT_FINAL-retme,
                65 LT_FINAL-salk3,
                75 LT_FINAL-umlme.
      ENDLOOP.
      FORMAT COLOR COL_TOTAL.
      WRITE :/2 text-119,     " TOTAL VALUE
              28 V_sov_total,
              87 V_urestrict_total.
      FORMAT COLOR OFF.
    Form Name: select1
    text: Population of internal table LT_MARD and using LT_MARD populating
          the internal table LT_MCHB
    FORM select1.
      SELECT matnr
             werks
             lgort
             labst
             retme
             umlme
             FROM mard
             INTO TABLE LT_mard
             WHERE matnr IN s_matnr
             AND werks IN s_werks
             AND lgort IN s_lgort.
      SELECT matnr
             charg
             FROM mchb
             INTO TABLE LT_mchb
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
    ENDFORM.                                                    "select1
    Form Name: select2
    text:Population of internal table LT_MCHB and using LT_MCHB populating
         LT_MARD
    FORM select2.
      SELECT matnr
             charg
             FROM mchb
             INTO TABLE LT_mchb
             WHERE charg IN s_charg.
      SELECT matnr
             werks
             lgort
             labst
             retme
             umlme
             FROM mard
             INTO TABLE LT_mard
             FOR ALL ENTRIES IN LT_mchb
             WHERE matnr EQ LT_mchb-matnr.
    ENDFORM.                                                    "select2
    Form Name: select3
    text: Population of internal table LT_TAB using inner join and then
          populating internal tables LT_MARD and LT_MCHB
    FORM select3.
      SELECT a~matnr
             a~werks
             a~lgort
             a~labst
             a~retme
             a~umlme
             b~charg
             INTO CORRESPONDING FIELDS OF TABLE LT_TAB
             FROM mard AS a
             INNER JOIN mchb AS b ON bmatnr = amatnr
             WHERE a~matnr IN s_matnr
             OR a~werks IN s_werks
             OR a~lgort IN s_lgort
             AND b~charg IN s_charg.
      LOOP AT LT_TAB.
        MOVE: LT_TAB-matnr TO wa_mard-matnr,
              LT_TAB-werks TO wa_mard-werks,
              LT_TAB-lgort TO wa_mard-lgort,
              LT_TAB-labst TO wa_mard-labst,
              LT_TAB-retme TO wa_mard-retme,
              LT_TAB-umlme TO wa_mard-umlme,
              LT_TAB-matnr TO wa_mchb-matnr,
              LT_TAB-charg TO wa_mchb-charg.
        APPEND wa_mard TO LT_mard.
        APPEND wa_mchb TO LT_mchb.
      ENDLOOP.
    ENDFORM.                                                    "select3
    Form Name:collect
    text:population of LT_FINAL internal table-LT_FINAL using other internal
          tables
    FORM collect.
      LOOP AT LT_mard INTO wa_mard.
        MOVE : wa_mard-matnr TO LT_FINAL-matnr,
               wa_mard-werks TO LT_FINAL-werks,
               wa_mard-lgort TO LT_FINAL-lgort,
               wa_mard-labst TO LT_FINAL-labst,
               wa_mard-retme TO LT_FINAL-retme,
               wa_mard-umlme TO LT_FINAL-umlme.
        READ TABLE LT_makt INTO wa_makt WITH KEY matnr = wa_mard-matnr.
        MOVE wa_makt-maktx TO LT_FINAL-maktx.
        READ TABLE LT_mska INTO wa_mska WITH KEY matnr = wa_mard-matnr.
        MOVE: wa_mska-kalab TO LT_FINAL-kalab,
              wa_mska-vbeln TO LT_FINAL-vbeln,
              wa_mska-posnr TO LT_FINAL-posnr.
        READ TABLE LT_vbap INTO wa_vbap WITH KEY matnr = wa_mard-matnr.
        MOVE: wa_vbap-kwmeng TO LT_FINAL-kwmeng.
        READ TABLE LT_mara INTO wa_mara WITH KEY matnr = wa_mard-matnr.
        MOVE : wa_mara-mfrpn TO LT_FINAL-mfrpn.
        READ TABLE LT_mbew INTO wa_mbew WITH KEY matnr = wa_mard-matnr.
      Calculation of Unrestricted value
        LT_FINAL-usp = wa_mard-labst * wa_mbew-stprs.
        V_urestrict_total = V_urestrict_total + ( wa_mard-labst * wa_mbew-stprs ).
       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
         EXPORTING
           input         = V_urestrict_total
        IMPORTING
          OUTPUT        = V_urestrict_total
        MOVE wa_mbew-salk3 TO LT_FINAL-salk3.
        READ TABLE LT_ekpo INTO wa_ekpo WITH KEY matnr = wa_mard-matnr.
        MOVE wa_ekpo-meins TO LT_FINAL-uom.
      Calculation of Sales Order Value
        LT_FINAL-sov = wa_mska-kalab * wa_ekpo-netpr.
        V_sov_total = V_sov_total + ( wa_mska-kalab * wa_ekpo-netpr ).
        APPEND LT_FINAL.
      ENDLOOP.
    ENDFORM.                    "collect
    *Form Name:FINAL1
    *Population of all the internal tables
    FORM FINAL1.
      SELECT matnr
             kalab
             vbeln
             posnr
             FROM mska
             INTO TABLE LT_mska
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             kwmeng
             pstyv
             FROM vbap
             INTO TABLE LT_vbap
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             salk3
             stprs
             FROM mbew
             INTO TABLE LT_mbew
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             mfrpn
             FROM mara
             INTO TABLE LT_mara
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             maktx
             FROM makt
             INTO TABLE LT_makt
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
      SELECT matnr
             netpr
             FROM ekpo
             INTO TABLE LT_ekpo
             FOR ALL ENTRIES IN LT_mard
             WHERE matnr EQ LT_mard-matnr.
    ENDFORM.                                                    "final1
    Reward if helpful.
    Chandralekha

  • How to get inventory report from CiscoWorks?

    Hi All,
    We are doing inventory clean up thing. Can I get an inventory report spreadsheet about device model, serial number, device name? In RME?
    Thanks a lot!
    Lou

    You can get that under RME > Reports > Report Generator. Choose "Inventory" under Application and "Detailed Device Report". For details on the reports you can check:
    http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_resource_manager_essentials/4.3/user/guide/invent.html#wpxref82038

  • How to check Inventory transactions weather they have transferred to GL?

    Hi All,
    How I can check Inventory transactions weather they have transferred to GL or not in R12.
    Example: I have performed a miscellaneous receipt it has costed as well. Now I am not transferred this transaction to GL from Cost Management i..e using create accounting program.
    In this case how I can check from the Inventory tables/from the front end screens (Material Transactions) weather this transaction has transferred to GL or not.
    Please let me know If you have any clarifications regarding this point.
    Regards,
    Kv.

    Hi,
    There is no way to check whether transactions has been transferred to GL or not. What material transaction form tells us is that distributions for particular transactions has been created in sub ledger tables. For transferring transactions to GL you will have to do some work regarding SRS that whenever Create Accounting Program Runs, a message should be routed that All Transactions have been transferred to GL.

Maybe you are looking for

  • Is there any reasonable way to update Photoshop CS6 to 13.1.2?

    I never had a problem updating my CS6 products until I signed up for CC. I run both versions of Photoshop, CC because it is more capable, and CS6 because ALL my plug-ins work. Now that CC has decided to do my CS6 updating for me,  I can't get the new

  • Can u tell me how to remove the documents in the Rection section after I had moved them to the respective folders. Thanks

    Can u tell me how to remove or delete the documents which are remain in the Recent section after I have moved them to the respective follders. Thanks.

  • Duplicated Files On Harddrive

    I have duplicated files on my Harddrive. I want to delte them, it is to messy to find them all individually. So i want to delte them through itunes using the "send to reycele bin thing" so s0ngs i have 4 copys off will just DISSAPPEAR of my HDD. How

  • Personalization problem

    Hi guys. I've been looking into web dynpro personalization for abap, and i've tried to follow the sample provided by R3 (WDR_TEST_PERS_IMP_EXP). I've implemented a timesheet application that prints a table of the projects, tasks, and other stuff on a

  • Getting exec file permission on Linux

    Hi, I have read http://forum.java.sun.com/thread.jspa?forumID=256&threadID=302708, but this is the old stuff. My problem is as follows: I need to sftp-y file from one Linux account to the other Linux one. It is not a big deal. However, I would like t