AllocateByLocation

Allocate By Location

Major Business Rule

Object Name: B3100670

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) primary location and 

then the secondary locations. 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.

Call Verify and Get Item Location (XF41021.C) to check if the primary location exists for the Item 

Number (ITM) and Branch/Plant (MCU) parameters passed in (Index = '4', Keys = '3'). If the primary 

location does not exist then 

If the Commitment Control parameter is '2' and the Done With Primary Location flag is off then
Set on the Done With Primary Location flag.
If Open Quantity parameter is greater than zero set on the Cross Branch Boundaries parameter for 

B4000780 and go to the Init/Read B4000780 call. 

Else call B4000780 in Close mode and end the business function.
If the Read Another Record flag is on, the Done With Primary Location flag is on, and the Commitment 
Control parameter is '2' then set on the Cross Branch Boundaries parameter for B4000780.

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

(on first pass and once again if Cross Branch Boundaries parameter was set on). Otherwise call B4000780 

in Read mode.


Discontinue processing if a the F41021 record was not found.

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 

(WLUM) 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 then set the Update Parts List (UFLG) flag to 'Y. 
Otherwise, set the Update Parts List flag to blank.

Write the User Index record.


Zero out the Open Quantity parameter.
End the business function.

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

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.

If the Read Another Record flag is off then set the Update Parts List (UFLG) flag to 'Y'. 
Otherwise, set the Update Parts List flag to blank.

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 if...then statement before the B4000780 

call. Else, call B4000780 in Close mode and end the business function.

Else,

If the Commitment Control parameter is '2' and the Done With Primary Location flag is off then
Set on the Done With Primary Location flag.
If Open Quantity parameter is greater than zero set on the Cross Branch Boundaries parameter for 

B4000780 and go to the Init/Read B4000780 call. 

Else call B4000780 in Close mode and end the business function.

Data Structure

D3100670 - Allocate By Location

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.

cPotencyConversionEV01charNONENONE

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

cCommitmentControlFLD1charNONENONE

An option that determines how the system commits inventory to a work order, and specifies the inventory location to which commitments are 
made. Valid values are: 1 Primary Location 2 Split-Cross Branch Boundaries 3 Split-Don't Cross Branch Boundaries Note: The system 
activates this field only when you create hard commitments. The three available options are as follows:   o  Primary Location. Make commitments to 
the primary location in the branch/plant where the work order originates.   o  Split-Cross Branch Boundaries. Split the parts list and 
commitments to fill any component shortages. The system can cross branch boundaries to fill requirements. In this case, the system uses the next 
alphabetical branch/plant listed in the table that occurs after the branch/plant on the work order header. For example, for the branch/plants CAL, 
CHI, CLE, and HOU: If the system starts committing inventory at branch/plant CHI, it accesses CLE as the next branch/plant. If inventory is low in 
all locations, the system makes the remaining commitments to the primary location of the branch/plant on the work order header.   o  
Split-Don't Cross Branch Boundaries. This option is similar to Split-Cross Branch Boundaries, but the system cannot cross branch boundaries. Note: 
When you set the Commitment Method field in the Item Branch/Plant table to 2 or 3 (lot number or expiration date control), you must use the 
Split-Don't Cross Branch Boundaries option.

mnLastComponentLineNoLNIDMATH_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

szComputerIDCTIDcharNONENONE

mnJobNumberJOBSMATH_NUMERICNONENONE

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

cSuppressErrorMessagesEV01charNONENONE

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.

mnUniqueKeyIDUKIDMATH_NUMERICNONENONE

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

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.

szComponentItemNo2ndCPILcharNONENONE

The system provides three separate item numbers. They are:    1. Item Number (short) - An eight digit, computer assigned, completely 
non-significant 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. The system has an extensive cross-reference search capability (see XRT). You 
can define numerous cross references to alternate part numbers to accomodate substitute item numbers, replacements, bar codes, customer 
numbers, or supplier numbers.

szDescriptionLine1DSC1charNONENONE

Brief information about an item; a remark or an explanation.

szLineTypeLNTYcharNONENONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

szComponentThirdNumberCPIAcharNONENONE

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 eight digit, computer assigned, completely non-significant 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 (e.g. substitute item numbers, replacements, bar codes, 
customer numbers, or supplier numbers).

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.

mnPartsListComponentLineNoCPNBMATH_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
B4000520 Get Item UoM Conversion Factor
B4000780 Get Itm Loc By Commitment
XF41021 Update F41021 Locations

Related Tables

None