DBA Data[Home] [Help]

APPS.PO_SOURCING_RULES_SV dependencies on MRP_SR_SOURCE_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 531: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Source Org');

527: l_organization_id----
528: );
529:
530: IF (g_po_pdoi_write_to_file = 'Y') THEN
531: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Source Org');
532: END IF;
533:
534: X_progress := '050';
535: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL

Line 535: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL

531: PO_DEBUG.put_line(' Inserting Record in Mrp Sr Source Org');
532: END IF;
533:
534: X_progress := '050';
535: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL
536: INTO x_sr_source_id
537: FROM SYS.DUAL;
538:
539:

Line 540: INSERT INTO MRP_SR_SOURCE_ORG(

536: INTO x_sr_source_id
537: FROM SYS.DUAL;
538:
539:
540: INSERT INTO MRP_SR_SOURCE_ORG(
541: sr_source_id,
542: sr_receipt_id,
543: vendor_id,
544: vendor_site_id,

Line 926: mrp_sr_source_org msso

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
929: AND msr.sourcing_rule_id = x_sourcing_rule_id
930: AND trunc(x_start_date) between trunc(nvl(msro.effective_date,x_start_date)) and trunc(nvl(msro.disable_date,x_end_date))-- bug 12755392

Line 1066: FROM mrp_sr_source_org

1062: --to update its date.
1063:
1064: SELECT COUNT(*)
1065: INTO x_vendor_count
1066: FROM mrp_sr_source_org
1067: WHERE sr_receipt_id = x_sr_receipt_id
1068: AND ( ( vendor_id <> x_vendor_id )
1069: OR ( ( vendor_id = x_vendor_id )
1070: AND ( ( x_vendor_site_id IS NOT NULL

Line 1191: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL

1187: );
1188:
1189: -- update existing links to sourcing rule
1190:
1191: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL
1192: INTO x_sr_source_id
1193: FROM SYS.DUAL;
1194:
1195: SELECT nvl(max(rank),0) +1

Line 1197: FROM MRP_SR_SOURCE_ORG MSSO

1193: FROM SYS.DUAL;
1194:
1195: SELECT nvl(max(rank),0) +1
1196: INTO x_vendor_rank
1197: FROM MRP_SR_SOURCE_ORG MSSO
1198: WHERE sr_receipt_id = x_sr_receipt_id;
1199:
1200: INSERT INTO MRP_SR_SOURCE_ORG(
1201: sr_source_id,

Line 1200: INSERT INTO MRP_SR_SOURCE_ORG(

1196: INTO x_vendor_rank
1197: FROM MRP_SR_SOURCE_ORG MSSO
1198: WHERE sr_receipt_id = x_sr_receipt_id;
1199:
1200: INSERT INTO MRP_SR_SOURCE_ORG(
1201: sr_source_id,
1202: sr_receipt_id,
1203: vendor_id,
1204: vendor_site_id,

Line 1295: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL

1291: );
1292:
1293: -- update existing links to sourcing rule
1294:
1295: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL
1296: INTO x_sr_source_id
1297: FROM SYS.DUAL;
1298:
1299: SELECT nvl(max(rank),0) +1

Line 1301: FROM MRP_SR_SOURCE_ORG MSSO

1297: FROM SYS.DUAL;
1298:
1299: SELECT nvl(max(rank),0) +1
1300: INTO x_vendor_rank
1301: FROM MRP_SR_SOURCE_ORG MSSO
1302: WHERE sr_receipt_id = x_sr_receipt_id;
1303:
1304: IF (g_po_pdoi_write_to_file = 'Y') THEN
1305: PO_DEBUG.put_line(' Vendor Rank' || to_char(x_vendor_rank));

Line 1309: INSERT INTO MRP_SR_SOURCE_ORG(

1305: PO_DEBUG.put_line(' Vendor Rank' || to_char(x_vendor_rank));
1306: PO_DEBUG.put_line(' Inserting Record MSSO for existing rule');
1307: END IF;
1308:
1309: INSERT INTO MRP_SR_SOURCE_ORG(
1310: sr_source_id,
1311: sr_receipt_id,
1312: vendor_id,
1313: vendor_site_id,

Line 1357: FROM mrp_sr_source_org msso

1353: corresponding ASL consists of no supplier_site_code - making the provision for
1354: vendor_site_id and x_vendor_site_id to be null without an error.*/
1355: SELECT count(*)
1356: INTO x_vendor_count_on_sr
1357: FROM mrp_sr_source_org msso
1358: WHERE
1359: sr_receipt_id = x_sr_receipt_id
1360: AND vendor_id = x_vendor_id
1361: AND (vendor_site_id = x_vendor_site_id

Line 1379: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL

1375:
1376: X_progress := '100';
1377: -- update existing links to sourcing rule
1378:
1379: SELECT MRP_SR_SOURCE_ORG_S.NEXTVAL
1380: INTO x_sr_source_id
1381: FROM SYS.DUAL;
1382:
1383: -- #13961772 POASLGEN IS NOT PROPERLY UPDATING SOURCING RULES

Line 1389: FROM MRP_SR_SOURCE_ORG MSSO

1385: -- rank to 1, and update the existings to self increasing 1
1386: -- respectively.
1387: /*SELECT nvl(max(rank),0) +1
1388: INTO x_vendor_rank
1389: FROM MRP_SR_SOURCE_ORG MSSO
1390: WHERE sr_receipt_id = x_sr_receipt_id;
1391:
1392: IF (g_po_pdoi_write_to_file = 'Y') THEN
1393: PO_DEBUG.put_line(' New Vendor Rank ' || to_char(x_vendor_rank));

Line 1396: Update Mrp_Sr_Source_Org

1392: IF (g_po_pdoi_write_to_file = 'Y') THEN
1393: PO_DEBUG.put_line(' New Vendor Rank ' || to_char(x_vendor_rank));
1394: END IF;*/
1395:
1396: Update Mrp_Sr_Source_Org
1397: Set Rank = Rank + 1
1398: Where Sr_Receipt_Id = X_Sr_Receipt_Id;
1399: --End 13961772
1400:

Line 1410: INSERT INTO MRP_SR_SOURCE_ORG(

1406: --Also if it is a new vendor/new OU, making 0% allocation is not correct, as the entire purpose of sourcing is
1407: --defeated.
1408: --The user can anytime manually change the allocation percentage as per their business requirements.
1409:
1410: INSERT INTO MRP_SR_SOURCE_ORG(
1411: sr_source_id,
1412: sr_receipt_id,
1413: vendor_id,
1414: vendor_site_id,