DeleteLotMaster

Lot Master Update

Minor Business Rule

Object Name: X4108

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function deletes the lot master row from the Lot Master table (F4108).

Setup Notes and Prerequisites

None


Special Logic

Delete the row in the F4108 with the keys passed in.


Technical Specification

This function checks the quantities in the Item Location table (F41021) for the Item, Branch and 
Location passed in.  If any quantity is not equal to zero, an error is returned.  If all quantities are 

zero, the Lot Master record is deleted.


Processing 

*Call CheckForZeroQuantity(...) with Index = 2 and Keys = 3 for all ITM, MCU, and 
LOTN:

If ZeroQuantityFlag = '0'; set an error to "2309" 

If ZeroQuantityFlag = '1'; 

Delete the F4108 record with the LOTN, ITM, MCU passed in

 


^

Data Structure

DX4108B - Delete Lot Master

Parameters:
Data Item Data Structure DescriptionI/ORequired

ITMItem NumberIY

MCUBranch/PlantIY

LOTNLot NumberIY

EV01Suppress Error MessageIN

DTAIError Message IDON


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

Parameters:
Data Item  ab Data Structure  Descriptionab  I/Oab  Requiredab 

ITMab  ab Item  Numberab  ab  ab  ab  Iab  Yab 

MCUab  ab  Branch/Plantab  ab  ab  Iab  Yab 

LOTNab  ab Lot  Numberab  ab  ab  ab  Iab  Yab 

EV01ab  ab Suppress Error  Messageab  ab  Iab  Nab 

DTAIab  ab Error Message  IDab  ab  ab  Oab  Nab 


^

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.

szLotNumberLOTNcharNONENONE

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

cSuppressErrorMessageEV01charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

Related Functions

B4100110 Check For Zero Quantity
B9800100 Get Audit Information
X0005 Get User Defined Codes

Related Tables

F4108 Lot Master
LotMasterUpdate

LotMasterUpdate

Lot Master Update

Minor Business Rule

Object Name: X4108

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function updates/writes records to the Lot Master table (F4108).


Setup Notes and Prerequisites

The Item Number (ITM), Branch (MCU) and Lot (LOTN) are required input parameters.  If performing an 

add, the Second Item Number (LITM) and Third Item Number (AITM) are also required.


Special Logic

Base on Document Type passed in, retrieve UDC description and determine which 
User Define Quantities   and Date to move add transaction quantity and date to 

respectively.


Technical Specification

This function retrieves the F4108 for the keys passed in.  If the record does not exist, the 

parameters are loaded add a record to the Lot Master table.  The Transaction Date and Transaction Quantity 

will be updated in UA01-UA06 and UB01-UB06 respectively.  If MODE equals '1' or '3' and UA01 is not NULL, 

today's date will be loaded into UA01.  If the MODE equals '1', '3', or 'S', and the Lot Status 

passed in is not blank, then the Lot Status (LOTS) will be loaded with the Lot Status passed in.  


The User Defined quantities use UDC 40/LQ to determine which quantity to update.  The User Defined 

dates use UDC 40/LD to determine which date to update.


Related Tables 

Table Table Description

F4108Lot Master



Related Business Functions

Source NameFunction Name

GetUDCX0005

GetAuditInfoB9800100


Processing 

1.Fetch F4108 with LOTN, ITM, and MCU. 
2.If the record does not exist then Load the following:

ITM=  Short Item Number
MCU= Branch/Plant

LOTN= Lot Number

LDSC= Lot Description

LITM= Second Item Number

AITM= Third Item Number

DOCO= Order Number

DCTO= Order Type

VEND= Supplier Number

RLOT= Supplier Lot Number

UA01-06= 0 

UB01-06= 0

LOT1= Memo Lot 1

LOT2= Memo Lot 2

LOT3= Memo Lot 3


3.Determine User Defined Quantity:  UB01-06: For All Transaction Quantities and associated 
Document

   types.


Call Get UDC with System = 40; Record Type Code = LQ; and User Defined Code = Document Type.

Do the following if  UDC Description equals:

UDC Description = 1 :   UB01 = Transaction Quantity

UDC Description = 2 :   UB02 = Transaction Quantity

UDC Description = 3 :   UB03 = Transaction Quantity

UDC Description = 4 :   UB04 = Transaction Quantity

UDC Description = 5 :   UB05 = Transaction Quantity

UDC Description = 6 :   UB06 = Transaction Quantity

4.Determine User Defined Date:  UA01-06:  For All Document Types
Call Get UDC with System = 40; Record Type Code = LD; and User Defined Code = Document Type.

Do the following if  UDC Description equals  and Transaction Date is not NULL:

UDC Description = 1 :   UA01 = Transaction Date

UDC Description = 2 :   UA02 = Transaction Date

UDC Description = 3 :   UA03 = Transaction Date

UDC Description = 4 :   UA04 = Transaction Date

UDC Description = 5 :   UA05 = Transaction Date

UDC Description = 6 :   UA06 = Transaction Date


5.Call Get Audit Info to retrieve the audit information and today's date.
6.If Mode equals 1, 3 and UA01 is NULL, move today's date into UA01.

7.If the Expiration Date passed is not NULL, Load MMEJ with Expiration Date passed in.

8.If Mode equals 1, 3, 2, or S, AND Lot Status passed in is not Blank, load LOTS with Lot Status 

passed in.

9.If Lot Grade passed in is not Blank, load LOTG with Lot Grade passed in.

10.If Lot Potency passed in is not zero, load LOTP with Lot Potency passed in.

11.Insert (Write) the record if the record does not exist in F4108   or Update the record if exists.


Data Structure

DX4108A - Lot Master Update

Parameters:
Data Item Data Structure DescriptionI/ORequired

ITMItem NumberIY

MCUBranch/PlantIY

LOTNLot NumberIY

LDSCLot DescriptionIN

LITMSecond Item NumberIY

AITMThird Item NumberIY

VENDSupplier NumberIN

KCOKey CompanyIN

DOCOOrder NumberIN

DCTOOrder TypeIN

RLOTSupplier Lot NumberIN

TRQTTransaction QuantityIN

MODEMODEIN

DCTDocument TypeIY

MMEJExpiration DateIN

TRDJTransaction DateIN

LOTSLot StatusIN

LOTGLot GradeIN

LOTPLot PotencyIN

PIDProgram IDIY

EV01Add New Record FlagIN

LOT1Memo Lot 1IN

LOT2Memo Lot 2IN

LOT3Memo Lot 3IN

TRQTTransaction Qty 2IN

DCTDocument Type 2IN

TRQTTransaction Qty 3IN

DCTDocument Type 3IN

TRQTTransaction Qty 4IN

DCTDocument Type 4IN

TRQTTransaction Qty 5IN

DCTDocument Type 5IN

TRQTTransaction Qty 6IN

DCTDocument Type 6IN


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szLotNumberLOTNcharNONENONE

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

szLotDescriptionLDSCcharNONENONE

A brief description of a specific lot.

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

szSecondItemNumberLITMcharNONENONE

Require on Add only
^

szThirdItemNumberAITMcharNONENONE

Require on Add only
^

mnSupplierNumberVENDMATH_NUMERICNONENONE

The address book number of the preferred provider of this item.

szKeyCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szSupplierLotNumberRLOTcharNONENONE

The supplier's lot number for the item.

mnTransactionQuantityTRQTMATH_NUMERICNONENONE

Based on DCT, Trasaction Quantity will be added to UB01 - UB06.
^

cModeMODEcharNONENONE

MODE 1 & 3 :  Update UA01 with today's date if UA01 is NULL.
MODE 1, 3, 2 & S :  Update LOTS if Lot Status passed in is not blank

^

szDocumentTypeDCTcharNONENONE

Retrieve UDC Description based on DCT passed in.
^

szBranchMCUcharNONENONE

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.

jdExpirationDateMMEJJDEDATENONENONE

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 
Item Master Information or Item Branch/Plant Information. The system calculates the expiration date by adding the number of shelf life days to 
the date that you receive the item. You can commit inventory based on the lot expiration date for items. You choose how the system commits 
inventory for an item on Item Master Information or Item Branch/Plant Information.

jdTransactionDateTRDJJDEDATENONENONE

Based on DCT, Trasaction Date will be moved to UA01 - UA06.
^

cLotStatusLOTScharNONENONE

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 
indicate that the lot is on hold. You can assign a different status code to each location in which a lot resides on Item/Location Information or 
Location Lot Status Change.

szLotGradeLOTGcharNONENONE

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 
grade    A2   Secondary grade  The grade for a lot is stored in the Lot Master table (F4108).

mnLotPotencyLOTPMATH_NUMERICNONENONE

A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
in a solution). The actual potency of a lot is defined in the Lot Master table (F4108).

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cAddNewRecordFlagEV01charNONENONE

'1' = Add new record without fetch the record first to verify its existence
^

mnTransactionQty2TRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szDocumentType2DCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

mnTransactionQty3TRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szDocumentType3DCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

mnTransactionQty4TRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szDocumentType4DCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

mnTransactionQty5TRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szDocumentType5DCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

mnTransactionQty6TRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szDocumentType6DCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szMemoLot1LOT1charNONENONE

A higher classification or grouping of serial number or lot processed items,maintained within the Lot Master (F4108).

szMemoLot2LOT2charNONENONE

A higher classification or grouping of memo lot 1 maintained within the lot master (F4108).

szMemoLot3LOT3charNONENONE

Currently not used
^

jdBasedOnDateBODJJDEDATEOPTNONE

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 
inventory completions. In addition to calculating the lot expiration date, the system uses the date that you enter in this field to calculate the following 
lot dates:   o Sell By Date   o Best Before Date   o Lot Effectivity Date   o User Lot Date 1   o User Lot Date 2   o User Lot Date 3   o User Lot Date 
4   o User Lot Date 5

jdOnHandDateOHDJJDEDATEOPTNONE

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 
upon which the first inventory for a particular lot is determined to be on hand. The system automatically assigns this date to the Lot Master 
table (F4108).

jdLotEffectivityDateDLEJJDEDATEOPTNONE

The date on which a lot becomes available. The system uses this date for availability and commitment processing to indicate that the lot is 
available on or after the date that you specify. You must complete this field when inventory first becomes an on-hand quantity for the lot. If you 
leave this field blank, the system calculates the effective date of the lot by using the value for Effective Days in the Item Branch File table 
(F4102) or the current date if the value for Effective Days is zero.

jdSellByDateSBDJJDEDATEOPTNONE

The date by which a lot should be completely sold. The system uses this date as a "through" date for commitment processing. The system 
calculates the sell by date using the value in the Sell By Days field, which is contained in the Item Branch File table (F4102), when inventory 
becomes available on-hand.

jdBestBeforeDateBBDJJDEDATEOPTNONE

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 
Before Days field in the Item Master program (P4101). You can also use this date as a "through" date for commitment processing. You can 
commit a lot by this date by using the Commitment Date Method field in the Item Branch program (P41026).

jdUserLotDate1U1DJJDEDATEOPTNONE

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 
you leave this field blank, the system can calculate the date by using the value for the User Lot Date 1 Default Days field, which is stored in 
the Item Branch File table (F4102).

jdUserLotDate2U2DJJDEDATEOPTNONE

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 
Date, User Lot Date 2 is a through date for commitment processing. The User Lot Date 2 commitment option is available in the Commitment 
Date Method in the Item Branch table (F4102). The system uses the User Lot Date 2 Default Days from the Item Branch table (F4102) to 
calculate User Lot Date 2 when inventory first goes on hand.

jdUserLotDate3U3DJJDEDATEOPTNONE

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, 
User Lot Date 3 is a through date for commitment processing. The User Lot Date commitment option is available in the Commitment Date 
Method in the Item Branch table (F4102). The system uses the User Lot Date 3 Default Days from the Item Branch table (F4102) to calculate User 
Lot Date 3 when inventory first goes on hand.   

jdUserLotDate4U4DJJDEDATEOPTNONE

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, 
User Lot Date 4 is a through date for commitment processing.   The User Lot Date commitment option is available in the Commitment Date 
Method in the Item Branch table (F4102). The system uses the User Lot Date 4 Default Days from the Item Branch table (F4102) to calculate 
User Lot Date 4 when inventory first goes on hand.

jdUserLotDate5U5DJJDEDATEOPTNONE

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, 
User Lot Date 5 is a through date for commitment processing.   The User Lot Date 5 commitment option is available in the Commitment Date 
Method in the Item Branch table (F4102). The system uses the User Lot Date 5 Default Days from the Item Branch table (F4102) to calculate 
User Lot Date 5 when inventory first goes on hand.

mnCostWorkOrderNumberDOC1MATH_NUMERICOPTNONE

The document number associated with a given document type.

cLotReusableFlagLOTRcharOPTNONE

A code that specifies whether a lot is reusable. Valid values are: 0 Not reusable 1 Reusable

Related Functions

B4100110 Check For Zero Quantity
B9800100 Get Audit Information
X0005 Get User Defined Codes

Related Tables

F4108 Lot Master