Problem originates on Line 15821 of SHOP_ORDER_OPERATION_API
- Variable do_not_close is declared
- do_not_close_ VARCHAR2(10);
- A debug session reveals that do_not_close is not part of attr_ before the binding, or after. Line 15967 variable do_not_close_ is bound as:
do_not_close_ := Client_SYS.Cut_Item_Value('DO_NOT_CLOSE',
attr_);
- Passing do_not_close_ as NULL to SHOP_ORDER_OPERATION_LIST_API.Verify_Status will default to FALSE on line 2625 thus return Oper_Status_Code_API.DB_CLOSED
- Code then continues - on Shop_order_operation_api.Update___ line 17189
- Since op_closed_db_ was returned closed from above, and clocking_seq is null because this is a Qty only report, and clockings do exist, as the operation is still in process - causing this was hitting trigger the Stop_operation call everytime as seen below.
IF ((newrec_.oper_status_code = op_closed_db_) AND
(clocking_seq_ IS NULL) AND (Shop_Oper_Clocking_Util_API.Check_Active_Clk_Exist(newrec_.order_no,
newrec_.release_no,
newrec_.sequence_no,
newrec_.operation_no) =
'TRUE')) THEN
Shop_Oper_Clocking_Util_API.Stop_Operation.
Below is the fix that works for us, as a business we will never use Auto Close of an operation at any of our facilities.
Shop_order_operation_api
Check_Update__
Approx. line #: 16582
IF (vrec_.reported_mach_setup_time != 0) OR
(vrec_.reported_mach_time != 0) OR (vrec_.reported_qty != 0) OR
(vrec_.reported_labor_setup_time != 0) OR
(vrec_.reported_labor_time != 0) OR
(newrec_.revised_qty_due > oldrec_.revised_qty_due) OR
((newrec_.revised_qty_due < oldrec_.revised_qty_due) AND
(oldrec_.oper_status_code != '90')) THEN
----The only code that gets changed for this fix
do_not_close_ := 'TRUE';
newrec_.oper_status_code := Shop_Order_Operation_List_API.Verify_Status(newrec_.order_no,
newrec_.release_no,
newrec_.sequence_no,
newrec_.operation_no,
vrec_.reported_mach_setup_time,
vrec_.reported_mach_time,
vrec_.reported_qty,
vrec_.reported_scrap_qty,
vrec_.reported_labor_setup_time *
NVL(reported_setup_crew_size_,
newrec_.setup_crew_size),
vrec_.reported_labor_time *
NVL(reported_crew_size_,
newrec_.crew_size),
do_not_close_,
newrec_.oper_status_code,
newrec_.revised_qty_due);
IF (Shop_Ord_API.Get_State_Db(newrec_.order_no,
newrec_.release_no,
newrec_.sequence_no) = 'Parked') THEN
IF (newrec_.oper_status_code != op_closed_db_) THEN
newrec_.oper_status_code := '60';
END IF;
END IF;
END IF;