DBA Data[Home] [Help]

APPS.PO_AUTOSOURCE_SV dependencies on PO_LINES_ALL

Line 1483: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;

1479: l_using_organization_id NUMBER;
1480: l_log_head CONSTANT VARCHAR2(100) := g_log_head||'get_document_from_asl';
1481:
1482: -- Bug 3361128: this parameter stores the UOM on the source doc
1483: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;
1484:
1485: l_item_based_asl VARCHAR2(1):= 'Y'; --
1486: l_item_id NUMBER; --
1487: l_vendor_contact_name PO_VENDOR_CONTACTS.last_name%TYPE; --Bug 3545698

Line 1537: po_lines_all pol --CTO changes FPH

1533: pol.unit_meas_lookup_code
1534: FROM po_asl_documents pad,
1535: po_approved_supplier_list pasl,
1536: po_headers_all poh, --CTO changes FPH
1537: po_lines_all pol --CTO changes FPH
1538: WHERE pasl.asl_id = x_local_asl_id
1539: AND pad.asl_id = pasl.asl_id
1540: AND pad.using_organization_id = l_using_organization_id --
1541: AND pad.document_header_id = poh.po_header_id

Line 1707: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes

1703: /*
1704: * Non-Catalog items in this case refers to any item that does not have an
1705: * item_id reference - includes, iP Non-Catalog item, Punchout item, POs without
1706: * item reference. For all these cases, the autosourcing is always done only
1707: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes
1708: * are not needed in the sql. This makes the sql more optimized for these
1709: * onetime/non-catalog item.(Also vendor_site_sourcing_flag is 'N')
1710: */
1711: --bug10216412 The condition is not needed here as we return only contracts in this

Line 2485: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;

2481: l_log_head CONSTANT VARCHAR2(100) := g_log_head||'get_latest_document';
2482: l_noncat_item BOOLEAN := FALSE; /* Bug#4263138 */
2483:
2484: -- Bug 3361128: this parameter stores the UOM on the source doc
2485: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;
2486:
2487:
2488: --
2489: l_eligible_doc_flag Boolean;

Line 2534: po_lines_all pol --CTO changes FPH

2530: NVL (poh.global_agreement_flag, 'N') global_flag,
2531: poh.creation_date creation_date,
2532: pol.expiration_date expiration_date --Bug14145177
2533: FROM po_headers_all poh, --CTO changes FPH
2534: po_lines_all pol --CTO changes FPH
2535: WHERE pol.po_header_id = poh.po_header_id -- Bug5081434 No Outer Join
2536: AND (x_document_line_id IS NULL OR x_document_line_id <> pol.po_line_id) -- Bug # 7454607 --bug10216412
2537: AND ( x_destination_doc_type = 'REQ'
2538: OR x_destination_doc_type = 'REQ_NONCATALOG' --

Line 2811: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes

2807: /*
2808: * Non-Catalog items in this case refers to any item that does not have an
2809: * item_id reference - includes, iP Non-Catalog item, Punchout item, POs without
2810: * item reference. For all these cases, the autosourcing is always done only
2811: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes
2812: * are not needed in the sql. This makes the sql more optimized for these
2813: * onetime/non-catalog item.(Also vendor_site_sourcing_flag is 'N')
2814: */
2815: -- Bug 5074119

Line 3451: l_item_revision PO_LINES_ALL.item_revision%TYPE;

3447: ) IS
3448:
3449: l_is_item_valid BOOLEAN := FALSE;
3450: l_is_org_valid BOOLEAN := FALSE;
3451: l_item_revision PO_LINES_ALL.item_revision%TYPE;
3452: x_vendor_contact_name PO_VENDOR_CONTACTS.last_name%TYPE;
3453: l_vendor_contact_name VARCHAR2(240); --
3454: l_current_org_id PO_HEADERS_ALL.org_id%TYPE;
3455: l_purchasing_org_id PO_HEADERS_ALL.org_id%TYPE; --

Line 3863: -- po_header_id, po_lines_all using po_line_id

3859: --SQL WHAT: Get the matching asl_id, sequence_num of GA if one exists in other OU
3860: --SQL WHY: This information will be used to identify the document in ASL.
3861: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
3862: -- po_asl_docuyment using asl_id, sequence_num, po_headers_all using
3863: -- po_header_id, po_lines_all using po_line_id
3864: SELECT pasl.asl_id, paa.using_organization_id,
3865: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
3866: paa.consigned_from_supplier_flag, paa.enable_vmi_flag,
3867: pad.sequence_num

Line 3873: po_lines_all pol

3869: po_asl_attributes paa,
3870: po_asl_status_rules_v pasr,
3871: po_asl_documents pad,
3872: po_headers_all poh,
3873: po_lines_all pol
3874: WHERE pasl.item_id = p_item_id --
3875: AND pasl.vendor_id = p_vendor_id
3876: AND pasl.using_organization_id in (-1, p_using_organization_id) --
3877: AND pasl.asl_id = paa.asl_id

Line 4236: -- po_header_id, po_lines_all using po_line_id

4232: --SQL WHAT: Get the matching asl_id, sequence_num of GA if one exists in other OU
4233: --SQL WHY: This information will be used to identify the document in ASL.
4234: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
4235: -- po_asl_docuyment using asl_id, sequence_num, po_headers_all using
4236: -- po_header_id, po_lines_all using po_line_id
4237: SELECT pasl.asl_id, paa.using_organization_id,
4238: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
4239: paa.consigned_from_supplier_flag, paa.enable_vmi_flag,
4240: pad.sequence_num

Line 4246: po_lines_all pol

4242: po_asl_attributes paa,
4243: po_asl_status_rules_v pasr,
4244: po_asl_documents pad,
4245: po_headers_all poh,
4246: po_lines_all pol
4247: WHERE pasl.category_id = p_category_id --
4248: AND pasl.vendor_id = p_vendor_id
4249: AND pasl.using_organization_id in (-1, p_using_organization_id) --
4250: AND pasl.asl_id = paa.asl_id

Line 4802: l_negotiated_by_preparer_flag PO_LINES_ALL.NEGOTIATED_BY_PREPARER_FLAG%TYPE; -- PO DBI FPJ

4798: x_suggested_vendor_site_code PO_VENDOR_SITES_ALL.vendor_site_code%TYPE;
4799: l_buyer_ok VARCHAR2(1);
4800: --
4801:
4802: l_negotiated_by_preparer_flag PO_LINES_ALL.NEGOTIATED_BY_PREPARER_FLAG%TYPE; -- PO DBI FPJ
4803:
4804: --
4805: l_asl_id PO_ASL_DOCUMENTS.ASL_ID%type;
4806: l_req_dist_sequence_id PO_REQUISITIONS_INTERFACE.req_dist_sequence_id%type;

Line 4946: SELECT NEGOTIATED_BY_PREPARER_FLAG INTO l_negotiated_by_preparer_flag FROM PO_LINES_ALL

4942: l_progress := '010';
4943: -- DBI FPJ ** Begin
4944: IF x_document_type_code = 'BLANKET' THEN
4945:
4946: SELECT NEGOTIATED_BY_PREPARER_FLAG INTO l_negotiated_by_preparer_flag FROM PO_LINES_ALL
4947: WHERE
4948: PO_HEADER_ID = x_document_header_id AND LINE_NUM = x_document_line_num;
4949:
4950: ELSIF x_document_type_code = 'QUOTATION' THEN

Line 5974: po_lines_all pol

5970: pol.not_to_exceed_price,
5971: pol.unit_meas_lookup_code
5972: FROM po_asl_documents pad,
5973: po_headers_all poh,
5974: po_lines_all pol
5975: WHERE pad.asl_id = l_asl_id
5976: AND pad.document_header_id = poh.po_header_id
5977: --
5978: AND pol.po_line_id (+) = pad.document_line_id

Line 6050: po_lines_all pol

6046: nvl(pol.allow_price_override_flag,'N'),
6047: pol.not_to_exceed_price,
6048: pol.unit_meas_lookup_code
6049: FROM po_headers_all poh,
6050: po_lines_all pol
6051: WHERE poh.vendor_id = l_vendor_id
6052: AND poh.type_lookup_code IN ('BLANKET','CONTRACT')
6053: AND ( ( poh.type_lookup_code = 'CONTRACT'
6054: AND nvl(poh.global_agreement_flag,'N') = 'N' -- Bug 3262136

Line 6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --

6125: l_discount po_line_locations_all.price_discount%TYPE;
6126: l_rate_type po_headers_all.rate_type%TYPE;
6127: l_rate_date po_headers_all.rate_date%TYPE;
6128: l_rate po_headers_all.rate%TYPE;
6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6130: l_base_price po_lines_all.unit_price%TYPE;
6131: l_currency_price po_lines_all.unit_price%TYPE;
6132: l_currency_amount po_lines_all.unit_price%TYPE;
6133: l_base_amount po_lines_all.unit_price%TYPE;

Line 6130: l_base_price po_lines_all.unit_price%TYPE;

6126: l_rate_type po_headers_all.rate_type%TYPE;
6127: l_rate_date po_headers_all.rate_date%TYPE;
6128: l_rate po_headers_all.rate%TYPE;
6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6130: l_base_price po_lines_all.unit_price%TYPE;
6131: l_currency_price po_lines_all.unit_price%TYPE;
6132: l_currency_amount po_lines_all.unit_price%TYPE;
6133: l_base_amount po_lines_all.unit_price%TYPE;
6134: l_currency_code po_headers_all.currency_code%TYPE;

Line 6131: l_currency_price po_lines_all.unit_price%TYPE;

6127: l_rate_date po_headers_all.rate_date%TYPE;
6128: l_rate po_headers_all.rate%TYPE;
6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6130: l_base_price po_lines_all.unit_price%TYPE;
6131: l_currency_price po_lines_all.unit_price%TYPE;
6132: l_currency_amount po_lines_all.unit_price%TYPE;
6133: l_base_amount po_lines_all.unit_price%TYPE;
6134: l_currency_code po_headers_all.currency_code%TYPE;
6135: l_price_break_id po_line_locations_all.line_location_id%TYPE;

Line 6132: l_currency_amount po_lines_all.unit_price%TYPE;

6128: l_rate po_headers_all.rate%TYPE;
6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6130: l_base_price po_lines_all.unit_price%TYPE;
6131: l_currency_price po_lines_all.unit_price%TYPE;
6132: l_currency_amount po_lines_all.unit_price%TYPE;
6133: l_base_amount po_lines_all.unit_price%TYPE;
6134: l_currency_code po_headers_all.currency_code%TYPE;
6135: l_price_break_id po_line_locations_all.line_location_id%TYPE;
6136: l_price_diff_src_id po_price_differentials.entity_id%TYPE;

Line 6133: l_base_amount po_lines_all.unit_price%TYPE;

6129: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6130: l_base_price po_lines_all.unit_price%TYPE;
6131: l_currency_price po_lines_all.unit_price%TYPE;
6132: l_currency_amount po_lines_all.unit_price%TYPE;
6133: l_base_amount po_lines_all.unit_price%TYPE;
6134: l_currency_code po_headers_all.currency_code%TYPE;
6135: l_price_break_id po_line_locations_all.line_location_id%TYPE;
6136: l_price_diff_src_id po_price_differentials.entity_id%TYPE;
6137: l_using_organization_id po_approved_supplier_list.using_organization_id%TYPE;

Line 6141: l_src_doc_line_id po_lines_all.po_line_id%TYPE;

6137: l_using_organization_id po_approved_supplier_list.using_organization_id%TYPE;
6138: l_entity_type po_price_differentials.entity_type%TYPE;
6139: l_vendor_contact_id po_headers_all.vendor_contact_id%TYPE;
6140: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6141: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6142: l_src_doc_line_num po_lines_all.line_num%TYPE;
6143: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;

Line 6142: l_src_doc_line_num po_lines_all.line_num%TYPE;

6138: l_entity_type po_price_differentials.entity_type%TYPE;
6139: l_vendor_contact_id po_headers_all.vendor_contact_id%TYPE;
6140: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6141: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6142: l_src_doc_line_num po_lines_all.line_num%TYPE;
6143: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6146: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;

Line 6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;

6140: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6141: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6142: l_src_doc_line_num po_lines_all.line_num%TYPE;
6143: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6146: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6147: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6148:

Line 6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;

6141: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6142: l_src_doc_line_num po_lines_all.line_num%TYPE;
6143: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6146: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6147: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6148:
6149: l_api_version NUMBER := 1.0;

Line 6146: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;

6142: l_src_doc_line_num po_lines_all.line_num%TYPE;
6143: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6144: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6145: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6146: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6147: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6148:
6149: l_api_version NUMBER := 1.0;
6150: l_api_name VARCHAR2(60) := 'get_services_asl_list';

Line 6690: FROM po_lines_all

6686: , from_line_location_id
6687: INTO x_from_header_id
6688: , x_from_line_id
6689: , x_from_line_location_id
6690: FROM po_lines_all
6691: WHERE po_line_id = p_po_line_id;
6692:
6693: EXCEPTION
6694:

Line 6742: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;

6738: , p_from_line_location_id IN NUMBER
6739: )
6740: RETURN BOOLEAN
6741: IS
6742: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6743: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6744: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6745:
6746: BEGIN

Line 6743: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;

6739: )
6740: RETURN BOOLEAN
6741: IS
6742: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6743: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6744: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6745:
6746: BEGIN
6747:

Line 6744: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;

6740: RETURN BOOLEAN
6741: IS
6742: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6743: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6744: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6745:
6746: BEGIN
6747:
6748: PO_AUTOSOURCE_SV.get_source_info

Line 6824: l_base_amount po_lines_all.amount%TYPE;

6820:
6821: l_rate_type po_headers_all.rate_type%TYPE;
6822: l_rate_date po_headers_all.rate_date%TYPE;
6823: l_rate po_headers_all.rate%TYPE;
6824: l_base_amount po_lines_all.amount%TYPE;
6825: l_currency_amount po_lines_all.amount%TYPE;
6826: l_currency_code po_headers_all.currency_code%TYPE;
6827: l_base_curr_ext_precision number;
6828: l_sob_id number;

Line 6825: l_currency_amount po_lines_all.amount%TYPE;

6821: l_rate_type po_headers_all.rate_type%TYPE;
6822: l_rate_date po_headers_all.rate_date%TYPE;
6823: l_rate po_headers_all.rate%TYPE;
6824: l_base_amount po_lines_all.amount%TYPE;
6825: l_currency_amount po_lines_all.amount%TYPE;
6826: l_currency_code po_headers_all.currency_code%TYPE;
6827: l_base_curr_ext_precision number;
6828: l_sob_id number;
6829:

Line 6839: po_lines_all pol

6835: pol.amount
6836: INTO l_currency_code ,
6837: l_currency_amount
6838: FROM po_headers_all poh,
6839: po_lines_all pol
6840: WHERE poh.po_header_id = pol.po_header_id
6841: AND poh.po_header_id = p_source_document_header_id
6842: AND pol.po_line_id = p_source_document_line_id;
6843: