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 384: x_result NUMBER := wip_constants.yes;

380: x_org_id NUMBER;
381: x_wip_entity_id NUMBER;
382: x_line_id NUMBER;
383: x_first_schedule_id NUMBER;
384: x_result NUMBER := wip_constants.yes;
385: x_sched_id NUMBER;
386:
387: cursor get_move_transaction_id is
388: select wip_transactions_s.nextval from dual;

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

421: AND overcompletion_primary_qty IS NOT NULL
422: ;
423:
424:
425: IF( p_move_profile = wip_constants.background) THEN
426: -- when the Move is done Online, the tolerance is validated in the
427: -- form.
428: x_result := wip_constants.no;
429: check_tolerance(

Line 428: x_result := wip_constants.no;

424:
425: IF( p_move_profile = wip_constants.background) THEN
426: -- when the Move is done Online, the tolerance is validated in the
427: -- form.
428: x_result := wip_constants.no;
429: check_tolerance(
430: x_org_id,
431: x_wip_entity_id,
432: x_sched_id,

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

434: x_result
435: );
436: END IF;
437:
438: IF( x_result = wip_constants.no ) THEN
439: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
440: p_err_mesg := fnd_message.get;
441: --p_err_mesg := 'Transaction violates Tolerance Level';
442: ELSE

Line 555: wip_constants.online , p_child_txn_id,

551: p_appl_id, /* program_application_id */
552: p_prog_id, /* program_id */
553: decode(p_req_id, -1, NULL, SYSDATE), /* program_update_date */
554: decode(p_move_profile, /* group_id */
555: wip_constants.online , p_child_txn_id,
556: wip_constants.background, wti.group_id),
557: /* Use the parent''s group_id if in BG */
558: NULL, /* source_code */
559: NULL, /* source_line_id */

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

552: p_prog_id, /* program_id */
553: decode(p_req_id, -1, NULL, SYSDATE), /* program_update_date */
554: decode(p_move_profile, /* group_id */
555: wip_constants.online , p_child_txn_id,
556: wip_constants.background, wti.group_id),
557: /* Use the parent''s group_id if in BG */
558: NULL, /* source_code */
559: NULL, /* source_line_id */
560: WIP_CONSTANTS.MOVE_PROC, /* process phase */

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

556: wip_constants.background, wti.group_id),
557: /* Use the parent''s group_id if in BG */
558: NULL, /* source_code */
559: NULL, /* source_line_id */
560: WIP_CONSTANTS.MOVE_PROC, /* process phase */
561: WIP_CONSTANTS.RUNNING, /* process status */
562: /* Process status is RUNNING even for BG,
563: since the child record is
564: inserted only when the parent is in Running status */

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

557: /* Use the parent''s group_id if in BG */
558: NULL, /* source_code */
559: NULL, /* source_line_id */
560: WIP_CONSTANTS.MOVE_PROC, /* process phase */
561: WIP_CONSTANTS.RUNNING, /* process status */
562: /* Process status is RUNNING even for BG,
563: since the child record is
564: inserted only when the parent is in Running status */
565: organization_id,

Line 580: WIP_CONSTANTS.QUEUE,

576: P_first_operation_seq_num,
577: P_first_operation_code,
578: P_first_department_id,
579: P_first_department_code,
580: WIP_CONSTANTS.QUEUE,
581: fm_operation_seq_num,
582: fm_operation_code,
583: fm_department_id,
584: fm_department_code,

Line 610: WIP_CONSTANTS.MOVE_TXN,

606: NULL, /* attribute12, */
607: NULL, /* attribute13, */
608: NULL, /* attribute14, */
609: NULL, /* attribute15, */
610: WIP_CONSTANTS.MOVE_TXN,
611: NULL, /* qa_collection_id, */
612: overcompletion_transaction_id,
613: NULL, /* overcompletion_transaction_qty */
614: NULL /* overcompletion_primary_qty */

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

648: DELETE FROM wip_move_txn_interface wti
649: WHERE
650: wti.group_id = p_group_id
651: AND Trunc(wti.transaction_date)
652: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
653: AND wti.process_phase = wip_constants.move_proc
654: AND wti.process_status = wip_constants.running
655: AND wti.overcompletion_transaction_id IS NOT NULL
656: AND wti.overcompletion_primary_qty IS NULL

Line 653: AND wti.process_phase = wip_constants.move_proc

649: WHERE
650: wti.group_id = p_group_id
651: AND Trunc(wti.transaction_date)
652: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
653: AND wti.process_phase = wip_constants.move_proc
654: AND wti.process_status = wip_constants.running
655: AND wti.overcompletion_transaction_id IS NOT NULL
656: AND wti.overcompletion_primary_qty IS NULL
657: AND wti.fm_operation_seq_num = wti.to_operation_seq_num

Line 654: AND wti.process_status = wip_constants.running

650: wti.group_id = p_group_id
651: AND Trunc(wti.transaction_date)
652: = TO_DATE(p_txn_date,WIP_CONSTANTS.date_fmt)
653: AND wti.process_phase = wip_constants.move_proc
654: AND wti.process_status = wip_constants.running
655: AND wti.overcompletion_transaction_id IS NOT NULL
656: AND wti.overcompletion_primary_qty IS NULL
657: AND wti.fm_operation_seq_num = wti.to_operation_seq_num
658: AND wti.fm_intraoperation_step_type = wti.to_intraoperation_step_type

Line 659: AND wti.fm_intraoperation_step_type = wip_constants.queue

655: AND wti.overcompletion_transaction_id IS NOT NULL
656: AND wti.overcompletion_primary_qty IS NULL
657: AND wti.fm_operation_seq_num = wti.to_operation_seq_num
658: AND wti.fm_intraoperation_step_type = wti.to_intraoperation_step_type
659: AND wti.fm_intraoperation_step_type = wip_constants.queue
660: ;
661: -- This first operation check is not necessary since, no other transaction
662: -- will have their op seq and steps match !!
663: /* AND exists

Line 675: p_outcome := wip_constants.yes;

671: -- First operation
672: ); */
673:
674: if (SQL%found) THEN
675: p_outcome := wip_constants.yes;
676: ELSE
677: p_outcome := wip_constants.no;
678: END IF;
679:

Line 677: p_outcome := wip_constants.no;

673:
674: if (SQL%found) THEN
675: p_outcome := wip_constants.yes;
676: ELSE
677: p_outcome := wip_constants.no;
678: END IF;
679:
680:
681: EXCEPTION

Line 683: p_outcome := wip_constants.no;

679:
680:
681: EXCEPTION
682: WHEN no_data_found THEN
683: p_outcome := wip_constants.no;
684: /* There may be no such Move records in WMTI */
685:
686: END delete_child_records;
687:

Line 716: p_result := wip_constants.no;

712: x_total_qty NUMBER;
713: x_repetitive_schedule_id NUMBER;
714: l_default_tolerance NUMBER := NULL;
715: BEGIN
716: p_result := wip_constants.no;
717:
718: if(p_repetitive_schedule_id is null OR p_repetitive_schedule_id < 0) then
719: x_repetitive_schedule_id := NULL;
720: else

Line 759: wip_constants.percent,

755: (
756: Sign(
757: x_total_qty + p_primary_quantity - wdj.start_quantity -
758: Decode(wdj.overcompletion_tolerance_type,
759: wip_constants.percent,
760: wdj.start_quantity
761: * wdj.overcompletion_tolerance_value/100,
762: wip_constants.amount,
763: wdj.overcompletion_tolerance_value,

Line 762: wip_constants.amount,

758: Decode(wdj.overcompletion_tolerance_type,
759: wip_constants.percent,
760: wdj.start_quantity
761: * wdj.overcompletion_tolerance_value/100,
762: wip_constants.amount,
763: wdj.overcompletion_tolerance_value,
764: NULL,
765: -- if both org and job tolerance is not set, need to offset the
766: -- p_primary_quantity

Line 770: 1, wip_constants.no,

766: -- p_primary_quantity
767: decode(l_default_tolerance,
768: 0, 0,
769: l_default_tolerance * wdj.start_quantity ))),
770: 1, wip_constants.no,
771: 0, wip_constants.yes,
772: -1, wip_constants.yes
773: )
774: INTO p_result

Line 771: 0, wip_constants.yes,

767: decode(l_default_tolerance,
768: 0, 0,
769: l_default_tolerance * wdj.start_quantity ))),
770: 1, wip_constants.no,
771: 0, wip_constants.yes,
772: -1, wip_constants.yes
773: )
774: INTO p_result
775: FROM wip_discrete_jobs wdj

Line 772: -1, wip_constants.yes

768: 0, 0,
769: l_default_tolerance * wdj.start_quantity ))),
770: 1, wip_constants.no,
771: 0, wip_constants.yes,
772: -1, wip_constants.yes
773: )
774: INTO p_result
775: FROM wip_discrete_jobs wdj
776: WHERE

Line 788: wip_constants.percent,

784: Sign(
785: x_total_qty + p_primary_quantity -
786: (wrs.daily_production_rate * wrs.processing_work_days) -
787: Decode(wri.overcompletion_tolerance_type,
788: wip_constants.percent,
789: (wrs.daily_production_rate * wrs.processing_work_days)
790: * wri.overcompletion_tolerance_value/100,
791: wip_constants.amount,
792: wri.overcompletion_tolerance_value,

Line 791: wip_constants.amount,

787: Decode(wri.overcompletion_tolerance_type,
788: wip_constants.percent,
789: (wrs.daily_production_rate * wrs.processing_work_days)
790: * wri.overcompletion_tolerance_value/100,
791: wip_constants.amount,
792: wri.overcompletion_tolerance_value,
793: NULL,
794: decode(l_default_tolerance,
795: 0,

Line 799: 1, wip_constants.no,

795: 0,
796: 0,
797: l_default_tolerance * wrs.daily_production_rate
798: * wrs.processing_work_days))),
799: 1, wip_constants.no,
800: 0, wip_constants.yes,
801: -1, wip_constants.yes
802: )
803: INTO p_result

Line 800: 0, wip_constants.yes,

796: 0,
797: l_default_tolerance * wrs.daily_production_rate
798: * wrs.processing_work_days))),
799: 1, wip_constants.no,
800: 0, wip_constants.yes,
801: -1, wip_constants.yes
802: )
803: INTO p_result
804: FROM wip_repetitive_items wri,

Line 801: -1, wip_constants.yes

797: l_default_tolerance * wrs.daily_production_rate
798: * wrs.processing_work_days))),
799: 1, wip_constants.no,
800: 0, wip_constants.yes,
801: -1, wip_constants.yes
802: )
803: INTO p_result
804: FROM wip_repetitive_items wri,
805: wip_repetitive_schedules wrs

Line 926: AND transaction_action_id = wip_constants.cplassy_action;

922: INTO x_org_id, x_wip_entity_id, x_line_id,
923: x_last_operation_seq_num
924: FROM mtl_material_transactions_temp
925: WHERE completion_transaction_id = p_parent_cpl_txn_id
926: AND transaction_action_id = wip_constants.cplassy_action;
927:
928: IF( x_result = wip_constants.no ) THEN
929: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
930: p_err_mesg := fnd_message.get;

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

924: FROM mtl_material_transactions_temp
925: WHERE completion_transaction_id = p_parent_cpl_txn_id
926: AND transaction_action_id = wip_constants.cplassy_action;
927:
928: IF( x_result = wip_constants.no ) THEN
929: fnd_message.set_name ('WIP', 'WIP_OC_TOLERANCE_FAIL');
930: p_err_mesg := fnd_message.get;
931: --p_err_mesg := 'Transaction violates Tolerance Level';
932:

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

1068: p_child_txn_id,
1069: /* group_id - Always Online, even when cpl is in BG */
1070: NULL, /* source_code */
1071: NULL, /* source_line_id */
1072: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1074: WIP_CONSTANTS.RUNNING,
1075: WIP_CONSTANTS.BACKGROUND,
1076: WIP_CONSTANTS.PENDING),

Line 1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,

1069: /* group_id - Always Online, even when cpl is in BG */
1070: NULL, /* source_code */
1071: NULL, /* source_line_id */
1072: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1074: WIP_CONSTANTS.RUNNING,
1075: WIP_CONSTANTS.BACKGROUND,
1076: WIP_CONSTANTS.PENDING),
1077: /* process status. wiltws requires it to be in Pending */

Line 1074: WIP_CONSTANTS.RUNNING,

1070: NULL, /* source_code */
1071: NULL, /* source_line_id */
1072: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1074: WIP_CONSTANTS.RUNNING,
1075: WIP_CONSTANTS.BACKGROUND,
1076: WIP_CONSTANTS.PENDING),
1077: /* process status. wiltws requires it to be in Pending */
1078: x_org_id,

Line 1075: WIP_CONSTANTS.BACKGROUND,

1071: NULL, /* source_line_id */
1072: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1074: WIP_CONSTANTS.RUNNING,
1075: WIP_CONSTANTS.BACKGROUND,
1076: WIP_CONSTANTS.PENDING),
1077: /* process status. wiltws requires it to be in Pending */
1078: x_org_id,
1079: x_org_code,

Line 1076: WIP_CONSTANTS.PENDING),

1072: WIP_CONSTANTS.MOVE_PROC, /* process phase */
1073: decode(p_cpl_profile, WIP_CONSTANTS.ONLINE,
1074: WIP_CONSTANTS.RUNNING,
1075: WIP_CONSTANTS.BACKGROUND,
1076: WIP_CONSTANTS.PENDING),
1077: /* process status. wiltws requires it to be in Pending */
1078: x_org_id,
1079: x_org_code,
1080: x_wip_entity_id, /* wip_entity_id */

Line 1093: WIP_CONSTANTS.QUEUE,

1089: p_first_operation_seq_num,
1090: x_first_operation_code,
1091: x_first_department_id,
1092: x_first_department_code,
1093: WIP_CONSTANTS.QUEUE,
1094: x_last_operation_seq_num,
1095: x_last_operation_code,
1096: x_last_department_id,
1097: x_last_department_code,

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

1094: x_last_operation_seq_num,
1095: x_last_operation_code,
1096: x_last_department_id,
1097: x_last_department_code,
1098: wip_constants.tomove, /* p_intraoperation_step_type */
1099: p_primary_quantity, /* transaction_quantity */
1100: msi.primary_uom_code, /* transaction_uom */
1101: p_primary_quantity,
1102: msi.primary_uom_code, /* primary_uom */

Line 1123: WIP_CONSTANTS.MOVE_TXN,

1119: NULL, /* attribute12, */
1120: NULL, /* attribute13, */
1121: NULL, /* attribute14, */
1122: NULL, /* attribute15, */
1123: WIP_CONSTANTS.MOVE_TXN,
1124: NULL, /* qa_collection_id, */
1125: p_oc_txn_id, /* overcompletion_transaction_id */
1126: NULL, /* overcompletion_transaction_qty */
1127: NULL /* overcompletion_primary_qty */

Line 1132: and mmtt.transaction_action_id = wip_constants.cplassy_action

1128: from mtl_material_transactions_temp mmtt,
1129: mtl_system_items msi
1130: where
1131: mmtt.completion_transaction_id = p_parent_cpl_txn_id
1132: and mmtt.transaction_action_id = wip_constants.cplassy_action
1133: and mmtt.overcompletion_primary_qty IS NOT NULL
1134: and mmtt.inventory_item_id = msi.inventory_item_id
1135: and mmtt.organization_id = msi.organization_id
1136: );