Data Validation
MORI will only retrieve a record from the MOHdr table if the following are true. If any of the checks below are false MORI will not touch the record, no errors will be reported.
- The MO Number exists in WO010032 (unless you are doing single step integration)
- The Made Item exists in IV00101
- The Location Code in the MOHdr exists in IV40700 (The Location Code can be provided in MOHdr, or pull from the Scheduling Preference, or that is in WO010032 for the MO Number)
- The MOHdr Status is not zero
- “Receipt Date On/Before User Date” is marked on MO Selection Query and the date in MOHdr Date1 is on/before the GP “User Date”
- The MO is not locked in MOP10223
- The BOM is not locked in BMS10000
- If the MO is linked to a SOP Line, the Sales Transaction is not locked in tempdb DEX_LOCK.
The following validations will be performed on the records imported into the MORI tables:
MOHdr & MOSer Checks
- If the MO Number exists in GP, is it locked? If an MO Receipt will not process, check Manufacturing Order Security (Transactions >> Manufacturing >> Manufacturing Orders >> Security). Locked MOs are recorded in MOP10223. An MO Lock will prevent MORI from attempting to process the receipt, so no errors will be reported.
- If the MO is linked to a Sales Order, is the Sales Order locked? If an MO Receipt will not process, check the DEX_LOCKS table in the tempdb for a locked Sales Order. A SOP Transaction that is locked, and linked to an MO, will prevent MORI from attempting to process the receipt, so no errors will be reported.
- Both the Inventory and Financial Fiscal Periods are open for the current period.
- Inventory Setup allows Adjustment Overrides.
- MO Activity check. A failure at this check will report an error that the “MO has activity”.
- The MO Number must not exist in Dynamics GP, or, “Allow Receipts on Existing MOs” is marked and it passes the following tests:
- If posting partial receipts, there can be NO Manufacturing Component Entry Transactions (MOP1210)
- If posting a single receipt, Allocation/Reverse Allocation transactions are allowed (MOP1210 TRX_TYPE = 3 or 4)
- There are no posted receipts for the Source MO (MOP1100). Since partial receipts “split” the MO (i.e. MO123-001), the Source MO does not have the partial receipts because they occur on the split MO.
- If posting partial receipts, there can be NO financial activity recorded in WIP (MOP1002)
- If posting a single receipt, Outsourced POs and WIP Data Collection are allowed (MOP1002 WIPCOSTIN fields 4,5,6 and 7,8,9 are allowed to have value).
- The MO must be Released (WO010032 MANUFACTUREORDERST_I = 3)
- The Finished Good Item Number is not blank, and exists in Dynamics GP
- The Receipt Quantity is compatible with the Item’s Decimal Place Quantity. For example, if the item has zero decimals for the quantity and the receipt integration table has 1.25 for the receipt quantity.
- Valid Draw From and Post To Sites exist, and the Made Item is assigned to the Post To Site. See Using MORI: Sites for more information.
- The Item has an Item Engineering Record.
- The Item has a MFG BOM, and the BOM is not locked.
- The Item has a Primary Routing.
- If the Item is Serialized, the Quantity entered in MOHdr table matches the number of serial numbers provided. If only one serial is provided it can be in the MOHdr table, but if the receipt will produce multiple serials they must be in the MOSer table.
- If the Item is Serialized, the Serial Number(s) provided do not already exist in GP.
- If multi-bin is enabled, there must be a Default Material Receipts bin for the Post To site, or a Bin must be provided in MOHdrOpt.
MOHdrOpt Checks
A record does not need to be in this table for each record in MOHdr, but if one exists:
- If RoutingName is not blank, verify that the routing exists
- If BOMCat > 0, verify the BOM exists
- If SchedPref is not blank, verify it exists
- If BINNMBR is not blank, verify it exists and is valid for the Site. Site comes from the Default Scheduling Preference “Post To”, or the MOHdr “Location Code”, or the MOHdrOpt Scheduling Preference “Post To” (in that order).
MORouting Checks
- If MOHdr ImportRoute = 1, records exist in MORouting.
- If MOHdr ImportRoute = 1, MORouting contains only routing sequences which exist on the Item’s Primary Routing.
MOPick Checks
- If MOHdr ImportBOM = 1, records exist in MOPick.
- Components exist as valid Item Numbers in GP
- If there are serialized components, the quantity must be 1.
- Components have valid Units of Measure
- Components have valid Item-Site assignments
- Components have valid Item Types (they must be Sales Inventory)
- Components are not marked Inactive
- Components have quantities greater than zero, and the quantity is compatible with the Item’s Quantity Decimals.
- Components have a valid Valuation Method (see Manufacturing for more information about Valuation Methods in Bills of Material).
- Components have serial/lot number that exist in GP, and are available.
- If MOHdr ImportBOM = 0, the MFG BOM does NOT have any serial/lot controlled components.
If any of the above validations fail, the MO Creation process will stop for that record. The STATUS column in the MOHdr table will be set to 1. Successfully processed records will have STATUS = 2.
MORI will NOT delete any records from the Staging Tables. Periodically, you may wish to delete processed records (Status = 2) from the Staging Tables so the tables do not grow excessively large.
If the record is validated successfully, and a new MO needs to be created, the Manufacturing Order will be generated based on the following:
MO Number = MANUFACTUREORDER_I from MOHdr
MO Description = “MOGen – Receipt Integration”
MO Status = Released
Item Number = ITEMNMBR from MOHdr
BOM Cat = 1 (MFG), or the BOMCat provided in MOHdrOpt
BOMName = blank (or the BOMName provided in MOHdrOpt)
Routing Name = Item Number’s Primary Routing (or RoutingName from MOHdrOpt)
End Quantity = QTY from MOHdr
Start Quantity = QTY from MOHdr
Due Date = DATE1 from MOHdr
Draw Inventory From Site = The Default Scheduling Preferences “Default Site to Draw Inventory From” in the MO Sched Prefs setup window (or from the Draw From Site if a Scheduling Preference is provided in MOHdrOpt)
Post To Site = POSTTO from MOHdr (or from the Post To Site if a Scheduling Preference is provided in MOHdrOpt)
Scheduling Method = The Default Scheduling Preferences in the MO Sched Prefs setup window (or the Scheduling Preference provided in MOHdrOpt)
If the Item Number is Serialized or Lot Controlled, the Serial Number(s) or Lot Number provided in MOHdr (serial or lot), or on MOSer (serial numbers only) will be pre-assigned to the Manufacturing Order.
The MO Receipt Integration will then move to the next step which is to create the MO Routing. If the MOHdr column ImportRouting is set to 0, the Working Routing will be created normally by GP Manufacturing.
If the ImportRouting is set to 1, the Working Routing will be created normally by GP Manufacturing (using the Primary Routing, or Routing Name provided in MOHdrOpt), but it will then set the all the MO’s Routing Sequences Labor Time, Setup Time and Machine Time to zero. The MO’s Routing record will then be updated for each Manufacturing Order/Routing Sequence Combination based on the data populated in the MORouting table. Note that the Cycle Time will NOT be populated.
Setup Time = SETUPTIME_I from MORouting
Labor Time = LABORTIME_I from Routing
Machine Time = MACHINETIME_I from MORouting
If any Routing Sequences exist on the Routing, but are NOT entered in the MORouting table, they will remain at 0 and NOT be populated with any Setup Time, Labor Time or Machine Time.
Regardless of whether the default routing is used, or a routing is imported, the Auto-Backflush Labor and Auto-Backflush Machine options will always be set to TRUE.
The MO Receipt Integration will then move to the next step which is to create the MO Pick List. If the MOHdr ImportBOM is set to 0, the Picklist will be created normally by GP Manufacturing. The MFG BOM will be used (or the BOM specified in MOHdrOpt), and all components will be set to backflush. If serial or lot numbered components exist on the BOM, serial/lot numbers will be auto-selected. The Lot Number selection method set in Manufacturing Order Preference Defaults will be used.
If the ImportBOM is set to 1, the MO’s Pick List will be based on the data entered in the MOPick table:
MO Number = MANUFACTUREORDER_I from MOPick
Sequence = LNITMSEQ from MOPick
MO Status = Released
FG Item Number = ITEMNMBR from MOHdr
Component Item Number = ITEMNMBR from MOPick
Position = LNITMSEQ from MOPick
Routing Name = FG Item Number’s Primary Routing Name
Routing Sequence = FG Item Number’s Routing’s 1st Sequence
Quantity = QTY from MOPick
Backflush = Set to 1 (Set to Backflush)
Site ID = LOCNCODE from MOPick
Finally, the MO Receipt Integration will create and post an MO Receipt for the quantity specified in the MOHdr table, and close the MO.
The standard Dynamics GP Manufacturing Posting/Closing Reports will NOT print.