1.Functional Description
1.1Purpose
This business function will update the Parts List in the table (F3111) 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.
1.2Setup Notes and Prerequisites
 None.
1.3Special Logic
None.
2.Technical Specifications
2.4Processing 
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 '1'.
The following actions have to be performed by the Business Function for each row in the F3111 table.
1. Read the Parts List row from the F3111 table using Document Number (DOCO) as the key.
2. If Old Order Quantity <> New Order Quantity  and Fixed or Variable Quantity (WMFORQ) <> 'F' or '%' 
-
 If Line Type (WMLNTY) <> LFLNTY 
 Read Line Type table (F40205) using WMLNTY as the key
 Endif.
 If Line Type has an Inventory Interface (LFIVI = 'Y')
 Read Item Master (F4101) using WMCPIT as the key.
 Calculate Open Quantity as follows.
 New UORG = WMUORG * Input New Order Qty / Input Old Order Quantity.
 If IMSNS = 'R', round the New UORG to the nearest whole number.
 Old Open Qty = WMUORG - WMQNTA.
 New Open Qty = New UORG - WMQNTA.
 Open Quantity = 0.
 If New Open Qty > 0 and Old Open Qty > 0
 Open Qty = New Open Qty - Old Open Qty
 Else
 If Old Open Qty  >  0
 Open Qty = - Old Open Qty
 Else
 If New Open Qty > 0
 Open Qty = New Open Qty.
 Endif.
 Endif.
 Endif.
    If  WMCOBY <> "B" or "C" and Open Qty  >  0
 Call Adjust Committed Quantity (Business Function B3100220) with 
   WMCPIT,WMCMCU,WMLOCN,WMLOTN, WMUM, Open Qty,Pick List Flag .
 Endif
 Replace WMUORG with New UORG.
 Endif 
    Endif.
3. If Old Start Date <> New Start Date
 Calculate the Offset days = No of Days between New Start Date and Old Start Date.
 WMDRQJ = WMDRQJ + Offset days ( Note - Date Addition/Subtaction).
 Call Validate Work Day Calender (Business Function  B3100210) with WMDRQJ.
 Load WMDRQJ with Ouput Date if no Error Code = '0'.
    If New Requested Date < WMDRQJ
 WMDRQJ = New Requested Date
 Endif 
    Endif.
4. Update the Work Order Parts List row (F3111).
       
If  all the records can be updated,  the function will return '0' in the Error Code field, and '1' if 
 any errors occur.
^
D3100190 - Update Part List 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 
  | ||||
| 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 
  | ||||
| cPickListFlag | SHTY | char | NONE | NONE | 
A code to designate whether or not the Work Order Pick List has been printed for a Work Order.  If a 1 is in this code, the Work Order Pick 
  | ||||
| jdNewRequestedDate | DRQJ | JDEDATE | NONE | NONE | 
The date that an item is scheduled to arrive or that an action is scheduled for completion.  | ||||
| jdOldRequestedDate | DRQJ | JDEDATE | NONE | NONE | 
The date that an item is scheduled to arrive or that an action is scheduled for completion.  | ||||
| B3100210 ValidateDateinWorkDayCalendar | ||||
| B3100220 Adjusted Committed Quantity | ||||
| B4000460 Free Ptr To Data Structure | ||||
| X4101 Validate and Retrieve Item Master | 
| F3111 Work Order Parts List | ||||
| F40205 Line Type Control Constants File |