DBA Data[Home] [Help]

APPS.PO_SOURCING_RULES_SV dependencies on MRP_SOURCING_RULES

Line 14: -- This API inserts row into mrp_sr_assignments, mrp_sourcing_rules,

10: --Name: create_update_sourcing_rules
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.

Line 420: from mrp_sourcing_rules where

416: BEGIN
417:
418: ----
419: select sourcing_rule_id into X_temp_sourcing_rule_id
420: from mrp_sourcing_rules where
421: sourcing_rule_name = X_rule_name and
422: sourcing_rule_type =l_sourcing_rule_type and ----
423: nvl(organization_id,-999) = nvl(l_organization_id,-999); ----
424: ----

Line 463: PO_DEBUG.put_line(' Inserting Record in Mrp Sourcing Rules');

459:
460: X_progress := '030';
461: IF (x_sourcing_rule_id is NULL) THEN
462: IF (g_po_pdoi_write_to_file = 'Y') THEN
463: PO_DEBUG.put_line(' Inserting Record in Mrp Sourcing Rules');
464: END IF;
465:
466: SELECT MRP_SOURCING_RULES_S.NEXTVAL
467: INTO x_sourcing_rule_id

Line 466: SELECT MRP_SOURCING_RULES_S.NEXTVAL

462: IF (g_po_pdoi_write_to_file = 'Y') THEN
463: PO_DEBUG.put_line(' Inserting Record in Mrp Sourcing Rules');
464: END IF;
465:
466: SELECT MRP_SOURCING_RULES_S.NEXTVAL
467: INTO x_sourcing_rule_id
468: FROM SYS.DUAL;
469:
470: INSERT INTO MRP_SOURCING_RULES(

Line 470: INSERT INTO MRP_SOURCING_RULES(

466: SELECT MRP_SOURCING_RULES_S.NEXTVAL
467: INTO x_sourcing_rule_id
468: FROM SYS.DUAL;
469:
470: INSERT INTO MRP_SOURCING_RULES(
471: sourcing_rule_id,
472: sourcing_rule_name,
473: status,
474: sourcing_rule_type,

Line 759: mrp_sourcing_rules msr

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
763: --added trunc and NVL condition

Line 787: mrp_sourcing_rules msr

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
791: trunc(x_end_date)--bug 12755392 added NVL on effective date

Line 816: --lock the sourcing rule in mrp_sourcing rules before proceeding

812:
813: begin
814:
815: --bug10330313
816: --lock the sourcing rule in mrp_sourcing rules before proceeding
817: --we ll loop 1000 times to try and lock the mrp_sourcing_rules record
818: --If locked, we continue to process the record.
819: --If not we exit the procedure raising an error.
820: FOR i IN 1..1000

Line 817: --we ll loop 1000 times to try and lock the mrp_sourcing_rules record

813: begin
814:
815: --bug10330313
816: --lock the sourcing rule in mrp_sourcing rules before proceeding
817: --we ll loop 1000 times to try and lock the mrp_sourcing_rules record
818: --If locked, we continue to process the record.
819: --If not we exit the procedure raising an error.
820: FOR i IN 1..1000
821: LOOP

Line 854: from mrp_sourcing_rules

850:
851: X_progress := '010';
852: select sourcing_rule_name, organization_id
853: into x_sourcing_name, x_org
854: from mrp_sourcing_rules
855: where sourcing_rule_id = x_sourcing_rule_id;
856:
857: if (x_org is NULL) then
858: x_org := 'ALL';

Line 925: mrp_sourcing_rules msr,

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
929: AND msr.sourcing_rule_id = x_sourcing_rule_id

Line 1255: mrp_sourcing_rules msr

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
1259: AND x_end_date between msro.effective_date and msro.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 (

Line 1758: FROM mrp_sourcing_rules

1754: END;
1755:
1756: SELECT sourcing_rule_name, organization_id
1757: INTO x_sourcing_name, x_org
1758: FROM mrp_sourcing_rules
1759: WHERE sourcing_rule_id = x_sourcing_rule_id;
1760:
1761: IF (x_org is NULL) THEN
1762: x_org := 'ALL';