Serial/Lot Number Pre-Assign

Serial/Lot Pre-Assign

This module (SLNPA) will automatically generate pre-assigned serial/lot numbers for manufactured items.  When using Sales Configurator this is especially helpful because the MO is generated in the background and the user does not have the opportunity to make sure serial numbers are generated.

When manually creating Manufacturing Orders, SLNPA saves the step of opening the Manufacturing Serial Number Pre-Entry window and clicking Auto Generate.  While the MO Entry window provides a field to manually pre-enter a Lot Number, it does not provide the ability to auto-generate the Lot Number using the Lot Number Mask.  SLNPA can auto-populate the Lot Number field using the Item’s Lot Number Mask.

SLNPA also has the ability to auto-generate Serial or Lot Numbers using any sort of custom business logic you need.  For example, Lot Numbers could be created based on the MO Number.

 

Setup

Navigation: Tools >> Setup >> Manufacturing >> MFG PowerPack Setup

Mark the box next to “MODULE: Serial/Lot Number Pre-Assign”.

Restart Dynamics GP to enable this feature for all users.

 

Using Serial/Lot Number pre-assign

Enabling Serial/Lot Number Pre-Assign will cause the system to automatically create serial/lot numbers from Sales Configurator, and when Manufacturing Orders are created in Manufacturing Order Entry.

There is no user-interface.  A small progress window may be visible (shown below) while the serial/lot numbers are being created.

//willoware.com/wp-content/uploads/2017/02/SLNPA.png

 

Custom Business logic

Serial/Lot Numbers can be generated using a Serial/Lot Mask assigned to the Item, and/or through custom business logic.

When MFG PowerPack is installed, it creates an “empty” SQL Stored Procedure called:

wspPreAssignSerLot

The stored procedure can be modified to add code that generates Serial/Lot Numbers using any logic desired.

The “empty” stored procedure looks like this:

//willoware.com/wp-content/uploads/2017/02/SLNPA2.png

wspPreAssignSerLot is used to populate a SQL table called W4970PreSL.  This table has two columns:

  • MANUFACTUREORDER_I
  • SERLTNUM

Both are key fields, so the combination must be unique (i.e. the same Serial Number can only be entered once for an MO).

Since wspPreAssignSerLot by default does nothing, when SLNPA runs it calls the stored procedure, and no records are added to W4970PreSL.  SLNPA checks W4970PreSL to see if there are records for the MO, and if not, it proceeds to attempt to use the Item’s Serial/Lot Number Mask.

If a Serial/Lot Number Mask is not present, SLNPA stops without adding any serial/lot numbers to the MO.

A sample modification to wspPreAssignSerLot is shown below:

//willoware.com/wp-content/uploads/2017/02/SLNPA3.png

Note that the Serial Numbering section is unchanged.  The Lot Numbering section will assign the “MO Number” as the “Lot Number” for each MO.