DBA Data[Home] [Help]

APPS.PO_SOURCING_RULES_SV dependencies on MRP_SR_RECEIPT_ORG

Line 15: -- mrp_sr_receipt_org, mrp_sr_source_org depending on the create or update

11: --Pre-reqs:
12: -- None
13: --Modifies:
14: -- This API inserts row into mrp_sr_assignments, mrp_sourcing_rules,
15: -- mrp_sr_receipt_org, mrp_sr_source_org depending on the create or update
16: -- flag from the approval flag.
17: --Locks:
18: -- None.
19: --Function:

Line 489: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');

485: 1 -- planning_active (1=ACTIVE)
486: );
487:
488: IF (g_po_pdoi_write_to_file = 'Y') THEN
489: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');
490: END IF;
491:
492: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
493: INTO x_sr_receipt_id

Line 492: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

488: IF (g_po_pdoi_write_to_file = 'Y') THEN
489: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');
490: END IF;
491:
492: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
493: INTO x_sr_receipt_id
494: FROM SYS.DUAL;
495:
496:

Line 498: INSERT INTO MRP_SR_RECEIPT_ORG(

494: FROM SYS.DUAL;
495:
496:
497: X_progress := '040';
498: INSERT INTO MRP_SR_RECEIPT_ORG(
499: sr_receipt_id,
500: sourcing_rule_id,
501: effective_date,
502: disable_date,

Line 750: FROM mrp_sr_receipt_org msro,

746: match in the sourcing rule effectivity dates */
747:
748: cursor C1 is
749: SELECT sr_receipt_id
750: FROM mrp_sr_receipt_org msro,
751: mrp_sourcing_rules msr
752: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
753: AND msr.sourcing_rule_id = x_sourcing_rule_id
754: AND msro.effective_date = x_start_date

Line 775: FROM mrp_sr_receipt_org msro,

771: */
772:
773: cursor C2 is
774: SELECT sr_receipt_id, msro.effective_date, msro.disable_date
775: FROM mrp_sr_receipt_org msro,
776: mrp_sourcing_rules msr
777: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
778: AND msr.sourcing_rule_id = x_sourcing_rule_id
779: AND (trunc(msro.effective_date) between trunc(x_start_date) and

Line 873: mrp_sr_receipt_org msro,

869: PO_DEBUG.put_line(' Vendor Site: ' || to_char (x_vendor_site_id));
870: END IF;
871: SELECT count(*) into x_within_vendor_cnt
872: FROM
873: mrp_sr_receipt_org msro,
874: mrp_sourcing_rules msr,
875: mrp_sr_source_org msso
876: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
877: AND msro.sr_receipt_id = msso.sr_receipt_id

Line 1046: from mrp_sr_receipt_org

1042:
1043: X_progress := '060';
1044: select count(*)
1045: into x_cnt_srdate
1046: from mrp_sr_receipt_org
1047: where x_end_date between
1048: effective_date and disable_date
1049: and sourcing_rule_id = x_sourcing_rule_id;
1050:

Line 1075: update mrp_sr_receipt_org

1071:
1072: if (x_start_date = x_effective_date) then
1073:
1074: X_progress := '070';
1075: update mrp_sr_receipt_org
1076: set disable_date = x_end_date
1077: where sr_receipt_id = x_sr_receipt_id;
1078:
1079: elsif (x_start_date > x_effective_date) then

Line 1084: update mrp_sr_receipt_org

1080:
1081: /* Update the current record's disable date
1082: to start date - 1 */
1083:
1084: update mrp_sr_receipt_org
1085: set disable_date = x_start_date - 1
1086: where sr_receipt_id = x_sr_receipt_id;
1087:
1088: /*

Line 1098: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

1094: */
1095: /* Create a new record for the new start and
1096: end dates */
1097:
1098: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1099: INTO x_sr_receipt_id
1100: FROM SYS.DUAL;
1101:
1102: INSERT INTO MRP_SR_RECEIPT_ORG(

Line 1102: INSERT INTO MRP_SR_RECEIPT_ORG(

1098: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1099: INTO x_sr_receipt_id
1100: FROM SYS.DUAL;
1101:
1102: INSERT INTO MRP_SR_RECEIPT_ORG(
1103: sr_receipt_id,
1104: sourcing_rule_id,
1105: effective_date,
1106: disable_date,

Line 1179: insert into mrp_sr_receipt_org */

1175: /*Bug 1608608
1176: Check to see if the effectivity dates of new sourcing rule falls
1177: within the exisiting sourcing rule's effectivity dates.
1178: If it does then dont do anything and proceed further else
1179: insert into mrp_sr_receipt_org */
1180:
1181: IF (g_po_pdoi_write_to_file = 'Y') THEN
1182: PO_DEBUG.put_line(' Check to see if the effectivity dates of new sourcing rule falls within the existing sourcing rules effectivity dates');
1183: END IF;

Line 1192: FROM mrp_sr_receipt_org msro,

1188: END IF;
1189:
1190: X_progress := '080';
1191: SELECT count(*) into x_sourcing_rule_within
1192: FROM mrp_sr_receipt_org msro,
1193: mrp_sourcing_rules msr
1194: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
1195: AND msr.sourcing_rule_id = x_sourcing_rule_id
1196: AND x_start_date between msro.effective_date and msro.disable_date

Line 1201: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

1197: AND x_end_date between msro.effective_date and msro.disable_date;
1198:
1199: if (x_sourcing_rule_within = 0) then
1200:
1201: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1202: INTO x_sr_receipt_id
1203: FROM SYS.DUAL;
1204:
1205:

Line 1206: INSERT INTO MRP_SR_RECEIPT_ORG(

1202: INTO x_sr_receipt_id
1203: FROM SYS.DUAL;
1204:
1205:
1206: INSERT INTO MRP_SR_RECEIPT_ORG(
1207: sr_receipt_id,
1208: sourcing_rule_id,
1209: effective_date,
1210: disable_date,

Line 1658: FROM mrp_sr_receipt_org msro, mrp_sourcing_rules msr

1654: -- be missed because we are not looping through the cursor to fish out overlapped dates correctly
1655:
1656: BEGIN
1657: SELECT count(*) into x_overlap_count
1658: FROM mrp_sr_receipt_org msro, mrp_sourcing_rules msr
1659: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
1660: AND msr.sourcing_rule_id = x_sourcing_rule_id
1661: AND trunc(msro.effective_date) > trunc(x_start_date)
1662: AND (