UpdateHoursAndQuantities

Update Hours And Quantities

Minor Business Rule

Object Name: B3100520

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

This function will update the (F3112) table with calculated hours and quantities. If a 
completion was done it will update the quantity at operation of the next operation for the current 

Document Number. 


1.1Purpose
This function will update the Shop Floor Control Routing Instructions (F3112) table with labor, 
setup, and machine hours; calculate completed and scrapped quantities; and update the status code.  If a 

completion was done it will update the quantity at operation to the next operation.


1.2Setup Notes and Prerequisites
• Set on "Suppress Error Messages" to suppress the runtime error message handling. Otherwise, if an 
error occurs the error message will be displayed on the message line.


1.3Special Logic
None.

2.Technical Specifications


2.4Processing 

1.Fetch Shop Floor Control Routing Instructions Table (F3112) DS DOCO, DS OPSQ, and OPSC= Blank.
Retrieve the following fields for later processing: UOM,
MCU, CTS5, CTS2, SETA, CTS4, CTS1, LABA, MACA, CTS3,

CTS6, DCT, SOQS, QMTO, UORG, SOCN, OPST, UPMJ, USER, PID, 

and JOBN, TDAY.


1.1. Call GetWCRatesData B3000150 with WLMCU, and LEDG =
     "07".  This will retrieve direct labor (STLF), setup 

     labor (STFF), and machine (MSFR) hourly rates used

     later in calculations.


1.2. Call Document Type Master Retrival N4000039 with 
     WLDCTO. This will retrieve the Service Order Type.


  a. If call to B3000150 (1.1) failed, set hourly rate

        fields to zero, direct labor (STLF), setup labor

        (STFF), and machine (MSFR).


 b. If Fetch to F3112 (1) passed with no errors

        continue processing.


1.If WTTYR equals '1', Calculate Labor Hours. (Use 9 decimal positions for all 
calcs.)   

WLLABA = WTHRW + WLLABA. 

If the order is a CSMS Service Order and  WLPWRT != 0
WTGPAY = WLPWRT * WTHRW

Else

WTGPAY = IWSTLF * WTHRW
End If
WLCTS1 = WTHRW + WLCTS1. 
WLCTS4 = WTGPAY + WLCTS4.


2.If WTTYR equal '2', Calculate Setup Hours.

WLSETA = WLSETA + WTHRW.

WTGPAY = IWSTFF * WTHRW.

WLCTS2 = WTHRW + WLCTS2.

WLCTS5 = WTGPAY + WLCTS5.


3.If WTTYR equals '3', Calculate Machine Hours.

WLMACA = WTHRW + WLMACA..   

WTGPAY = IWMSFR * WTHRW.  

WLCTS3 = WTHRW + WLCTS3. 

WLCTS6 = WTGPAY + WLCTS6.


4.If WTTYR equals '4' (quantities completed) or '5' (quantities scrapped)

a.If unit of measure (WLUOM) from the F3112 table is blank, then set to the value of 

unit of measure (WTUOM) from the F31122 table. 

   

b.Call VerifyAndGetPartsList B3100470 with     Return Pointer = 0, Call Type = 1, 

Suppress Error Message = 1, Index = 6, Keys         = 3, COBY = I, DOCO = WTDOCO, OPSQ =     

WTOPSQ.  WMCPIT and WMCMCU are returned.

 

     c.If unit of measure (WLUOM) from the F3112         table is equal to unit of measure

(WTUOM)     from the F31122 table, add 1 to work field         CUTL-WF.

     else

        If call to B3100470 passed (4b):

Call GetItemUoMConversionFactor B4000520         with Branch Plant = WTMMCU, From 

Unit of     Measure = WTUOM, To Unit of Measure =     WLUOM, Quantity to Convert = '0', 

Inventory         Interface Flag = 'Y', and Short Item Number         = WMCPIT,

else

Call GetItemUoMConversionFactor B4000520         with Branch Plant = WTMMCU, From 

Unit of     Measure = WTUOM, To Unit of Measure =     WLUOM, Quantity to Convert = '0', 

Inventory     Interface Flag = 'Y', and Short Item Number     = WTKIT.

If no errors from call to B4000520:

Assign Conversion Factor From to To to a         work field CUTL-WF.

else 

Add 1 to work field CUTL-WF.


5.Create a work field PDONE-WF and assign it to zero. 

If WTTYR equals '4' and EV02 equals '0', Calculate Completed Quantities.

WQTY-WF = WTSOQS * CUTL-WF.

WLSOQS = WQTY-WF + WLSOQS.

WLQMTO = WLQMTO - WQTY-WF.

PDONE-WF = WQTY-WF / WLUORG.


6.If WTTYR equals '5' and EV02 equals '0', Calculate Scrapped Quantities.

WQTY-WF = WTSOCN * CUTL-WF.

WLSOCN = WLSOCN + WQTY-WF.

WLQMTO = WLQMTO - WQTY-WF.


7.If WTOPST not Blank, then WLOPST = WTOPST.


8.WLDCT = DS DCT.

WLPID  = DS PID.


9.Call GetAuditInformationB9800100 to retrieve time and date stamp information, then 

update WLUSER, WLJOBN, WLUPMJ, WLTDAY.


10.Update Shop Floor Control Routing Instructions (F3112) Table.


11.If PDONE-WF not zero.  Fetch the next record from Shop Floor Control Routing 

Instructions (F3112) table with WTDOCO.  If WLOPSC is Blank, calculate quantity at operation and 

update the table.  Retrieve OPSC, UORG, and QMTO from (F3112)

Calculate quantity at operation:

Work Field WK299-WF = WLUORG * PDONE-WF

WLQMTO = WLQMTO + WK299-WF.

Update Shop Floor Control Routing Instructions (F3112) Table.


^

Data Structure

D3100520 - Update Hours And Quantities

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

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.

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

szOperationStatusOPSTcharNONENONE

User defined code system 31, type OS. The operation status code that identifies the current status of a work order or engineering change 
order as the operation steps in the routing are completed.

cTypeOfHoursTYRcharNONENONE

A code that indicates the type of time entered. Valid values are:    1   Run Labor Hours    2   Setup Labor Hours    3   Machine Hours    4   
Quantities Completed    5   Quantities Scrapped    9   Miscellaneous (such as piece rate bonus)

szDocumentTypeDCTcharNONENONE

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 

mnHoursWorkedHRWMATH_NUMERICNONENONE

The number of hours associated with each transaction.

mnGrossPayGPAYMATH_NUMERICNONENONE

The actual gross pay amount for an employee. This amount is different from the distributed gross pay amount used for labour 
distribution. On Work Order Time Entry, use this field to record miscellaneous pay for an employee, such as piece rate bonus.

mnQuantityShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnQuantityCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

szUnitOfMeasureUOMcharNONENONE

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

szProgramIDPIDcharNONENONE

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.

cSuperBackflushFlagEV02charNONENONE

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

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.

jdGLDateDGLJDEDATENONENONE

A date that identifies the financial period to which the transaction is to be posted.  The company constants specify the date range for each 
financial period. You can have as many as 14 periods. Generally, period 14 is used for audit adjustments. The system validates this field for 
PBCO (posted before cutoff), PYEB (prior year ending balance), PACO (post after cutoff), and WACO (post way after cutoff) messages.

mnEmployeeNumberAN8MATH_NUMERICOPTNONE

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

cPayPointStatusPPRFcharOPTNONE

A code that indicates whether the operation should be taken to a status of complete or partially complete. Valid values are:    Blank Not 
reported    P        Partially complete    C        Completed 

Related Functions

B3000150 Get WC Rates Data
B3100470 Verify And Get Parts List
B4000460 Free Ptr To Data Structure
B4000520 Get Item UoM Conversion Factor
B4001040 Get Item Master Description UOM
B9800100 Get Audit Information

Related Tables

F3112 Work Order Routing