LotMasterCardexShell

Lot Master Cardex Shell

Major Business Rule

Object Name: B4100090

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function loads the appropriate fields to write an Inventory Cardex record (F4111) from the Lot 
Master and Lot Availability programs.


Setup Notes and Prerequisites

The pointer to the Item Master record (F4101) is a required input parameter.  If calling from Lot 

Master, pass '4108' in the Program Id parameter.  If calling from Lot Availability, pass '41280' in the 

Program Id parameter. 


Special Logic



Technical Specification


This function loads parameters into the Write Cardex Record (B4100040) business function.  The 

document number written is '4108' and the As of Posted code = 'X'.  The Lot Master Cardex field (LMCX) = 

'Y'.  You could possibly call the Write Cardex Record function three times.


If the lot status is not equal to the original lot status QuantityOnHand 

TransactionQuantity


If lot status is not equal to blank

And original lot status is equal to blank

OR lot status is not equal to blank

And original lot status is not equal to blanks

Multiply the Transaction Quantity by negative 1

end

If Program Id = '4108'

Explanation 'Lot Status Change' 

end

ReasonCode=Status Change Reason

DocumentType='IZ'


Call Write Cardex Record

end


If the grade is not equal to the original grade and Program Id = '4108'

TransactionQuantity = Quantity on Hand

Explanation         = 'Grade Change' 

Reason Code    = Grade Change Reason

DocumentType        = Grade Change Type 


Call WriteCardexRecord
end


If the potency is not equal to the original potency and Program Id = '4108'

TransactionQuantity = Quantity on Hand

Explanation         = 'Potency Change' 

Reason Code    = Potency Change Reason

DocumentType        = Potency Change Type 


Call WriteCardexRecord
end


^

Data Structure

D4100090 - Lot Master Cardex Shell

Parameters:
Data Item Data Structure DescriptionI/ORequired

ItemMasterRecordGENLNGIY

ShortIemNumberITMIY

SecondItemNumberLITMIN

ThirdItemNumberAITMIN

BranchPlantMCUIY

KeyCompanyKCOIN

LotNumberLOTNIN

G/LClassGLPTIN

OriginalLotStatusLOTSIY

OriginalGradeStatusLOTGIY

OriginalPotencyStatusLOTPIY

LotStatusLOTSIY

LotGradeLOTGIY

LotPotencyLOTPIY

QuantityOnHandPQOHIN

StatusChangeReasonSTRCDIN

GradeChangeReasonGRRCDIN

PotencyChangeReasonPTRCDIN

GradeChangeTypeDCTIN

PotencyChangeTypeDCTIN

LocationLOCNIN

ProgramIDDOCOIY

^

Parameter NameData ItemData TypeReq/OptI/O/Both
idItemMasterRecordGENLNGIDNONENONE

General purpose ID variable.

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

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

szThirdItemNumberAITMcharNONENONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned item number. 2.  2nd Item Number - The 25-digit, free-form, user 
defined alphanumeric item number. 3.  3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item number.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

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.

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.

szLotNumberLOTNcharNONENONE

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

szGLClassGLPTcharNONENONE

A user defined code (41/9) that identifies the G/L offset that system uses when it searches for the account to which it posts the transaction. If 
you do not want to specify a class code, you can enter **** (four asterisks) in this field. You can use automatic accounting instructions (AAIs) to 
predefine classes of automatic offset accounts for the Inventory Management, Procurement, and Sales Order Management systems. You 
might assign G/L class codes as follows:    IN20   Direct Ship Orders    IN60   Transfer Orders    IN80   Stock Sales  The system can generate 
accounting entries based upon a single transaction. For example, a single sale of a stock item can trigger the generation of accounting entries 
similar to the following:         Sales-Stock (Debit) xxxxx.xx     A/R Stock Sales (Credit) xxxxx.xx     Posting Category: IN80             Stock Inventory 
(Debit) xxxxx.xx     Stock COGS (Credit) xxxxx.xx The system uses the class code and the document type to find the AAI.

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).

mnQuantityOnHandPQOHMATH_NUMERICNONENONE

The number of units that are physically in stock. The system displays the quantity on-hand in the primary unit of measure.

cOriginalLotStatusLOTScharNONENONE

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.

szOriginalGradeStatusLOTGcharNONENONE

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).

mnOriginalPotencyStatusLOTPMATH_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).

szStatusChangeReasonSTRCDcharNONENONE

szGradeChangeReasonGRRCDcharNONENONE

szPotencyChangeReasonPTRCDcharNONENONE

szGradeChangeTypeDCTcharNONENONE

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 

szPotencyChangeTypeDCTcharNONENONE

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 

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

mnProgramIDDOCOMATH_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.

mnAddressNumberAN8MATH_NUMERICOPTNONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szVendorLotNumberRLOTcharOPTNONE

The supplier's lot number for the item.

Related Functions

B4100040 Write Cardex Record
B9800100 Get Audit Information

Related Tables

F4101 Item Master