AllocateByLotNoOrExpDate

Allocate By Lot Number / Lot Expiration Date

Major Business Rule

Object Name: B3100680

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will attempt to commit inventory from the Item Location (F41021) file by Lot or using 
the Expiration Date parameter to locate unexpired lots. It will write/update commitment records to the 

Batch WO Commitments (F31UI001) User Index file for the inventory that it commits.


1.2Setup Notes and Prerequisites

None.


1.3Special Logic

None


2.Technical Specifications

2.4Processing 
Set off the Read Another Record flag.
Set off the Update flag.

Zero out the Primary Location Quantity Available workfield.

Call the Get Item Location By Commitment Method (B4000780.C) business function in Initialization mode 

(first pass only). Otherwise call B4000780 in Read mode. 


If there were no errors returned then 

If the Potency Conversion parameter is on then convert the Quantity Available returned by B4000780.C 
from the Item Master Primary Unit of Measure (IMUOM1) parameter to the Parts List Unit of Measure 

(UM) parameter using Get Item UOM Conversion Factor (B4000520.C). Save the original Quantity Available 

value.

If the Quantity Available is greater than or equal to the Open Quantity parameter then

Zero out the Batch WO Commitments User Index (F3100UI001) Quantity Ordered ($1UORG).
If the Potency Conversion parameter is on then load the User Index's Quantity Ordered with the 

Open Quantity parameter value. Else, convert the Open Quantity parameter from the Item Master Primary 

Unit of Measure to the Parts List Unit of Measure and load the result to the User Index's Quantity 

Ordered.

Zero out the User Index's Quantity On WO Hard Commit ($1QOWO).

If the Item Branch's Stocking Type (IBSTKT) is not 'B' then

If the Potency Conversion parameter is off then load the User Index's Quantity On WO Hard Commit 
with the Open Quantity parameter value. Else, convert the Open Quantity parameter from the Parts 

List Unit of Measure to the Item Master Primary Unit of Measure and load the result to the User 

Index's Quantity On WO Hard Commit.

If the Read Another Record flag is off, or the Primary Location Quantity Available is zero, or the 
Update flag is on then set the Update Parts List (UFLG) parameter to 'Y. Otherwise, set the Update 

Parts List parameter to blank.

Write the User Index record.


Zero out the Open Quantity parameter.
Call B4000780 in Close mode and end the business function.

Else, 
If the Quantity Available is less than or equal to zero then 
If Read Another Record flag is off then set on the Read Another Record flag and the Update flag. 
Go to the B4000780 call.

If the Item Location's Primary Location (LIPBIN) is a 'P' then save the Quantity Available to the 
Primary Location Quantity Availbale workfield.

Zero out the Batch WO Commitments User Index (F3100UI001) Quantity Ordered ($1UORG).

If the Potency Conversion parameter is on then load the User Index's Quantity Ordered with the 

Quantity Available value. Else, convert the Quantity Available from the Item Master Primary Unit of 

Measure to the Parts List Unit of Measure and load the result to the User Index's Quantity Ordered.

Zero out the User Index's Quantity On WO Hard Commit ($1QOWO).

If the Item Branch's Stocking Type (IBSTKT) is not 'B' then

If the Potency Conversion parameter is off then load the User Index's Quantity On WO Hard Commit 
with the Quantity Available value. Else, load original Quantity Available to the User Index's 

Quantity On WO Hard Commit.

Write the User Index record.

Subtract the Quantity Available from the Open Quantity and set on the Read Another Record flag.
If the Open Quantity is greater than zero then go to the Init/Read B4000780 call. Otherwise, call 

B4000780 in Close mode and end the business function. 

Else,

Call B4000780 in Close mode and end the business function.


^

Data Structure

D3100680 - Allocate By Lot Number / Lot Expiration Date

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

szBusinessUnitMCUcharNONENONE

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.

cAllocationModeEV01charNONENONE

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

cPotencyConversionEV02charNONENONE

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

szItemMasterPrimaryUOMUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szPartsListUOMUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

mnOpenQuantityQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

cItemBranchStockingTypeSTKTcharNONENONE

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 
types are hard-coded and you should not change them:    0   Phantom item    B Bulk floor stock    C Configured item    E Emergency/corrective 
maintenance    F Feature    K Kit parent item    N Nonstock  The first character of Description 2 in the user defined code table indicates if the item 
is purchased (P) or manufactured (M).

cLotProcessingSRCEcharNONENONE

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.

jdExpirationDateDATE01JDEDATENONENONE

Event point for JDE Date.

mnLastComponentLineNumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnPercentOfScrapSCRPMATH_NUMERICNONENONE

The percentage of unusable component material that is created during the manufacture of a particular parent item.  During DRP/MPS/MRP 
generation, the system increases gross requirements for the component item to compensate for the loss. Note: Shrink is the expected loss of 
parent items (and hence, components) due to the manufacturing process. Shrink and scrap are compounded to figure the total loss in the 
manufacture of a particular item. Accurate shrink and scrap factors can help to produce more accurate planning calculations. Enter percentages 
as whole numbers: 5 percent as 5.0

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.

cSuppressErrorMessagesEV01charNONENONE

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

szComputerIDCTIDcharNONENONE

mnUniqueKeyIDUKIDMATH_NUMERICNONENONE

This field is a unique number used to identify a record in a file.

mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

szStdUOMConversionFlagTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

cPartialsAllowedPRTAcharNONENONE

When you specify component and substitute items on the bill of material, this field indicates whether the total quantity is required to be 
available or if a partial quantity available is acceptable to commit. Example: 100 lb of item A is available:        150 lb of item A is needed. If 
substitutes are not used and Partials Allowed is set to Y for item A, then the 100 lb will be committed. If substitute processing is used, substitutes will 
be checked next, and Partials Allowed on the substitute record will be considered

cFixedOrVariableQtyFORQcharNONENONE

A code that indicates if the quantity per assembly for an item on the bill of material varies according to the quantity of the parent item 
produced or is fixed regardless of the parent quantity. This value also determines if the component quantity is a percent of the parent quantity. Valid 
values are:    F Fixed Quantity    V Variable Quantity (default)    %   Quantities are expressed as a percentage and must total 100%For 
fixed-quantity components, the Work Order and Material Requirements Planning systems do not extend the component's quantity per assembly 
value by the order quantity.

mnCacheJobnumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

mnCacheDocNumberDOCOMATH_NUMERICOPTNONE

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.

nCurrentRowNumberINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

nLastRowNumberINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

szProgramIDPIDcharOPTNONE

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.

mnComponentLineNoCPNBMATH_NUMERICOPTNONE

A number that specifies how the system displays the sequence of components on a single-level bill of material. This number initially 
indicates the sequence in which a component was added to the bill of material. You can modify this number to change the sequence in which the 
components appear.

cModeEV01charOPTNONE

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

szLocationLOCNcharOPTNONE

The storage location from which goods will be moved.

szOrderTypeDCTOcharOPTNONE

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

szLotGroupLOTGRPcharOPTNONE

Lot Group is the name of a user defined list of allowed non-blank lot status codes.  Entry of a Lot Group name in the Processing Option will 
allow this Application to process lots whose lot status code is defined within the specified Lot Group Name.  

Related Functions

B3101600 Cache Parts List
B3101940 Cache, F31172 processing
B4000460 Free Ptr To Data Structure
B4000520 Get Item UoM Conversion Factor
B4000780 Get Itm Loc By Commitment
XF41021 Update F41021 Locations

Related Tables

None