RetrieveOpenPuchaseOrders

F4311 Retrieve Open Purchase Orders

Minor Business Rule

Object Name: N3101840

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose


The purpose of the function is to retrieve a single purchase order.   If more than one purchase order 

exists, the record exists flag will be returned with a value '2'. 


2.4Processing 

1)Initialize RecordsExistFlag to '0'.
2)Open F4311.

3)If Successful ,

a)Select all records from the F4311 with Document Type, Item Number, and Branch/Plant.
b)While Successful and RecordsExistFlag is not 2,

i)FetchNext   
(1)If Successful,
(a)If var NextStatus is not "999",
(i)Add 1 to Record ExistFlag
(ii)If RecordsExistFlag is equal to '1'  

1.Assign the output data structure values.
(iii)Else,
1.Assign blanks to output data structure values.
4)Else, 
a.If Suppress Errors is not equal to '1',
i.Set Error 099W.
b.Assign a '1' to Error Code.
c.Assign '099W' to Error Message ID.

5)Close F4311.



Data Structure

D3101840 - F4311 Retrieve Open Purchase Orders

2.1Parameters:
Data Item  Description         I/O  Required  Notes
EV01        Suppress Errors    I   N         '0' Do not Suppress Errors '1' Suppress 

Errors

EV02        Error Code          O   N 

DTAI        Error Message ID   O   N

EV02        RecordsExistFlag    O    N         '0' No record exists '1' Only one record 

found 

                                                         '2' Two or more records found

UITM        Item Number         I    Y

MCU        Branch               I   Y

DCTO        Document Type         I   Y 

DOCO        Document Number    O   N

KCOO        Order Company         O   N

SFXO        Order Suffix         O   N

LNID        Line Number         O   N


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szCostCenterMCUcharOPTNONE

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.

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

cSuppressErrorsEV01charOPTNONE

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

cErrorCodeEV02charOPTNONE

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

szErrorMessageIDDTAIcharOPTNONE

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.

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

szCompanyKeyOrderNoKCOOcharOPTNONE

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.

szOrderSuffixSFXOcharOPTNONE

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_NUMERICOPTNONE

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.

mnRecordExistsFlagMATH10MATH_NUMERICOPTNONE

Event point for Math Numeric.

mnIdentifierShortItemITMMATH_NUMERICOPTNONE

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

mnSupplierAN8MATH_NUMERICOPTNONE

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

jdDateTransFromTRDJJDEDATEOPTNONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

jdDateTransThruTRDJJDEDATEOPTNONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

cFetchModeEV03charOPTNONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

Related Functions

None

Related Tables

None