LotNumberAssignByProcessType

Lot Number Assign By Process Type

Minor Business Rule

Object Name: B4100500

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description
Purpose

This function will assign the Lot Number as a system date in YMD format for lot processed lots.  If 
the lot process is a '1' or '2' lot number will be advanced by one.  The F41021 (Item Location) table 

will be retrieved for the primary record and fields will be defaulted from the primary record into the 

secondary record


Setup Notes and Prerequisites

None

Special Logic

None.

Technical Specifications

Processing 

*Set FIRST(This will need to be a global variable) to '0'

// Lot number assigned is system date in YMD format.

*If EV01 (Warning) equals '1', move LOTN to work field $$LOTN

*If LOTN equal blanks AND SRCE not equal '0' AND SRCE not equal blanks AND SRCE not equal '3',

If SRCE equals '2' 

OR SRCE equals '1' AND work field FIRST not equal '1'

Move blanks to work field $SLOTN

Move ITM to work field $SITM

Move MCU to work field $SMCU

Move LOCN to work field $SLOCN

Move SRCE to work field $SSRCE

Move TRDJ to parm for 
X41LOT
Call AssignLotNumber(X41LOT)
Move $SLOTN to LILOTN

Move left $SLOTN to $$LOTN

If SRCE equals '1'

Move '1' to FIRST

Move left $$LOTN to work field $HLOTN

else


// If the lot process type is a 1 or a 2 after the first lot assignment, advance the lot number by 

one.


Move blanks to $$LOTN
Move left $HLOTN(This will need to be a global variable)  to $WORK

Add 1 to $WORK 

Move 
left $WORK to $$LOTN
Do While Record Found

Call
 VerifyAndGetItemLocation(Xf41021) with Index = 5, 
Keys = 1

If found

Move left  $$LOTN to $WORK

Add 1 to $WORK

Move left  $WORK to $$LOTN

else

get out of Do While

EndDo

Move left $$LOTN to LILOTN

Move left $$LOTN to $HLOTN

else

Call 
VerifyAndGetItemLocation(XF41021) with Index = 1, Keys = 4.
If record is not found

If Item Location Warning ( Ev06) equals blanks

If From Side of Transfer (EV01) equals '0',

set error '0678' and highlight item 

numberMove '1' to Item Location 

Warning

else

set error '0294' and highlight 

item number.



^

Data Structure

D4100500 - Lot Number Assign By Process Type

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShort Item NumberIY

MCUBranch/PlantIY

LOCNLocationIN

LOTNLot NumberIN

SRCELot Process TypeIN

TRDJTransaction DateIY

EV01Item Location WarningIN

EV01Add F41021IN

EV01From Side of TransferIN


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

cLotProcessTypeSRCEcharNONENONE

A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108). Valid 
codes are:    0   Lot assignment is optional. You can manually assign numbers. Quantity can be greater than one. (Default)    1   Lot assignment is 
required. The system assigns numbers using the system date in YYMMDD format. Quantity can be greater than one.    2   Lot assignment is 
required. The system assigns numbers in ascending order using Next Numbers. Quantity can be greater than one.    3   Lot assignment is 
required. You must manually assign numbers. Quantity can be greater than one.    4   Serial number assignment is optional except during shipment 
confirmation. Quantity must not exceed one.    5   Serial number assignment is required. The system assigns numbers using the system date 
in YYMMDD format. Quantity must not exceed one.    6   Serial number assignment is required. The system assigns numbers in ascending 
order using Next Numbers. Quantity must not exceed one.    7   Serial number assignment is required. You must manually assign numbers. 
Quantity must not exceed one.

jdTransactionDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

Related Functions

B4000610 Get Lot Master By Lot Number
X41LOT Assign Lot Number
XF41021 Update F41021 Locations

Related Tables

None