1 PACKAGE INV_Pick_Release_PVT AS
2 /* $Header: INVVPICS.pls 120.5.12010000.2 2008/09/11 12:32:14 haluthra ship $ */
3
4 g_min_tolerance NUMBER := 0.0;
5 g_max_tolerance NUMBER := 0;
6
7 -------------------------------------------------------------------------------
8 -- Procedures and Functions
9 -------------------------------------------------------------------------------
10 -- Start of Comments
11 --
12 -- Name
13 -- PROCEDURE Process_Line
14 --
15 -- Package
16 -- INV_Pick_Release_PVT
17 --
18 -- Purpose
19 -- Pick releases the move order line passed in. Any necessary validation is
20 -- assumed to have been done by the caller.
21 --
22 -- Input Parameters
23 -- p_mo_line_rec
24 -- The Move Order Line record to pick release
25 -- p_grouping_rule_id
26 -- The grouping rule to use for generating pick slip numbers
27 -- p_allow_partial_pick
28 -- TRUE if the pick release process should continue after a line fails to
29 -- be detailed completely. FALSE if the process should stop and roll
30 -- back all changes if a line cannot be fully detailed.
31 -- NOTE: Printing pick slips as the lines are detailed is only supported if
32 -- this parameter is TRUE, since a commit must be done before printing.
33 -- p_print_mode
34 -- Whether the pick slips should be printed as they are generated or not.
35 -- If this is 'I' (immediate) then after a pick slip number has been returned a
36 -- specified number of times (given in the shipping parameters), that pick
37 -- slip will be printed immediately.
38 -- If this is 'E' (deferred) then the pick slips will not be printed until the
39 -- pick release process is complete.
40 --
41 -- Output Parameters
42 -- x_return_status
43 -- if the process succeeds, the value is
44 -- fnd_api.g_ret_sts_success;
45 -- if there is an expected error, the value is
46 -- fnd_api.g_ret_sts_error;
47 -- if there is an unexpected error, the value is
48 -- fnd_api.g_ret_sts_unexp_error;
49 -- x_msg_count
50 -- if there is one or more errors, the number of error messages
51 -- in the buffer
52 -- x_msg_data
53 -- if there is one and only one error, the error message
54 -- (See fnd_api package for more details about the above output parameters)
55 --
56
57 PROCEDURE Process_Line
58 (
59 p_api_version IN NUMBER
60 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
61 ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
62 ,x_return_status OUT NOCOPY VARCHAR2
63 ,x_msg_count OUT NOCOPY NUMBER
64 ,x_msg_data OUT NOCOPY VARCHAR2
65 ,p_mo_line_rec IN OUT NOCOPY INV_Move_Order_PUB.TROLIN_REC_TYPE
66 ,p_grouping_rule_id IN NUMBER
67 ,p_allow_partial_pick IN VARCHAR2 DEFAULT fnd_api.g_true
68 ,p_print_mode IN VARCHAR2
69 ,x_detail_rec_count OUT NOCOPY NUMBER
70 ,p_plan_tasks IN BOOLEAN DEFAULT FALSE
71 );
72
73
74 --
75 -- Start of Comments
76 -- Name
77 -- PROCEDURE process_prj_dynamic_locator
78 --
79 -- Package
80 -- INV_Pick_Release_PVT
81 --
82 -- Purpose
83 -- Creates dynamic locators for project manufacturing. If the org or sub has dynamic
84 -- locator control and the move order line being pick released has project and task
85 -- specified then a new locator ID needs to be generated for the project and task.
86 --
87 -- Input Parameters
88 -- p_mo_line_rec
89 -- The Move Order Line record being pick released
90 --
91 -- p_mold_temp_id
92 -- Transaction temp ID being processed
93 --
94 -- p_mold_sub_code
95 -- Source subinventory on MMTT
96 --
97 -- p_from_locator_id
98 -- Source locator on MMTT
99 --
100 -- p_to_locator_id
101 -- Destination locator on MMTT
102 --
103 --
104 -- Output Parameters
105 -- x_return_status
106 -- if the process succeeds, the value is
107 -- fnd_api.g_ret_sts_success;
108 -- if there is an expected error, the value is
109 -- fnd_api.g_ret_sts_error;
110 -- if there is an unexpected error, the value is
111 -- fnd_api.g_ret_sts_unexp_error;
112 -- x_msg_count
113 -- if there is one or more errors, the number of error messages
114 -- in the buffer
115 -- x_msg_data
116 -- if there is one and only one error, the error message
117 -- (See fnd_api package for more details about the above output parameters)
118 --
119
120 PROCEDURE process_prj_dynamic_locator
121 (
122 p_mo_line_Rec IN OUT NOCOPY INV_MOVE_ORDER_PUB.Trolin_rec_type
123 , p_mold_temp_id IN NUMBER
124 , p_mold_sub_code IN VARCHAR2
125 , p_from_locator_id IN NUMBER
126 , p_to_locator_id IN NUMBER
127 , x_return_status OUT NOCOPY VARCHAR2
128 , x_msg_count OUT NOCOPY NUMBER
129 , x_msg_data OUT NOCOPY VARCHAR2
130 , x_to_locator_id OUT NOCOPY NUMBER
131 , p_to_subinventory IN VARCHAR2 DEFAULT NULL
132 );
133
134 /* FP-J PAR Replenishment Counts: 4 new input parameters are introduced viz.,
135 p_dest_subinv, p_dest_locator_id, p_project_id, p_task_id. This is as a result
136 of moving Supply Subinv, Supply Locator, Project and Task to 'Common' group
137 from 'Manufacturing' group in Grouping Rule form. */
138 PROCEDURE get_pick_slip_number(
139 p_ps_mode VARCHAR2
140 , p_pick_grouping_rule_id NUMBER
141 , p_org_id NUMBER
142 , p_header_id NUMBER
143 , p_customer_id NUMBER
144 , p_ship_method_code VARCHAR2
145 , p_ship_to_loc_id NUMBER
146 , p_shipment_priority VARCHAR2
147 , p_subinventory VARCHAR2
148 , p_trip_stop_id NUMBER
149 , p_delivery_id NUMBER
150 , x_pick_slip_number OUT NOCOPY NUMBER
151 , x_ready_to_print OUT NOCOPY VARCHAR2
152 , x_api_status OUT NOCOPY VARCHAR2
153 , x_error_message OUT NOCOPY VARCHAR2
154 , x_call_mode OUT NOCOPY VARCHAR2
155 , p_dest_subinv VARCHAR2 DEFAULT NULL
156 , p_dest_locator_id NUMBER DEFAULT NULL
157 , p_project_id NUMBER DEFAULT NULL
158 , p_task_id NUMBER DEFAULT NULL
159 , p_inventory_item_id NUMBER DEFAULT NULL
160 , p_locator_id NUMBER DEFAULT NULL
161 , p_revision VARCHAR2 DEFAULT NULL
162 );
163
164 PROCEDURE process_reservations(
165 x_return_status OUT NOCOPY VARCHAR2
166 , x_msg_count OUT NOCOPY NUMBER
167 , x_msg_data OUT NOCOPY VARCHAR2
168 , p_demand_info IN wsh_inv_delivery_details_v%ROWTYPE
169 , p_mo_line_rec IN inv_move_order_pub.trolin_rec_type
170 , p_mso_line_id IN NUMBER
171 , p_demand_source_type IN VARCHAR2
172 , p_demand_source_name IN VARCHAR2
173 , p_allow_partial_pick IN VARCHAR2 DEFAULT fnd_api.g_true
174 , x_demand_rsvs_ordered OUT NOCOPY inv_reservation_global.mtl_reservation_tbl_type
175 , x_rsv_qty_available OUT NOCOPY NUMBER
176 ,x_rsv_qty2_available OUT NOCOPY NUMBER --7377744
177 );
178
179 FUNCTION check_backorder_cache (
180 p_org_id NUMBER
181 ,p_inventory_item_id NUMBER
182 ,p_ignore_reservations BOOLEAN
183 ,p_demand_line_id NUMBER)
184 return BOOLEAN;
185
186 PROCEDURE clear_backorder_cache;
187
188 PROCEDURE release_mo_tasks (p_header_id NUMBER);
189
190 PROCEDURE get_tolerance(
191 p_mo_line_id NUMBER
192 , x_return_status OUT NOCOPY VARCHAR2
193 , x_msg_count OUT NOCOPY VARCHAR2
194 , x_msg_data OUT NOCOPY VARCHAR2
195 , x_max_tolerance OUT NOCOPY NUMBER
196 , x_min_tolerance OUT NOCOPY NUMBER);
197
198 END INV_Pick_Release_PVT;