DBA Data[Home] [Help]

APPS.WIP_OVERCOMPLETION dependencies on WIP_CONSTANTS

Line 58: and wti1.process_phase = WIP_CONSTANTS.MOVE_PROC

54: wro1.rowid = wro.rowid
55: -- The WO rows to be updated are identified by the rowids.
56: -- For each such row, go back and sum the quantities from WMTI
57: and wti1.group_id = p_group_id
58: and wti1.process_phase = WIP_CONSTANTS.MOVE_PROC
59: and wti1.process_status = WIP_CONSTANTS.RUNNING
60: and TRUNC(wti1.transaction_date)
61: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
62: and wti1.overcompletion_transaction_id is not null

Line 59: and wti1.process_status = WIP_CONSTANTS.RUNNING

55: -- The WO rows to be updated are identified by the rowids.
56: -- For each such row, go back and sum the quantities from WMTI
57: and wti1.group_id = p_group_id
58: and wti1.process_phase = WIP_CONSTANTS.MOVE_PROC
59: and wti1.process_status = WIP_CONSTANTS.RUNNING
60: and TRUNC(wti1.transaction_date)
61: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
62: and wti1.overcompletion_transaction_id is not null
63: and wti1.overcompletion_primary_qty IS NULL

Line 61: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)

57: and wti1.group_id = p_group_id
58: and wti1.process_phase = WIP_CONSTANTS.MOVE_PROC
59: and wti1.process_status = WIP_CONSTANTS.RUNNING
60: and TRUNC(wti1.transaction_date)
61: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
62: and wti1.overcompletion_transaction_id is not null
63: and wti1.overcompletion_primary_qty IS NULL
64: and wro1.wip_entity_id = wti1.wip_entity_id
65: and wro1.organization_id = wti1.organization_id

Line 79: and wti2.process_phase = WIP_CONSTANTS.MOVE_PROC

75: wip_move_txn_interface wti2,
76: WIP_MOVE_TXN_ALLOCATIONS wma2
77: where
78: wti2.group_id = p_group_id
79: and wti2.process_phase = WIP_CONSTANTS.MOVE_PROC
80: and wti2.process_status = WIP_CONSTANTS.RUNNING
81: and TRUNC(wti2.transaction_date)
82: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
83: and wti2.overcompletion_transaction_id is not null

Line 80: and wti2.process_status = WIP_CONSTANTS.RUNNING

76: WIP_MOVE_TXN_ALLOCATIONS wma2
77: where
78: wti2.group_id = p_group_id
79: and wti2.process_phase = WIP_CONSTANTS.MOVE_PROC
80: and wti2.process_status = WIP_CONSTANTS.RUNNING
81: and TRUNC(wti2.transaction_date)
82: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
83: and wti2.overcompletion_transaction_id is not null
84: and wti2.overcompletion_primary_qty IS NULL

Line 82: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)

78: wti2.group_id = p_group_id
79: and wti2.process_phase = WIP_CONSTANTS.MOVE_PROC
80: and wti2.process_status = WIP_CONSTANTS.RUNNING
81: and TRUNC(wti2.transaction_date)
82: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
83: and wti2.overcompletion_transaction_id is not null
84: and wti2.overcompletion_primary_qty IS NULL
85: -- Picked a Move txn
86: and wro2.wip_entity_id = wti2.wip_entity_id

Line 152: AND mmtt1.transaction_action_id = wip_constants.cplassy_action

148: wro1.ROWID = wro.ROWID
149: -- The WO rows to be updated are identified by the rowids.
150: -- For each such row, go back and sum the quantities from WMTI
151: and mmtt1.completion_transaction_id = p_cpl_txn_id
152: AND mmtt1.transaction_action_id = wip_constants.cplassy_action
153: AND mmtt1.overcompletion_primary_qty IS NOT NULL
154: AND wro1.wip_entity_id = mmtt1.transaction_source_id
155: AND wro1.organization_id = mmtt1.organization_id
156: AND mmtt1.organization_id = mmta1.organization_id (+)

Line 168: mmtt2.transaction_action_id = wip_constants.cplassy_action

164: wip_requirement_operations wro2,
165: mtl_material_transactions_temp mmtt2,
166: mtl_material_txn_allocations mmta2
167: WHERE
168: mmtt2.transaction_action_id = wip_constants.cplassy_action
169: AND mmtt2.overcompletion_primary_qty IS NOT NULL
170: and mmtt2.completion_transaction_id = p_cpl_txn_id
171: -- Picked a cpl txn
172: AND wro2.wip_entity_id = mmtt2.transaction_source_id

Line 238: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)

234: -- The WO rows to be updated are identified by the rowids.
235: -- For each such row, go back and sum the quantities from WMTI
236: and wti1.group_id = p_group_id
237: and TRUNC(wti1.transaction_date)
238: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
239: AND wti1.transaction_id = p_txn_id
240: and wop1.wip_entity_id = wti1.wip_entity_id
241: and wop1.organization_id = wti1.organization_id
242: and wop1.operation_seq_num = wti1.fm_operation_seq_num

Line 259: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)

255: wip_move_txn_allocations wma2
256: where
257: wti2.group_id = p_group_id
258: and TRUNC(wti2.transaction_date)
259: = TO_DATE(P_TXN_DATE, WIP_CONSTANTS.DATE_FMT)
260: and wti2.transaction_id = p_txn_id
261: -- Picked a Move txn
262: and wop2.wip_entity_id = wti2.wip_entity_id
263: and wop2.organization_id = wti2.organization_id

Line 323: and wro.basis_type = wip_constants.ITEM_BASED_MTL; /* Bug fix 9337675 */

319: and wro1.wip_entity_id = wdj.wip_entity_id
320: AND wro1.organization_id = wdj.organization_id)
321: where wro.wip_entity_id = p_wip_entity_id
322: and wro.organization_id = p_org_id
323: and wro.basis_type = wip_constants.ITEM_BASED_MTL; /* Bug fix 9337675 */
324: ELSIF ( p_rep_id > 0 ) then
325: /*Bugfix:8838245.Changed below update to divide with component yield factor
326: as yield is separated from quantity per assembly as part of component yield factor project during R12 */
327: update wip_requirement_operations wro

Line 345: and wro.basis_type = wip_constants.ITEM_BASED_MTL; /* Bug fix 9337675 */

341: where
342: wro.organization_id = p_org_id
343: AND wro.wip_entity_id = p_wip_entity_id
344: AND wro.repetitive_schedule_id = p_rep_id
345: and wro.basis_type = wip_constants.ITEM_BASED_MTL; /* Bug fix 9337675 */
346: END IF;
347:
348: END;
349:

Line 390: x_result NUMBER := wip_constants.yes;

386: x_org_id NUMBER;
387: x_wip_entity_id NUMBER;
388: x_line_id NUMBER;
389: x_first_schedule_id NUMBER;
390: x_result NUMBER := wip_constants.yes;
391: x_sched_id NUMBER;
392:
393: cursor get_move_transaction_id is
394: select wip_transactions_s.nextval from dual;

Line 431: IF( p_move_profile = wip_constants.background) THEN

427: AND overcompletion_primary_qty IS NOT NULL
428: ;
429:
430:
431: IF( p_move_profile = wip_constants.background) THEN
432: -- when the Move is done Online, the tolerance is validated in the
433: -- form.
434: x_result := wip_constants.no;
435: check_tolerance(

Line 434: x_result := wip_constants.no;

430:
431: IF( p_move_profile = wip_constants.background) THEN
432: -- when the Move is done Online, the tolerance is validated in the
433: -- form.
434: x_result := wip_constants.no;
435: check_tolerance(
436: x_org_id,
437: x_wip_entity_id,
438: x_sched_id,

Line 444: IF( x_result = wip_constants.no ) THEN

440: x_result
441: );
442: END IF;
443:
444: IF( x_result = wip_constants.no ) THEN
445: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
446: p_err_mesg := fnd_message.get;
447: --p_err_mesg := 'Transaction violates Tolerance Level';
448: ELSE

Line 561: wip_constants.online , p_child_txn_id,

557: p_appl_id, /* program_application_id */
558: p_prog_id, /* program_id */
559: decode(p_req_id, -1, NULL, SYSDATE), /* program_update_date */
560: decode(p_move_profile, /* group_id */
561: wip_constants.online , p_child_txn_id,
562: wip_constants.background, wti.group_id),
563: /* Use the parent''s group_id if in BG */
564: NULL, /* source_code */
565: NULL, /* source_line_id */

Line 562: wip_constants.background, wti.group_id),

558: p_prog_id, /* program_id */
559: decode(p_req_id, -1, NULL, SYSDATE), /* program_update_date */
560: decode(p_move_profile, /* group_id */
561: wip_constants.online , p_child_txn_id,
562: wip_constants.background, wti.group_id),
563: /* Use the parent''s group_id if in BG */
564: NULL, /* source_code */
565: NULL, /* source_line_id */
566: WIP_CONSTANTS.MOVE_PROC, /* process phase */

Line 566: WIP_CONSTANTS.MOVE_PROC, /* process phase */

562: wip_constants.background, wti.group_id),
563: /* Use the parent''s group_id if in BG */
564: NULL, /* source_code */
565: NULL, /* source_line_id */
566: WIP_CONSTANTS.MOVE_PROC, /* process phase */
567: WIP_CONSTANTS.RUNNING, /* process status */
568: /* Process status is RUNNING even for BG,
569: since the child record is
570: inserted only when the parent is in Running status */

Line 567: WIP_CONSTANTS.RUNNING, /* process status */

563: /* Use the parent''s group_id if in BG */
564: NULL, /* source_code */
565: NULL, /* source_line_id */
566: WIP_CONSTANTS.MOVE_PROC, /* process phase */
567: WIP_CONSTANTS.RUNNING, /* process status */
568: /* Process status is RUNNING even for BG,
569: since the child record is
570: inserted only when the parent is in Running status */
571: organization_id,

Line 586: WIP_CONSTANTS.QUEUE,

582: P_first_operation_seq_num,
583: P_first_operation_code,
584: P_first_department_id,
585: P_first_department_code,
586: WIP_CONSTANTS.QUEUE,
587: fm_operation_seq_num,
588: fm_operation_code,
589: fm_department_id,
590: fm_department_code,

Line 616: WIP_CONSTANTS.MOVE_TXN,

612: NULL, /* attribute12, */
613: NULL, /* attribute13, */
614: NULL, /* attribute14, */
615: NULL, /* attribute15, */
616: WIP_CONSTANTS.MOVE_TXN,
617: NULL, /* qa_collection_id, */
618: overcompletion_transaction_id,
619: NULL, /* overcompletion_transaction_qty */
620: NULL /* overcompletion_primary_qty */

Line 658: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)

654: DELETE FROM wip_move_txn_interface wti
655: WHERE
656: wti.group_id = p_group_id
657: AND Trunc(wti.transaction_date)
658: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
659: AND wti.process_phase = wip_constants.move_proc
660: AND wti.process_status = wip_constants.running
661: AND wti.overcompletion_transaction_id IS NOT NULL
662: AND wti.overcompletion_primary_qty IS NULL

Line 659: AND wti.process_phase = wip_constants.move_proc

655: WHERE
656: wti.group_id = p_group_id
657: AND Trunc(wti.transaction_date)
658: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
659: AND wti.process_phase = wip_constants.move_proc
660: AND wti.process_status = wip_constants.running
661: AND wti.overcompletion_transaction_id IS NOT NULL
662: AND wti.overcompletion_primary_qty IS NULL
663: AND wti.fm_operation_seq_num = wti.to_operation_seq_num

Line 660: AND wti.process_status = wip_constants.running

656: wti.group_id = p_group_id
657: AND Trunc(wti.transaction_date)
658: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
659: AND wti.process_phase = wip_constants.move_proc
660: AND wti.process_status = wip_constants.running
661: AND wti.overcompletion_transaction_id IS NOT NULL
662: AND wti.overcompletion_primary_qty IS NULL
663: AND wti.fm_operation_seq_num = wti.to_operation_seq_num
664: AND wti.fm_intraoperation_step_type = wti.to_intraoperation_step_type

Line 665: AND wti.fm_intraoperation_step_type = wip_constants.queue

661: AND wti.overcompletion_transaction_id IS NOT NULL
662: AND wti.overcompletion_primary_qty IS NULL
663: AND wti.fm_operation_seq_num = wti.to_operation_seq_num
664: AND wti.fm_intraoperation_step_type = wti.to_intraoperation_step_type
665: AND wti.fm_intraoperation_step_type = wip_constants.queue
666: ;
667: -- This first operation check is not necessary since, no other transaction
668: -- will have their op seq and steps match !!
669: /* AND exists

Line 681: p_outcome := wip_constants.yes;

677: -- First operation
678: ); */
679:
680: if (SQL%found) THEN
681: p_outcome := wip_constants.yes;
682: ELSE
683: p_outcome := wip_constants.no;
684: END IF;
685:

Line 683: p_outcome := wip_constants.no;

679:
680: if (SQL%found) THEN
681: p_outcome := wip_constants.yes;
682: ELSE
683: p_outcome := wip_constants.no;
684: END IF;
685:
686:
687: EXCEPTION

Line 689: p_outcome := wip_constants.no;

685:
686:
687: EXCEPTION
688: WHEN no_data_found THEN
689: p_outcome := wip_constants.no;
690: /* There may be no such Move records in WMTI */
691:
692: END delete_child_records;
693:

Line 722: p_result := wip_constants.no;

718: x_total_qty NUMBER;
719: x_repetitive_schedule_id NUMBER;
720: l_default_tolerance NUMBER := NULL;
721: BEGIN
722: p_result := wip_constants.no;
723:
724: if(p_repetitive_schedule_id is null OR p_repetitive_schedule_id < 0) then
725: x_repetitive_schedule_id := NULL;
726: else

Line 765: wip_constants.percent,

761: (
762: Sign(
763: x_total_qty + p_primary_quantity - wdj.start_quantity -
764: Decode(wdj.overcompletion_tolerance_type,
765: wip_constants.percent,
766: wdj.start_quantity
767: * wdj.overcompletion_tolerance_value/100,
768: wip_constants.amount,
769: wdj.overcompletion_tolerance_value,

Line 768: wip_constants.amount,

764: Decode(wdj.overcompletion_tolerance_type,
765: wip_constants.percent,
766: wdj.start_quantity
767: * wdj.overcompletion_tolerance_value/100,
768: wip_constants.amount,
769: wdj.overcompletion_tolerance_value,
770: NULL,
771: -- if both org and job tolerance is not set, need to offset the
772: -- p_primary_quantity

Line 776: 1, wip_constants.no,

772: -- p_primary_quantity
773: decode(l_default_tolerance,
774: 0, 0,
775: l_default_tolerance * wdj.start_quantity ))),
776: 1, wip_constants.no,
777: 0, wip_constants.yes,
778: -1, wip_constants.yes
779: )
780: INTO p_result

Line 777: 0, wip_constants.yes,

773: decode(l_default_tolerance,
774: 0, 0,
775: l_default_tolerance * wdj.start_quantity ))),
776: 1, wip_constants.no,
777: 0, wip_constants.yes,
778: -1, wip_constants.yes
779: )
780: INTO p_result
781: FROM wip_discrete_jobs wdj

Line 778: -1, wip_constants.yes

774: 0, 0,
775: l_default_tolerance * wdj.start_quantity ))),
776: 1, wip_constants.no,
777: 0, wip_constants.yes,
778: -1, wip_constants.yes
779: )
780: INTO p_result
781: FROM wip_discrete_jobs wdj
782: WHERE

Line 794: wip_constants.percent,

790: Sign(
791: x_total_qty + p_primary_quantity -
792: (wrs.daily_production_rate * wrs.processing_work_days) -
793: Decode(wri.overcompletion_tolerance_type,
794: wip_constants.percent,
795: (wrs.daily_production_rate * wrs.processing_work_days)
796: * wri.overcompletion_tolerance_value/100,
797: wip_constants.amount,
798: wri.overcompletion_tolerance_value,

Line 797: wip_constants.amount,

793: Decode(wri.overcompletion_tolerance_type,
794: wip_constants.percent,
795: (wrs.daily_production_rate * wrs.processing_work_days)
796: * wri.overcompletion_tolerance_value/100,
797: wip_constants.amount,
798: wri.overcompletion_tolerance_value,
799: NULL,
800: decode(l_default_tolerance,
801: 0,

Line 805: 1, wip_constants.no,

801: 0,
802: 0,
803: l_default_tolerance * wrs.daily_production_rate
804: * wrs.processing_work_days))),
805: 1, wip_constants.no,
806: 0, wip_constants.yes,
807: -1, wip_constants.yes
808: )
809: INTO p_result

Line 806: 0, wip_constants.yes,

802: 0,
803: l_default_tolerance * wrs.daily_production_rate
804: * wrs.processing_work_days))),
805: 1, wip_constants.no,
806: 0, wip_constants.yes,
807: -1, wip_constants.yes
808: )
809: INTO p_result
810: FROM wip_repetitive_items wri,

Line 807: -1, wip_constants.yes

803: l_default_tolerance * wrs.daily_production_rate
804: * wrs.processing_work_days))),
805: 1, wip_constants.no,
806: 0, wip_constants.yes,
807: -1, wip_constants.yes
808: )
809: INTO p_result
810: FROM wip_repetitive_items wri,
811: wip_repetitive_schedules wrs

Line 932: AND transaction_action_id = wip_constants.cplassy_action;

928: INTO x_org_id, x_wip_entity_id, x_line_id,
929: x_last_operation_seq_num
930: FROM mtl_material_transactions_temp
931: WHERE completion_transaction_id = p_parent_cpl_txn_id
932: AND transaction_action_id = wip_constants.cplassy_action;
933:
934: IF( x_result = wip_constants.no ) THEN
935: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
936: p_err_mesg := fnd_message.get;

Line 934: IF( x_result = wip_constants.no ) THEN

930: FROM mtl_material_transactions_temp
931: WHERE completion_transaction_id = p_parent_cpl_txn_id
932: AND transaction_action_id = wip_constants.cplassy_action;
933:
934: IF( x_result = wip_constants.no ) THEN
935: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
936: p_err_mesg := fnd_message.get;
937: --p_err_mesg := 'Transaction violates Tolerance Level';
938:

Line 1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */

1074: p_child_txn_id,
1075: /* group_id - Always Online, even when cpl is in BG */
1076: NULL, /* source_code */
1077: NULL, /* source_line_id */
1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1080: WIP_CONSTANTS.RUNNING,
1081: WIP_CONSTANTS.BACKGROUND,
1082: WIP_CONSTANTS.PENDING),

Line 1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,

1075: /* group_id - Always Online, even when cpl is in BG */
1076: NULL, /* source_code */
1077: NULL, /* source_line_id */
1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1080: WIP_CONSTANTS.RUNNING,
1081: WIP_CONSTANTS.BACKGROUND,
1082: WIP_CONSTANTS.PENDING),
1083: /* process status. wiltws requires it to be in Pending */

Line 1080: WIP_CONSTANTS.RUNNING,

1076: NULL, /* source_code */
1077: NULL, /* source_line_id */
1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1080: WIP_CONSTANTS.RUNNING,
1081: WIP_CONSTANTS.BACKGROUND,
1082: WIP_CONSTANTS.PENDING),
1083: /* process status. wiltws requires it to be in Pending */
1084: x_org_id,

Line 1081: WIP_CONSTANTS.BACKGROUND,

1077: NULL, /* source_line_id */
1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1080: WIP_CONSTANTS.RUNNING,
1081: WIP_CONSTANTS.BACKGROUND,
1082: WIP_CONSTANTS.PENDING),
1083: /* process status. wiltws requires it to be in Pending */
1084: x_org_id,
1085: x_org_code,

Line 1082: WIP_CONSTANTS.PENDING),

1078: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1079: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1080: WIP_CONSTANTS.RUNNING,
1081: WIP_CONSTANTS.BACKGROUND,
1082: WIP_CONSTANTS.PENDING),
1083: /* process status. wiltws requires it to be in Pending */
1084: x_org_id,
1085: x_org_code,
1086: x_wip_entity_id, /* wip_entity_id */

Line 1099: WIP_CONSTANTS.QUEUE,

1095: p_first_operation_seq_num,
1096: x_first_operation_code,
1097: x_first_department_id,
1098: x_first_department_code,
1099: WIP_CONSTANTS.QUEUE,
1100: x_last_operation_seq_num,
1101: x_last_operation_code,
1102: x_last_department_id,
1103: x_last_department_code,

Line 1104: wip_constants.tomove, /* p_intraoperation_step_type */

1100: x_last_operation_seq_num,
1101: x_last_operation_code,
1102: x_last_department_id,
1103: x_last_department_code,
1104: wip_constants.tomove, /* p_intraoperation_step_type */
1105: p_primary_quantity, /* transaction_quantity */
1106: msi.primary_uom_code, /* transaction_uom */
1107: p_primary_quantity,
1108: msi.primary_uom_code, /* primary_uom */

Line 1129: WIP_CONSTANTS.MOVE_TXN,

1125: NULL, /* attribute12, */
1126: NULL, /* attribute13, */
1127: NULL, /* attribute14, */
1128: NULL, /* attribute15, */
1129: WIP_CONSTANTS.MOVE_TXN,
1130: NULL, /* qa_collection_id, */
1131: p_oc_txn_id, /* overcompletion_transaction_id */
1132: NULL, /* overcompletion_transaction_qty */
1133: NULL /* overcompletion_primary_qty */

Line 1138: and mmtt.transaction_action_id = wip_constants.cplassy_action

1134: from mtl_material_transactions_temp mmtt,
1135: mtl_system_items msi
1136: where
1137: mmtt.completion_transaction_id = p_parent_cpl_txn_id
1138: and mmtt.transaction_action_id = wip_constants.cplassy_action
1139: and mmtt.overcompletion_primary_qty IS NOT NULL
1140: and mmtt.inventory_item_id = msi.inventory_item_id
1141: and mmtt.organization_id = msi.organization_id
1142: );