Closing Stock Valuation doesn't matched physicallly

Hi SAP Gurus.,
    Can you please assist me reg this issue"Closing Stock Valuation doesn't matched physicallly".
May I know the possible rectification ways to solve this problem.
Thanks in Advance,
Regards,
Balaji Bhonsle

Physical Inventory...
http://www.sap-img.com/materials/physical-inventory-process.htm

Similar Messages

  • Closing stock valuation

    Hi All,
    How the closing stock will be valuation in FI trial balance??
    regards

    Hi Closing stock towards finished goods will be valuated at standared pricing and other than finished goods eg, RM and WIP are valuated at moving average price.

  • Valuation class wise stock report for opening and closing stock

    Dear all,
       My Clint is asking the report for the opening stock and closing stock with respect to valuation class is there any standard report is available please guide me
    regards
    pramod

    Dear sir,
    in my case matarial is split valuated matarial, matarial is maintained with two valuation classes
    when  seeing the report  MB5B its not showing the price valuation class vise, its showing combined together only, again i am using the MC.9 there also same problem its not showing both the valuation class vise price its showing only one valuation class price, if we check for another valuation class price for that particular matarial its telling no data is availabel for the valuation class
    regards
    pramod

  • Inventory Valuated Stock Value is not matching with R/3

    Dear Friends,
    we are in a big mess.Needed your help urgently
    We are in sap netweaver 2004s.We are implementing the standard business content only for one of our client.We have loaded the Inventory data into BW by following "How to handle the Inventory Management" document.
    We have loaded the inventory data into 0IC_C03 using standard transferrules and update rules.
    The sequence we followed as:
    IN R/3
    Filled the setup tables for during the posting free time(non-business hours)
    Stock intialization
    Material Movements
    Evaluations
    IN BW
    We had loaded the data into only 0IC_C03 cube using standard update rules(no changes done)
    2LIS_03_BX-Generate intial stock with no marker update unchecked
    2LIS_03_BF-Full update with no marker update checked
    2LIS_03_UM-Full update with no marker update checked
    When we compared the data between R/3 and BW they are many materials "Valuated Stock Value" is not matching with R/3.For some materials value is matching with R/3 but for some other materials its not matching with R/3.Some materials are showing the negative figures for Valuated Stock Value.
    But the valuated quantity value is exactly matching with R/3 for all the materials.
    We have tryed to many ways in the past 10 days to find out the solution.We have followd the notes 589024 and implemented the formula.But no luck so far.
    Needed your help..Any suggestions would be highly appreciated.
    Please help us with your inputs.
    Thanks in advance.
    Regards
    Soujanya

    Hi Sudheer,
    No We haven't implemented this note.
    In start routine we already have the first start routine in the note.
    INSERT BEGIN
      loop at DATA_PACKAGE.
        if DATA_PACKAGE-stockcat eq 'V' or
           DATA_PACKAGE-stocktype eq 'V'.
          delete DATA_PACKAGE.
        endif.
      endloop.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    INSERT END
    We should comment the above start routine and follow the remaining section as below?
    ==========================================================
    Notes:
    However, if you want a report of these consumption values, proceed as follows:
    1. Do not use the start routine listed above.
    2. Create two new key figures (cumulative values):
       1. Material consumption value (ZVERWERT, for example) with unit 0BASE_UOM
       2. Material consumption quantity (ZVERMENGE, for example) with unit 0LOC_CURRCY
    3. Include these in the InfoCube definition.
    4. Update these key figures from 2LIS_03_BF as follows:
    -> material consumption value:
    IF ( COMM_STRUCTURE-processkey EQ '100'   "Other Issues
        OR COMM_STRUCTURE-processkey EQ '101'   "Returns / Vendor
        OR COMM_STRUCTURE-processkey EQ '104'   "Material Transfer
        OR COMM_STRUCTURE-processkey EQ '105'   "Stock Adjustment InvD
        OR COMM_STRUCTURE-processkey EQ '106'   "Stock Adjustment Other
        OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock
                                                "Transfers
       AND COMM_STRUCTURE-bwapplnm EQ 'MM'
    only movements which are relevant for stock control
       AND COMM_STRUCTURE-cppvlc <> 0
       AND COMM_STRUCTURE-stockcat EQ 'V'
       AND COMM_STRUCUTRE-stocktype EQ 'V'.
    result value of the routine
        RESULT = -1 * COMM_STRUCTURE-cppvlc.
    if the returncode is zero, the result will be updated
        RETURNCODE = 0.
    ELSEIF ( COMM_STRUCTURE-processkey EQ '000'   "Other Receipts
        OR COMM_STRUCTURE-processkey EQ '001'   "Goods Receipt/Vendor
        OR COMM_STRUCTURE-processkey EQ '004'   "Material Transfer/"Receipt
        OR COMM_STRUCTURE-processkey EQ '005'   "Stock Adjustment InvD
        OR COMM_STRUCTURE-processkey EQ '006'   "Stock Adjustment Other
        OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock
                                                "Transfer
    only movements which are relevant for stock control
       AND COMM_STRUCTURE-cppvlc <> 0
       AND COMM_STRUCTURE-stockcat EQ 'V'
       AND COMM_STRUCUTRE-stocktype EQ 'V'.
    result value of the routine
        RESULT = COMM_STRUCTURE-cppvlc.
    if the returncode is zero, the result will be updated
        RETURNCODE = 0.
      ELSE.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 4.
      ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0..
    -> material consumption quantity:
    The code is the same, but COMM_STRUCTURE-cpquabu replaces COMM_STRUCTURE-cppvlc.
    -> The characteristic value calculation is the same for the other key figures.
    5. Update these key figures from the 2LIS_03_UM in the same way.
    =======================================================

  • How to get Opening /Closing stock value of Non Valuated stock materails

    Hello,
    We would like to know since 95% of our procurement will be for Projects and since the stock is u201CNon-Valuatedu201D stock, is there any method by which we will be in a position to get the  details of Opening Stock, Purchases & Closing Stock?
    Regards
    Sapman man

    hi
    try mb52
    enter maerial type for nonvaluated stock
    then
    execute
    you will  get output
    regards
    vijay

  • MB5B Report table for Open and Closing stock on date wise

    Hi Frds,
    I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports,
    Could anyone suggest correct table to fetch the values Open and Closing stock on date wise for MB5B reports.
    Thanks
    Mohan M

    Hi,
    Please check the below links...
    Query for Opening And  Closing Stock
    Inventory Opening and Closing Stock
    open stock and closing stock
    Kuber

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

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

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

  • How to create a query to see Opening stock and closing stock as on particul

    Hi All,
    How to create a query to see Opening stock and closing stock as on particul.
    Regards
    Albaik

    Hi,
    In BI 0IC_C03 will provide u the  required information and also having standard queries provided by the SAP.
    Plz find the list of Queries provided by the SAP.
    =======================================================================================================
    Inventory turnover      0IC_C01_Q0001
    Range of coverage - quantity      0IC_C01_Q0002
    Range of Coverage - Value      0IC_C01_Q0003
    Range of coverage of finished goods - quantity      0IC_C01_Q0004
    Range of Coverage of Finished Goods - Value      0IC_C01_Q0005
    Range of coverage of raw materials - quantity      0IC_C01_Q0006
    Range of Coverage of Raw Materials - Value      0IC_C01_Q0007
    Obsolete Stock on Hand      0IC_C01_Q0008
    Period-dependent requirement coverage      0IC_C01_Q0009
    Value of stock on hand      0IC_C01_Q0010
    Quantity of stock on hand      0IC_C01_Q0011
    Material consumption      0IC_C01_Q0012
    Material Movements      0IC_C01_Q0013
    Consignment stock: receipts and issues      0IC_C01_Q0014
    Valuated stock: receipts and issues      0IC_C01_Q0015
    Material stock and movements      0IC_C01_Q0016
    Material Movements (Healthcare)      0IC_C01_Q0020
    Material Consumption (Healthcare)      0IC_C01_Q0021
    Material Availability      0IC_C01_Q0022
    Inventory Turnover Frequency (Value)      0IC_C01_Q0023
    Consignment Stock Received and Issued per Unit      0IC_C01_Q0024
    Material Consumption (Quantity)      0IC_C02_Q0001
    Valuated Stock Receipts and Issues (Quantity)      0IC_C02_Q0002
    Range of Valuated Stock (Quantity)      0IC_C02_Q0003
    Inventory Turnover      0IC_C02_Q0004
    Receipt and Issue Consignment Stock at Customer      0IC_C03_Q0001
    Receipt and Issue Quality Inspection Stock      0IC_C03_Q0002
    Vendor Consignment Stock Receipt and Issue      0IC_C03_Q0003
    Receipt and Issue Stock in Transit      0IC_C03_Q0004
    Receipt and Issue of Blocked Stock      0IC_C03_Q0005
    Valuated Stock      0IC_C03_Q0006
    Stock in Quality Inspection      0IC_C03_Q0007
    Stock in Transit      0IC_C03_Q0008
    Blocked Stock      0IC_C03_Q0009
    Vendor Consignment Stock      0IC_C03_Q0010
    Consignment Stock at Customer      0IC_C03_Q0011
    Stock Overview      0IC_C03_Q0012
    Stock Overview (as of 3.1 Content)      0IC_C03_Q0013
    Quantities of Valuated Project Stock (as of 3.1 Content)      0IC_C03_Q0014
    Valuated Stock (as of 3.1 Content)      0IC_C03_Q0015
    Quantities of Valuated Sales Order Stock (as of 2.1 Cont.)      0IC_C03_Q0016
    Inventory Turnover      0IC_C03_Q0017
    Days' Supply      0IC_C03_Q0018
    SUS: Vendor Consignment Stock      0IC_C03_Q0019
    Scrap      0IC_C03_Q0020
    Inventory Aging      0IC_C03_Q0021
    Stock Overview - extended      0IC_C03_Q0022
    Demand Supply Match      0IC_C03_Q0023
    Warehouse Stock Analytics – Inventory Turnover      0IC_C03_Q0024
    Warehouse Analytics - Obsolescence and Variance      0IC_C03_Q0025
    Stock Overview: Materials      0IC_C03_Q0030
    Average Stock Value Over Time      0IC_C03_Q0031
    Stock Overview Over Time      0IC_C03_Q0032
    Range of Coverage Over Time      0IC_C03_Q0033
    ==================================================================================================
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Jan 18, 2010 8:06 AM

  • Closing stock of a particular date

    how to get plant wise material closing stock on any particular date. say previous months end date. I am calculating that from MSEG table with the help of MSEGINSMK and MSEGSHKZG field. (with date filtaration by joining MBLNR of MKPF table) But stock is showing different with the closing stock showing in MB5B report for that date. I don't know which BWART of MSEG table to be excluded. My email id is [email protected]

    Hi,
    This is a stock aging report, you can use this for reference.
    Logic: Based on current stock and value from MBEW table. The latest receipt dates were taken till the qty tallies off.Rejections and reversals are considered.
    The movement types considered are ('101','102','105','106','122','123','131','132','301','302','309','310','501','502','531','532','561','562','701','702').
    *& Report  ZMM03_TRY                                                 *
    REPORT  ZMM03 LINE-SIZE 226
                   LINE-COUNT 35(2)
                    NO STANDARD PAGE HEADING..
    TABLES : S032,  "Current Stock And Grouping Terms
             MBEW,  "Material Valuation
             T023T, "Material Group Desc.
             MAKT,  "Material Description
             EKPO.  "Purchasing Document Item.
    DATA : BEGIN OF T_HEADER OCCURS 0,
           MTART LIKE MARA-MTART,
           MATNR LIKE MBEW-MATNR,
           BWKEY LIKE MBEW-BWKEY,
           MATKL LIKE MARA-MATKL,
           MAKTX LIKE MAKT-MAKTX,
           MEINS LIKE MARA-MEINS,
           LBKUM LIKE MBEW-LBKUM,
           SALK3 LIKE MBEW-SALK3,
           VERPR LIKE MBEW-VERPR,
           CLSTK LIKE MBEW-LBKUM,
           CLVAL LIKE CKMLCR-SALK3,
           UNIT LIKE CKMLCR-PVPRS,
           END OF T_HEADER.
    DATA : BEGIN OF T_MSEG OCCURS 0,
           MATNR LIKE MSEG-MATNR,
           WERKS LIKE MSEG-WERKS,
           BUDAT LIKE MKPF-BUDAT,
           MBLNR LIKE MKPF-MBLNR,
           MJAHR LIKE MKPF-MJAHR,
           ZEILE LIKE MSEG-ZEILE,
           LFBNR LIKE MSEG-LFBNR,
           LFBJA LIKE MSEG-LFBJA,
           LFPOS LIKE MSEG-LFPOS,
           BWART LIKE MSEG-BWART,
           MENGE LIKE MSEG-MENGE,
           EBELN LIKE MSEG-EBELN,
           EBELP LIKE MSEG-EBELP,
           XAUTO LIKE MSEG-XAUTO,
           UMMAT LIKE MSEG-UMMAT,
           UMWRK LIKE MSEG-UMWRK,
           MARK(1),
           END OF T_MSEG.
    TYPE-POOLS : SLIS.
    DATA : L_STOCK TYPE MSEG-MENGE.
    DATA : WA_MSEG LIKE T_MSEG.
    DATA : WA_MSEG1 LIKE T_MSEG.
    DATA : T_ITEMS LIKE T_MSEG OCCURS 0 WITH HEADER LINE.
    DATA : T_CUR_STOCK LIKE T_MSEG OCCURS 0 WITH HEADER LINE.
    DATA : L_LBKUM TYPE MBEW-LBKUM.
    DATA : BEGIN OF T_OUTPUT OCCURS 0,
             WERKS LIKE MSEG-WERKS,
             MATNR LIKE MSEG-MATNR,
             BUDAT LIKE MKPF-BUDAT,
             MENGE LIKE MSEG-MENGE,
             PDAYS TYPE I,
             PVAL  TYPE MSEG-MENGE,
             MAKTX LIKE MAKT-MAKTX,
             CQTY  LIKE MSEG-MENGE,
             CPRC  LIKE MBEW-SALK3,
           END OF T_OUTPUT.
    DATA: GRID_TAB TYPE SLIS_T_FIELDCAT_ALV  WITH HEADER LINE.
    DATA : T_SORT TYPE SLIS_T_SORTINFO_ALV,
           WA_SORT TYPE SLIS_SORTINFO_ALV.
    *AT SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-014.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : P_DATE LIKE S032-LETZTABG OBLIGATORY DEFAULT SY-DATUM.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE TEXT-015.
    PARAMETERS     : P_WERKS    TYPE S032-WERKS OBLIGATORY.
    SELECT-OPTIONS : S_LGORT    FOR S032-LGORT,
                     S_MATNR    FOR S032-MATNR.
    SELECTION-SCREEN END OF BLOCK 2.
    SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE TEXT-016.
    SELECT-OPTIONS : S_MTART    FOR S032-MTART,
                     S_MATKL    FOR S032-MATKL.
    SELECTION-SCREEN END OF BLOCK 3.
    IF  P_DATE IS INITIAL AND
        P_WERKS IS INITIAL AND
        S_LGORT IS INITIAL AND
        S_MATNR IS INITIAL AND
        S_MTART IS INITIAL AND
        S_MATKL  IS INITIAL.
      MESSAGE I398(00) WITH 'Enter Selection Critirea'(019).
      SY-SUBRC = '1'.
    ELSE.
      SELECT AMATNR ABWKEY BMATKL BMTART CMAKTX BMEINS A~LBKUM
             A~SALK3
           INTO CORRESPONDING FIELDS OF TABLE T_HEADER
           FROM MBEW AS A INNER JOIN MARA AS B ON AMATNR = BMATNR
                          INNER JOIN MAKT AS C ON AMATNR = CMATNR
                                            WHERE A~MATNR IN S_MATNR
                                              AND A~BWKEY EQ P_WERKS
                                              AND MATKL IN S_MATKL
                                              AND MTART IN S_MTART
                                              AND BWTAR EQ ' '
                                              AND C~SPRAS = SY-LANGU.
      IF SY-SUBRC EQ 0.
        SELECT ABUDAT AMBLNR AMJAHR BZEILE BMATNR BWERKS B~BWART
               BMENGE BLFBNR BLFBJA BLFPOS BEBELN BEBELP B~XAUTO
               BUMMAT BUMWRK
            INTO CORRESPONDING FIELDS OF TABLE T_MSEG
            FROM MKPF AS A INNER JOIN MSEG AS B ON AMBLNR = BMBLNR
                                               AND AMJAHR = BMJAHR
             FOR ALL ENTRIES IN T_HEADER
                                             WHERE A~BUDAT <= P_DATE
                                               AND B~MATNR = T_HEADER-MATNR
                                               AND B~WERKS = T_HEADER-BWKEY
                                               AND B~BWART IN ('101',
                                                               '102',
                                                               '105',
                                                               '106',
                                                               '122',
                                                               '123',
                                                               '301',
                                                               '302',
                                                               '701',
                                                               '702',
                                                               '131',
                                                               '132',
                                                               '309',
                                                               '310',
                                                               '501',
                                                               '502',
                                                               '531',
                                                               '532',
                                                               '561',
                                                               '562').
        PERFORM GET_DEAD_STOCK.
        PERFORM DISPLAY_OUTPUT.
      ELSE.
        MESSAGE S398(00) WITH 'No Data found for'(013)
        'Given Selection Critirea'(017).
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDIF.
    *&      Form  get_dead_stock
          text
    FORM GET_DEAD_STOCK .
      LOOP AT T_HEADER.
        SORT T_MSEG BY MATNR WERKS BUDAT DESCENDING MBLNR DESCENDING.
        LOOP AT T_MSEG WHERE MATNR = T_HEADER-MATNR
                         AND WERKS = T_HEADER-BWKEY
                         AND ( BWART = '101' OR
                               BWART = '105' OR
                               BWART = '501' OR
                               BWART = '531' OR
                               BWART = '561' OR
                               BWART = '701' OR
                               BWART = '309' OR
                               BWART = '301' OR
                               BWART = '131' ).
          IF T_MSEG-BWART = 101.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 102.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
            READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 122.
            IF SY-SUBRC = 0.
              READ TABLE T_MSEG INTO WA_MSEG1 WITH KEY LFBNR = WA_MSEG-MBLNR
                                         LFBJA = WA_MSEG-MJAHR
                                         LFPOS = WA_MSEG-ZEILE
                                         BWART = 123.
              IF SY-SUBRC EQ 0.
                WA_MSEG-MARK = 'X'.
                MODIFY T_MSEG FROM WA_MSEG.
                CONTINUE.
              ELSE.
                IF T_MSEG-MENGE EQ WA_MSEG-MENGE.
                  T_MSEG-MARK = 'X'.
                  MODIFY T_MSEG.
                  CONTINUE.
                ELSE.
                  T_MSEG-MENGE = T_MSEG-MENGE - WA_MSEG-MENGE.
                  MODIFY T_MSEG.
                ENDIF.
              ENDIF.
            ENDIF.
          ELSEIF T_MSEG-BWART = 105.
            READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 106.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 131.
            READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 132.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 501.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 502.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 301.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 302.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 531.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 532.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 561.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 562.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 701.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 702.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ELSEIF T_MSEG-BWART = 309.
            READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
                                       LFBJA = T_MSEG-MJAHR
                                       LFPOS = T_MSEG-ZEILE
                                       BWART = 310.
            IF SY-SUBRC = 0.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ELSEIF T_MSEG-XAUTO = ' '.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ELSEIF T_MSEG-MATNR EQ T_MSEG-UMMAT.
              T_MSEG-MARK = 'X'.
              MODIFY T_MSEG.
              CONTINUE.
            ENDIF.
          ENDIF.
          SELECT SINGLE EBELN INTO EKPO-EBELN FROM EKPO
                             WHERE EBELN = T_MSEG-EBELN
                               AND EBELP = T_MSEG-EBELP
                               AND KNTTP = 'K'.
          IF SY-SUBRC = 0.
            T_MSEG-MARK = 'X'.
            MODIFY T_MSEG.
            CONTINUE.
          ENDIF.
         TMENGE = TMENGE - t_mseg-MENGE.
        ENDLOOP.
      ENDLOOP.
      DELETE T_MSEG WHERE MARK = 'X'.
      DELETE T_MSEG WHERE ( BWART = '102' OR
                            BWART = '106' OR
                            BWART = '502' OR
                            BWART = '532' OR
                            BWART = '562' OR
                            BWART = '702' OR
                            BWART = '310' OR
                            BWART = '302' OR
                            BWART = '123' OR
                            BWART = '122' OR
                            BWART = '132' ).
      SORT T_HEADER BY MATNR BWKEY.
      DELETE ADJACENT DUPLICATES FROM T_HEADER COMPARING MATNR BWKEY.
      T_CUR_STOCK[] = T_MSEG[].
      SORT T_CUR_STOCK BY MATNR WERKS.
      LOOP AT T_CUR_STOCK.
        WA_MSEG = T_CUR_STOCK.
        AT END OF WERKS.
        ENDAT.
      ENDLOOP.
      LOOP AT T_HEADER.
        CLEAR L_LBKUM.
        L_LBKUM = T_HEADER-LBKUM.
        REFRESH T_ITEMS.
        CLEAR T_ITEMS.
        LOOP AT T_MSEG WHERE MATNR EQ T_HEADER-MATNR
                         AND WERKS EQ T_HEADER-BWKEY.
          T_ITEMS = T_MSEG.
          APPEND T_ITEMS.
          CLEAR T_ITEMS.
        ENDLOOP.
        SORT T_ITEMS BY BUDAT DESCENDING
                        MBLNR DESCENDING.
        CLEAR L_LBKUM.
        LOOP AT T_ITEMS.
          L_LBKUM = T_ITEMS-MENGE - T_HEADER-LBKUM.
          IF L_LBKUM GE 0.
            T_OUTPUT-MATNR = T_HEADER-MATNR.
            T_OUTPUT-WERKS = T_HEADER-BWKEY.
            T_OUTPUT-BUDAT = T_ITEMS-BUDAT.
            T_OUTPUT-MENGE = T_HEADER-LBKUM.
            APPEND T_OUTPUT.
            CLEAR T_OUTPUT.
            EXIT.
          ELSE.
            T_HEADER-LBKUM = T_HEADER-LBKUM - T_ITEMS-MENGE.
            T_OUTPUT-MATNR = T_HEADER-MATNR.
            T_OUTPUT-WERKS = T_HEADER-BWKEY.
            T_OUTPUT-BUDAT = T_ITEMS-BUDAT.
            T_OUTPUT-MENGE = T_ITEMS-MENGE.
            APPEND T_OUTPUT.
            CLEAR T_OUTPUT.
            CONTINUE.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    " get_dead_stock
    *&      Form  DISPLAY_OUTPUT
          text
    FORM DISPLAY_OUTPUT .
      DATA: L_DAYS TYPE I.
      DATA : WA_OUTPUT LIKE T_OUTPUT.
      DATA : T_FINAL LIKE T_OUTPUT OCCURS 0 WITH HEADER LINE.
      DATA : WA_FINAL LIKE T_OUTPUT.
      DATA : L_CQTY TYPE MSEG-MENGE,
             L_CPRC TYPE MBEW-SALK3.
      DATA : L_TITLE TYPE LVC_TITLE.
      DATA : L_NAME1 TYPE T001W-NAME1.
    *C-- Not to output when the quantity is zero.
      DELETE T_OUTPUT WHERE MENGE EQ 0.
      SORT T_OUTPUT BY WERKS MATNR BUDAT.
      LOOP AT T_OUTPUT.
        T_FINAL = T_OUTPUT.
        AT NEW MATNR.
          CLEAR T_HEADER.
          READ TABLE T_HEADER WITH KEY MATNR = T_OUTPUT-MATNR
                                       BWKEY = T_OUTPUT-WERKS.
        ENDAT.
        T_FINAL-MAKTX = T_HEADER-MAKTX.
        IF T_HEADER-LBKUM GT 0.
          T_FINAL-PVAL = ( T_OUTPUT-MENGE * T_HEADER-SALK3 / T_HEADER-LBKUM ).
        ELSE.
          CLEAR T_FINAL-PVAL.
        ENDIF.
        L_CQTY = L_CQTY + T_OUTPUT-MENGE.
        IF T_HEADER-LBKUM GT 0.
          L_CPRC = L_CPRC + ( T_OUTPUT-MENGE * T_HEADER-SALK3 / T_HEADER-LBKUM ).
        ENDIF.
        CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
          EXPORTING
            BEG_DA        = T_OUTPUT-BUDAT
            END_DA        = P_DATE
          IMPORTING
            NO_CAL_DAY    = L_DAYS
          EXCEPTIONS
            DATEINT_ERROR = 1
            OTHERS        = 2.
        IF SY-SUBRC <> 0.
          WRITE : 70 'Error While Calculating days'(018) .
        ELSE.
          T_FINAL-PDAYS = L_DAYS.
        ENDIF.
        T_FINAL-CQTY = L_CQTY.
        T_FINAL-CPRC = L_CPRC.
        APPEND T_FINAL.
        AT END OF MATNR.
          CLEAR : L_CPRC, L_CQTY.
        ENDAT.
      ENDLOOP.
      PERFORM BUILD_FIELD_CATALOG.
      WA_SORT-FIELDNAME = 'MATNR'.
      WA_SORT-SPOS = '1'.
      APPEND WA_SORT TO T_SORT.
      SELECT SINGLE NAME1 FROM T001W INTO L_NAME1
      WHERE WERKS = P_WERKS.
      CONCATENATE 'Plant: ' P_WERKS ',' L_NAME1 INTO L_TITLE.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-CPROG
          I_GRID_TITLE       = L_TITLE
          IT_FIELDCAT        = GRID_TAB[]
          IT_SORT            = T_SORT
          I_SAVE             = 'A'
        TABLES
          T_OUTTAB           = T_FINAL[].
    SORT T_FINAL BY WERKS MATNR BUDAT.
    LOOP AT T_FINAL.
       WRITE : /10 T_FINAL-MATNR.
       WRITE : 30 T_FINAL-WERKS.
       WRITE : 40 T_FINAL-BUDAT.
       WRITE : 50 T_FINAL-MENGE.
    **C-- FM to find the number of days between
    **C-- todays date and the posting date
       CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
         EXPORTING
           BEG_DA        = T_FINAL-BUDAT
           END_DA        = P_DATE
         IMPORTING
           NO_CAL_DAY    = L_DAYS
         EXCEPTIONS
           DATEINT_ERROR = 1
           OTHERS        = 2.
       IF SY-SUBRC <> 0.
         WRITE : 70 'Error While Calculating days'(018) .
       ELSE.
         WRITE : 70 L_DAYS.
       ENDIF.
       AT END OF MATNR.
         ULINE.
         READ TABLE T_HEADER WITH KEY MATNR = T_FINAL-MATNR
                                      BWKEY = T_FINAL-WERKS.
         IF SY-SUBRC EQ 0.
           WRITE : /1 'Total Valuated Stock', T_HEADER-LBKUM.
           WRITE : /1 'Value of total valuated Stock', T_HEADER-SALK3.
           ULINE.
         ENDIF.
       ENDAT.
    ENDLOOP.
    ENDFORM.                    " DISPLAY_OUTPUT
    *&      Form  BUILD_FIELD_CATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_FIELD_CATALOG .
      DATA : CNT1 TYPE I.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Material'.
      GRID_TAB-FIELDNAME = 'MATNR'.
      GRID_TAB-KEY = 'X'.
      GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Material Description'.
      GRID_TAB-FIELDNAME = 'MAKTX'.
      GRID_TAB-OUTPUTLEN = '30'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Date of Reciept'.
      GRID_TAB-FIELDNAME = 'BUDAT'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Quantity'.
      GRID_TAB-FIELDNAME = 'MENGE'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Pending Days'.
      GRID_TAB-FIELDNAME = 'PDAYS'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Value'.
      GRID_TAB-FIELDNAME = 'PVAL'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Cumulative Quantity'.
      GRID_TAB-FIELDNAME = 'CQTY'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
      CLEAR GRID_TAB.
      CNT1 = CNT1 + 1.
      GRID_TAB-COL_POS = CNT1.
      GRID_TAB-SELTEXT_L = 'Value of Cumulative Quantity'.
      GRID_TAB-OUTPUTLEN = '30'.
      GRID_TAB-FIELDNAME = 'CPRC'.
    GRID_TAB-KEY = 'X'.
    GRID_TAB-NO_ZERO = 'X'.
      GRID_TAB-TABNAME = 'T_FINAL'.
      APPEND GRID_TAB.
    ENDFORM.                    " BUILD_FIELD_CATALOG

  • Opening and closing stock with sales order and with out sales order

    hello,
    any body please help me my client want to check opening stock and and closing stock in areport.
    material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
    this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
    please guide me to get this report.
    Thanks & Regads
    Bhakta

    Transaction MB5B
    For sales order related use specila stock as E and use radio button indicator in stock type
    For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
    to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
    See the o/p which will give the stock as required by you

  • Stock valuation down to Storage location level

    Dear all,
    System setup for stock valuation is till Plant level. And understand that's how data stored in table MBEW and MBEWH until plant level only.
    Eventhough that is system standrd, is that possible to get the stock valuation until Storage location level?
    For eg: In MB5B, there is opening stock, closing stock and the material movement posting. I need to get opening and closing stock for each storage location.
    Could you please comment if there are tables store these data? Kindly comment.

    Hi Afshad Irani,
    Thanks for your reply. Understand from the previous post that stock valuation for storage location can be done via table MARDH or report MC.9, but this tools are excess base on period/month basis.
    My case, i need to report storage location stock for both (1)last month 06.2010 and (2)yesterday's stock 06.07.2010. So i can use MARDH table to report (1)last month stock for each storage location. While for (2) yesterday stock, table MARDH isn't help.
    Could you please advice further?

  • Calculating opening and closing stocks at a plant (on specific dates)

    Hi,
    I am to develop an ABAP-report. On the selection screen, I'll have plant, material, and a date range (date_1 and date_2). The report should show opening stock on date_1, closing stock on date_2, and then there is more segregation based on movement types (along with both stock-quantity and stock-value). I am stuck at how-to's around calculating opening (and closing) stock on a particular date.
    Secondly, transaction MB5B has 3 options : batch stock, valuated stock, special stock ... One of these options uses table MBEW and other uses table MARD ... Which (all) tables will I need to use so as to get both stock-quantities and stock-values ?
    Please advise. Thank you.
    Regards,

    Hi
    for second question answer is
    you need to consider all batch stock, valuated stock, special stock ... One of these options uses table MBEW and other uses table MARD to get both stock-quantities and stock-values
    hope it helps
    Edited by: ppkk on Dec 10, 2008 10:58 AM

  • Closing stock as on 31st march 2008

    Hi,
    I need to take a closing stock report as on 31st march 2008 with quantity and value.
    Please do the needful
    Regards,
    narasiman

    Hai,
    Use Tcode MB5B - Stock on posting date to get the report. Enter the following in the selection parameters,
    1.Material number
    2.Company code or plant, storage location
    3. selection date 31.3.2008
    4. Select the radio button - valuated stock this will give both qty & values.
    5. If batch managed material, select the check boxes in the Totals only - non hierarchial representation, only matls handled in batches & also batches w/o stk segment.

  • Reg: Closing Stock

    Dear All,
    With the help from forums, i had written a Query to generate the closing stock for a given period, with below said columns
    Itemcode, Itemname,In Qty, Out Qty, on Hand, Price, Value, Warehouename
    The result is coming correct, but there is a difference for the price when compared to my Query and SAP Report,
    reason is that SAP is picking up the Average Price for some items and Last Purchase Price for some items.
    Since in SAP the price is maintained at three different levels and which are:
    1. Last Purchase Price
    2. Average Price
    3. Warehouse wise price
    Can any one suggest me how to get the price for closing stock, and below is the code.
    select m.warehouse, w.WhsName, m.ItemCode, m.Dscription, sum(m.inqty) as inq, sum(m.outqty) as outq,
    T0.LastPurPrc as 'Price', sum(m.inqty-m.outqty)as 'on Hand'
    from oinm m inner join owhs w on m.warehouse = w.whscode
    inner join OITM T0 on m.itemcode = T0.itemcode
    where m.DocDate between [%0]and [%1]
    group by m.ItemCode, m.Dscription, m.warehouse,w.WhsName, T0.LastPurPrc
    having sum(inqty) <> sum(outqty)
    order by m.warehouse,m.ItemCode
    Currently we are using 2005B PL35.
    Please help us to resolve.
    Regards
    Shanker

    Hi All,
    Sorry for delay in replying.
    I had executed the query and verified the same.
    The Quantities are matching as per SAP report, but the Price / Item cost is not matching since SAP considers price at two levels.
    1. when GRPO is raised tax is not considered
    2. When A/P Invoice is raised tax is considered
    For some Items the Price / Item cost is matching since A/P Invoice is not raised, the issue is only with items for which A/P Invoice is raised.
    Please help me out to get the Price / Item cost as per SAP report,
    P.S: i had run the Inventory Audit Report for verification.
    Regards
    Shanker

  • Error: The decapsulated inner packet doesn't match the negotiated policy in the SA

    I upgraded my ASA from 8.2(1) to 8.4(3) as I wanted to try to get Android devices to properly connect via VPN.
    After some effort, I was able to get the Android devices to connect via VPN.  However, my syslog server has a number of errors recorded that look this this:
    %ASA-4-402116: IPSEC: Received an ESP packet (SPI= 0x1E76EFA6, sequence number= 0x1F0) from x.x.x.x (user= testuser) to y.y.y.y.  The decapsulated inner packet doesn't match the negotiated policy in the SA.  The packet specifies its destination as z.z.z.z, its source as a.a.a.a, and its protocol as tcp.  The SA specifies its local proxy as y.y.y.y/255.255.255.255/udp/42246 and its remote_proxy as x.x.x.x/255.255.255.255/udp/0.
    Digging further, it seems this error might be due to a NAT issues with the VPN connections.  VPN previously worked with Cisco's VPN client on Windows, though I did not test to see if that is no longer working.  However, I made no changes in the config, except for those related to additions needed to support L2TP.  With the below config, Android clients can connect to the ASA and access the internal network, but they cannot connect to external addresses.  I'm at a loss.
    The addresses used in the config: 192.168.1.0/24 are on the internal LAN and 192.168.3.0/24 are addresses assigned to VPN clients.
    I noted in the config this line:
    access-list inside_nat0_outbound extended permit ip any 192.168.3.0 255.255.255.0
    The access list is not referenced anywhere, though it was referenced in the 8.2(1) config like this:
    nat (inside) 0 access-list inside_nat0_outbound
    I'm not sure what else changed, but I've looked over the config and I just cannot see what the issue might be.  I'm hoping somebody might be able to point out my error.
    Here's the config file (at least the parts that might be of interest):
    : Saved
    ASA Version 8.4(3)
    interface Vlan1
    nameif inside
    security-level 100
    ip address 192.168.1.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    ip address dhcp setroute
    boot system disk0:/asa843-k8.bin
    object network obj-192.168.3.0
    subnet 192.168.3.0 255.255.255.0
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    access-list outside_access_in extended permit icmp any interface outside time-exceeded
    access-list outside_access_in extended permit icmp any interface outside echo-reply
    access-list outside_access_in extended permit icmp any interface outside unreachable
    access-list outside_mpc extended permit ip any interface outside
    access-list inside_mpc extended permit ip 192.168.1.0 255.255.255.0 any
    access-list testVPN_splitTunnelAcl extended permit ip 192.168.1.0 255.255.255.0 any
    access-list inside_nat0_outbound extended permit ip any 192.168.3.0 255.255.255.0
    ip local pool VPN-Pool-1 192.168.3.1-192.168.3.254 mask 255.255.255.0
    ip verify reverse-path interface outside
    nat (inside,any) source static any any destination static obj-192.168.3.0 obj-192.168.3.0 no-proxy-arp
    object network obj-192.168.3.0
    nat (outside,outside) dynamic interface
    object network obj_any
    nat (inside,outside) dynamic interface
    access-group outside_access_in in interface outside
    crypto ipsec ikev1 transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
    crypto ipsec ikev1 transform-set ESP-DES-SHA esp-des esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-DES-MD5 esp-des esp-md5-hmac
    crypto ipsec ikev1 transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
    crypto ipsec ikev1 transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
    crypto ipsec ikev1 transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
    crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANSP esp-aes esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANSP mode transport
    crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANSP esp-des esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANSP mode transport
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 10 set ikev1 transform-set ESP-AES-128-SHA-TRANSP ESP-3DES-SHA-TRANSP
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
    crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
    crypto map outside_map interface outside
    crypto ikev1 enable outside
    crypto ikev1 policy 5
    authentication pre-share
    encryption aes
    hash sha
    group 2
    lifetime 86400
    crypto ikev1 policy 10
    authentication pre-share
    encryption aes-256
    hash sha
    group 2
    lifetime 86400
    group-policy testVPN internal
    group-policy testVPN attributes
    wins-server value 192.168.1.8
    dns-server value 192.168.1.8 192.168.1.4
    vpn-idle-timeout none
    vpn-tunnel-protocol ikev1
    split-tunnel-policy tunnelspecified
    split-tunnel-network-list value testVPN_splitTunnelAcl
    default-domain value test.us
    group-policy testVPNnsl2tp internal
    group-policy testVPNnsl2tp attributes
    wins-server value 192.168.1.8
    dns-server value 192.168.1.8 192.168.1.4
    vpn-idle-timeout none
    vpn-tunnel-protocol l2tp-ipsec
    group-policy testVPNns internal
    group-policy testVPNns attributes
    wins-server value 192.168.1.8
    dns-server value 192.168.1.8 192.168.1.4
    vpn-idle-timeout none
    vpn-tunnel-protocol ikev1
    username testuser password PASSWORD encrypted privilege 15
    username testuser2 password PASSWORD nt-encrypted privilege 15
    tunnel-group DefaultRAGroup general-attributes
    address-pool VPN-Pool-1
    default-group-policy testVPNnsl2tp
    tunnel-group DefaultRAGroup ipsec-attributes
    ikev1 pre-shared-key *****
    tunnel-group DefaultRAGroup ppp-attributes
    authentication ms-chap-v2
    tunnel-group testVPN type remote-access
    tunnel-group testVPN general-attributes
    address-pool VPN-Pool-1
    default-group-policy testVPN
    tunnel-group testVPN ipsec-attributes
    ikev1 pre-shared-key *****
    tunnel-group testVPNns type remote-access
    tunnel-group testVPNns general-attributes
    address-pool VPN-Pool-1
    default-group-policy testVPNns
    tunnel-group testVPNns ipsec-attributes
    ikev1 pre-shared-key *****
    tunnel-group testVPNnsl2tp type remote-access
    tunnel-group testVPNnsl2tp general-attributes
    address-pool VPN-Pool-1
    default-group-policy testVPNnsl2tp
    tunnel-group testVPNnsl2tp ipsec-attributes
    ikev1 pre-shared-key *****
    tunnel-group testVPNnsl2tp ppp-attributes
    authentication ms-chap-v2
    One last question: in order to get the connection from Android to work, I was forced to use "tunnel-group DefaultRAGroup".  Is that actually a limitation, or did I make an error that forced that requirement?  I wanted to use "tunnel-group testVPNnsl2tp".
    Thanks!

    Chris,
    This is still a bit off the mark.  I think I might be confusing the issue by including some of the VPN configuration that I had previously installed and working (e.g., two other VPN tunnel groups with split tunneling on one of them).  Let's just remove that stuff from consideration.  I actually tested the current configs just to see if they are working since the upgrade.  testVPN is working with the split tunneling, but testVPNns (no-split tunneling) does not allow external access.  I guess there is a NAT config issue there, too, but not sure what it is, yet.  I've not investigated that closely.
    I want to solve one problem at a time, though I understand there are some interdependencies.
    What I'd like to focus on right now is just the L2TP VPN connection.
    From what I've been able to understand from the documentation, what I need are these lines:
    crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANSP esp-aes esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-AES-128-SHA-TRANSP mode transport
    crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANSP esp-des esp-sha-hmac
    crypto ipsec ikev1 transform-set ESP-3DES-SHA-TRANSP mode transport
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 10 set ikev1 transform-set ESP-AES-128-SHA-TRANSP ESP-3DES-SHA-TRANSP
    crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
    crypto map outside_map interface outside
    crypto ikev1 enable outside
    group-policy testVPNnsl2tp internal
    group-policy testVPNnsl2tp attributes
    wins-server value 192.168.1.8
    dns-server value 192.168.1.8 192.168.1.4
    vpn-idle-timeout none
    vpn-tunnel-protocol l2tp-ipsec
    tunnel-group DefaultRAGroup general-attributes
    address-pool VPN-Pool-1
    default-group-policy testVPNnsl2tp
    tunnel-group DefaultRAGroup ipsec-attributes
    ikev1 pre-shared-key P74bmqL6rT40bl5
    tunnel-group DefaultRAGroup ppp-attributes
    authentication ms-chap-v2
    crypto ikev1 policy 5
    authentication pre-share
    encryption aes
    hash sha
    group 2
    lifetime 86400
    I still want to assign the IP addresses to VPN clients out of 192.168.3.0/24.
    The tricky part is understanding exactly what NAT rules to insert and to avoid that error message I'm getting relatred to the encapsulated packets.  I tried to introduce the commands you had, but it's missing stuff that I would need for L2TP/IPSec (e.g., "mode transport").  I also don't think I want "pfs group5".  The above config "works" in that I get connected -- all negotiation is done.  It's just that packets from the VPN client are not able to go out to the Internet and I'm seeing that encapsulation error messages when I try to send a packet.
    Paul

Maybe you are looking for

  • IMac won't see my music library on an external drive

    I am running Yosemite 10.10.1 on an iMac late 2012 3.4 GHz Intel Core i7 32GB 1600 MHz DDR3 with NVIDIA GeForce GTX 680MX 2048 MB and my music library is on an external disc drive a WD MyBookLive 3TB. I used to run the external disc drive through a S

  • How to delete the duplicate copy in version management?

    Hi, I have reverted the previous version. it is getting back the version on my user id. but i selected the active version again and clicking on RETRIVE button..now it is creating another duplication version. so i want to delete that one. anybody can

  • Counting how many times my app has been opened

    I want to be able to count how many times a user has opened my application, and so every time the application launches, this number is added by one. Does anyone know how I store a long-time variable like this that will still need to be available acro

  • DVD cleaning

    I've burned about 50 dvd's on this machine and now I'm seeing distortions where the pixels seem to deteriorate at certain spots. Does the unit need cleaning? How do I do that?

  • How to access graphic components from classes?

    Hi, I am creating a Flex application. In my Main.mxml, I add different UI elements, such as panels. I also have a few actionscript files. Everything is in the same folder. So my question is : how can I access a panel created in Main.mxml from an acti