Question:
I had a plant in which for many materials, I had assigned MRP Controller.
Now I-want to know-only the MRP controller, can I set MRP run automatically in backend, daily at time 23.59? Is this possible?
If yes then you tell me what do this? And what is prereuisites for this?
Answer:
This question have been as below:
1.First Create the variant for the MRP run,using t.code MDBT--->mention the PLANT,MRP control parameters--->user Ex It key (first the user Exit M61X0001-MRP run based on MRP Controller should is activated).
2.MRP job can scheduled either from T.code SM36 (for the program name RMMRP000 and selecting the proper variant) or else From MDBT to clicking the schedule and mention it for daily option,the time details etc.
3.The results can is checked in SP01 or else SM37.
Go to Omix and create the user keys with same as MRP controller code and give some (any) description in user parameter.
Now go to SE37 and enter the following exits names and get a idea of the ABAP code
exit_sapmm61x_001
exit_saplm61c_001
You'll see the ZX includes, go to SE38 and create them with same name your saw in SE37.
Now on the includes add the code similar to the following code:
*&---------------------------------------------------------*
*& Include zxm61u01
*&---------------------------------------------------------*
Clear:no_planning, stop_planning.
IF User_key = 'B01'.
IF mt61d-dispo = 'B01'. "Plan only MRP Controller B01
*continue
ELSE.
no_planning = ' X '. " Exclude all others
ENDIF.
ENDIF.
IF User_key = 'B02'.
IF mt61d-dispo = 'B02'. "Plan only MRP Controller B02
*continue
ELSE.
no_planning = ' X '. "Exclude all others
ENDIF.
ENDIF.
As far as I know you need to has the same code in both the user exits else the user exit doesn ' t work.
Automatic scheduling MRP Run for specific MRP controller