DBA Data[Home] [Help]

PACKAGE: APPS.INV_PICK_RELEASE_PVT

Source


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