Friday, 12 March 2010

Note 1082841 - MMPV date check for Material Ledger

Symptom

You need to run MMPV (period roller).  You want to prevent shifting to a future period by mistake (for example, a common mistake is running MMPV twice at the beginning of a month).

Other terms

MMPV, MARV, period roller, period shift, material ledger, MMPV_READ_NOTE, MMPV_DATE_CHECK

Reason and Prerequisites

In the event that MMPV is mistakenly executed twice at the beginning of a period, the active period could be shifted to a future period.  As a consequence, all subsequent goods movement would be posted to the wrong period.  To correct such errors is difficult, especially when Material Ledger is active.

Solution

This note provides a feature to prevent using MMPV to shift into a future period.  This feature is activated automatically after implementing this note and works with our without Material Ledger active.  MMPV can continue only if the new period is within 10 days (by default but is configurable) away from the current date in the system. Otherwise, it will terminate and no change will be made.
To disable this feature, you must set parameter ID MMPV_READ_NOTE with the current date in the user parameters in form YYYYMMDD (Y = year, M = month, D = day).
To change the number of days to a value other than the default (10 days), set the following entry in table CKMLMVADMIN:

KKEY  : MMPV_NUMBER_DAYS_ALLOWED

KDATA : <number of days MMPV is allowed>

Only integers are allowed, with 0 meaning MMPV is allowed only on or after the first day of a new period.  If the value is greater than the actual number of days in a period then it means MMPV is allowed for the entire month.  Any invalid entry in the KDATA field will be ignored and the default value will be used.
Carry out the following manual stpes, then implement the attached note.

    1. Use transaction SE80 to create a SET/GET parameter:
    Package/Dev. Class : MG
    Parameter ID : MMPV_READ_NOTE
    Text : Follow instructions in Note 1082841.
    2. Use transaction SE37 to create function module MMPV_DATE_CHECK with the following attributes:

              Function group : MLCCS_MATERIAL_MASTER
Short text : Date check for period roller

              Import parameters:

Parameter Name
Type
Associated Type

I_NEW_LFGJA
TYPE
BDATJ

I_NEW_LFMON
TYPE
MONAT

I_BUKRS
LIKE
T001-BUKRS

I_FY_VARIANT
TYPE
PERIV

              Exceptions:

MMPV_BLOCKED

ERROR_OCCURRED

    3. Use transaction SE38 to add the following Text Elements to program RMMMPERI (select the radio button 'Text elements' and click on the 'Change' button):

    Sym  : 099

    Text : Transaction MMPV cannot be executed.  Please refer to SAP        note 1082841

              Save and activate the changes.

    4. Add the following entries to table T139A:
    Use Transaction se16n and enter table name T136A, verify the 'Maintain Entries' checkbox is ticked.  Select AUSNA = 99 and execute (F8); create the following entry:

    AUSNA : 99

    ABBRU : X

    SORT  : 99

    KTEXT : MMPV_DATE_CHECK: Error occurred (Note 1082841).

    5. Similarly, add the corresponding translation text to table T139B (if a translation is missing in T139B, then the program will use the entry in T139A as default):
       SPRAS : <language code>

       AUSNA : 99
       KTEXT : MMPV_DATE_CHECK: Error occurred (Note 1082841).

    6. Implement the attached program corrections.

No comments:

Post a Comment