DBA Data[Home] [Help]

APPS.WIP_DEFAULT_SHOPFLOORMOVE dependencies on WIP_CONSTANTS

Line 57: and (((we.entity_type = WIP_CONSTANTS.DISCRETE)

53: select count(*) into x_valid_ez_complete
54: from WIP_ENTITIES WE
55: where we.wip_entity_id = p_wip_entity_id
56: and we.organization_id = p_org_id
57: and (((we.entity_type = WIP_CONSTANTS.DISCRETE)
58: and not exists (select 'X'
59: from WIP_DISCRETE_JOBS DJ
60: where DJ.WIP_ENTITY_ID = p_wip_entity_id
61: and DJ.ORGANIZATION_ID = p_org_id

Line 63: or (we.entity_type = WIP_CONSTANTS.REPETITIVE)

59: from WIP_DISCRETE_JOBS DJ
60: where DJ.WIP_ENTITY_ID = p_wip_entity_id
61: and DJ.ORGANIZATION_ID = p_org_id
62: and DJ.COMPLETION_SUBINVENTORY IS NOT NULL))
63: or (we.entity_type = WIP_CONSTANTS.REPETITIVE)
64: and not exists (select 'X' from WIP_REPETITIVE_ITEMS WRI
65: where WRI.WIP_ENTITY_ID = p_wip_entity_id
66: and WRI.ORGANIZATION_ID = p_org_id
67: and WRI.LINE_ID = p_line_id

Line 92: and msi.lot_control_code = WIP_CONSTANTS.LOT

88: where we.wip_entity_id = p_wip_entity_id
89: and we.organization_id = p_org_id
90: and msi.inventory_item_id = we.primary_item_id
91: and msi.organization_id = we.organization_id
92: and msi.lot_control_code = WIP_CONSTANTS.LOT
93: and ( ( we.entity_type = WIP_CONSTANTS.DISCRETE
94: and exists (select 'X'
95: from wip_discrete_jobs wdj
96: where wdj.wip_entity_id = we.wip_entity_id

Line 93: and ( ( we.entity_type = WIP_CONSTANTS.DISCRETE

89: and we.organization_id = p_org_id
90: and msi.inventory_item_id = we.primary_item_id
91: and msi.organization_id = we.organization_id
92: and msi.lot_control_code = WIP_CONSTANTS.LOT
93: and ( ( we.entity_type = WIP_CONSTANTS.DISCRETE
94: and exists (select 'X'
95: from wip_discrete_jobs wdj
96: where wdj.wip_entity_id = we.wip_entity_id
97: and wdj.organization_id = we.organization_id

Line 99: or (we.entity_type = WIP_CONSTANTS.REPETITIVE) );

95: from wip_discrete_jobs wdj
96: where wdj.wip_entity_id = we.wip_entity_id
97: and wdj.organization_id = we.organization_id
98: and wdj.lot_number is null))
99: or (we.entity_type = WIP_CONSTANTS.REPETITIVE) );
100:
101: exception
102: when others then
103: fnd_msg_pub.add_exc_msg('WIP_Default_Shopfloormove','validate_lot_control');

Line 143: and wsfs.intraoperation_step_type=WIP_CONSTANTS.TOMOVE

139: and nvl (wo.repetitive_schedule_id, -1) = nvl (p_rep_sched_id, -1)
140: and wo.organization_id = wsfs.organization_id
141: and wo.next_operation_seq_num is null
142: and wo.operation_seq_num = wsfs.operation_seq_num
143: and wsfs.intraoperation_step_type=WIP_CONSTANTS.TOMOVE
144: and wsfsc.shop_floor_status_code = wsfs.shop_floor_status_code
145: and wsfsc.organization_id = wsfs.organization_id
146: and wsfsc.status_move_flag = 2
147: and nvl(wsfsc.disable_date, sysdate + 1) > sysdate;

Line 174: and ( ( we.entity_type = WIP_CONSTANTS.DISCRETE

170: from MTL_SYSTEM_ITEMS msi
171: where msi.organization_id = p_org_id
172: and msi.inventory_item_id = we.primary_item_id
173: and msi.revision_qty_control_code=2)
174: and ( ( we.entity_type = WIP_CONSTANTS.DISCRETE
175: and not exists (
176: select 'X'
177: from WIP_DISCRETE_JOBS wdj, MTL_ITEM_REVISIONS MIR
178: where wdj.organization_id = we.organization_id

Line 188: or (we.entity_type = WIP_CONSTANTS.REPETITIVE

184: and mir.revision = wdj.bom_revision
185: )
186: )
187: ))
188: or (we.entity_type = WIP_CONSTANTS.REPETITIVE
189: and not exists (
190: select 'X'
191: from WIP_REPETITIVE_SCHEDULES WRS, MTL_ITEM_REVISIONS MIR
192: where wrs.organization_id = we.organization_id

Line 266: x_txn_type := WIP_CONSTANTS.MOVE_TXN;

262: l_lot_control_code NUMBER; /*Added for bug 8826087*/
263: l_shelf_life_code NUMBER; /*Added for bug 8826087*/
264:
265: BEGIN
266: x_txn_type := WIP_CONSTANTS.MOVE_TXN;
267: if (p_correction_type = MOVE_FORWARD) then
268:
269: if (p_next_op > p_current_op) then
270: x_current_step := WIP_CONSTANTS.QUEUE;

Line 270: x_current_step := WIP_CONSTANTS.QUEUE;

266: x_txn_type := WIP_CONSTANTS.MOVE_TXN;
267: if (p_correction_type = MOVE_FORWARD) then
268:
269: if (p_next_op > p_current_op) then
270: x_current_step := WIP_CONSTANTS.QUEUE;
271: x_next_step := WIP_CONSTANTS.QUEUE;
272: else
273: validate_last_op(p_wip_entity_id, p_org_id, p_line_id,
274: p_rep_sched_id, x_valid_ez_complete);

Line 271: x_next_step := WIP_CONSTANTS.QUEUE;

267: if (p_correction_type = MOVE_FORWARD) then
268:
269: if (p_next_op > p_current_op) then
270: x_current_step := WIP_CONSTANTS.QUEUE;
271: x_next_step := WIP_CONSTANTS.QUEUE;
272: else
273: validate_last_op(p_wip_entity_id, p_org_id, p_line_id,
274: p_rep_sched_id, x_valid_ez_complete);
275:

Line 305: if (l_ncp_after_current_op > 0 or (l_lot_control_code = WIP_CONSTANTS.LOT and l_shelf_life_code = WIP_CONSTANTS.USER_DEFINED_EXP)) then

301:
302:
303:
304: /*Fix for bug 8826087*/
305: if (l_ncp_after_current_op > 0 or (l_lot_control_code = WIP_CONSTANTS.LOT and l_shelf_life_code = WIP_CONSTANTS.USER_DEFINED_EXP)) then
306: /*To make the completion invalid because there are Non count point operation
307: after this operation*/
308: x_valid_ez_complete := -999 ;
309: end if ;

Line 313: x_txn_type := WIP_CONSTANTS.COMP_TXN;

309: end if ;
310:
311:
312: if (x_valid_ez_complete = VALID) then
313: x_txn_type := WIP_CONSTANTS.COMP_TXN;
314: end if;
315:
316: p_next_op := p_current_op;
317: p_next_dept_id := p_current_dept_id;

Line 318: x_current_step := WIP_CONSTANTS.QUEUE;

314: end if;
315:
316: p_next_op := p_current_op;
317: p_next_dept_id := p_current_dept_id;
318: x_current_step := WIP_CONSTANTS.QUEUE;
319: x_next_step := WIP_CONSTANTS.TOMOVE;
320:
321: end if;
322: else

Line 319: x_next_step := WIP_CONSTANTS.TOMOVE;

315:
316: p_next_op := p_current_op;
317: p_next_dept_id := p_current_dept_id;
318: x_current_step := WIP_CONSTANTS.QUEUE;
319: x_next_step := WIP_CONSTANTS.TOMOVE;
320:
321: end if;
322: else
323: if (p_next_op > p_current_op) then

Line 330: x_current_step := WIP_CONSTANTS.QUEUE;

326: p_next_op := x_temp;
327: x_temp := p_current_dept_id;
328: p_current_dept_id := p_next_dept_id;
329: p_next_dept_id := x_temp;
330: x_current_step := WIP_CONSTANTS.QUEUE;
331: x_next_step := WIP_CONSTANTS.QUEUE;
332: else
333: validate_last_op(p_wip_entity_id, p_org_id, p_line_id,
334: p_rep_sched_id, x_valid_ez_complete);

Line 331: x_next_step := WIP_CONSTANTS.QUEUE;

327: x_temp := p_current_dept_id;
328: p_current_dept_id := p_next_dept_id;
329: p_next_dept_id := x_temp;
330: x_current_step := WIP_CONSTANTS.QUEUE;
331: x_next_step := WIP_CONSTANTS.QUEUE;
332: else
333: validate_last_op(p_wip_entity_id, p_org_id, p_line_id,
334: p_rep_sched_id, x_valid_ez_complete);
335: if (x_valid_ez_complete = VALID) then

Line 336: x_txn_type := WIP_CONSTANTS.RET_TXN;

332: else
333: validate_last_op(p_wip_entity_id, p_org_id, p_line_id,
334: p_rep_sched_id, x_valid_ez_complete);
335: if (x_valid_ez_complete = VALID) then
336: x_txn_type := WIP_CONSTANTS.RET_TXN;
337: end if;
338: p_next_op := p_current_op;
339: p_next_dept_id := p_current_dept_id;
340: x_current_step := WIP_CONSTANTS.TOMOVE;

Line 340: x_current_step := WIP_CONSTANTS.TOMOVE;

336: x_txn_type := WIP_CONSTANTS.RET_TXN;
337: end if;
338: p_next_op := p_current_op;
339: p_next_dept_id := p_current_dept_id;
340: x_current_step := WIP_CONSTANTS.TOMOVE;
341: x_next_step := WIP_CONSTANTS.QUEUE;
342: end if;
343: end if;
344:

Line 341: x_next_step := WIP_CONSTANTS.QUEUE;

337: end if;
338: p_next_op := p_current_op;
339: p_next_dept_id := p_current_dept_id;
340: x_current_step := WIP_CONSTANTS.TOMOVE;
341: x_next_step := WIP_CONSTANTS.QUEUE;
342: end if;
343: end if;
344:
345: exception

Line 511: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then

507: -- set the primary quantity to job qty if basis type is LOT based
508: -- fix bug 1832111
509: if (l_basis_type = 2) then -- lot based resource
510: if (l_fm_operation_seq_num = l_cur_op_seq) then
511: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then
512: l_primary_quantity := l_cur_qty_in_queue;
513: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then
514: l_primary_quantity := l_cur_qty_to_move;
515: end if;

Line 513: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then

509: if (l_basis_type = 2) then -- lot based resource
510: if (l_fm_operation_seq_num = l_cur_op_seq) then
511: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then
512: l_primary_quantity := l_cur_qty_in_queue;
513: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then
514: l_primary_quantity := l_cur_qty_to_move;
515: end if;
516: elsif (l_fm_operation_seq_num = l_next_op_seq) then
517: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then

Line 517: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then

513: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then
514: l_primary_quantity := l_cur_qty_to_move;
515: end if;
516: elsif (l_fm_operation_seq_num = l_next_op_seq) then
517: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then
518: l_primary_quantity := l_next_qty_in_queue;
519: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then
520: l_primary_quantity := l_next_qty_to_move;
521: end if;

Line 519: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then

515: end if;
516: elsif (l_fm_operation_seq_num = l_next_op_seq) then
517: if (l_fm_intraop_step_type = WIP_CONSTANTS.QUEUE) then
518: l_primary_quantity := l_next_qty_in_queue;
519: elsif (l_fm_intraop_step_type = WIP_CONSTANTS.TOMOVE) then
520: l_primary_quantity := l_next_qty_to_move;
521: end if;
522: end if;
523: -- need to also change the transaction_quantity

Line 1156: IF (l_logLevel <= wip_constants.full_logging) THEN

1152: AND pda.quantity_delivered IS NOT NULL;
1153: END IF;
1154: /*Changes done SQL for performance bug 9888616. */
1155:
1156: IF (l_logLevel <= wip_constants.full_logging) THEN
1157: wip_logger.log('Get_Overcpl_Primary_Qty: l_total_po_qty_delivered: '||l_total_po_qty_delivered,l_returnStatus);
1158: END IF ;
1159:
1160: begin

Line 1254: IF (l_logLevel <= wip_constants.full_logging) THEN

1250: when others then
1251: fnd_msg_pub.add_exc_msg('WIP_Default_Shopfloormove','get_overcpl_primary_qty: select from MSI');
1252: end;
1253:
1254: IF (l_logLevel <= wip_constants.full_logging) THEN
1255: wip_logger.log('Get_Overcpl_Primary_Qty: l_total_pri_qty_delivered: '||l_total_pri_qty_delivered,l_returnStatus);
1256: END IF;
1257:
1258: begin

Line 1297: and wrs.status_type = WIP_CONSTANTS.RELEASED

1293: and wrs.wip_entity_id = wo.wip_entity_id
1294: and wo.organization_id = wrs.organization_id
1295: and wo.repetitive_schedule_id = wrs.repetitive_schedule_id
1296: and wrs.line_id = g_osp_rec.line_id
1297: and wrs.status_type = WIP_CONSTANTS.RELEASED
1298: and wo.organization_id = g_ShopFloorMove_rec.organization_id
1299: and wo.operation_seq_num = g_ShopFloorMove_rec.fm_operation_seq_num;
1300:
1301: end if ;

Line 1305: IF (l_logLevel <= wip_constants.full_logging) THEN

1301: end if ;
1302:
1303: l_total_qty := l_quantity_in_queue + l_quantity_running + l_quantity_completed ;
1304:
1305: IF (l_logLevel <= wip_constants.full_logging) THEN
1306: wip_logger.log('Get_Overcpl_Primary_Qty: l_total_qty: '||l_total_qty,l_returnStatus);
1307: wip_logger.log('Get_Overcpl_Primary_Qty: l_quantity_in_queue: '||l_quantity_in_queue,l_returnStatus);
1308: wip_logger.log('Get_Overcpl_Primary_Qty: l_quantity_running: '||l_quantity_running,l_returnStatus);
1309: wip_logger.log('Get_Overcpl_Primary_Qty: l_quantity_completed: '||l_quantity_completed,l_returnStatus);

Line 1318: IF (l_logLevel <= wip_constants.full_logging) THEN

1314: --the quantity being received as OverCompletion, when it is NOT. This condition will cause it to
1315: --avoid that.
1316: if (l_total_qty = 0) then
1317: l_total_qty := l_scheduled_quantity;
1318: IF (l_logLevel <= wip_constants.full_logging) THEN
1319: wip_logger.log('Get_Overcpl_Primary_Qty: l_total_qty 2: '||l_total_qty,l_returnStatus);
1320: END IF;
1321: end if;
1322:

Line 1332: IF (l_logLevel <= wip_constants.full_logging) THEN

1328:
1329: l_curr_qty_delivered := nvl(g_ShopFloorMove_rec.primary_quantity,0);
1330: l_total_prev_qty_delivered := l_total_pri_qty_delivered - l_curr_qty_delivered;
1331:
1332: IF (l_logLevel <= wip_constants.full_logging) THEN
1333: wip_logger.log('Get_Overcpl_Primary_Qty: l_curr_qty_delivered: '||l_curr_qty_delivered,l_returnStatus);
1334: wip_logger.log('Get_Overcpl_Primary_Qty: l_total_prev_qty_delivered: '||l_total_prev_qty_delivered,l_returnStatus);
1335: END IF;
1336:

Line 1350: IF (l_logLevel <= wip_constants.full_logging) THEN

1346: /* Modified for bug 6649174 */
1347: --l_remaining_qty := greatest(l_scheduled_quantity, l_quantity_in_queue) - l_total_prev_qty_delivered ; -- Open Qty
1348: l_remaining_qty := l_total_qty - l_total_prev_qty_delivered ; -- Open Qty
1349:
1350: IF (l_logLevel <= wip_constants.full_logging) THEN
1351: wip_logger.log('Get_Overcpl_Primary_Qty: l_remaining_qty: '||l_remaining_qty,l_returnStatus);
1352: END IF;
1353:
1354: /* Modified calculation logic for bug 6649174 */

Line 1359: IF (l_logLevel <= wip_constants.full_logging) THEN

1355: if l_curr_qty_delivered > l_remaining_qty then -- Current Qty is going to overcomplete an Op.
1356:
1357: If ( l_total_prev_qty_delivered >= l_total_qty ) then -- You delivered more quantity last time
1358: l_overcpl_primary_qty := l_curr_qty_delivered;
1359: IF (l_logLevel <= wip_constants.full_logging) THEN
1360: wip_logger.log('Get_Overcpl_Primary_Qty: l_overcpl_primary_qty1: '||l_overcpl_primary_qty,l_returnStatus);
1361: END IF;
1362: elsif (l_total_pri_qty_delivered > l_total_qty) then -- You are over receiving this time
1363: l_overcpl_primary_qty := l_total_pri_qty_delivered - l_total_qty;

Line 1364: IF (l_logLevel <= wip_constants.full_logging) THEN

1360: wip_logger.log('Get_Overcpl_Primary_Qty: l_overcpl_primary_qty1: '||l_overcpl_primary_qty,l_returnStatus);
1361: END IF;
1362: elsif (l_total_pri_qty_delivered > l_total_qty) then -- You are over receiving this time
1363: l_overcpl_primary_qty := l_total_pri_qty_delivered - l_total_qty;
1364: IF (l_logLevel <= wip_constants.full_logging) THEN
1365: wip_logger.log('Get_Overcpl_Primary_Qty: l_overcpl_primary_qty2: '||l_overcpl_primary_qty,l_returnStatus);
1366: END IF;
1367: end if;
1368:

Line 1375: IF (l_logLevel <= wip_constants.full_logging) THEN

1371:
1372: END IF;
1373: END IF;
1374:
1375: IF (l_logLevel <= wip_constants.full_logging) THEN
1376: wip_logger.log('Get_Overcpl_Primary_Qty: l_overcpl_primary_qty3: '||l_overcpl_primary_qty,l_returnStatus);
1377: END IF;
1378:
1379: RETURN l_overcpl_primary_qty;

Line 1536: RETURN WIP_CONSTANTS.MOVE_VAL;

1532: RETURN g_ShopFloorMove_rec.process_phase;
1533: END IF;
1534:
1535: IF g_ShopFloorMove_rec.source_code = 'RCV' THEN
1536: RETURN WIP_CONSTANTS.MOVE_VAL;
1537: END IF;
1538:
1539: RETURN NULL;
1540:

Line 1557: RETURN WIP_CONSTANTS.PENDING;

1553: RETURN g_ShopFloorMove_rec.process_status;
1554: END IF;
1555:
1556: IF g_ShopFloorMove_rec.source_code = 'RCV' THEN
1557: RETURN WIP_CONSTANTS.PENDING;
1558: END IF;
1559:
1560: RETURN NULL;
1561: