Archive

Archive for April 1st, 2007

The MRP Generation algorithm

April 1st, 2007 No comments

The MRP Generation algorithm
– SL6 and lower (Progress versions)
Regenerates the m-day calendar if it requires regeneration
If full regeneration being run:
Delete all requirement records for all items (mrp table)
Delete all transfer order receipts for all items (rcpts table, ref-type “T”)
If lasttran counter for PLNs is > 9000000:
Reset it to 1
Delete all planned orders for all items (rcpts table, ref-type “N”)
End
End

Reads through item master by low level code, by item:
If type is Other and net change is on, turn it off and skip to next item
Turn on the I/M net change flag for all current materials of the item
Get the following from item’s product code (if not ?) or planning parms:
Forecast look ahead and behind
Job reschedule tolerance factors
PO reschedule tolerance factors

Generate independent requirements:
Delete forecasts older than (today – forecast look behind)
Consume forecasts with customer orders
Create requirements for:
Outstanding forecasts
All unreserved COs
Transfer orders where
If “Whse Considered For” = Single
From Whse = default warehouse
If “Whse Considered For” = All
From Site is the current site
Project resources
End – Generate independent requirements

Create receipt records for transfer orders where:
If “Whse Considered For” = Single
To Whse = default warehouse
If “Whse Considered For” = All
To Site is the current site

Delete all of the item’s exception messages
Calculate beginning projected on hand (nettable on hand – qty reserved)
Generate applicable exceptions regarding beginning on hand:
On Hand below Safety Stock
Initial Qty. On Hand negative

If beginning on hand below safety stock and there are no past due requirements:
Look for first receipt for the item (job, PO, PS, transfer order, PO req)
Generate exception if appropriate:
Reschedule Receipt
Sched. Rcpt. past due
If no receipts or not enough to cover quantity below safety stock:
Create planned order (PLN) in temporary table
End

Read through all requirements for the item:
If requirement source is x-reffed, find x-reffed receipt (po, job, etc.)
If x-ref is valid, skip to next requirement
Generate error (then continue on) if:
Receipt is not cross referenced back
Receipt has a status of complete
End.
Generate exception if appropriate: Date outside shop calendar

If not an MPS item:
Generate exception if appropriate: Requirement past due
If requirement source is x-reffed, find x-reffed receipt then
Generate appropriate exception:
X-ref Rcpt: Resched
X-ref Rcpt: Qty
Sched. Rcpt. past due

If requirement is a forecast and “Use CO, Fcst or Both” is Forecast
Deduct full forecast amount from POH
Else deduct outstanding (i.e. not consumed by CO) amount from POH
Look for next receipt for item
If found, generate exception if appropriate:
Reschedule Receipt (if outside PO and job reschedule tolerance factors)
Sched. Rcpt. past due
If no more receipts or not enough to cover quantity below safety stock:
Create planned order (PLN) in temporary table
End – not an MPS item
End – read through all requirements

Read through all existing planned orders for the item (from the last MRP run)
Match them with temp table PLNs created in this MRP run
If old PLN and new PLN match up, set date and quantity to new record’s values
If old PLN exists and new record does not, it is no longer needed so it is deleted
If old PLN does not exist for new PLN, create a new real planned order
End

Read through all non-PLN receipts (jobs, PO, etc.)
Generate exception if appropriate: Sched. Rcpt. not needed

Pass all requirements to children:
Pass PLNs to current BOM, creating PPLN requirements
Pass job receipts to job BOM if exists or current BOM if not, creating PJOB requirements
Pass PS receipts to PS BOM if exists or current BOM if not, creating PPS requirements
Turning on each child’s net change flag
End

Turn off the item’s net change flag
Set the item’s Last Generation date

If the item’s Source is Transferred, it’s not an MPS item and its Supply Site is not blank
Set the flag that indicates planned transfer orders need passed for the item

End – read through item master

Turn off the behind-the-scenes flag that indicates a full regeneration must be done

If an error occurred (invalid cross reference detected):
Display “MRP Processor was not successful”
Else
Look for item master records with their net change flag enabled
If there are any (none should be) display:
“WARNING – Low Level codes improperly set”
“MRP Generation is not complete – re-run net change”
If not being run in the background:
Ask if the Item With Net Change Flag report should be run.
End. else
Display “MRP Processor was successful”
E
nd

If multi-site and “Post Planned TOs” = Auto:
If not being run in the background
Display “Put Planned TRN Requirements will be performed”
Read through all transferred items for which the pass planned transfers flag is enabled:
Pass all PLNs for the item to the item’s Supply Site as TPLN requirements
Set the net change flag for the item in the supply site
display success or failure message for “Put Planned TRN Requirements”
End

Delete all records from the material planner workbench that were created from PLNs

Categories: Application, Progress Tags: , ,