Purpose:
This business function will update the WO Routing table (F3112) for a given Work Order Number with
the new Quantity and Date. This is used to update the Parts List when the Work Order Quantity or
Requested Dates change. This function will return a code '1'in the errorcode field if not successful and '0'
if successful.
Edits:
If the Old Order Quantity is equal to New Order Quantity and The Old Start Date is equal to New Start
Date exit with a return code of '0'.
Retrievals:
a. Initialise all Wk parameters passed to business function (B3100240)
Wk Hours per Day.
Wk Prev Overlap.
Wk Bal Hours.
Wk Prev Hours.
Wk Prev Run Hours.
Wk No of Operations.
Wk WO Start Date.
Wk WO Req Date = Input New Requested Date.
Wk Oper Start Date.
Wk Oper Req Date.
Wk Begin Date.
Wk Prev Error = '0'.
b. Get total number of operations in the Routing table.
Wk No Of Operations = 0.
If Lead Time Level = 'F'
Read all the rows in F3112 table using WLDOCO and WLOPSQ ( = 99999)
as keys in descending sequence.
Increment Wk No of Operations if WLOPSC = Blanks.
Endif.
c.Process the Routing table (F3112) rows.
Set the file pointer to the Routing table (F3112) using WLDOCO and WLOPSQ (= 99999) as keys.
Read all the rows of the Routing table (F3112) using WLDOCO as the key.
If row is found and WLOPSC = Blanks
If New Order Qty <> Old Order Quantity
WLRUNL = WLRUNL * New Order Qty / Old Order Qty.
WLRUNM = WLRUNM * New Order Qty / Old Order Qty.
WLUORG = New Order Qty.
Endif
If Input Unit of Measure = Blanks
If WLSTRT = 0
WLSTRT = New Start Date
Endif.
If WLDRQJ = 0
WLSTRT = New Requested Date
Endif.
Else
If WLMCU <> IWMCU
Read Work Centre Master table (F30006) using WLMCU as the key.
Endif
If WLMOVD = 0
WLMOVD = IWMOVD
Endif
If WLQUED = 0
WLQUED = IWQUED
Endif
If Wk Prev Error = '0'
Load Parameters to the Schedule Operation Dates as given below.
Schedule Type= 'B'
Beginning Date= Wk Begin Date.
Cost Centre= WLMMCU
Work Centre= WLMCU
Unit of Measure= Input Unit Of Measure.
Lead Time Type= Input Lead Time Type.
Lead Time Level= Input Lead Time Level.
Prime Load Code= IWPILC.
No of Employees = IWQMAD.
No of Machines = IWNOMA.
Move Hours = WLMOVD.
Queue Hours= WLQUED.
Run Labor Hours= WLRUNL.
Run Machine Hours= WLRUNM.
Setup Hours= WLSETL.
Hours per Day= Wk Hours per Day.
Operation Overlap= WLPOVR.
Prev Oper Overlap = Wk Prev Overlap.
Hours Balance= Wk Bal Hours.
Hours Previous= Wk Prev Hours.
Hours Run= Wk Prev Run Hours.
No of Operations = Wk No of Operations.
WO Start Date = Wk WO Start Date.
WO Req Date= Wk WO Req Date.
Oper Start Date= Wk Oper Start Date.
Oper Req Date = Wk Oper Req Date.
Error Code= Blanks.
Call Schedule Operation Dates (B3100240) with the above parameters.
If Error Code <> '0'
Wk Prev Error = '1'
Endif
Endif
If Wk Prev Error = '0' and Error Code = '0'
WLSTRT = Oper Start Date.
WLDRQJ = Oper Req Date.
Wk Beg Date = WO Req Date.
Wk Hours per Day= Hours per Day.
Wk Prev Overlap = Prev Overlap.
Wk Hours Balance= Bal Hours.
Wk Prev Hours= Prev Hours.
Wk Hours Run= Prev Run Hours.
Wk Beg Date= WO Req Date.
Else
If WLSTRT = 0
WLSTRT = New Start Date
Endif.
If WLDRQJ = 0
WLSTRT = New Requested Date
Endif.
Wk Message Code = '2'
Endif.
Endif.
Endif.
If Input Hold Code <> Blanks and WLRORN <> 0
Read F4301 using Business function (B4300110)
using WLRORN,WLRCTO,WLRKCO and '000' as Order Suffix as keys.
If Error
Input Hold Code = Blanks.
Else
PHHCOD = Input Hold Code
Call Business function (B4300080) with HCRPER, PHAN8, PHTRDJ, PHPDDJ
HCCYTP and PHSFXO in the Data Structure.
Update F4301 with Hold code.
Endif.
Endif.
Update the row in F3112 with User Id, Program Name, Job Id, Date and Time.
d. Read F4801 using Input Document as key
If found
If WASPRT = '1' or '2'
WASPRT = ' '
Endif
If WASPRT = ' '
If WASTRT <> WLSTRT and Input MSG1 = '1'
WASPRT = '1'
Endif
If WASPRT = ' ' and Input MSG2 = '1'
WASPRT = Wk Message Code
Endif
Endif
Endif
Returns:
If the all the rows are successfully updated return with a '0' in the Error Code otherwise return a
'1'.
^
D3100200 - Update Routing Quantity and Date
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnDocumentNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
mnOldOrderQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
mnNewOrderQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
jdOldStartDate | STRT | JDEDATE | NONE | NONE |
The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine
| ||||
jdNewStartDate | STRT | JDEDATE | NONE | NONE |
The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine
| ||||
jdOldRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdNewRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
cLeadTimeType | MRPP | char | NONE | NONE |
A code that determines whether the system uses fixed or variable leadtimes.
This code works in conjunction with the value from either the
| ||||
mnLeadTimeLevel | LTLV | MATH_NUMERIC | NONE | NONE |
A value that represents the leadtime for an item at its assigned level in the production process, as defined on Plant Manufacturing Data.
| ||||
szHoldCode | HCOD | char | NONE | NONE |
A user defined code (42/HC) that identifies why an order was placed on hold (for example, credit, budget, or margin standards were
| ||||
szUnitofMeasure | UM | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box,
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
cMessageType1 | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cMessageType2 | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szProgramID | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szLineIdentifier | LINE | char | OPT | NONE |
A number that defines a production line or cell. Detailed work center operations can be defined inside the line or cell. | ||||
cQueueHrsSchedulingMethod | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
B3100240 Schedule Operation Dates | ||||
B4001100 Write Hold Code | ||||
B9800100 Get Audit Information |
F30006 Work Center Master File | ||||
F3112 Work Order Routing | ||||
F4301 Purchase Order Header |