DetermineIfBlanketPOExists

Determine If Blanket PO Exists

Major Business Rule

Object Name: N4300410

Parent DLL: CDIST

Location: Client/Server

Language: NER

Functional Description

Purpose

The purpose of this business function is to determine if one or many blanket orders exist and if only 

one exists to pass the Blanket Order Number back to the calling application.  If more than one 

blanket order exists then the blanket order number is not returned. A number of '2' is returned in 

NumberOfBlanketsIndicator to signify that TWO OR MORE blanket orders exist for this item.


Technical Specification



Select Records from the F4311 file (PO detail file) using the following criteria :


F4311.PDAN8 =Supplier

F4311.PDITM=ShortItemNumber

F4311.PDUOM=TransactionUoM

F4311.PDCRCD=TransactionCurrency

F4311.PDOTQY =1

F4311.PDCNDJ<RequestedDate /* NOTE the less than sign

F4311.PDUOPN<>0

F4311.PDDCTOinUDC 40/BT

F4311.PDNXTR<>999


Fetch a record from the selection.


If no record exists then

Set BlanketsFoundIndictor to '0'
End processing


If a record has been found then


Fetch next record from the selection


If no further records exist in selection then

Assign  PDDOCO to BlanketOrderNumber  /* NOTE : this is a numeric to char conversion
Assign PDDCTO to BlanketOrderType

Assign PDKCOO to BlanketOrderCompany

Assign PDLNID to BlanketOrderLineNumber

If Currency Mode = 'F'

Assign PDFRRC to BlanketUnitPrice
else

Assign PDPRRC to BlanketUnitPrice
Set BlanketsFoundIndicator to '1'
End Processing


If a record has been found then

Set BlanketsFoundIndicator to '2'
End Processing.









Data Structure

D4300410 - Determine If Blanket PO Exists

Parameter NameData ItemData TypeReq/OptI/O/Both
szBlanketOrderTypeOCTOcharNONENONE

This code defines the order type. It is verified in user defined codes (40/OT). Reserved document types have been defined for voucher 
entry, invoice entry, receipts entry, and time sheet entry.  Because the offsetting entries for document types are created automatically during the 
post program, they will not be self-balancing on original entry. The reserved document types are:    PR Purchase Requisition Orders    PQ 
Purchase Quote    PO Purchase Order    PD Purchase Order - Direct Ship    PB Purchase Order - Blanket    SQ Sales Quote    SO Sales Order    
SD Sales Order - Direct Ship    SB Sales Order - Blanket 

szBlanketOrderCompanyOKCOcharNONENONE

A number that is used in conjunction with the values in the ODOC and ODCT fields to identify a transaction.

szBlanketOrderNumberOORNcharNONENONE

The original document number. This can be a voucher, an invoice, unapplied cash, a journal entry number, and so on Matching document 
numbers are also used to identify related documents in the Accounts Receivable and Accounts Payable systems. The document number 
(DOC) is always the original document number. The matching document number (DOCM) is the check, adjustment, or credit to be applied 
against the original document.

mnBlanketOrderLineNumberOGNOMATH_NUMERICNONENONE

A number identifying which line on the original order that the current line matches.

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

szTransactionUOMUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

jdRequestedDateDRQJJDEDATENONENONE

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

szTransactionCurrencyCRCDcharNONENONE

A code that identifies the currency of a transaction. 

cBlanketsFoundIndicatorEV01charNONENONE

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

mnSupplierAN8MATH_NUMERICNONENONE

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

cCurrencyModeCRRMcharNONENONE

An option that specifies whether the system displays amounts in the domestic or foreign currency. On  The system displays amounts in the 
foreign currency of the transaction. Off  The system displays amounts in the domestic currency of the transaction.

mnUnitCostPRRCMATH_NUMERICNONENONE

The unit cost of one item, as purchased from the supplier, excluding freight,taxes, discounts, and other factors that might modify the actual 
unit cost you record when you receive the item.

szBlanketOrderSuffixSFXOcharOPTNONE

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.

mnUnitsOpenQuantityUOPNMATH_NUMERICOPTNONE

The original quantity for the order detail line, plus or minus any changes to that quantity, minus all quantities shipped, received, and 
vouchered to date.

szBusinessUnitMCUcharOPTNONE

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.

szBlanketReleaseVersionVERScharOPTNONE

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 
processing option values and data selection and sequencing options. Interactive versions are associated with applications (usually as a 
menu selection). Batch versions are associated with batch jobs or reports. To run a batch process, you must choose a version.

szLineTypeLNTYcharOPTNONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

szAccountIdAIDcharOPTNONE

A number that the system assigns to each general ledger account in the Account Master table (F0901) to uniquely identify it. 

mnAmountOpen1AOPNMATH_NUMERICOPTNONE

The amount of the order, invoice, or voucher that is still unpaid or open. When you enter a document (for example, an order, invoice, or 
voucher), the open amount is the original amount of that document. If you change the original amount, the open amount is reduced by the net 
change. For example,payments, shipments, or receipts against a document result in a reduction of the open balance.

mnAmountForeignOpenFAPMATH_NUMERICOPTNONE

The unpaid foreign amount of a transaction.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

Related Functions

None

Related Tables

None