Вы находитесь на странице: 1из 4

MRP MANUAL

Parallel Planning Run

Parallel Planning Run: Prerequisites:


Customizing transaction OMIQ Define Parallel Processing in MRP: Enter destinations (servers) and number of sessions (processes) for the parallel planning run (F4 Help gives you a list of the active servers on the network)

Basic Concept:
Planning Types: Parallel planning can be started online, or in the background (batch) from a dispatcher server. In operative planning: MD01 and MDBT In master production scheduling: MD40 and MDBS In long-term planning: MS01 and MSBT

Task Handling:
This dispatcher server distributes individual packages to planning file entries in the individual sessions/processes of the servers defined in Customizing (asynchronous RFC calls are used). Each process plans its package, and when it has completed planning, sends the package and the planning results back to the dispatcher server. As soon as a process/task becomes free again, it is sent the next planning package, and so on and so forth. Note: If the overall planning run (as a background job!) terminates, refer to Note 217271 for possible causes: In this case, incorrect destinations were defined in Customizing tables. These entries have to be corrected (as described in Note 217271).

Planning Hierarchy:
The planning packages are sorted by low-level code/material/plant. Planning is performed on the basis of low-level code, i.e. tasks with a new low-level code are not sent off until all of the tasks of the previous low-level code have been completed. When planning with planning scope, all planning file entries with the same material are sent off in the same package. If an error arises when a planning package is being planned, the planning file entries in the package are sent off again individually for planning.

Source Code:
Executing online (transactions MD01/MS01/MD40): MD01 - Include MM61XI10_DO_MRP_PARALLEL, or MD40 - Include MM61XI10_DO_MPS_PARALLEL, or MS01 - Include MM61XI10_DO_LFR_PARALLEL, and Screen 400 in program SAPMM61X (dispatcher screen with dispatcher in PBO) Executing in background (transactions MDBT/MSBT/MDBS): MDBT - RMMRP000 (batch report) MDBS - RMMPS000 (batch report) MSBT - RMMRP010 (batch report)

Important Tables and Structures:


TASKX PLANTX MDMMX: Table of destinations for planning package Table of planning units: plants and MRP areas to be planned for Table for planning package with planning file entries to be planned (DISST/MATNR/WERKS) WORKX Backup table of materials to be planned this side of the RFC RECVX Table with the contents of the completed tasks CM61D_TAB Table of materials currently to be planned on an application server CM61DP_TAB Table of materials currently to be planned, sorted by planning scope CM61DX Table of planned materials returned

MRP MANUAL PERFX RUNCNTX NREAD

Parallel Planning Run Performance hit list of materials with the longest runtimes Table for counting the number of planning attempts per material Table with empty DB table not to be read

Planning:
Dispatcher screen 400 or FORM DISPATCHER in MM61XF40_DISPATCHER FORM routine CALL_TASK_DISPOSITION Function module for asynchronous RFCs to the destination servers: CALL FUNCTION 'MRP_MATERIAL_PARALLEL' DESTINATION taskx-desti STARTING NEW TASK taskx-tname PERFORMING get_results ON END OF TASK EXPORTING icm61x = cm61x tindx = taskx-index iplsc = plsc user_key = rm61x-uxkey user_par = rm61x-uxpar TABLES cm61d_tab = cm61d_tab tplantx = plantx perf_tab = perfy nread_tab = nread EXCEPTIONS communication_failure = 01 system_failure = 02. FORM routine for returning results at the end of the task:
FORM GET_RESULTS USING TASKNAME. DATA: RECV TYPE RECV. DATA: H_STOPX LIKE CM61X-STOPX. "HW 155335 * CLEAR RECV. IF KEEPING_TASK IS INITIAL. RECEIVE RESULTS FROM FUNCTION 'MRP_MATERIAL_PARALLEL' IMPORTING TINDX = RECV-INDEX RTIME = RECV-RTIME ISTATS = RECV-STATN STOPX = H_STOPX "HW 155335 TABLES CM61D_TAB = RECV-CM61DX TPLANTX = PLANTX PERF_TAB = RECV-PERFY NREAD_TAB = NREAD EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE RECV-MSGTX COMMUNICATION_FAILURE = 2 MESSAGE RECV-MSGTX. ELSE. "Kontext erhalten RECEIVE RESULTS FROM FUNCTION 'MRP_MATERIAL_PARALLEL' KEEPING TASK IMPORTING TINDX = RECV-INDEX RTIME = RECV-RTIME ISTATS = RECV-STATN STOPX = H_STOPX "HW 155335 TABLES CM61D_TAB = RECV-CM61DX TPLANTX = PLANTX PERF_TAB = RECV-PERFY NREAD_TAB = NREAD EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE RECV-MSGTX COMMUNICATION_FAILURE = 2 MESSAGE RECV-MSGTX.

MRP MANUAL
ENDIF.

Parallel Planning Run

Second Planning Attempt: In FORM routine DISPATCHER, Include MM61XF40_DISPATCHER:


*--> Fehlerhaften Saetzen eine zweite Chance geben IF MRPSTOP IS INITIAL. PERFORM ERROR_TAB. ENDIF.

Planning a Material:
In function module: MRP_MATERIAL_PARALLEL: IF CM61X-PLSCN IS INITIAL. PERFORM BEARBEITEN_MATERIAL_BT USING USER_KEY USER_PAR CHANGING STOPX_FLAG. ELSE. PERFORM BEARBEITEN_MATERIAL_LFRPL USING USER_KEY USER_PAR CHANGING STOPX_FLAG. ENDIF.

Recursiveness Check in Planning Run with Planning Scope:


In Include LM61CF40 ...
FORM add_planreq_to_cm61dp_tab TABLES iplanreq STRUCTURE mdmm iplantx STRUCTURE plant iruncntx STRUCTURE runcntx ccm61dp_tab STRUCTURE cm61dp. DATA: cm61d_tabix TYPE i. CONSTANTS: rnmax TYPE i VALUE 4. "Max. Anzahl Planungslufe pro VM

... the system notes the number of planning runs performed for a material/plant/MRP area combination (of the same low-level code) in the current planning package, and writes this number to table IRUNCNTX. If more than 4 planning runs are performed for a material, the planning file entry in question is no longer included in the internal planning file entries, which means that the planning of this planning file key is terminated. Note: Please check if Note 314813 has been applied.

User Exit in Planning Run:


In the function module 'MRP_MATERIAL_PARALLEL':
-> Form BEARBEITEN_MATERIAL_BT USING USER_KEY USER_PAR CHANGING STOPX_FLAG.

MRP MANUAL

Parallel Planning Run

*--> User-Exit for exluding materials / stopping the planning run PERFORM USER_EXIT_001 USING UXKEY UXPAR CHANGING STOPX_FLAG CM61D-NOMRP. STOPX_FLAG: CM61D-NOMRP: Flag for terminating the planning run completely Flag for excluding a specific material from planning

Note:

Please check the customer system and make sure that the sequence correction regarding the blocking of a material and the user exit check have been applied as described in Note 179476. Other Notes dealing with user exits: 155335 and 156582.

Вам также может понравиться