GetNumberOfPendingOrders

Get Number Of Pending Orders

Minor Business Rule

Object Name: B3001310

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function reads the ECO Parts List file (F3013) and counts the number of work orders on the file 
containing the item number passed in as input to the function. When selecting F3013 records to be 

counted for a given item, this function excludes:

a)  the order whose number was passed in as input,

b)  any order whose branch/plant does not match the branch/plant value passed in as input,

c)  any order whose order type does not match the order type value passed in as input,

d)  completed work orders (orders are "completed" if the completion date on the F4801 Work 

Order Master       is not null).

Also, an order on the F3013 Parts List file will only be counted once, even though there will may be 

multiple records on the order for the selected item number.


1.2Setup Notes and Prerequisites

None.

1.3Special Logic

There is no special logic within this function.

2.Technical Specifications

2.4Processing 

1.Select all rows from the F3013 (ECO Parts List) table which match the item number passed in as 
input; the first element of the third key of this file (Index = ITM, DOCO; use ITM only) should be 

used for this Select function.


2.Process fetched records sequentially:  


• Bypass records whose order number matches the order number passed in as input.  Also, on each new 
order number read, save the order number value and do not count subsequent F3013 records for the 

same order; i.e. only count an order once when passing through the fetched records.


• If the order is not excluded by conditions in step 3, call the "Get Work Order Data I" (B3100310) 
business function passing the order number.  Increment the Total number of  Order count only if 

all of the following are true:

a)   The Branch/Plant on the F3013 Parts List file record equals the Branch/Plant input 
parameter,

b)    The Order Type on the F4801 Work Order Master equals the Order Type input parameter,
c)The Completion Date on the F4801 Work Order Master is null.


3.After all fetched records have been processed, return the Total Number of Orders to the calling 

program.


^

Data Structure

D3001310 - Get Number Of Pending Orders

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTotalOrdersMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

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.

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

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.

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

szOrderTypeGBDCTOcharNONENONE

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

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.

cReleaseRequestEV02charNONENONE

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

Related Functions

B3000780 Get ECO Parts List Sequentially
B3100310 Get Work Order Data I

Related Tables

F3013 ECO Parts List Detail