CalculateSerialNoCompletionQty

Calculate Serial No Completion Qty

Minor Business Rule

Object Name: N3101350

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
This function will calculate the Completion status (P=Pending; C=Complete; S=Scrapped; A=Associated) 
and the Parent Quantity to be used to update the Serial Number Association cache in B3101310.


1.3Special Logic
There is no special logic within this function.

2.Technical Specifications
2.4Processing 


1)Read the Item Ledger (F4111) sequentially using the Order Number (DOCO passed in as input) and the 
Completions Document Type (passed in as input). For each record retrieved, accumulate the Transaction 

Quantity (TRQT) if the F4111 Lot Number matches the parent lot number passed in as input.


2)After all completions have been accumulated, if the accumulated value is less than or equal to 

zero:

a)Read the Item Ledger (F4111) sequentially using the Order Number (DOCO passed in as input) and 
the Scrapped Document Type (passed in as input). For each record retrieved, accumulate the 

Transaction Quantity (TRQT) if the F4111 Lot Number matches the parent lot number passed in as input.


3)Set the Parent Completion status and transaction quantity to return to calling program:

a)If scrapped records were found in step 2, set the Parent Completion status to "S" (Scrapped); 
set the Parent Quantity to the value accumulated in step 2.

b)If the accumulated transaction quantity from either step 1 and 2 is greater than zero or equal 

to 1, set the Parent Completion Status to "C" (completion); set the Parent Quantity to the value 

accumulated in step 1.

c)Otherwise, set the Parent Completion status to "P" (partial); set the Parent Quantity to zero.



^

Data Structure

D3101350 - Calculate Serial No Completion Qty

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.

szCompletionsDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szScrapDocumentTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

cParentCompletionStatusEV01charNONENONE

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

mnParentQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

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.

szParentLotSerialNoPLOTcharNONENONE

An inventory separation device that allows tracking of the inventory by date received or similar convention to control lots or layers.

Related Functions

None

Related Tables

None