The planning run uses the fields maintained in MRP views for the materials.
In LTP, we create different planning scenarios with different settings in the LTP planning scenario (in MS31/ MS32) and try to analyze the results in simulation.
Using standard features, we can have different BOM for different planning scenarios and we can check the simulation results based on the different BOMs.
In this document we will discuss a modification that gives us an option to have planning scenario specific material master MRP data.
Consider that we have set up two planning scenarios, for one we want to have lot size ‘EX’ with no minimum lot size; whereas for the other we want to have lot size ‘EX’ with a minimum lot size, say 100.
This can be achieved by an implementation of the BAdI MD_MRP_PARAMETERS as discussed in the following section.
(a) We create a custom table where we can have the planning scenario specific MRP master data (in extensive implementation scenarios, you can think of having a custom table like MARC, with planning scenario as an additional primary key field).
(b) We maintain our planning scenario specific master data in this custom table.
(c) We implement the BAdI and change the master data used by planning as per the data maintained in this custom table.
Details of the BAdI:
The Add In has two methods:
(a) ADJUST_MATERIAL_MASTER_PARAMS: for material master parameters change (change in the MT61D structure relevant for planning).
(b) ADJUST_PLANNING_PARAMS: for adjusting the planning parameters (e.g. roll forward period, change in CM61X structure).
For the example described we should use ADJUST_MATERIAL_MASTER_PARAMS method. One example coding is provided below:
The name of our custom table is suppose ZMARC.
*—-Declare Local Variables—————
DATA: LV_DISLS TYPE DISLS,
LV_BSTMI TYPE BSTMI.
*—-Check LTP scenario is present——-
CHECK IM_PLSC-PLSCN IS NOT INITIAL.
*—–Get the master data from custom table——
SELECT SINGLE DISLS BSTMI FROM ZMARC INTO (LV_DISLS , LV_BSTMI) WHERE PLSCN = IM_PLSC-PLSCN
AND MATNR = IM_MT61D-MATNR
AND WERKS = IM_MT61D-WERKS.
CHECK SY-SUBRC EQ 0.
CH_MT61D_EXT-DISLS = LV_DISLS. ” Lot Size
CH_MT61D_EXT-BSTMI = LV_BSTMI. “Minimum Lot Size
*——Set Change Indicator——————
CH_CHANGED = ‘X’.
This is one useful BAdI in PP-MRP component and the same can be used to achieve critical requirements during planning run. One such example of deleting firmed PR’s during planning run is given in the BAdI itself. Use menu function Goto -> Sample Code -> Display in SE18 transaction and go through the BAdI documentation.
Thanks a lot for going through the document. Hope this will help you to achieve numerous additional functionality in MRP/ MPS/ LTP run.
Please discuss if you face any difficulties.