DBA Data[Home] [Help]

PACKAGE BODY: APPS.WIP_DISCRETE_WS_MOVE

Source


1 PACKAGE BODY wip_discrete_ws_move AS
2 /* $Header: wipdsmvb.pls 120.3.12020000.2 2013/02/27 13:57:53 sjallipa ship $ */
3 
4   procedure explodeComponents(p_jobID        in number,
5                               p_orgID        in number,
6                               p_moveQty      in number,
7                               p_fromOp       in number,
8                               p_fromStep     in number,
9                               p_toOp         in number,
10                               p_toStep       in number,
11                               p_txnType      in number,
12                               x_moveTxnID    out nocopy number,
13                               x_cplTxnID     out nocopy number,
14                               x_txnHeaderID  out nocopy number,
15                               x_compHeaderID out nocopy number,
16                               x_batchID      out nocopy number,
17                               x_lotEntryType out nocopy number,
18                               x_compInfo     out nocopy system.wip_lot_serial_obj_t,
19                               x_mtlMode      out nocopy number,
20                               x_periodID     out nocopy number,
21                               x_returnStatus out nocopy varchar2,
22                               x_errMessage   out nocopy varchar2) is
23     openPastPeriod boolean;
24     periodID number;
25   begin
26     select wip_transactions_s.nextval into x_moveTxnID from dual;
27     select mtl_material_transactions_s.nextval into x_cplTxnID from dual;
28     select mtl_material_transactions_s.nextval into x_batchID from dual;
29     select mtl_material_transactions_s.nextval into x_txnHeaderID from dual;
30 
31     openPastPeriod := false;
32     x_mtlMode := nvl(to_number(fnd_profile.value('TRANSACTION_PROCESS_MODE')),
33                      WIP_CONSTANTS.ONLINE);
34     if ( x_mtlMode = WIP_CONSTANTS.FORM_LEVEL ) then
35       x_mtlMode := nvl(to_number(fnd_profile.value('WIP_SHOP_FLOOR_MTL_TRANSACTION')),
36                        WIP_CONSTANTS.ONLINE);
37     end if;
38 
39     if ( x_mtlMode <> WIP_CONSTANTS.ONLINE ) then
40       select mtl_material_transactions_s.nextval into x_compHeaderID from dual;
41     else
42       x_compHeaderID := x_txnHeaderID;
43     end if;
44 
45     -- derive the accounting period stuff by calling inv routine
46     invttmtx.tdatechk(
47       org_id           => p_orgID,
48       transaction_date => sysdate,
49       period_id        => periodID,
50       open_past_period => openPastPeriod);
51 
52     if (periodID = -1 or periodID = 0) then
53       fnd_message.set_name(
54         application => 'INV',
55         name        => 'INV_NO_OPEN_PERIOD');
56       x_returnStatus := fnd_api.g_ret_sts_error;
57       x_errMessage := fnd_message.get;
58       return;
59     end if;
60 
61     x_periodID := periodID;
62 
63     wma_move.backflush(p_jobID => p_jobID,
64                        p_orgID => p_orgID,
65                        p_childMoveID => -1,
66                        p_moveID => x_moveTxnID,
67                        p_ocQty => 0,
68                        p_moveQty => p_moveQty,
69                        p_txnDate => sysdate,
70                        p_txnHdrID => x_txnHeaderID,
71                        p_fm_op => p_fromOp,
72                        p_fm_step => p_fromStep,
73                        p_to_op => p_toOp,
74                        p_to_step => p_toStep,
75                        p_cmpTxnID => x_cplTxnID,
76                        p_txnType => p_txnType,
77                        p_objectID => -1,
78                        x_lotEntryType => x_lotEntryType,
79                        x_compInfo => x_compInfo,
80                        x_returnStatus => x_returnStatus,
81                        x_errMessage => x_errMessage);
82 
83   end explodeComponents;
84 
85 
86   procedure processMove(moveData       in  MoveData,
87                         x_returnStatus out nocopy varchar2,
88                         x_errMessage   out nocopy varchar2) is
89     qaCollectionID number;
90     processStatus number;
91     groupID number;
92     primaryItemID number;
93     lineID number;
94 
95     fmOpCode varchar2(5);
96     fmDeptID number;
97     fmDeptCode varchar2(11);
98     fmPrevOpSeq number;
99     fmNextOpSeq number;
100     fmOpExists boolean;
101     toOpCode varchar2(5);
102     toDeptID number;
103     toDeptCode varchar2(11);
104     toPrevOpSeq number;
105     toNextOpSeq number;
106     toOpExists boolean;
107 
108     l_totalNum number;
109     l_returnStatus VARCHAR2(1);
110     l_logLevel NUMBER;
111     l_params  wip_logger.param_tbl_t;
112     l_periodID Number;
113     l_temp Number;
114     l_openperiod boolean := false;
115   begin
116     x_returnStatus := fnd_api.g_ret_sts_success;
117     l_totalNum := 0;
118     l_logLevel := to_number(fnd_log.g_current_runtime_level);
119     savepoint dsmove1;
120 
121     if ( l_logLevel <= wip_constants.trace_logging) then
122       l_params(1).paramName := 'not printing params';
123       l_params(1).paramValue := ' ';
124       wip_logger.entryPoint(p_procName => 'wip_discrete_ws_move.insertMoveRecord',
125                             p_params => l_params,
126                             x_returnStatus => l_returnStatus);
127     end if;
128 
129 	   --Bug 16372749: Added validation on transaction date to be in an open accounting period.
130     invttmtx.tdatechk(
131       org_id           => moveData.orgID,
132       transaction_date => sysdate,
133       period_id        => l_periodID,
134       open_past_period => l_openperiod);
135 
136     if (l_periodID = -1 or l_periodID = 0) then
137       fnd_message.set_name('INV','INV_NO_OPEN_PERIOD');
138       fnd_msg_pub.add;
139       raise fnd_api.g_exc_unexpected_error;
140     end if;
141 
142     begin
143       SELECT 1 into l_temp
144       FROM wip_period_balances wpb
145       WHERE wpb.acct_period_id = l_periodID
146       AND wpb.wip_entity_id = moveData.wipEntityID
147       AND wpb.organization_id = moveData.orgID;
148     exception
149       when others then
150         fnd_message.set_name('WIP', 'WIP_NO_BALANCE');
151         fnd_msg_pub.add;
152         raise fnd_api.g_exc_unexpected_error;
153     end;
154 
155     qaCollectionID := moveData.qaCollectionID;
156     if ( moveData.qaCollectionID is not null ) then
157       select count(*) into l_totalNum
158         from qa_results
159        where collection_id = moveData.qaCollectionID;
160       if ( l_totalNum = 0 ) then
161         qaCollectionID := null;
162       end if;
163     end if;
164 
165     if ( moveData.txnMode = 1 ) then
166       groupID := moveData.txnID;
167       processStatus := 2; -- running
168     else
169       groupID := null;
170       processStatus := 1;
171     end if;
172 
173     select primary_item_id, line_id
174       into primaryItemID, lineID
175       from wip_discrete_jobs
176      where organization_id = moveData.orgID
177        and wip_entity_id = moveData.wipEntityID;
178 
179     wip_operations_info.derive_info(
180       p_org_id => moveData.orgID,
181       p_wip_entity_id => moveData.wipEntityID,
182       p_first_schedule_id => null,
183       p_operation_seq_num => moveData.fmOp,
184       p_operation_code => fmOpCode,
185       p_department_id => fmDeptID,
186       p_department_code => fmDeptCode,
187       p_prev_op_seq_num => fmPrevOpSeq,
188       p_next_op_seq_num => fmNextOpSeq,
189       p_operation_exists => fmOpExists);
190 
191     wip_operations_info.derive_info(
192       p_org_id => moveData.orgID,
193       p_wip_entity_id => moveData.wipEntityID,
194       p_first_schedule_id => null,
195       p_operation_seq_num => moveData.toOp,
196       p_operation_code => toOpCode,
197       p_department_id => toDeptID,
198       p_department_code => toDeptCode,
199       p_prev_op_seq_num => toPrevOpSeq,
200       p_next_op_seq_num => toNextOpSeq,
201       p_operation_exists => toOpExists);
202 
203 
204     insert into wip_move_txn_interface
205          (transaction_id,
206           group_id,
207           source_code,
208           last_update_date,
209           last_updated_by,
210           creation_date,
211           created_by,
212           process_phase,
213           process_status,
214           transaction_type,
215           organization_id,
216           wip_entity_id,
217           entity_type,
218           transaction_date,
219           acct_period_id,
220           fm_operation_seq_num,
221           fm_intraoperation_step_type,
222           to_operation_seq_num,
223           to_intraoperation_step_type,
224           transaction_quantity,
225           transaction_uom,
226           scrap_account_id,
227           qa_collection_id,
228           primary_item_id,
229           line_id,
230           fm_operation_code,
231           fm_department_id,
232           fm_department_code,
233           to_operation_code,
234           to_department_id,
235           to_department_code,
236           primary_quantity,
237           primary_uom)
238    values(moveData.txnID,
239           groupID,
240           'Discrete Station Move',
241           sysdate,
242           fnd_global.user_id,
243           sysdate,
244           fnd_global.user_id,
245           2, -- move processing
246           processStatus,
247           moveData.txnType,
248           moveData.orgID,
249           moveData.wipEntityID,
250           1,
251           sysdate,
252           moveData.periodID,
253           moveData.fmOp,
254           moveData.fmStep,
255           moveData.toOp,
256           moveData.toStep,
257           moveData.txnQty,
258           moveData.txnUOM,
259           moveData.scrapAcctID,
260           qaCollectionID,
261           primaryItemID,
262           lineID,
263           fmOpCode,
264           fmDeptID,
265           fmDeptCode,
266           toOpCode,
267           toDeptID,
268           toDeptCode,
269           moveData.txnQty,
270           moveData.txnUOM
271           );
272 
273     if ( moveData.txnMode = WIP_CONSTANTS.BACKGROUND ) then
274       return;
275     end if;
276 
277     -- process online move transactions
278     if ( moveData.compHeaderID is not null ) then
279       wip_mtlTempProc_priv.validateInterfaceTxns(
280          p_txnHdrID      => moveData.compHeaderID,
281          p_addMsgToStack => fnd_api.g_true,
282          p_rollbackOnErr => fnd_api.g_true,
283          x_returnStatus  => l_returnStatus);
284     end if;
285 
286     if ( l_returnStatus <> fnd_api.g_ret_sts_success) then
287       x_returnStatus := fnd_api.g_ret_sts_error;
288       wip_utilities.get_message_stack(p_msg => x_errMessage);
289       return;
290     end if;
291 
292     if ( moveData.assyHeaderID is not null AND moveData.assyHeaderID <> moveData.compHeaderID ) then
293       wip_mtlTempProc_priv.validateInterfaceTxns(
294          p_txnHdrID      => moveData.assyHeaderID,
295          p_addMsgToStack => fnd_api.g_true,
296          p_rollbackOnErr => fnd_api.g_true,
297          x_returnStatus  => l_returnStatus);
298       if ( l_returnStatus <> fnd_api.g_ret_sts_success) then
299         x_returnStatus := fnd_api.g_ret_sts_error;
300         wip_utilities.get_message_stack(p_msg => x_errMessage);
301         return;
302       end if;
303     end if;
304 
305     wip_movProc_priv.processIntf(
306                         p_group_id => groupID,
307                         p_proc_phase => WIP_CONSTANTS.MOVE_PROC,
308                         p_time_out => 0,
309                         p_move_mode => WIP_CONSTANTS.ONLINE,
310                         p_bf_mode => WIP_CONSTANTS.ONLINE,
311                         p_mtl_mode => moveData.mtlMode,
312                         p_endDebug => fnd_api.g_true,
313                         p_initMsgList => fnd_api.g_true,
314                         p_insertAssy => fnd_api.g_false,
315                         p_do_backflush => fnd_api.g_false,
316                         p_assy_header_id => moveData.assyHeaderID,
317                         p_mtl_header_id => moveData.compHeaderID,
318                         x_returnStatus => x_returnStatus);
319     if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
320       wip_utilities.get_message_stack(p_msg => x_errMessage);
321       rollback to dsmove1;
322     end if;
323 
324   exception
325     when fnd_api.g_exc_unexpected_error THEN
326       rollback to dsmove1;
327       x_returnStatus := fnd_api.g_ret_sts_unexp_error;
328       wip_utilities.get_message_stack(p_msg => x_errMessage);
329       if (l_logLevel <= wip_constants.trace_logging) then
330         wip_logger.exitPoint(p_procName => 'wip_discrete_ws_move.insertMoveRecord',
331                              p_procReturnStatus => x_returnStatus,
332                              p_msg => x_errMessage,
333                              x_returnStatus => l_returnStatus);
334       end if;
335 
336     when others then
337       rollback to dsmove1;
338       x_returnStatus := fnd_api.g_ret_sts_unexp_error;
339       fnd_message.set_name ('WIP', 'GENERIC_ERROR');
340       fnd_message.set_token ('PROCEDURE', 'wip_discrete_ws_move.processMove');
341       fnd_message.set_token ('ERROR', SQLCODE || ' ' || SQLERRM);
342       x_errMessage := fnd_message.get;
343       if (l_logLevel <= wip_constants.trace_logging) then
344         wip_logger.exitPoint(p_procName => 'wip_discrete_ws_move.processMove',
345                              p_procReturnStatus => x_returnStatus,
346                              p_msg => x_errMessage,
347                              x_returnStatus => l_returnStatus);
348       end if;
349   end processMove;
350 
351 
352   procedure createLocator(p_orgID        in number,
353                           p_locatorName  in varchar2,
354                           p_subinv       in varchar2,
355                           x_locatorID    out nocopy number,
356                           x_returnStatus out nocopy varchar2,
357                           x_errMessage   out nocopy varchar2) is
358     l_msgCount number;
359     l_locExists varchar2(1);
360   begin
361     inv_loc_wms_pub.create_locator(
362                      x_return_status => x_returnStatus,
363                      x_msg_count => l_msgCount,
364                      x_msg_data => x_errMessage,
365                      x_inventory_location_id => x_locatorID,
366                      x_locator_exists => l_locExists,
367                      p_organization_id => p_orgID,
368                      p_organization_code => null,
369                      p_concatenated_segments => p_locatorName,
370                      p_description => null,
371                      p_inventory_location_type => 3, --storage locator
372                      p_picking_order => null,
373                      p_location_maximum_units => null,
374                      p_subinventory_code => p_subinv,
375                      p_location_weight_uom_code => null,
376                      p_max_weight => null,
377                      p_volume_uom_code => null,
378                      p_max_cubic_area => null,
379                      p_x_coordinate => null,
380                      p_y_coordinate => null,
381                      p_z_coordinate => null,
382                      p_physical_location_id => null,
383                      p_pick_uom_code => null,
384                      p_dimension_uom_code => null,
385                      p_length => null,
386                      p_width => null,
387                      p_height => null,
388                      p_status_id => null,
389                      p_dropping_order => null);
390   end createLocator;
391 
392 
393   procedure checkOvershipment(p_orgID       in number,
394                               p_itemID      in number,
395                               p_orderLineID in number,
396                               p_primaryQty  in number,
397                               p_primaryUOM  in varchar2,
398                               x_returnStatus out nocopy varchar2,
399                               x_errMessage   out nocopy varchar2) is
400     l_wsh_minmax_in_rec wsh_integration.minmaxinrectype;
401     l_wsh_minmax_out_rec wsh_integration.minmaxoutrectype;
402     l_wsh_minmax_inout_rec wsh_integration.minmaxinoutrectype;
403     l_msg_count number;
404     l_msg_data varchar2(2000);
405 
406     l_max_rem_primary_qty number;
407     l_inv_primary_rsv_quantity number;
408   begin
409     x_returnStatus := fnd_api.g_ret_sts_success;
410     l_wsh_minmax_in_rec.api_version_number := 1.0;
411     l_wsh_minmax_in_rec.source_code := 'OE';--Fix for Bug 4635597
412     l_wsh_minmax_in_rec.line_id := p_orderLineID;
413 
414     wsh_integration.get_min_max_tolerance_quantity(
415       p_in_attributes => l_wsh_minmax_in_rec,
416       p_out_attributes => l_wsh_minmax_out_rec,
417       p_inout_attributes => l_wsh_minmax_inout_rec,
418       x_return_status => x_returnStatus,
419       x_msg_count => l_msg_count,
420       x_msg_data => l_msg_data);
421 
422     if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
423       fnd_message.set_name(application => 'WIP',
424                            name => 'WIP_WSH_MINMAX_API_FAILURE');
425       fnd_message.set_token(token => 'ENTITY1',
426                             value => substr(l_msg_data, 1, 250),
427                             translate => false);
428       x_errMessage := fnd_message.get;
429       return;
430     end if;
431 
432     l_max_rem_primary_qty := inv_convert.inv_um_convert(
433         item_id => p_itemID,
434         precision => null,
435         from_quantity => l_wsh_minmax_out_rec.max_remaining_quantity,
436         from_unit => l_wsh_minmax_out_rec.quantity_uom,
437         to_unit => p_primaryUOM,
438         from_name => null,
439         to_name => null);
440 
441     select nvl(sum(primary_reservation_quantity), 0)
442       into l_inv_primary_rsv_quantity
443       from mtl_reservations
444      where demand_source_line_id = p_orderLineID
445        and organization_id = p_orgID
446        and supply_source_type_id = 13;
447 
448     if ( p_primaryQty > l_max_rem_primary_qty - l_inv_primary_rsv_quantity ) then
449       x_returnStatus := fnd_api.g_ret_sts_error;
450       fnd_message.set_name('WIP', 'WIP_OSHP_TOLERANCE_FAIL');
451       x_errMessage := fnd_message.get;
452     end if;
453 
454   end checkOvershipment;
455 
456 
457   function clientToServerDate(p_date in date) return date is
458     l_dateval varchar2(100);
459     l_date  date;
460   begin
461     if ( p_date is null ) then
462       return null;
463     end if;
464     l_dateval := to_char(p_date, fnd_date.outputDT_mask);
465     l_date := fnd_date.displayDT_to_date(charDT => l_dateval,calendar_aware => 2);
466     return l_date;
467   end clientToServerDate;
468 
469 
470   function serverToClientDate(p_date in date) return date is
471     l_dateval varchar2(100);
472     l_date  date;
473   begin
474     if ( p_date is null ) then
475       return null;
476     end if;
477     l_dateval := fnd_date.date_to_displayDT(dateval => p_date,calendar_aware => 2);
478     l_date := to_date(l_dateval, fnd_date.outputDT_mask);
479     return l_date;
480   end serverToClientDate;
481 
482 
483   procedure initTimezone is
484   begin
485     fnd_date.timezones_enabled := true;
486     fnd_date.server_timezone_code := fnd_timezones.get_server_timezone_code;
487     fnd_date.client_timezone_code := fnd_timezones.get_client_timezone_code;
488     if ( fnd_timezones.timezones_enabled = 'N' ) then
489       fnd_date.timezones_enabled := false;
490     end if;
491   end initTimezone;
492 
493 
494 /* Fix for bug 4568517: New procedure get_prj_loc_lov added.
495  * ==========================================================
496  * Procedure returns a ref cursor containing LOV statement to
497  * be used by discrete workstation code completion locator.
498  * For PJM enabled orgs, the locator will show project number
499  * and task number, and if project/task are passed, the
500  * restriction would be applied.
501  *===========================================================
502  */
503 PROCEDURE get_prj_loc_lov(
504     x_locators               OUT    NOCOPY t_genref
505   , p_organization_id        IN     NUMBER
506   , p_subinventory_code      IN     VARCHAR2
507   , p_restrict_locators_code IN     NUMBER
508   , p_inventory_item_id      IN     NUMBER
509   , p_concatenated_segments  IN     VARCHAR2
510   , p_transaction_type_id    IN     NUMBER
511   , p_wms_installed          IN     VARCHAR2
512   , p_project_id             IN     NUMBER
513   , p_task_id                IN     NUMBER
514   ) IS
515 
516   l_ispjm_org VARCHAR2(1);
517   l_sub_type      NUMBER;
518 BEGIN
519   BEGIN
520     SELECT nvl(PROJECT_REFERENCE_ENABLED,'N')
521     INTO   l_ispjm_org
522     FROM   pjm_org_parameters
523     WHERE  organization_id=p_organization_id;
524   EXCEPTION
525      WHEN NO_DATA_FOUND  THEN
526        l_ispjm_org:='N';
527   END;
528 
529   BEGIN
530     SELECT Nvl(subinventory_type,1)
531     INTO   l_sub_type
532     FROM   mtl_secondary_inventories
533     WHERE  secondary_inventory_name = p_subinventory_code
534     AND    organization_id = p_organization_id;
535   EXCEPTION
536     WHEN OTHERS THEN
537         l_sub_type := 1;
538     END;
539 
540   IF l_ispjm_org='N' THEN /*Non PJM Org*/
541     IF p_Restrict_Locators_Code = 1 AND l_sub_type = 1 THEN --Locators restricted to predefined list
542       OPEN   x_Locators FOR
543       SELECT a.inventory_location_id,
544              a.concatenated_segments,
545              nvl( a.description, -1)
546       FROM   mtl_item_locations_kfv a,mtl_secondary_locators b
547       WHERE  b.organization_id = p_Organization_Id
548       AND    b.inventory_item_id = p_Inventory_Item_Id
549       AND    nvl(a.disable_date, trunc(sysdate+1)) > trunc(sysdate)
550       AND    b.subinventory_code = p_Subinventory_Code
551       AND    a.inventory_location_id = b.secondary_locator
552       AND    a.concatenated_segments LIKE (p_concatenated_segments)
553       AND    inv_material_status_grp.is_status_applicable
554              ( p_wms_installed,
555                NULL,
556                p_transaction_type_id,
557                NULL,
558                NULL,
559                p_Organization_Id,
560                p_Inventory_Item_Id,
561                p_Subinventory_Code,
562                a.inventory_location_id,
563                NULL,
564                NULL,
565                'L') = 'Y'
566       ORDER BY 2;
567 
568     ELSE --Locators not restricted
569       OPEN   x_Locators FOR
570       SELECT inventory_location_id,
571              concatenated_segments,
572              description
573       FROM   mtl_item_locations_kfv
574       WHERE  organization_id = p_Organization_Id
575       AND    subinventory_code = p_Subinventory_Code
576       AND    nvl(disable_date, trunc(sysdate+1)) > trunc(sysdate)
577       AND    concatenated_segments LIKE (p_concatenated_segments )
578       AND    inv_material_status_grp.is_status_applicable
579              ( p_wms_installed,
580                NULL,
581                p_transaction_type_id,
582                NULL,
583                NULL,
584                p_Organization_Id,
585                p_Inventory_Item_Id,
586                p_Subinventory_Code,
587                inventory_location_id,
588                NULL,
589                NULL,
590                'L') = 'Y'
591       ORDER BY 2;
592     END IF;
593   ELSE /*PJM org*/
594     IF p_Restrict_Locators_Code = 1 AND l_sub_type = 1 THEN --Locators restricted to predefined list
595       OPEN x_Locators FOR
596       SELECT a.inventory_location_id,
597              inv_project.get_locator(a.inventory_location_id,
598                                      a.organization_id) concatenated_segments,
599              nvl( a.description, -1)
600       FROM   mtl_item_locations_kfv a,mtl_secondary_locators b
601       WHERE  b.organization_id = p_Organization_Id
602       AND    b.inventory_item_id = p_Inventory_Item_Id
603       AND    nvl(a.disable_date, trunc(sysdate+1)) > trunc(sysdate)
604       AND    b.subinventory_code = p_Subinventory_Code
605       AND    a.inventory_location_id = b.secondary_locator
606       AND    a.concatenated_segments like (p_concatenated_segments )
607       AND    nvl(a.project_id,-1) = nvl(p_project_id, -1)
608       AND    nvl(a.task_id, -1) = nvl(p_task_id, -1)
609       AND    inv_material_status_grp.is_status_applicable
610              ( p_wms_installed,
611                NULL,
612                p_transaction_type_id,
613                NULL,
614                NULL,
615                p_Organization_Id,
616                p_Inventory_Item_Id,
617                p_Subinventory_Code,
618                a.inventory_location_id,
619                NULL,
620                NULL,
621                'L') = 'Y'
622       ORDER BY 2;
623     ELSE --Locators not restricted
624       OPEN x_Locators FOR
625       SELECT inventory_location_id,
626              inv_project.get_locator(inventory_location_id,
627                                      organization_id) concatenated_segments,
628              description
629       FROM   mtl_item_locations_kfv
630       WHERE  organization_id = p_Organization_Id
631       AND    subinventory_code = p_Subinventory_Code
632       AND    nvl(disable_date, trunc(sysdate+1)) > trunc(sysdate)
633       AND    concatenated_segments LIKE (p_concatenated_segments )
634       AND    nvl(project_id,-1) = nvl(p_project_id, -1)
635       AND    nvl(task_id, -1) = nvl(p_task_id, -1)
636       AND    inv_material_status_grp.is_status_applicable
637              ( p_wms_installed,
638                NULL,
639                p_transaction_type_id,
640                NULL,
641                NULL,
642                p_Organization_Id,
643                p_Inventory_Item_Id,
644                p_Subinventory_Code,
645                inventory_location_id,
646                NULL,
647                NULL,
648                'L') = 'Y'
649       ORDER BY 2;
650     END IF;
651   END IF;
652 END get_prj_loc_lov;
653 
654 END wip_discrete_ws_move;