.Functional Description
1.1Purpose
The purpose of this business function will be to determine the allocation preference information and
to maintain the allocation work file F40UI17. The preference retrieval information is contained in
files F40070, F40071, F40072, and F40073 (Preference Hierarchy). The preference details are held in
F40307.
1.2Setup Notes and Prerequisites
None
2.Technical Specifications
2.2Related Tables
Table Table Description
F40070Preference Master
F40071Customer Preference Groups
F40072Item Preference Groups
F40073Preference Hierarchy
F40307Allocation Preferences
F40UI17Allocation Error Work File
F42UI11SO Detail Work File
2.3Related Business Functions
Source NameFunction Name
B4000520Get Item UOM Conversion Factors
B4100210Get Item Master Description UOM
B4001040Check Item Branch
2.4Processing
Initialization Function:
Retrieve the following processing option values for R40400 using the Version ID (VERS) value.
cPaymentTerms
cUnitOfMeasure
cRevenueCostCenter
cEndUse
cGradeAndPotency
cDeliveryDate
cAllocation
cLineOfBusiness
cPriceCode1
cPriceCode2
cPriceCode3
// Set up variables from parameters.
set Difference-wf = Original Quantity (UORG-parm) (Ship Quantity (SOQS-parm) + Backorder Quantity
(SOBK-parm))
If MODE-parm = '3' or if MODE-parm = '2' and Difference-wf <> 0
Preference Type<='07'
Customer Number<=AN8-parm
Item Numbernot used
Customer Group=>Sold To Group-wf
Item Groupnot used
Suppress Error<=' '
Error Code
Get the ship to customer group by calling Get/Update Customer/Item Group (B4002140)
Preference Type<='07'
Customer Number<=SHAN-parm
Item Numbernot used
Customer Group=>Ship To Group-wf
Item Groupnot used
Suppress Error<=' '
Error Code
Preference Type<='07'
Customer Number<=PA8-parm
Item Numbernot used
Customer Group=>Parent Group-wf
Item Groupnot used
Suppress Error<=' '
Error Code
Get the item group by calling Get/Update Customer/Item Group (B4002140)
Preference Type<='07'
Customer Numbernot used
Item Number<=ITM-parm
Customer Group
Item Group=>Item Group-wf
Suppress Error<=' '
Error Code
Enable Effective Dates=>Effective Dates-wf
Enable Effective Quantities=>Effective Quantities-wf
Preference Classnot used
Sequence Numbernot used
Load the following values to an array:
Key List Value (corresponds to hierarchy):
2=Ship to customer & Item group
3=Ship to customer
4=Ship to group & Item number
5=Ship to group & Item group
6=Ship to group
7=Sold to customer & Item number
8=Sold to customer & Item group
9=Sold to customer
10=Sold to group & Item number
11=Sold to group & Item group
12=Sold to group
13=Parent customer & Item number
14=Parent customer & Item group
15=Parent customer
16=Parent group & Item number
17=Parent group & Item group
18=Parent group
19=Item number
20=Item group
21=All
End of Initialization Function
Main portion of Business Function:
// If updating allocation table, do the update and exit routine
If MODE-parm = '2'
Get Preference Profile row (F40307) using key values from F40UI17
set Order Quantity (UORG-parm) = Ship Quantity (SOQS-parm) + Backorder Quantity (SOBK-parm)
Sales Order UOM.
Multiply the Order Quantity (UORG parm) by the ConversionFactorFrom_To_to.
Add Order Quantity (UORG-parm) to Preference Quantity Sold (LAQSLD)
Update Preference table (F40307)
If Difference-wf = 0
set Order Quantity (UORG-parm) = Original Quantity (UORG-parm)
Clear the F40UI17 work file records for the order using CTID-parm and JOBS-parm
// process Product Allocation Preference '07'
if MODE-parm <> '3' and cProductAllocation ='1'
Do function EditCycle
endif
Return to calling program
End of main portion of business function
EditCycle Function:
parameters :
preference type (numeric)
Main loop (21 times)
Retrieve the Hierarchy Order array.
Set Invalid Record Flag = ' '
// Load the key values for retrieval of the preference
select
hierarchy = '01'
Key Value AN8 = SHAN-parm
Key Value ITM = ITM-parm
hierarchy = '02'
Key Value AN8 = SHAN-parm
Key Value ITTP = Item Group-wf
If Key Value ITTP = ' '
Set Invalid Record Flag-wf = '1' (invalid key)
endif
hierarchy = '03'
Key Value AN8 = SHAN-parm
hierarchy = '04'
Key Value CSTP = Ship To Group-wf
Key Value ITM = ITM-parm
If Key Value CSTP = ' '
hierarchy = '05'
Key Value CSTP = Ship To Group-wf
Key Value ITTP = Item Group Array-wf
If Key Value CSTP = ' ' or Key Value ITTP = ' '
hierarchy = '06'
Key Value CSTP = Ship To Group-wf
If Key Value CSTP = ' '
hierarchy = '07'
Key Value AN8 = AN8-parm
Key Value ITM = ITM-parm
hierarchy = '08'
Key Value AN8 = AN8-parm
Key Value ITTP = Item Group-wf
If Key Value ITTP = ' '
hierarchy = '09'
Key Value AN8 = AN8-parm
hierarchy = '10'
Key Value CSTP = Sold to Group-wf
Key Value ITM = ITM-parm
If Key Value CSTP = ' '
hierarchy = '11'
Key Value CSTP = Sold to Group-wf
Key Value ITTP = Item Group Array-wf
If Key Value CSTP = ' ' or Key Value ITTP = ' '
hierarchy = '12'
Key Value CSTP = Sold To Group-wf
If Key Value CSTP = ' '
hierarchy = '13'
Key Value AN8 = PA8-parm
Key Value ITM = ITM-parm
If Key Value AN8 = 0
hierarchy = '14'
Key Value AN8 = PA8-parm
Key Value ITTP = Item Group-wf
If Key Value ITTP = ' ' or Key Value AN8 = 0
hierarchy = '15'
Key Value AN8 = PA8-parm
If Key Value AN8 = 0
hierarchy = '16'
Key Value CSTP = Parent Group-wf
Key Value ITM = ITM-parm
If Key Value CSTP = ' '
hierarchy = '17'
Key Value CSTP = Parent Group-wf
Key Value ITTP = Item Group-wf
If Key Value CSTP = ' ' or Key Value ITTP = ' '
hierarchy = '18'
Key Value CSTP = Parent Group-wf
If Key Value CSTP = ' '
hierarchy = '19'
Key Value ITM = ITM-parm
hierarchy = '20'
Key Value ITTP = Item Group-wf
If Key Value ITTP = ' '
hierarchy = '21'
no logic here.
end select
Set Key Value Expire Date-wf = Sales Order Request Date (DRQJ-parm)
Set Work Date-wf = Sales Order Request Date (DRQJ-parm)
Set Key Value Unit of Measure-wf = Sales Order Unit of Measure (UOM-parm)
Set Key Value Maximum Quantity-wf = Sales Order Order Quantity (UORG-parm)
select
Enable Effective Date (PFENED) = 'Y' and Enable Effective Quantity (PFENQT) = 'Y'
Set Key List = Customer Number, Customer Group, Item Number, Item Group, Expiration Date, Unit of
Measure and Maximum Quantity
Set Key List = Customer Number, Customer Group, Item Number and Item Group
Set All Keys Flag-wf = '1'
// Retrieve Preference Records
If Invalid Record Flag-wf <> '1'
Expiration Date (LAEXDJ) and Order Quantity (UORG-parm) >= Minimum Quantity (LAMNQ) and Order
Quantity (UORG-parm <= Maximum Quantity (LAMXQ) and Unit of Measure (UOM-parm) = Unit of
Measure (LAUOM)
<= Expiration Date (LAEXDJ)
If All Keys Flag-wf = '0' do not check for dates or quantities
If a row is
D4002300 - PreferenceAllocation
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnSalesOrderNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szOrderType | DCTO | char | NONE | NONE |
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
| ||||
szOrderCompany | KCOO | char | NONE | NONE |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
mnLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
szComputerID | CTID | char | NONE | NONE |
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
mnWorkFileLineNo | XLIN | MATH_NUMERIC | NONE | NONE |
Line number. | ||||
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
| ||||
mnAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnShipToAddressNo | SHAN | MATH_NUMERIC | NONE | NONE |
The address number of the location to which you want to ship this order. The address book provides default values for customer address,
| ||||
mnParentAddressNo | PA8 | MATH_NUMERIC | NONE | NONE |
The address book number of the parent company. The system uses this number to associate a particular address with a parent company
| ||||
jdDateRequested | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
mnOrderQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
mnShipQuantity | SOQS | MATH_NUMERIC | NONE | NONE |
The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this
| ||||
mnBackorderQuantity | SOBK | MATH_NUMERIC | NONE | NONE |
The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of
| ||||
szUnitOfMeasure | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
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
| ||||
szHeaderBranchPlant | EMCU | char | NONE | NONE |
A business unit is an accounting entity required for management reporting. It can be a profit center, department, warehouse location, job,
| ||||
mnOriginalQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
cProcessingMode | MODE | char | NONE | NONE |
The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed. | ||||
szVersionID | VERS | char | NONE | NONE |
A user-defined set of specifications that control how applications and reports run. You use versions to group and save a set of user-defined
| ||||
cPrefProductAlloc | SO10 | char | NONE | NONE |
Flag to indicate the sales order detail line was allocated through the product allocation preference. | ||||
cPrefMethodOfAlloc | ALOC | char | NONE | NONE |
A code that specifies how the system creates allocation journal entries or updates. Valid values are:
B
Balance Method. Create journal
| ||||
szCustomerGroup | CS07 | char | NONE | NONE |
A user defined code (40/07) that identifies a group to which you can assign customers for the Product Allocations preference. Assign
| ||||
szItemGroup | IT07 | char | NONE | NONE |
User defined code (system 40, type 57) identifying a group to which you can assign items for the Product Allocations preference. Do this
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szAllocationUOM | UOM1 | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA
| ||||
cCMUseWorkFiles | EV22 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
B4000520 Get Item UoM Conversion Factor | ||||
B4001040 Get Item Master Description UOM | ||||
B4002060 Preference Get Values For Sales Order | ||||
B4002140 F40071/F40072 Get/Update Cust/Item Group | ||||
B4100210 Check Item Branch |
F40070 Preference Master File | ||||
F40071 Customer Preference Groups | ||||
F40072 Item Preference Groups | ||||
F40073 Preference Hierarchy File | ||||
F40307 Preference Profile - Product Allocations | ||||
F40339 Preference Profile - Product Allocations (Branch) | ||||
F40UI17 Allocation Work File | ||||
F42UI11 SO Detail Cache File (MBF) |