SAP Note 1082841 - MMPV/Close Periods : Prevent shifting to a future period by mistake
Symptom
When running MMPV/ Close Periods, 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, MMPI, MARV, period roller, period shift, material ledger, MMPV_READ_NOTE, MMPV_DATE_CHECK, T001, PERIV
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, system would accept goods movements with a posting date pointing to this wrong future period.
To revert wrong period shift and correct such posting 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. The future period is defined according to the fiscal year variant setting of the company code (T001-PERIV). This feature is activated automatically after implementing this note (or if the note is included in a support package upgrade or a new release), and it works both with and without Material Ledger active. By default, MMPV is allowed only if the new period is within 10 days away from the current date in the system. Otherwise, an error will be displayed and no change will be made.
The default behavior can be changed in the following ways:
- To disable this feature, it is suggested to enter a user parameter "MMPV_READ_NOTE" and set it to the current date in YYYYMMDD format (Y = year, M = month, D = day), with transaction SU3 > Parameters:
Get/Set parameter ID | Parameter Value |
MMPV_READ_NOTE | <current date, e.g. 20191231> |
This will disable the feature on the specified date (e.g. "20191231" for December 31, 2019) and no date check will be done during MMPV.
- To change the default number of days from 10 to a different value, it is suggested to add the following entry in table CKMLMVADMIN, with transaction SM30 > V_CKMLMVADMIN:
KKEY | KDATA |
MMPV_NUMBER_DAYS_ALLOWED | <number of days, e.g. 15> |
This will allow MMPV to be performed within the specified days before the new period (e.g. "15" for 15 days before the new period).
Note: Only integers are valid for the KDATA field, 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.
If apply this note with SNOTE, it is suggested to carry out the following manual steps, and 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 T139A, 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.
Comments
Post a Comment