Automatic scheduling MRP run for specific MRP controller

Question :

I have a plant in which for many materials, I have assigned MRP Controller.

Now I want to know that for only this MRP controller, can I set MRP run automatically in backend, daily at time 23.59 ?  Is this possible?

If yes then please tell me how to do this?   and what are prereuisites for this?

Answer :

This question has been as below :

1.First create the variant for the MRP run,using T.Code MDBT --->mention the plant,MRP control parameters--->User Exit key(First the user Exit M61X0001- MRP run based on MRP controller should be activated).

 

2.MRP job can be scheduled either from T.Code SM36(for the Program name RMMRP000 and selecting the proper variant) or else from MDBT by clicking the schedule and mention it for daily option,the time details etc.

 

3.The results can be checked in SP01 or else SM37.

Go to OMIX and create 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 an idea of the ABAP code

 

EXIT_SAPMM61X_001

EXIT_SAPLM61C_001

 

You will see ZX includes, go to SE38 and create them with same name you saw in SE37.

 

Now in 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 have the same code in both the user exits else the user exit doesn't work.

 

posted @ 2015-01-07 13:26  jefflu99  阅读(645)  评论(0编辑  收藏  举报