GetRoutingInstrForAnOrderNumber

Get Routing Instructions For An Order Number

Minor Business Rule

Object Name: B3100870

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function is used to obtain data from the F3112 table for its calling 

program.  The function will return error codes necessary.


1.2Setup Notes and Prerequisites

In order to shorten the processing time, the table will be kept open until 

the request is released. The Mode must as follows.

1. The first time the function is called, the Mode must be set to '1' in 

Order to Open the Table.

2. To read and select records in the table, the Mode must be '2'.

3. To get the next row in the table, the Mode must be '3'

4. To kill the Request, the Mode must be set to '4'.


Note: The user must supply GENLNG type variables to hold the hRequest in 

all Modes and F3112 Pointer during all Modes '2', '3' and '4'.


1.3Special Logic

If the Input Mode is '1', Open the table and Store the Request in 

parameters. 

If Mode is '2', the rows will be selected and read sequentially and if a 

record is found, the F3112 Pointer will be stored. 

If the Mode is '3', the next row will be read. If a record is not found, 

the F3112 Pointer is released.

If the Mode is '4', Kill and Release the request.

If the DoNotReturnOutputPtr is '1' then DO NOT Allocate memory and return 

the Output Pointer(GENLN3)



2.Technical Specifications

2.4Processing


The following actions have to be performed by the Business Function.

1. If  Mode = '1'

Open the F3111 table and Store the RequestID & User in Global 

Variables

If Unable to Open the Request

Kill Request, Set Error Code to '1' 

     Endif

Endif

2. If Mode = '2' or '3'

If Mode = '2'

Read Routing Instructions Table (F3112) Sequentially in 

either ascending or descending order, depending upon the 

input parameter, using the appropriate key(s).

If record is found, return F3112 Pointer.

Else if Mode = '3'

Read Next Routing Instructions Table (F3112) Sequentially 

using the appropriate key(s).

If record is found then

Return F3112 Pointer.

Else

Free Memory allocated for F3112 Pointer

Endif

Endif

If Record is found, assign values to output parameters, and 

allocate memory and return the Output Pointer if the DoNotReturnOutputPtr is not 

'1'.

If not found

Error Code = 2

Clear all Output fields

Break and Exit the Subroutine

Endif

Endif

3. If Mode = 4

If Memory for F3112 Pointer has not been freed, Free it now.

Release and Kill the Request

   Endif

 


Data Structure

D3100870 - Retrieve Routing Instructions for an Order Number

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

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    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.

szRelatedOrderNumberRORNcharNONENONE

A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for 
informational purposes only.

szRelatedOrderTypeRCTOcharNONENONE

A user defined code (system 00, type DT) that indicates the document type of the secondary or related order. For example, a purchase 
order might be document type OP and might have been created to fill a related work order with document type WO.

szRelatedKeyCompanyRKCOcharNONENONE

The key company that is associated with the document number of the related order.

jdStartDateSTRTJDEDATENONENONE

The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine 
starts with the required date and offsets the total leadtime to calculate the appropriate start date.

jdRequestedDRQJJDEDATENONENONE

The date that an item is scheduled to arrive or that an action is scheduled for completion.

mnRunLaborActualLABAMATH_NUMERICNONENONE

This is the actual labor time in hours recorded for the work order.

mnSetupLaborActualSETAMATH_NUMERICNONENONE

The actual time in hours of setup labor recorded against the work order operation.

mnMachineLaborActualMACAMATH_NUMERICNONENONE

This is the actual machine time in hours recorded against the work order.

idF3112PtrGENLNGIDNONENONE

General purpose ID variable.

cModeEV01charNONENONE

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

cSuppressErrorMessageEV02charNONENONE

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

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

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.

idhRequestF3112GENLN2IDNONENONE

General purpose ID variable.

cSortOperationSequenceEV01charNONENONE

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

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

mnOperationSequenceNoOPSQMATH_NUMERICNONENONE

A number used to indicate an order of succession. In routing instructions, a number that sequences the fabrication or assembly steps in the 
manufacture of an item. You can track costs and charge time by operation. In bills of material, a number that designates the routing step in the 
fabrication or assembly process that requires a specified component part. You define the operation sequence after you create the routing 
instructions for the item. The Shop Floor Management system uses this number in the backflush/preflush by operation process. In engineering 
change orders, a number that sequences the assembly steps for the engineering change. For repetitive manufacturing, a number that 
identifies the sequence in which an item is scheduled to be produced. Skip To fields allow you to enter an operation sequence that you want to begin 
the display of information. You can use decimals to add steps between existing steps. For example, use 12.5 to add a step between steps 
12 and 13.

szOperationCodeTypeOPSCcharNONENONE

A user defined code (30/OT) that indicates the type of operation. Valid values include: A Alternate routing   TT Travel time   IT Idle time   T Text

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.

mnMoveHoursMOVDMATH_NUMERICNONENONE

The planned hours that are required to move the order from this operation to the next operation in the same work center. If the Routing 
Master values are blank, the system retrieves the default value from the work order routing. However, the system uses these values only for 
backscheduling variable leadtime items.

mnQueueHoursQUEDMATH_NUMERICNONENONE

The total hours that an order is expected to be in queue at work centers and moving between work centers. The system stores this value in 
the Item Branch table (F4102). You can calculate this value using the Leadtime Rollup program or you can enter it manually. When you run the 
Leadtime Rollup program, the system overrides manual entries and populates the table with calculated values.

mnRelatedLineNoRLLNMATH_NUMERICNONENONE

A number of the detail line on the related order for which the current order was created. For example, on a purchase order created to fill 
open sales orders, this is the line number of the sales order on which the item you are ordering appears.

mnRunMachineHoursRUNMMATH_NUMERICNONENONE

The standard machine hours that you expect to incur in the normal production of this item.

mnRunLaborHoursRUNLMATH_NUMERICNONENONE

The standard hours of labor that you expect to incur in the normal production of this item. The run labor hours in the Routing Master table 
(F3003) are the total hours that it takes the specified crew size to complete the operation. The hours are multiplied by the crew size during shop 
floor release and product costing.

mnSetupLaborHoursSETLMATH_NUMERICNONENONE

The standard setup hours that you expect to incur in the normal completion of this item. This value is not affected by crew size.

mnPercentOverlapPOVRMATH_NUMERICNONENONE

A number that indicates the percentage that successive operations can overlap. The actual overlap percentage entered for the operation 
sequence is the percent by which that operation overlaps the prior operation. For example, if you enter 80%, this indicates that work can begin 
on the overlapped operation when 20% of the prior operation is completed. Notes:    1.   Overlapping has no effect on move and queue 
calculations.    2.   The percent entered must be less than or equal to 100%. Enter percents as whole numbers:  5% as 5.00

idF3112PointerForOutputGENLN3IDNONENONE

General purpose ID variable.

szBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

cDoNotReturnOutputPtrEV01charNONENONE

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

Related Functions

None

Related Tables

F3112 Work Order Routing