cancel
Showing results for 
Search instead for 
Did you mean: 

mrp run

deepu_p2
Active Participant
0 Kudos

Hi. in my scenario.

I have to rum mrp for mrp controler.

i ve assigned different mrp controlers based on the catergory of the material.

now i have to run mrp for each mrp controler saperately and automatically every night.

How do i do this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First of all create a new "User-exit Key" to be used in MD01 screen.

SPRO --> Production --> MRP --> Planning --> User Exit: Material Selection for Planning Run.

Let's say u define key as "Z01" with desc "User exit MRP on controller".

Now ask the developer to implement the user-exit: M61X0001 with user-exit: EXIT_SAPLM61C_001 and EXIT_SAPMM61X_001.

Below is the logic that we have used for user-exit based on MRP Controller. You can reuse some of this.

DATA: FOUND_FLG(1) TYPE C, " X if material controller in parameter

OFFSET TYPE I, " offset into parameter for a controller

TUXPAR LIKE RM61X-UXPAR. " temporary uxpar

CLEAR: NO_PLANNING, STOP_PLANNING.

  • Check whether the material's controller is specified in the user

  • parameter. There can be up to nineteen, three-character controllers

  • in the user parameter field. If the controller is not in the user

  • parameter, set the no_planning flag to 'X'.

IF USER_KEY = 'Z01'.

UXPAR = USER_PAR.

CONDENSE UXPAR.

CLEAR FOUND_FLG.

DO 19 TIMES.

OFFSET = ( SY-INDEX - 1 ) * 3.

TUXPAR = UXPAR+OFFSET(3).

WRITE TUXPAR(3) TO DISPO.

IF DISPO IS INITIAL.

EXIT.

ELSEIF MT61D-DISPO = DISPO.

FOUND_FLG = 'x'.

EXIT.

ENDIF.

ENDDO.

IF FOUND_FLG = SPACE.

NO_PLANNING = 'X'.

ENDIF.

ENDIF.

Answers (2)

Answers (2)

deepu_p2
Active Participant
0 Kudos

thanks guys.

all that i have to do is create a user exit key. and ask the abapor to do the coding for that.according to the reqirement.

former_member184655
Active Contributor
0 Kudos

Dear Deepu,

You have to use the User Exit - M61X0001 for running MRP based on MRP type or for selecting particular

MRP controller for running MRP.

Moreover you can create a variant and schedule the job in SM36 as per your business Requirement.

Regards

Mangalraj.S

deepu_p2
Active Participant
0 Kudos

I didnt get u.

can u come clear.

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

To execute MRP run for particular MRP controller you have to activate User Exit.

1. Create User Exit

Nav: Production > Material requirements Planning > Planning > User Exit: Material selec

For ex: Z01 - MRP controller

2. Create Project using enhancement M61X0001 in Tcode CMOD

3. Write following code in function module EXIT_SAPMM61X_001 include ZXM61U01

CLEAR: NO_PLANNING, STOP_PLANNING.

CASE USER_KEY.

WHEN 'Z01'.

UXPAR = USER_PAR.

CONDENSE UXPAR.

WRITE UXPAR+0(3) TO DISGR.

IF DISGR IS INITIAL.

EXIT.

ENDIF.

IF MT61D-DISGR DISGR.

NO_PLANNING = 'X'.

ENDIF.

ENDCASE.

4. When you want to execute MPR only for MRP controller "001", in MD01 select User Exit Key Z01 and controller in User parameter.

Consult you technical consultant for above process

Regards,

R.Brahmankar