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 497: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');

493: 1 -- planning_active (1=ACTIVE)
494: );
495:
496: IF (g_po_pdoi_write_to_file = 'Y') THEN
497: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');
498: END IF;
499:
500: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
501: INTO x_sr_receipt_id

Line 500: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

496: IF (g_po_pdoi_write_to_file = 'Y') THEN
497: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Receipt Org');
498: END IF;
499:
500: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
501: INTO x_sr_receipt_id
502: FROM SYS.DUAL;
503:
504:

Line 506: INSERT INTO MRP_SR_RECEIPT_ORG(

502: FROM SYS.DUAL;
503:
504:
505: X_progress := '040';
506: INSERT INTO MRP_SR_RECEIPT_ORG(
507: sr_receipt_id,
508: sourcing_rule_id,
509: effective_date,
510: disable_date,

Line 758: FROM mrp_sr_receipt_org msro,

754: match in the sourcing rule effectivity dates */
755:
756: cursor C1 is
757: SELECT sr_receipt_id
758: FROM mrp_sr_receipt_org msro,
759: mrp_sourcing_rules msr
760: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
761: AND msr.sourcing_rule_id = x_sourcing_rule_id
762: AND trunc(nvl(msro.effective_date,x_start_date)) = trunc(x_start_date)--bug 12755392

Line 786: FROM mrp_sr_receipt_org msro,

782: */
783:
784: cursor C2 is
785: SELECT sr_receipt_id, msro.effective_date, msro.disable_date
786: FROM mrp_sr_receipt_org msro,
787: mrp_sourcing_rules msr
788: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
789: AND msr.sourcing_rule_id = x_sourcing_rule_id
790: AND (trunc(nvl(msro.effective_date,x_start_date)) between trunc(x_start_date) and

Line 924: mrp_sr_receipt_org msro,

920:
921: /* Bug 12344417 Added nvl clause in effective_date and disable_date */
922: SELECT count(*) into x_within_vendor_cnt
923: FROM
924: mrp_sr_receipt_org msro,
925: mrp_sourcing_rules msr,
926: mrp_sr_source_org msso
927: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
928: AND msro.sr_receipt_id = msso.sr_receipt_id

Line 1107: from mrp_sr_receipt_org

1103: --bug12591815 disable date on Sourcing rule was not getting updated
1104: --when new end date was less than old end date.
1105: select count(*)
1106: into x_cnt_srdate
1107: from mrp_sr_receipt_org
1108: where x_end_date between
1109: effective_date and disable_date
1110: and sourcing_rule_id = x_sourcing_rule_id
1111: and sr_receipt_id <> x_sr_receipt_id;

Line 1137: update mrp_sr_receipt_org

1133:
1134: if (x_start_date = x_effective_date) then
1135:
1136: X_progress := '070';
1137: update mrp_sr_receipt_org
1138: set disable_date = x_end_date
1139: where sr_receipt_id = x_sr_receipt_id;
1140:
1141: elsif (x_start_date > x_effective_date) then

Line 1146: update mrp_sr_receipt_org

1142:
1143: /* Update the current record's disable date
1144: to start date - 1 */
1145:
1146: update mrp_sr_receipt_org
1147: set disable_date = x_start_date - 1
1148: where sr_receipt_id = x_sr_receipt_id;
1149:
1150: /*

Line 1160: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

1156: */
1157: /* Create a new record for the new start and
1158: end dates */
1159:
1160: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1161: INTO x_sr_receipt_id
1162: FROM SYS.DUAL;
1163:
1164: INSERT INTO MRP_SR_RECEIPT_ORG(

Line 1164: INSERT INTO MRP_SR_RECEIPT_ORG(

1160: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1161: INTO x_sr_receipt_id
1162: FROM SYS.DUAL;
1163:
1164: INSERT INTO MRP_SR_RECEIPT_ORG(
1165: sr_receipt_id,
1166: sourcing_rule_id,
1167: effective_date,
1168: disable_date,

Line 1241: insert into mrp_sr_receipt_org */

1237: /*Bug 1608608
1238: Check to see if the effectivity dates of new sourcing rule falls
1239: within the exisiting sourcing rule's effectivity dates.
1240: If it does then dont do anything and proceed further else
1241: insert into mrp_sr_receipt_org */
1242:
1243: IF (g_po_pdoi_write_to_file = 'Y') THEN
1244: PO_DEBUG.put_line(' Check to see if the effectivity dates of new sourcing rule falls within the existing sourcing rules effectivity dates');
1245: END IF;

Line 1254: FROM mrp_sr_receipt_org msro,

1250: END IF;
1251:
1252: X_progress := '080';
1253: SELECT count(*) into x_sourcing_rule_within
1254: FROM mrp_sr_receipt_org msro,
1255: mrp_sourcing_rules msr
1256: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
1257: AND msr.sourcing_rule_id = x_sourcing_rule_id
1258: AND x_start_date between msro.effective_date and msro.disable_date

Line 1263: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL

1259: AND x_end_date between msro.effective_date and msro.disable_date;
1260:
1261: if (x_sourcing_rule_within = 0) then
1262:
1263: SELECT MRP_SR_RECEIPT_ORG_S.NEXTVAL
1264: INTO x_sr_receipt_id
1265: FROM SYS.DUAL;
1266:
1267:

Line 1268: INSERT INTO MRP_SR_RECEIPT_ORG(

1264: INTO x_sr_receipt_id
1265: FROM SYS.DUAL;
1266:
1267:
1268: INSERT INTO MRP_SR_RECEIPT_ORG(
1269: sr_receipt_id,
1270: sourcing_rule_id,
1271: effective_date,
1272: disable_date,

Line 1738: FROM mrp_sr_receipt_org msro, mrp_sourcing_rules msr

1734: -- be missed because we are not looping through the cursor to fish out overlapped dates correctly
1735:
1736: BEGIN
1737: SELECT count(*) into x_overlap_count
1738: FROM mrp_sr_receipt_org msro, mrp_sourcing_rules msr
1739: WHERE msr.sourcing_rule_id = msro.sourcing_rule_id
1740: AND msr.sourcing_rule_id = x_sourcing_rule_id
1741: AND trunc(msro.effective_date) > trunc(x_start_date)
1742: AND (