DBA Data[Home] [Help]

PACKAGE BODY: APPS.WMS_GET_DEST_LOC_LPN

Source


1 package body wms_get_dest_loc_lpn as
2  /* $Header: WMSDLLWB.pls 115.10 2003/11/03 21:18:13 joabraha noship $ */
3 --
4 l_debug                 number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
5 -- ---------------------------------------------------------------------------|
6 -- |-------------------------------< trace >----------------------------------|
7 -- ---------------------------------------------------------------------------|
8 -- {Start Of Comments}
9 --
10 -- Description:
11 -- Wrapper around the tracing utility.
12 --
13 -- Prerequisites:
14 -- None
15 --
16 -- In Parameters:
17 --   Name        Reqd Type     Description
18 --   p_message   Yes  varchar2 Message to be displayed in the log file.
19 --   p_prompt    Yes  varchar2 Prompt.
20 --   p_level     No   number   Level.
21 --
22 -- Post Success:
23 --   None.
24 --
25 -- Post Failure:
26 --   None
27 --
28 -- Access Status:
29 --   Internal Development Use Only.
30 --
31 -- {End Of Comments}
32 --
33 Procedure trace(
34    p_message  in varchar2
35 ,  p_level    in number
36 ) is
37 begin
38       INV_LOG_UTIL.trace(p_message, 'WMS_GET_DEST_LOC_LPN', p_level);
39 end trace;
40 --
41 -- ---------------------------------------------------------------------------------
42 -- |-----------------------< wms_dest_loc_w_item >----------------------------------|
43 -- ---------------------------------------------------------------------------------
44 -- {Start Of Comments}
45 --
46 -- Description:
47 --   Returns selected Locator or validates Locator passed in with Item restriction.
48 --
49 -- Prerequisites:
50 --
51 -- In Parameters:
52 --   Name                    Reqd Type      Description
53 --   ---------------------   ---- --------  ---------------------------
54 --   p_mode                  Yes  number    Mode indicating call is
55 --                                          1. Selection  2. Validation
56 --   p_task_id               Yes  varchar2  MMTT.transaction_temp_id
57 --   p_activity_type_id      Yes  varchar2  Activity Type :
58 --                                          1  Inbound
59 --                                          2  Outbound
60 --   p_locator_id            No  number     Location ID passed in for
61 --                                          validation when called with
62 --                                          p_mode = 2.
63 --   p_item_id               Yes  number    Item ID passed in for
64 --                                          Restriction purposes..
65 -- Post Success:
66 --   Returns a selected a Locator ID or validates a Locator ID.
67 --
68 -- Post Failure:
69 --
70 --
71 -- Access Status:
72 --   Internal Development Use Only.
73 --
74 -- {End Of Comments}
75 --
76 --
77 
78 Procedure wms_dest_loc_w_item(
79    x_return_status       out nocopy varchar2
80 ,  x_msg_count           out nocopy number
81 ,  x_msg_data            out nocopy varchar2
82 ,  x_locator_id          out nocopy number
83 ,  x_zone_id             out nocopy number
84 ,  x_subinventory_code   out nocopy varchar2
85 ,  x_loc_valid           out nocopy varchar2
86 ,  p_mode                in  number
87 ,  p_task_id             in  number
88 ,  p_activity_type_id    in  number
89 ,  p_locator_id          in  number
90 ,  p_item_id             in  number
91 ,  p_api_version         in  number
92 ,  p_init_msg_list       in  varchar2
93 ,  p_commit              in  varchar2
94 ) is
95 
96   l_proc        varchar2(72) := 'WMS_DEST_LOC_W_ITEM :';
97   l_prog        float;
98 
99 begin
100    -- ### Initialize API return status to success
101    x_return_status := FND_API.G_RET_STS_SUCCESS;
102 
103    if (l_debug = 1) then
104       trace(l_proc ||' Entering "wms_get_dest_loc_lpn.wms_dest_loc_w_item"... '|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 1);
105       trace(l_proc ||'   ');
106       trace(l_proc ||'   ');
107       trace(l_proc ||' Before calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
108       trace(l_proc ||' Input parameters...');
109       trace(l_proc ||' p_mode => ' || p_mode);
110       trace(l_proc ||' p_task_id => ' || p_task_id);
111       trace(l_proc ||' p_activity_type_id  => ' || p_activity_type_id);
112       trace(l_proc ||' p_locator_id => ' || p_locator_id);
113       trace(l_proc ||' p_item_id => ' || p_item_id);
114    end if;
115 
116    wms_atf_dest_loc.get_seed_dest_loc(
117       x_return_status       => x_return_status
118    ,  x_msg_count           => x_msg_count
119    ,  x_msg_data            => x_msg_data
120    ,  x_locator_id          => x_locator_id
121    ,  x_zone_id             => x_zone_id
122    ,  x_subinventory_code   => x_subinventory_code
123    ,  x_loc_valid           => x_loc_valid
124    ,  p_mode                => p_mode
125    ,  p_task_id             => p_task_id
126    ,  p_activity_type_id    => p_activity_type_id
127    ,  p_locator_id          => p_locator_id
128    ,  p_item_id             => p_item_id
129    ,  p_api_version         => p_api_version
130    ,  p_init_msg_list       => p_init_msg_list
131    ,  p_commit              => p_commit
132 
133    );
134 
135    if (l_debug =1) then
136       trace(l_proc ||' After calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
137       trace(l_proc ||' Out parameters...');
138       trace(l_proc ||' x_return_status = ' ||  x_return_status);
139       trace(l_proc ||' x_locator_id = ' ||  x_locator_id);
140       trace(l_proc ||' x_zone_id = ' ||  x_zone_id);
141       trace(l_proc ||' x_subinventory_code = ' ||  x_subinventory_code);
142       trace(l_proc ||' x_loc_valid = ' ||  x_loc_valid);
143       trace(l_proc ||'   ');
144       trace(l_proc ||'   ');
145       trace(l_proc ||' Exiting procedure "wms_get_dest_loc_lpn.wms_dest_loc_w_item"....', 1);
146    end if;
147 
148 end wms_dest_loc_w_item;
149 --
150 --
151 -- ---------------------------------------------------------------------------------
152 -- |-----------------------< wms_dest_loc_wo_item >---------------------------------|
153 -- ---------------------------------------------------------------------------------
154 -- {Start Of Comments}
155 --
156 -- Description:
157 --   Returns selected Locator or validates Locator passed in without Item restriction.
158 --
159 -- Prerequisites:
160 --
161 -- In Parameters:
162 --   Name                    Reqd Type      Description
163 --   -------------------     ---- --------  ---------------------------
164 --   p_mode                  Yes  number    Mode indicating call is
165 --                                          1. Selection  2. Validation
166 --   p_task_id               Yes  varchar2  MMTT.transaction_temp_id
167 --   p_activity_type_id      Yes  varchar2  Activity Type :
168 --                                          1  Inbound
169 --                                          2  Outbound
170 --   p_locator_id            No  number     Location ID passed in for
171 --                                          validation when called with
172 --                                          p_mode = 2.
173 --   p_item_id               Yes  number    Item ID passed in for
174 --                                          Restriction purposes but not
175 --     					    used. This is to keep the
176 --                                          signature consistent.
177 -- Post Success:
178 --   Returns a selected a Locator ID or validates a Locator ID.
179 --
180 -- Post Failure:
181 --
182 --
183 -- Access Status:
184 --   Internal Development Use Only.
185 --
186 -- {End Of Comments}
187 --
188 --
189 
190 Procedure wms_dest_loc_wo_item(
191    x_return_status       out nocopy varchar2
192 ,  x_msg_count           out nocopy number
193 ,  x_msg_data            out nocopy varchar2
194 ,  x_locator_id          out nocopy number
195 ,  x_zone_id             out nocopy number
196 ,  x_subinventory_code   out nocopy varchar2
197 ,  x_loc_valid           out nocopy varchar2
198 ,  p_mode                in  number
199 ,  p_task_id             in  number
200 ,  p_activity_type_id    in  number
201 ,  p_locator_id          in  number
202 ,  p_item_id             in  number
203 ,  p_api_version         in  number
204 ,  p_init_msg_list       in  varchar2
205 ,  p_commit              in  varchar2
206 ) is
207 
208   l_proc       varchar2(72) := 'WMS_DEST_LOC_WO_ITEM :';
209   l_prog       float;
210 
211 begin
212    -- ### Initialize API return status to success
213    x_return_status := FND_API.G_RET_STS_SUCCESS;
214 
215    if (l_debug = 1) then
216       trace(l_proc ||' Entering "wms_get_dest_loc_lpn.wms_dest_loc_wo_item"... '|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 1);
217       trace(l_proc ||'   ');
218       trace(l_proc ||'   ');
219       trace(l_proc ||' Before calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
220       trace(l_proc ||' Input parameters...');
221       trace(l_proc ||' p_mode => ' || p_mode);
222       trace(l_proc ||' p_task_id => ' || p_task_id);
223       trace(l_proc ||' p_activity_type_id  => ' || p_activity_type_id);
224       trace(l_proc ||' p_locator_id => ' || p_locator_id);
225       trace(l_proc ||' p_item_id => ' || p_item_id);
226    end if;
227 
228    wms_atf_dest_loc.get_seed_dest_loc(
229       x_return_status       => x_return_status
230    ,  x_msg_count           => x_msg_count
231    ,  x_msg_data            => x_msg_data
232    ,  x_locator_id          => x_locator_id
233    ,  x_zone_id             => x_zone_id
234    ,  x_subinventory_code   => x_subinventory_code
235    ,  x_loc_valid           => x_loc_valid
236    ,  p_mode                => p_mode
237    ,  p_task_id             => p_task_id
238    ,  p_activity_type_id    => p_activity_type_id
239    ,  p_locator_id          => p_locator_id
240    ,  p_api_version         => p_api_version
241    ,  p_init_msg_list       => p_init_msg_list
242    ,  p_commit              => p_commit
243    );
244 
245    if (l_debug =1) then
246       trace(l_proc ||' After calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
247       trace(l_proc ||' Out parameters...');
248       trace(l_proc ||' x_return_status = ' ||  x_return_status);
249       trace(l_proc ||' x_locator_id = ' ||  x_locator_id);
250       trace(l_proc ||' x_zone_id = ' ||  x_zone_id);
251       trace(l_proc ||' x_subinventory_code = ' ||  x_subinventory_code);
252       trace(l_proc ||' x_loc_valid = ' ||  x_loc_valid);
253       trace(l_proc ||'   ');
254       trace(l_proc ||'   ');
255       trace(l_proc ||' Exiting procedure "wms_get_dest_loc_lpn.wms_dest_loc_wo_item"....', 1);
256    end if;
257 
258 end wms_dest_loc_wo_item;
259 --
260 --
261 -- ---------------------------------------------------------------------------------
262 -- |-----------------------< wms_dest_lpn_w_item >----------------------------------|
263 -- ---------------------------------------------------------------------------------
264 -- {Start Of Comments}
265 --
266 -- Description:
267 --   Returns selected LPN or validates LPN passed in, with Item restriction.
268 --
269 -- Prerequisites:
270 --
271 -- In Parameters:
272 --   Name                    Reqd Type      Description
273 --   -------------------     ---- --------  ---------------------------
274 --   p_mode                  Yes  number    Mode indicating call is
275 --                                          1. Selection  2. Validation
276 --   p_task_id               Yes  varchar2  MMTT.transaction_temp_id
277 --   p_activity_type_id      Yes  varchar2  Activity Type :
278 --                                          1  Inbound
279 --                                          2  Outbound
280 --   p_lpn_id                No  number     LPN ID passed in for
281 --                                          validation when called with
282 --                                          p_mode = 2.
283 --   p_item_id               Yes  number    Item ID passed in for
284 --                                          Restriction purposes..
285 --
286 -- Post Success:
287 --   Returns a selected a Locator ID or validates a Locator ID.
288 --
289 -- Post Failure:
290 --
291 --
292 -- Access Status:
293 --   Internal Development Use Only.
294 --
295 -- {End Of Comments}
296 --
297 --
298 
299 Procedure wms_dest_lpn_w_item(
300    x_return_status       out nocopy varchar2
301 ,  x_msg_count           out nocopy number
302 ,  x_msg_data            out nocopy varchar2
303 ,  x_lpn_id              out nocopy number
304 ,  x_lpn_valid           out nocopy varchar2
305 ,  p_mode                in  number
306 ,  p_task_id             in  number
307 ,  p_activity_type_id    in  number
308 ,  p_lpn_id              in  number
309 ,  p_item_id             in  number
310 ,  p_subinventory_code   in  varchar2
311 ,  p_locator_id          in  number
312 ,  p_api_version         in  number
313 ,  p_init_msg_list       in  varchar2
314 ,  p_commit              in  varchar2
315 ) is
316 
317   l_proc        varchar2(72) := 'WMS_DEST_LPN_W_ITEM :';
318   l_prog        float;
319 
320 begin
321    -- ### Initialize API return status to success
322    x_return_status := FND_API.G_RET_STS_SUCCESS;
323 
324    if (l_debug = 1) then
325       trace(l_proc ||' Entering "wms_get_dest_loc_lpn.wms_dest_lpn_w_item"... '|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 1);
326       trace(l_proc ||'   ');
327       trace(l_proc ||'   ');
328       trace(l_proc ||' Before calling package "wms_atf_dest_loc.get_seed_dest_lpn"....', 1);
329       trace(l_proc ||' Input parameters...');
330       trace(l_proc ||' p_mode => ' || p_mode);
331       trace(l_proc ||' p_task_id => ' || p_task_id);
332       trace(l_proc ||' p_activity_type_id  => ' || p_activity_type_id);
333       trace(l_proc ||' p_lpn_id => ' || p_lpn_id);
334       trace(l_proc ||' p_item_id => ' || p_item_id);
335       trace(l_proc ||' p_subinventory_code => ' || p_subinventory_code, 4);
336       trace(l_proc ||' p_locator_id => ' || p_locator_id, 4);
337    end if;
338 
339    wms_atf_destination_lpn.get_seed_dest_lpn(
340       x_return_status       => x_return_status
341    ,  x_msg_count           => x_msg_count
342    ,  x_msg_data            => x_msg_data
343    ,  x_lpn_id              => x_lpn_id
344    ,  x_lpn_valid           => x_lpn_valid
345    ,  p_mode                => p_mode
346    ,  p_task_id             => p_task_id
347    ,  p_activity_type_id    => p_activity_type_id
348    ,  p_lpn_id              => p_lpn_id
349    ,  p_item_id             => p_item_id
350    ,  p_subinventory_code   => p_subinventory_code
351    ,  p_locator_id          => p_locator_id
352    ,  p_api_version         => p_api_version
353    ,  p_init_msg_list       => p_init_msg_list
354    ,  p_commit              => p_commit
355    );
356 
357    if (l_debug =1) then
358       trace(l_proc ||' After calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
359       trace(l_proc ||' Out parameters...');
360       trace(l_proc ||' x_return_status = ' ||  x_return_status);
361       trace(l_proc ||' x_lpn_id = ' ||  x_lpn_id);
362       trace(l_proc ||' x_lpn_valid = ' ||  x_lpn_valid);
363       trace(l_proc ||'   ');
364       trace(l_proc ||'   ');
365       trace(l_proc ||' Exiting procedure "wms_get_dest_loc_lpn.wms_dest_lpn_w_item"....', 1);
366    end if;
367 
368 end wms_dest_lpn_w_item;
369 --
370 --
371 -- ---------------------------------------------------------------------------------
372 -- |-----------------------< wms_dest_lpn_wo_item >---------------------------------|
373 -- ---------------------------------------------------------------------------------
374 -- {Start Of Comments}
375 --
376 -- Description:
377 --   Returns selected LPN or validates LPN passed in, with Item restriction.
378 --
379 -- Prerequisites:
380 --
381 -- In Parameters:
382 --   Name                    Reqd Type      Description
383 --   -------------------     ---- --------  ---------------------------
384 --   p_mode                  Yes  number    Mode indicating call is
385 --                                          1. Selection  2. Validation
386 --   p_task_id               Yes  varchar2  MMTT.transaction_temp_id
387 --   p_activity_type_id      Yes  varchar2  Activity Type :
388 --                                          1  Inbound
389 --                                          2  Outbound
390 --   p_lpn_id                No  number     LPN ID passed in for
391 --                                          validation when called with
392 --                                          p_mode = 2.
393 -- Post Success:
394 --   Returns a selected a Locator IDor validates a Locator ID.
395 --
396 -- Post Failure:
397 --
398 --
399 -- Access Status:
400 --   Internal Development Use Only.
401 --
402 -- {End Of Comments}
403 --
404 --
405 
406 Procedure wms_dest_lpn_wo_item(
407    x_return_status       out nocopy varchar2
408 ,  x_msg_count           out nocopy number
409 ,  x_msg_data            out nocopy varchar2
410 ,  x_lpn_id              out nocopy number
411 ,  x_lpn_valid           out nocopy varchar2
412 ,  p_mode                in  number
413 ,  p_task_id             in  number
414 ,  p_activity_type_id    in  number
415 ,  p_lpn_id              in  number
416 ,  p_item_id             in  number
417 ,  p_subinventory_code   in  varchar2
418 ,  p_locator_id          in  number
419 ,  p_api_version         in  number
420 ,  p_init_msg_list       in  varchar2
421 ,  p_commit              in  varchar2
422 ) is
423 
424    l_proc       varchar2(72) := 'WMS_DEST_LPN_WO_ITEM :';
425    l_prog       float;
426 
427 begin
428    -- ### Initialize API return status to success
429    x_return_status := FND_API.G_RET_STS_SUCCESS;
430 
431    if (l_debug = 1) then
432       trace(l_proc ||' Entering "wms_get_dest_loc_lpn.wms_dest_lpn_wo_item"... '|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 1);
433       trace(l_proc ||'   ');
434       trace(l_proc ||'   ');
435       trace(l_proc ||' Before calling package "wms_atf_dest_loc.get_seed_dest_lpn"....', 1);
436       trace(l_proc ||' Input parameters...');
437       trace(l_proc ||' p_mode => ' || p_mode);
438       trace(l_proc ||' p_task_id => ' || p_task_id);
439       trace(l_proc ||' p_activity_type_id  => ' || p_activity_type_id);
440       trace(l_proc ||' p_lpn_id => ' || p_lpn_id);
441       trace(l_proc ||' p_item_id => ' || p_item_id);
442       trace(l_proc ||' p_subinventory_code => ' || p_subinventory_code, 4);
443       trace(l_proc ||' p_locator_id => ' || p_locator_id, 4);
444    end if;
445 
446    wms_atf_destination_lpn.get_seed_dest_lpn(
447       x_return_status       => x_return_status
448    ,  x_msg_count           => x_msg_count
449    ,  x_msg_data            => x_msg_data
450    ,  x_lpn_id              => x_lpn_id
451    ,  x_lpn_valid           => x_lpn_valid
452    ,  p_mode                => p_mode
453    ,  p_task_id             => p_task_id
454    ,  p_activity_type_id    => p_activity_type_id
455    ,  p_lpn_id              => p_lpn_id
456    ,  p_subinventory_code   => p_subinventory_code
457    ,  p_locator_id          => p_locator_id
458    ,  p_api_version         => p_api_version
459    ,  p_init_msg_list       => p_init_msg_list
460    ,  p_commit              => p_commit
461    );
462 
463    if (l_debug =1) then
464       trace(l_proc ||' After calling package "wms_atf_dest_loc.get_seed_dest_loc"....', 1);
465       trace(l_proc ||' Out parameters...');
466       trace(l_proc ||' x_return_status = ' ||  x_return_status);
467       trace(l_proc ||' x_lpn_id = ' ||  x_lpn_id);
468       trace(l_proc ||' x_lpn_valid = ' ||  x_lpn_valid);
469       trace(l_proc ||'   ');
470       trace(l_proc ||'   ');
471       trace(l_proc ||' Exiting procedure "wms_get_dest_loc_lpn.wms_dest_lpn_wo_item"....', 1);
472    end if;
473 
474 end wms_dest_lpn_wo_item;
475 
476 end wms_get_dest_loc_lpn;