Functional Description
Purpose
This function will load the lot expiration date if zero from the shelf life days. It will also
default the lot description, grade, potency, and supplier lot number from the Lot Master (F4108) if blank
Setup Notes and Prerequisites
None
Special Logic
None
Technical Specifications
Related Tables
Table Table Description
F4108Lot Master
2.3Related Business Functions
Source NameFunction Name
GetLotMasterByLotNumberB4000610
ConvertDateToJulianB9800210
ConvertJulianToDateB9800210
VerifyAndGetItemLocationXF41021
2.4Processing
If Default From Lot Number is '1', '2'
Branch/Plant (MCU)<=Branch/Plant
Lot Number (LOTN)<=Lot Number
Return Record<='1'
GENLNG=>Lot Master Record
If Record is not Found
If Suppress Error Message is not '1'
Issue an Error '3559'
Else
Call VerifyAndGetItemLocation (XF41021)
Short Item Number<=Short Item Number
Branch/Plant<=Branch/Plant
LocationO
Lot Number=>Primary Location Lot
Return Record<='0'
Suppress Error Msg<='1'
Index<='4'
Keys<='3'
End
End
End
If ( Record is not in F4108 AND Primary Location Lot is not blank )
Branch/Plant (MCU)<=Branch/Plant
Lot Number (LOTN)<=Primary Location Lot
Return Record<='1'
GENLNG=>Lot Master Record
End
// Load the following fields if blanks from the GENLNG retrieved
If Lots is Blank
Move LOTS (From Lot Master) into Lot Status Code ( LOTS)
If Lot Description equals blanks
Move LDSC(From Lot Master) into Lot Description (LDSC)
If Lot Grade equals blanks
Move LOTG(From Lot Master) into Lot Grade (LOTG)
If Lot Potency equals blanks
Move LOTP(From Lot Master) into Lot Potency (LOTP)
If Supplier Lot Number equals blanks
Move RLOT(From Lot Master) into Supplier Lot Number (RLOT)
If Memo Lot Edit = '1' AND Memo Lot 1 passed in is Blanks
Memo Lot 1 passed in = F4108::LOT1
Else
If F4108::LOT1 is not blank
Memo Lot 1 passed in = F4108::LOT1
End
End
If Memo Lot Edit = '1' AND Memo Lot 2 passed in is Blanks
Memo Lot 2 passed in = F4108::LOT2
Else
If F4108::LOT2 is not blank
Memo Lot 2 passed in = F4108::LOT2
End
End
If Memo Lot Edit = '1' AND Memo Lot 3 passed in is Blanks
Memo Lot 3 passed in = F4108::LOT3
Else
If F4108::LOT3 is not blank
Memo Lot 3 passed in = F4108::LOT3
End
End
If Expiration Date Edit Mode = '1' AND Expiration Date passed in is Blanks
Expiration Date passed in = F4108::MMEJ
Else
If F4108::MMEJ is not blank
Expiration Date passed in = F4108::MMEJ
End
End
// This will calculate the lot expiration date based on the shelf life days from the Item Branch.
Will need to roll over into the correct year.
If Lot Expiration Date equals zeros AND Expiration Date Edit Mode equals '1'
AND Shelf Life Days (SLD) greater than zero
call ConvertDateToJulian(...) with TransactionDate as the parameter.
Add SLD to the returned Julian Date.
Call ConvertJulianToDate(..) with the added Julian Date as the
parameter.
Move Converted Date to Lot Expiration Date (in MMDDYYYY format)
// Issue an error if the lot expiration date equals zero and the shelf life days does not
If Lot Expiration Date equals zero
AND Shelf Life Days not equal zero
AND From Side of Transfer not equal '1'
Issue Error '0004
If Lot Expiration Edit Mode equals '1' and Lot Expiration Date equals zero
Issue Error '0004'
// Check to see if the Memo lot fields are required
If Memo Lot 1 (LOT1) equals blanks AND SRNR GE '4' AND SRNR LE '5'
NE '1' OR LOTN NE blanks
Set on Error '4773' and highlight the LOT1 field
end
If Memo Lot 2 (LOT2) equals blanks AND SRNR EQ '5'
NE '1' OR LOTN NE blanks
Set on Error '4773' and highlight the LOT2 field
end
^
D4100540 - Load Lot Expiration Date And Defaults
Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShortItemNumberIY
MCUBranchPlantIY
LOTNLotNumberIY
LOTGLotGradeI/ON
LOTPLotPotencyI/ON
LDSCLotDescriptionI/ON
LOTSLotStatusCodeON
MMEJExpirationDateI/ON
RLOTSupplierLotNumberI/ON
SLDShelfLifeDaysIN
EV01FromSideOfTransferIN
TRDJTransactionDateIN
EV02DefaultFromLotMasterIN
EV01SuppressErrorMsgIN
SRCELotProcessTypeIN
SRNRSerialNumberRequiredIN
LOT1MemoLot1IN
LOT2MemoLot2IN
LOT3MemoLot3IN
EV03ExpirationDateEditModeIN
EV05MemoLotEditModeIN
LOTNPrimaryLocationLotIN
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szBranchPlant | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szLotNumber | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
szLotGrade | LOTG | char | NONE | NONE |
A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:
A1 Premium
| ||||
mnLotPotency | LOTP | MATH_NUMERIC | NONE | NONE |
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol
| ||||
szLotDescription | LDSC | char | NONE | NONE |
A brief description of a specific lot. | ||||
cLotStatusCode | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
jdExpirationDate | MMEJ | JDEDATE | NONE | NONE |
The date on which a lot of items expires.
The system automatically enters this date if you have specified the shelf life days for the item on
| ||||
szSupplierLotNumber | RLOT | char | NONE | NONE |
The supplier's lot number for the item. | ||||
mnShelfLifeDays | SLD | MATH_NUMERIC | NONE | NONE |
The number of days that an item can remain in inventory before it expires. The system adds this number to the date that the item is received
| ||||
cFromSideOfTransfer | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
jdTransactionDate | TRDJ | JDEDATE | NONE | NONE |
The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing. | ||||
cDefaultFromLotMaster | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cSuppressErrorMsg | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cLotProcessType | SRCE | char | NONE | NONE |
A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108).
Valid
| ||||
cSerialNumberRequired | SRNR | char | NONE | NONE |
A code that specifies whether you must attach a serial number to this item at receipt or sale for basic serial number processing, or whether
| ||||
szMemoLot1 | LOT1 | char | NONE | NONE |
A higher classification or grouping of serial number or lot processed items,maintained within the Lot Master (F4108). | ||||
szMemoLot2 | LOT2 | char | NONE | NONE |
A higher classification or grouping of memo lot 1 maintained within the lot master (F4108). | ||||
szMemoLot3 | LOT3 | char | NONE | NONE |
A higher classification or grouping of memo lot 2 and memo lot 1 maintained within the lot master (F4108). | ||||
cExpirationDateEditMode | EV03 | char | NONE | NONE |
A radio button that specifies the level at which trace/track result is to be displayed. Select the Detail to display all transactions except IB, IX,
| ||||
cMemoLotEditMode | EV05 | char | NONE | NONE |
A flag that indicates whether automatic spell check is turned on. | ||||
szPrimaryLocationLot | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
cInventoryLotCreation | OT6Y | char | OPT | NONE |
A code that indicates whether the inventory transaction programs can create new lot or serial numbers in the system.
If you leave this option
| ||||
cErrorCode | ERRC | char | OPT | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
idF4102ItemBranchPtr | GENLNG | ID | OPT | NONE |
General purpose ID variable. | ||||
mnTransactionType | MATH01 | MATH_NUMERIC | OPT | INPUT |
- - - Good Performance Low Value. | ||||
jdBasedOnDate | BODJ | JDEDATE | OPT | BOTH |
The date that the system uses in conjunction with the shelf life days to calculate the lot expiration date. You can enter this date during
| ||||
jdOnHandDate | OHDJ | JDEDATE | OPT | BOTH |
The date when a lot is considered to be on hand in a branch/plant. The system determines the on-hand date by using the transaction date
| ||||
jdLotEffectivityDate | DLEJ | JDEDATE | OPT | BOTH |
The date on which a lot becomes available. The system uses this date for availability and commitment processing to indicate that the lot is
| ||||
jdSellByDate | SBDJ | JDEDATE | OPT | BOTH |
The date by which a lot should be completely sold. The system uses this date as a "through" date for commitment processing. The system
| ||||
jdBestBeforeDate | BBDJ | JDEDATE | OPT | BOTH |
The last date on which the products in a lot should be consumed. The system calculates the date by retrieving the value from the Best
| ||||
jdUserLotDate1 | U1DJ | JDEDATE | OPT | BOTH |
A date that the system can use as a through date for commitment processing. The system stores this date in the Lot Master table (F4108). If
| ||||
jdUserLotDate2 | U2DJ | JDEDATE | OPT | BOTH |
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to the Lot Expiration
| ||||
jdUserLotDate3 | U3DJ | JDEDATE | OPT | BOTH |
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date,
| ||||
jdUserLotDate4 | U4DJ | JDEDATE | OPT | BOTH |
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date,
| ||||
jdUserLotDate5 | U5DJ | JDEDATE | OPT | BOTH |
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date,
| ||||
cStockingType | STKT | char | OPT | NONE |
A user defined code (41/I) that indicates how you stock an item, for example, as finished goods or as raw materials. The following stocking
| ||||
mnSupplierNumber | VEND | MATH_NUMERIC | OPT | NONE |
The address book number of the preferred provider of this item. |
B4000610 Get Lot Master By Lot Number | ||||
B4100210 Check Item Branch | ||||
B9800210 Convert From and To Julian Date from JDEDATE | ||||
XF41021 Update F41021 Locations |
F4102 Item Branch File | ||||
F4108 Lot Master |