DBA Data[Home] [Help]

APPS.PO_AUTOSOURCE_SV dependencies on PO_VENDOR_SITES

Line 127: l_vendor_site_code PO_VENDOR_SITES_ALL.vendor_site_code%TYPE; --

123: x_item_buyer_id NUMBER;
124: x_ga_flag VARCHAR2(1) := '';
125: x_owning_org_id NUMBER;
126: x_fsp_org_id NUMBER;
127: l_vendor_site_code PO_VENDOR_SITES_ALL.vendor_site_code%TYPE; --
128: l_return_code BOOLEAN; --
129: l_buyer_ok VARCHAR2(1); --
130: l_progress VARCHAR2(3) := '000'; -- Bug 2836530
131: l_log_head CONSTANT VARCHAR2(100) := g_log_head||'autosource';

Line 355: FROM po_vendor_sites_all pvs,

351:
352: BEGIN
353: SELECT vendor_site_id
354: INTO x_vendor_site_id
355: FROM po_vendor_sites_all pvs,
356: org_organization_definitions oog
357: WHERE pvs.vendor_site_code = l_vendor_site_code
358: AND nvl(pvs.org_id,nvl(oog.operating_unit,-1)) =
359: nvl(oog.operating_unit,-1)

Line 1194: FROM po_vendor_sites_all pvs,

1190:
1191: BEGIN
1192: SELECT vendor_site_id
1193: INTO x_vendor_site_id
1194: FROM po_vendor_sites_all pvs,
1195: org_organization_definitions oog
1196: WHERE pvs.vendor_site_code = p_vendor_site_code
1197: AND pvs.vendor_id = x_vendor_id --
1198: AND nvl(pvs.org_id,nvl(oog.operating_unit,-1)) =

Line 1636: from po_vendor_sites pvs

1632: ( p_vendor_site_sourcing_flag = 'Y'
1633: AND (p_vendor_site_code IS NULL OR
1634: poh.vendor_site_id =
1635: (select pvs.vendor_site_id
1636: from po_vendor_sites pvs
1637: where pvs.vendor_site_code = p_vendor_site_code
1638: and pvs.vendor_id = x_vendor_id))
1639: )
1640: )

Line 1661: po_vendor_sites_all pvsa

1657: AND (p_vendor_site_code IS NULL OR
1658: EXISTS (
1659: SELECT 'vendor site code matches'
1660: FROM po_ga_org_assignments poga,
1661: po_vendor_sites_all pvsa
1662: WHERE poh.po_header_id = poga.po_header_id
1663: AND poga.organization_id = p_org_id
1664: AND poga.vendor_site_id = decode( Nvl (poh.Enable_All_Sites,'N'),'N', pvsa.vendor_site_id ,poga.Vendor_Site_Id) -- pvsa.vendor_site_id
1665: AND pvsa.vendor_site_code = p_vendor_site_code

Line 2601: from po_vendor_sites pvs

2597: ( p_vendor_site_sourcing_flag = 'Y'
2598: AND (p_vendor_site_code IS NULL OR
2599: poh.vendor_site_id =
2600: (select pvs.vendor_site_id
2601: from po_vendor_sites pvs
2602: where pvs.vendor_site_code = p_vendor_site_code
2603: and pvs.vendor_id = x_vendor_id))
2604: )
2605: )

Line 2632: po_vendor_sites_all pvsa

2628: AND ( ( p_vendor_site_sourcing_flag = 'Y'
2629: AND EXISTS (
2630: SELECT 'vendor site code matches'
2631: FROM po_ga_org_assignments poga,
2632: po_vendor_sites_all pvsa
2633: WHERE poh.po_header_id = poga.po_header_id
2634: AND poga.organization_id = p_org_id
2635: AND poga.vendor_site_id = pvsa.vendor_site_id
2636: AND pvsa.vendor_site_code =

Line 2719: from po_vendor_sites pvs

2715: ( p_vendor_site_sourcing_flag = 'Y'
2716: AND (p_vendor_site_code IS NULL OR
2717: poh.vendor_site_id =
2718: (select pvs.vendor_site_id
2719: from po_vendor_sites pvs
2720: where pvs.vendor_site_code = p_vendor_site_code
2721: and pvs.vendor_id = x_vendor_id))
2722: )
2723: )

Line 2742: po_vendor_sites_all pvsa

2738: AND (p_vendor_site_code IS NULL OR
2739: EXISTS (
2740: SELECT 'vendor site code matches'
2741: FROM po_ga_org_assignments poga,
2742: po_vendor_sites_all pvsa
2743: WHERE poh.po_header_id = poga.po_header_id
2744: AND poga.organization_id = p_org_id
2745: AND poga.vendor_site_id = Decode( Nvl (poh.Enable_All_Sites,'N'),'N',pvsa.vendor_site_id,poga.Vendor_Site_Id) -- pvsa.vendor_site_id
2746: AND pvsa.vendor_site_code =

Line 3452: l_purchasing_org_id := PO_VENDOR_SITES_SV.get_org_id_from_vendor_site(

3448: IF p_destination_doc_type = 'STANDARD PO' AND
3449: p_vendor_site_sourcing_flag = 'N'
3450: THEN
3451: --Get purchasing org from site
3452: l_purchasing_org_id := PO_VENDOR_SITES_SV.get_org_id_from_vendor_site(
3453: p_vendor_site_id => x_vendor_site_id);
3454:
3455: --Validate that the item is valid in GA org and POU
3456: PO_GA_PVT.validate_in_purchasing_org(

Line 3516: x_vendor_site_id := PO_VENDOR_SITES_SV.get_vendor_site_id(

3512: ELSE
3513: l_progress := '040';
3514: IF p_vendor_site_sourcing_flag = 'Y' and x_vendor_site_id is NULL THEN
3515:
3516: x_vendor_site_id := PO_VENDOR_SITES_SV.get_vendor_site_id(
3517: p_po_header_id => p_document_header_id);
3518:
3519: PO_VENDOR_CONTACTS_SV.get_vendor_contact(
3520: x_vendor_site_id =>x_vendor_site_id,

Line 3797: -- po_vendor_sites_all using vendor_site_id

3793: IS
3794: --SQL WHAT: Get the matching asl_id if one exists in current OU
3795: --SQL WHY: This information will be used to identify the document in ASL.
3796: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
3797: -- po_vendor_sites_all using vendor_site_id
3798: SELECT pasl.asl_id, paa.using_organization_id,
3799: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
3800: paa.consigned_from_supplier_flag, paa.enable_vmi_flag
3801: FROM po_approved_supplier_lis_val_v pasl,

Line 3804: po_vendor_sites_all pvs

3800: paa.consigned_from_supplier_flag, paa.enable_vmi_flag
3801: FROM po_approved_supplier_lis_val_v pasl,
3802: po_asl_attributes paa,
3803: po_asl_status_rules_v pasr,
3804: po_vendor_sites_all pvs
3805: WHERE pasl.item_id = p_item_id --
3806: AND pasl.vendor_id = p_vendor_id
3807: AND pasl.using_organization_id in (-1, p_using_organization_id) --
3808: AND pasl.asl_id = paa.asl_id

Line 3894: FROM po_vendor_sites_all pvs

3890: --
3891: AND ((pasl.vendor_site_id IS NULL AND p_vendor_site_code IS NULL)
3892: OR EXISTS (
3893: SELECT 'vendor site code matches ASL'
3894: FROM po_vendor_sites_all pvs
3895: WHERE pasl.vendor_site_id = decode(nvl(poh.Enable_all_sites,'N'),'N',pvs.vendor_site_id,pasl.vendor_site_id) --
3896: AND pvs.vendor_site_code = p_vendor_site_code
3897: AND pvs.vendor_id = p_vendor_id)
3898: )

Line 3903: po_vendor_sites_all pvs

3899: AND ( NVL (poh.global_agreement_flag, 'N') = 'Y'
3900: AND EXISTS (
3901: SELECT 'vendor site code matches GA'
3902: FROM po_ga_org_assignments poga,
3903: po_vendor_sites_all pvs
3904: WHERE poh.po_header_id = poga.po_header_id
3905: AND poga.organization_id = p_org_id
3906: AND poga.enabled_flag = 'Y'
3907: AND pvs.vendor_site_id = decode( Nvl (poh.Enable_All_Sites,'N'),'N',poga.Vendor_Site_Id,pvs.vendor_site_id) --< R12 GCPA ER>

Line 4170: -- po_vendor_sites_all using vendor_site_id

4166: IS
4167: --SQL WHAT: Get the matching asl_id if one exists in current OU
4168: --SQL WHY: This information will be used to identify the document in ASL.
4169: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
4170: -- po_vendor_sites_all using vendor_site_id
4171: SELECT pasl.asl_id, paa.using_organization_id,
4172: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
4173: paa.consigned_from_supplier_flag, paa.enable_vmi_flag
4174: FROM po_approved_supplier_lis_val_v pasl,

Line 4177: po_vendor_sites_all pvs

4173: paa.consigned_from_supplier_flag, paa.enable_vmi_flag
4174: FROM po_approved_supplier_lis_val_v pasl,
4175: po_asl_attributes paa,
4176: po_asl_status_rules_v pasr,
4177: po_vendor_sites_all pvs
4178: WHERE pasl.category_id = p_category_id --
4179: AND pasl.vendor_id = p_vendor_id
4180: AND pasl.using_organization_id in (-1, p_using_organization_id) --
4181: AND pasl.asl_id = paa.asl_id

Line 4267: FROM po_vendor_sites_all pvs

4263: --
4264: AND ((pasl.vendor_site_id IS NULL AND p_vendor_site_code IS NULL)
4265: OR EXISTS (
4266: SELECT 'vendor site code matches ASL'
4267: FROM po_vendor_sites_all pvs
4268: WHERE pasl.vendor_site_id = decode(nvl(poh.Enable_All_Sites,'N'),'N',pvs.vendor_site_id,pasl.vendor_site_id) --
4269: AND pvs.vendor_site_code = p_vendor_site_code
4270: AND pvs.vendor_id = p_vendor_id)
4271: )

Line 4276: po_vendor_sites_all pvs

4272: AND ( NVL (poh.global_agreement_flag, 'N') = 'Y'
4273: AND EXISTS (
4274: SELECT 'vendor site code matches GA'
4275: FROM po_ga_org_assignments poga,
4276: po_vendor_sites_all pvs
4277: WHERE poh.po_header_id = poga.po_header_id
4278: AND poga.organization_id = p_org_id
4279: AND poga.enabled_flag = 'Y'
4280: AND pvs.vendor_site_id = decode( Nvl (poh.Enable_All_Sites,'N'),'Y',pvs.vendor_site_id, poga.Vendor_Site_Id) --< R12 GCPA ER>

Line 4760: x_suggested_vendor_site_code PO_VENDOR_SITES_ALL.vendor_site_code%TYPE;

4756: x_ga_flag VARCHAR2(1) := '';
4757: x_owning_org_id NUMBER;
4758: x_fsp_org_id NUMBER;
4759: --
4760: x_suggested_vendor_site_code PO_VENDOR_SITES_ALL.vendor_site_code%TYPE;
4761: l_buyer_ok VARCHAR2(1);
4762: --
4763:
4764: l_negotiated_by_preparer_flag PO_LINES_ALL.NEGOTIATED_BY_PREPARER_FLAG%TYPE; -- PO DBI FPJ

Line 5688: FROM po_vendor_sites_all

5684: l_vendor_site_status VARCHAR2(20);
5685: BEGIN
5686: SELECT 'Site is within OU'
5687: INTO l_vendor_site_status
5688: FROM po_vendor_sites_all
5689: WHERE vendor_site_id = p_vendor_site_id
5690: AND org_id = p_ou_id;
5691:
5692: RETURN FALSE;

Line 5733: FROM po_vendor_sites_all

5729: IF (px_vendor_site_id_list(i) IS NOT NULL) THEN
5730: BEGIN
5731: SELECT 'Valid supplier site'
5732: INTO l_vendor_site_status
5733: FROM po_vendor_sites_all
5734: WHERE vendor_site_id = px_vendor_site_id_list(i)
5735: AND (purchasing_site_flag = 'Y' OR rfq_only_site_flag = 'Y')
5736: AND sysdate <= nvl(inactive_date, sysdate);
5737: EXCEPTION

Line 5911: po_vendor_sites_all povs

5907: AND ( (poh.type_lookup_code = 'CONTRACT'
5908: AND nvl(poh.global_agreement_flag,'N') = 'N') -- Bug 3262136
5909: OR exists (select 'site in POU'
5910: from po_ga_org_assignments poga,
5911: po_vendor_sites_all povs
5912: where poh.po_header_id = poga.po_header_id
5913: and povs.vendor_site_id = l_vendor_site_id
5914: and povs.org_id = poga.purchasing_org_id
5915: and poga.vendor_site_id = l_vendor_site_id

Line 5984: FROM po_vendor_sites_all povs

5980: -- As part of Bug# 3379053: Vendor Site on Local Contract must belong to ROU
5981: AND poh.vendor_site_id = l_vendor_site_id
5982: AND EXISTS -- Bug# 3379053
5983: (SELECT 'Site must be in ROU for local contracts'
5984: FROM po_vendor_sites_all povs
5985: WHERE povs.vendor_site_id = l_vendor_site_id
5986: AND povs.org_id = l_org_id)
5987: )
5988: OR

Line 5991: po_vendor_sites_all povs

5987: )
5988: OR
5989: EXISTS (SELECT 'site in POU'
5990: FROM po_ga_org_assignments poga,
5991: po_vendor_sites_all povs
5992: WHERE poh.po_header_id = poga.po_header_id
5993: AND povs.vendor_site_id = l_vendor_site_id
5994: AND povs.org_id = poga.purchasing_org_id
5995: AND poga.vendor_site_id = l_vendor_site_id