1 PACKAGE inv_mo_cancel_pvt AS
2 /* $Header: INVMOCNS.pls 120.0.12010000.2 2008/07/29 12:53:13 ptkumar ship $ */
3
4 /**
5 * Cancel Move Order Line is called by a Source when it is cancelled so
6 * that the associated Move Order Line is also cancelled.
7 * <p>
8 * Cancelling a Move Order Line by the Source (9) is not same as Closing a
9 * Move Order Line (5). Neither it is similar to the status Cancelled (6).
10 * The user doesnt have access to a Closed Move Order Line. But a MO Line
11 * Cancelled by Source can still be transacted. However, the transfer
12 * doesnt go towards the Source. It is treated as a Subinventory Transfer.
13 * <p>
14 * Reservations if any are delinked from the Allocation. First, the Reservations
15 * not yet detailed are deleted if the Source says so. Then the Detailed Qty of
16 * the Reservations are decremented and Delete Reservations is passed as TRUE, then
17 * the Reservation Qty is also decremented. <br>
18 * For a pure Inventory Organization, the Allocations are not deleted as there
19 * is no way to determine whether the allocation is picked or not.
20 * For a WMS Organization, because of the advent of Task Status, allocations can
21 * be deleted for all statuses other than Active (9) and Loaded (4). <br>
22 * If all the Allocations are deleted, then the Line is Closed (5). Otherwise the
23 * Line Status is set to Cancelled by Source (9).
24 * <p>
25 * Shipping calls this procedure when a Delivery Line that is Released
26 * to Warehouse is Cancelled. <br>
27 * WIP calls this procedure when the Job/Schedule is Cancelled.
28 * <p>
29 * @param x_return_status Return Status
30 * @param x_msg_count Message Count in the Stack
31 * @param x_msg_data Message if the Count is 1
32 * @param p_line_id Move Order Line ID
33 * @param p_delete_reservations Delete Reservations (Y/N)
34 * @param p_txn_source_line_id Transaction Source Line ID
35 * @param p_delivery_detail_id Delivery Detail ID
36 */
37 PROCEDURE cancel_move_order_line(
38 x_return_status OUT NOCOPY VARCHAR2
39 , x_msg_count OUT NOCOPY NUMBER
40 , x_msg_data OUT NOCOPY VARCHAR2
41 , p_line_id IN NUMBER
42 , p_delete_reservations IN VARCHAR2
43 , p_txn_source_line_id IN NUMBER DEFAULT NULL
44 , p_delete_alloc IN VARCHAR2 DEFAULT NULL--ER3969328: CI project
45 , p_delivery_detail_id IN NUMBER DEFAULT NULL -- planned crossdocking project
46 );
47
48 /**
49 * Reduce Move Order Quantity is called from Shipping when the quantity on a
50 * sales order line is reduced, leading to the quantity on a Delivery Detail
51 * being reduced. It reduces the required_quantity column on the MO Line by
52 * the passed reduction qty.
53 * The Required Qty is the quantity needed by shipping to fulfill the sales order.
54 * Any quantity transacted in excess of the Required Qty will be moved to staging,
55 * but will not be reserved or shipped to the customer. Since the
56 * sales order line quantity has been reduced, the Qty reserved for the SO
57 * should also be reduced. Some reservations are reduced here, and some are reduced
58 * in Finalize_Pick_Confirm (INVVTROB.pls).
59 * If WMS is installed, undispatched tasks may be deleted, since these tasks are no
60 * longer necessary.
61 * <p>
62 * @param x_return_status Return Status
63 * @param x_msg_count Message Count in the Stack
64 * @param x_msg_data Message if the Count is 1
65 * @param p_line_id Move Order Line ID
66 * @param p_reduction_quantity Reduction Quantity
67 * @param p_sec_reduction_quantity Secondary Reduction Quantity
68 * @param p_txn_source_line_id Transaction Source Line ID
69 * @param p_delivery_detail_id Delivery Detail ID
70 */
71 PROCEDURE reduce_move_order_quantity(
72 x_return_status OUT NOCOPY VARCHAR2
73 , x_msg_count OUT NOCOPY NUMBER
74 , x_msg_data OUT NOCOPY VARCHAR2
75 , p_line_id IN NUMBER
76 , p_reduction_quantity IN NUMBER
77 , p_sec_reduction_quantity IN NUMBER DEFAULT NULL
78 , p_txn_source_line_id IN NUMBER DEFAULT NULL
79 , p_delivery_detail_id IN NUMBER DEFAULT NULL -- planned crossdocking project
80 );
81 --Bug 7190635, Added a parameter to check whether the call is for ATO serial picking.
82 PROCEDURE reduce_rsv_allocation(
83 x_return_status OUT NOCOPY VARCHAR2
84 , x_msg_count OUT NOCOPY NUMBER
85 , x_msg_data OUT NOCOPY VARCHAR2
86 , p_transaction_temp_id IN NUMBER
87 , p_quantity_to_delete IN NUMBER
88 , p_sec_quantity_to_delete IN NUMBER DEFAULT NULL
89 , p_ato_serial_pick IN VARCHAR2 DEFAULT NULL
90 );
91
92 PROCEDURE update_mol_carton_group(
93 x_return_status OUT NOCOPY VARCHAR2
94 , x_msg_cnt OUT NOCOPY NUMBER
95 , x_msg_data OUT NOCOPY VARCHAR2
96 , p_line_id IN NUMBER
97 , p_carton_grouping_id IN NUMBER
98 );
99 END inv_mo_cancel_pvt;