F43092GetReceiptRoutingPreproces

F43092 Get Receipt Routing Preprocessor

Minor Business Rule

Object Name: N4300400

Parent DLL: CDIST

Location: Client/Server

Language: NER

Functional Description

Purpose

This Named ER will try to match a record entered to an existing receipt routing batch record using a 
the following.


F43092

1.Order Number, Order Type, Order Company, Order Suffix, Line Number, Number of Lines, 
Operation Code From

2.Order Number, Line Number, Number of Lines, Branch/Plant, Operation Code From


F43092 Join

3.Order Number, Branch/Plant, Lot Number, Item Number, Operation Code From, Quantity at 
Operation 'b9 0

4.Order Number, Branch/Plant, Item Number, Operation Code From, Quantity at Operation 'b9 0

5.Branch/Plant, Address Number, Container ID, Item Number, Operation Code From, Quantity at 

Operation 'b9 0.

6.Branch/Plant, Address Number, Item Number, Operation Code From, Quantity at Operation 'b9 0


Skip record if the Move Quantity is greater than Quantity at Operation.


Setup Notes and Prerequisites
It is assumed that the business functions to convert the customer/supplier item number to a J.D. 
Edwards item number have been called prior to calling this NER.


Six sets of input parameters for correct searches are valid.  One of the sets is required for the 

NER to perform a search:


1.Order Number, Order Type, Order Company, Order Suffix, Line Number, Number of Lines, 
Operation Code From

2.Order Number, Line Number, Number of Lines, Branch/Plant, Operation Code From

3.Order Number, Branch/Plant, Lot Number, Item Number, Operation Code From, Order Number, 

Branch/Plant, Item Number, Operation Code From

4.Branch/Plant, Address Number, Container ID, Item Number, Operation Code From

Branch/Plant, Address Number, Item Number, Operation Code From


Special Logic




Technical Specification


cRecordFound    =

//

//  If the first set of match parameters are passed in, use them to try and find a receipt routing 

batch record.

//  If found, set on Record Found flag and exit function.

//

If (mnOrderNumber is not zero) and (szOrderType is not blank) and (szOrderCompany is not blank) and 

(szOrderSuffix is not blank) and (mnLineNumber is not zero) and (mnNumberOfLines is not zero) and 

(szOperationCodeFrom is not blank)

F43092.Select

OrderNumber=mnOrderNumber
OrderType=szOrderType

OrderCompany=szOrderCompany

OrderSuffix=szOrderSuffix

LineNumber=mnLineNumber

NumberOfLines=mnNumberOfLines

OperationCodeFrom=szOperationCodeFrom

F43092.FetchNext

If(FILE_IO_STATUS is equal to SUCCESS)

cRecordFound = 1

End If

End If

//

//If previous matches fail, try Order Number, Line Number, Number of Lines, Branch/Plant, Operation 

Code //From.  If found, load all output fields and exit function.

//

If (cRecordFound is not '1') and (mnOrderNumber is not zero) and (mnLineNumber is not zero) and 

(mnNumberOfLines is not zero) and (szBranch/Plant is not equal to blank) and (szOperationCodeFrom is not 

blank)

F43092.Select
OrderNumber=mnOrderNumber
LineNumber=mnLineNumber

NumberOfLines=mnNumberOfLines

Branch/Plant=szBranch/Plant

OperationCodeFrom=szOperationCodeFrom

F43092.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

If(FILE_IO_STATUS is equal to SUCCESS)

cRecordFound = 1

OrderType=evt_OrderType

OrderCompany=evt_OrderCompany

OrderSuffix=evt_OrderSuffix

End If

//

//If previous matches fail, use Order Number, Branch/Plant, Lot Number, Item Number, Operation Code 

From, //Quantity at Operation.  

//

If (cRecordFound is not '1') and (mnOrderNumber is not zero) and (szBranch/Plant is not blank) and 

(mnLotNumber is not zero) and (szItemNumber is not equal to blank) and (szOperationCodeFrom is not 

blank) and (mnMoveQuantity is greater than zero)

F43092Join.Select
OrderNumber=mnOrderNumber
Branch/Plant=szBranch/Plant

LotNumber=mnLotNumber

ItemNumber=szItemNumber

OperationCodeFrom=szOperationCodeFrom

'b9mnQuantityAtOperation

F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

While(FILE_IO_STATUS is equal to SUCCESS) and (cRecordType 'b9 1)

If (mnMoveQuatity greater than evt_QuantityatOperation)
 F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

Else

cRecordFound ='1'

OrderType=evt_OrderType

OrderCompany=evt_OrderCompany

OrderSuffix=evt_OrderSuffix

LineNumber=evt_LineNumber

NumberOfLines=evt_NumberOfLines

End If

End While

End If

//

//  Try to find F43092 Join using Order Number, Branch/Plant, Item Number, Operation Code From, 

Quantity

// at operation 'b9 0.

//  

If (cRecordFound is not '1') and (mnOrderNumber is not zero) and (szBranch/Plant is not blank) and 

(szItemNumber is not equal to blank) and (szOperationCodeFrom is not blank) and (mnMoveQuantity is 

greater than zero)

F43092Join.Select
OrderNumber=mnOrderNumber
Branch/Plant=szBranch/Plant

ItemNumber=szItemNumber

OperationCodeFrom=szOperationCodeFrom

'b9mnQuantityAtOperation

F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

While(FILE_IO_STATUS is equal to SUCCESS)  and (cRecordFound 'b9 1)

If (mnMoveQuatity greater than evt_QuantityatOperation)
 F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

Else

cRecordFound  = '1'

OrderType=evt_OrderType

OrderCompany=evt_OrderCompany

OrderSuffix=evt_OrderSuffix

LineNumber=evt_LineNumber

NumberOfLines=evt_NumberOfLines

End If

End While

End If

//

//  Try to find F43092Join using Branch/Plant, Address Number, Container ID, Item Number, Operation 

Code // From, Quantity at Operation 'b9 0.

//

If (cRecordFound is not '1') and (szBranch/Plant is not blank) and (mnAddressNumber is not zero) and 

(szContainerID is not blank) and (szItemNumber is not equal to blank) and (szOperationCodeFrom is not 

blank) and (mnMoveQuantity is greater than zero)

F43092Join.Select
Branch/Plant=szBranch/Plant

AddressNumber=mnAddressNumber

ContainerID=szContainerID

ItemNumber=szItemNumber

OperationCodeFrom=szOperationCodeFrom

'b9mnQuantityAtOperation

F43092Join.FetchNext

OrderNumber->evt_OrderNumber

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

While(FILE_IO_STATUS is equal to SUCCESS) and (cRecordType 'b9 1)

If (mnMoveQuatity greater than evt_QuantityatOperation)
 F43092Join.FetchNext

OrderNumber->evt_OrderNumber

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

Else

cRecordFound is equal to '1'

OrderNumber=evt_OrderNumber

OrderType=evt_OrderType

OrderCompany=evt_OrderCompany

OrderSuffix=evt_OrderSuffix

LineNumber=evt_LineNumber

NumberOfLines=evt_NumberOfLines

End If

End While

End If

//

//  Try to find F43092Join using Branch/Plant, Address Number, Item Number, Operation Code 

/ From, Quantity at Operation 'b9 0.

//

If (cRecordFound is not '1') and (szBranch/Plant is not blank) and (mnAddressNumber is not zero) and 

(szItemNumber is not equal to blank) and (szOperationCodeFrom is not blank) and (mnMoveQuantity is 

greater than zero)

F43092Join.Select
Branch/Plant=szBranch/Plant

AddressNumber=mnAddressNumber

ItemNumber=szItemNumber

OperationCodeFrom=szOperationCodeFrom

'b9mnQuantityAtOperation

F43092Join.FetchNext

OrderNumber->evt_OrderNumber

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

While(FILE_IO_STATUS is equal to SUCCESS) and (cRecordType 'b9 1)

Data Structure

D4300401 - Data Structure for Receipt Routing Preprocessor

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocumentOrderInvoiceEDOCOMATH_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

szCompanyKeyOrderNoKCOOcharNONENONE

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

szOrderSuffixSFXOcharNONENONE

In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies 
multiple transactions for an original order. For purchase orders, the code is always 000. For sales orders with multiple partial receipts against an 
order, the first receiver used to record receipt has a suffix of 000, the next has a suffix of 001, the next 002, and so on.

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

mnNoOfLinesOnOrderNLINMATH_NUMERICNONENONE

A number representing the number of lines on either a purchase or sales order. or The number of receivers recorded during the receipts 
process.  This field will be used in Voucher Matching.

szCostCenterMCUcharNONENONE

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.

szLotLOTNcharNONENONE

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

mnIdentifierShortItemITMMATH_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

mnAddressNumberAN8MATH_NUMERICNONENONE

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

szContainerIDCNIDcharNONENONE

A code on the container or that you assign to the container in which the items on this purchase order or order line were shipped to you. You 
can assign container information to an order during receipts entry.

szOperationCodeOPRCcharNONENONE

A user defined code (43/OC) that represents an operation or step within the receipt route.

mnQuantityMovedQTYMMATH_NUMERICNONENONE

The number of units that have been either moved or dispositioned.

cRecordFoundEV01charNONENONE

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

Related Functions

None

Related Tables

None
00in">->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

If(FILE_IO_STATUS is equal to SUCCESS)

cRecordFound = 1

OrderType=evt_OrderType

OrderCompany=evt_OrderCompany

OrderSuffix=evt_OrderSuffix

End If

//

//If previous matches fail, use Order Number, Branch/Plant, Lot Number, Item Number, Operation Code 

From, //Quantity at Operation.  

//

If (cRecordFound is not '1') and (mnOrderNumber is not zero) and (szBranch/Plant is not blank) and 

(mnLotNumber is not zero) and (szItemNumber is not equal to blank) and (szOperationCodeFrom is not 

blank) and (mnMoveQuantity is greater than zero)

F43092Join.Select
OrderNumber=mnOrderNumber
Branch/Plant=szBranch/Plant

LotNumber=mnLotNumber

ItemNumber=szItemNumber

OperationCodeFrom=szOperationCodeFrom

'b9mnQuantityAtOperation

F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

QuantityAtOperation->evt_QuantityAtOperation

While(FILE_IO_STATUS is equal to SUCCESS) and (cRecordType 'b9 1)

If (mnMoveQuatity greater than evt_QuantityatOperation)
 F43092Join.FetchNext

OrderType->evt_OrderType

OrderCompany->evt_OrderCompany

OrderSuffix->evt_OrderSuffix

LineNumber->evt_LineNumber

NumberOfLines->evt_NumberOfLines

Quan