DBA Data[Home] [Help]

APPS.PO_AUTOSOURCE_SV dependencies on PO_LINES_ALL

Line 1479: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;

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

Line 1529: po_lines_all pol --CTO changes FPH

1525: pol.unit_meas_lookup_code
1526: FROM po_asl_documents pad,
1527: po_approved_supplier_list pasl,
1528: po_headers_all poh, --CTO changes FPH
1529: po_lines_all pol --CTO changes FPH
1530: WHERE pasl.asl_id = x_local_asl_id
1531: AND pad.asl_id = pasl.asl_id
1532: AND pad.using_organization_id = l_using_organization_id --
1533: AND pad.document_header_id = poh.po_header_id

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

1693: /*
1694: * Non-Catalog items in this case refers to any item that does not have an
1695: * item_id reference - includes, iP Non-Catalog item, Punchout item, POs without
1696: * item reference. For all these cases, the autosourcing is always done only
1697: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes
1698: * are not needed in the sql. This makes the sql more optimized for these
1699: * onetime/non-catalog item.(Also vendor_site_sourcing_flag is 'N')
1700: */
1701: CURSOR L_GET_DOCS_ON_ASL_NONCAT_CSR(

Line 2472: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;

2468: l_log_head CONSTANT VARCHAR2(100) := g_log_head||'get_latest_document';
2469: l_noncat_item BOOLEAN := FALSE; /* Bug#4263138 */
2470:
2471: -- Bug 3361128: this parameter stores the UOM on the source doc
2472: l_source_doc_purchasing_uom PO_LINES_ALL.unit_meas_lookup_code%TYPE;
2473:
2474:
2475: --
2476: l_eligible_doc_flag Boolean;

Line 2516: po_lines_all pol --CTO changes FPH

2512: decode(pol.unit_meas_lookup_code, p_purchasing_uom, 1,2) MatchUom,
2513: NVL (poh.global_agreement_flag, 'N') global_flag,
2514: poh.creation_date creation_date
2515: FROM po_headers_all poh, --CTO changes FPH
2516: po_lines_all pol --CTO changes FPH
2517: WHERE pol.po_header_id = poh.po_header_id -- Bug5081434 No Outer Join
2518: AND ( x_destination_doc_type = 'REQ'
2519: OR x_destination_doc_type = 'REQ_NONCATALOG' --
2520: OR x_destination_doc_type IS NULL

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

2785: /*
2786: * Non-Catalog items in this case refers to any item that does not have an
2787: * item_id reference - includes, iP Non-Catalog item, Punchout item, POs without
2788: * item reference. For all these cases, the autosourcing is always done only
2789: * to a Contract agreement. So the join to po_lines_all, check for blankets/quotes
2790: * are not needed in the sql. This makes the sql more optimized for these
2791: * onetime/non-catalog item.(Also vendor_site_sourcing_flag is 'N')
2792: */
2793: -- Bug 5074119

Line 3426: l_item_revision PO_LINES_ALL.item_revision%TYPE;

3422: ) IS
3423:
3424: l_is_item_valid BOOLEAN := FALSE;
3425: l_is_org_valid BOOLEAN := FALSE;
3426: l_item_revision PO_LINES_ALL.item_revision%TYPE;
3427: x_vendor_contact_name PO_VENDOR_CONTACTS.last_name%TYPE;
3428: l_current_org_id PO_HEADERS_ALL.org_id%TYPE;
3429: l_purchasing_org_id PO_HEADERS_ALL.org_id%TYPE; --
3430: l_progress VARCHAR2(3) := '000';

Line 3835: -- po_header_id, po_lines_all using po_line_id

3831: --SQL WHAT: Get the matching asl_id, sequence_num of GA if one exists in other OU
3832: --SQL WHY: This information will be used to identify the document in ASL.
3833: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
3834: -- po_asl_docuyment using asl_id, sequence_num, po_headers_all using
3835: -- po_header_id, po_lines_all using po_line_id
3836: SELECT pasl.asl_id, paa.using_organization_id,
3837: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
3838: paa.consigned_from_supplier_flag, paa.enable_vmi_flag,
3839: pad.sequence_num

Line 3845: po_lines_all pol

3841: po_asl_attributes paa,
3842: po_asl_status_rules_v pasr,
3843: po_asl_documents pad,
3844: po_headers_all poh,
3845: po_lines_all pol
3846: WHERE pasl.item_id = p_item_id --
3847: AND pasl.vendor_id = p_vendor_id
3848: AND pasl.using_organization_id in (-1, p_using_organization_id) --
3849: AND pasl.asl_id = paa.asl_id

Line 4208: -- po_header_id, po_lines_all using po_line_id

4204: --SQL WHAT: Get the matching asl_id, sequence_num of GA if one exists in other OU
4205: --SQL WHY: This information will be used to identify the document in ASL.
4206: --SQL JOIN: po_asl_attributes using asl_id, po_asl_status_rules_v using status_id
4207: -- po_asl_docuyment using asl_id, sequence_num, po_headers_all using
4208: -- po_header_id, po_lines_all using po_line_id
4209: SELECT pasl.asl_id, paa.using_organization_id,
4210: pasl.primary_vendor_item, paa.purchasing_unit_of_measure,
4211: paa.consigned_from_supplier_flag, paa.enable_vmi_flag,
4212: pad.sequence_num

Line 4218: po_lines_all pol

4214: po_asl_attributes paa,
4215: po_asl_status_rules_v pasr,
4216: po_asl_documents pad,
4217: po_headers_all poh,
4218: po_lines_all pol
4219: WHERE pasl.category_id = p_category_id --
4220: AND pasl.vendor_id = p_vendor_id
4221: AND pasl.using_organization_id in (-1, p_using_organization_id) --
4222: AND pasl.asl_id = paa.asl_id

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

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
4765:
4766: --
4767: l_asl_id PO_ASL_DOCUMENTS.ASL_ID%type;
4768: l_req_dist_sequence_id PO_REQUISITIONS_INTERFACE.req_dist_sequence_id%type;

Line 4906: SELECT NEGOTIATED_BY_PREPARER_FLAG INTO l_negotiated_by_preparer_flag FROM PO_LINES_ALL

4902:
4903: -- DBI FPJ ** Begin
4904: IF x_document_type_code = 'BLANKET' THEN
4905:
4906: SELECT NEGOTIATED_BY_PREPARER_FLAG INTO l_negotiated_by_preparer_flag FROM PO_LINES_ALL
4907: WHERE
4908: PO_HEADER_ID = x_document_header_id AND LINE_NUM = x_document_line_num;
4909:
4910: ELSIF x_document_type_code = 'QUOTATION' THEN

Line 5897: po_lines_all pol

5893: pol.not_to_exceed_price,
5894: pol.unit_meas_lookup_code
5895: FROM po_asl_documents pad,
5896: po_headers_all poh,
5897: po_lines_all pol
5898: WHERE pad.asl_id = l_asl_id
5899: AND pad.document_header_id = poh.po_header_id
5900: --
5901: AND pol.po_line_id (+) = pad.document_line_id

Line 5973: po_lines_all pol

5969: nvl(pol.allow_price_override_flag,'N'),
5970: pol.not_to_exceed_price,
5971: pol.unit_meas_lookup_code
5972: FROM po_headers_all poh,
5973: po_lines_all pol
5974: WHERE poh.vendor_id = l_vendor_id
5975: AND poh.type_lookup_code IN ('BLANKET','CONTRACT')
5976: AND ( ( poh.type_lookup_code = 'CONTRACT'
5977: AND nvl(poh.global_agreement_flag,'N') = 'N' -- Bug 3262136

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

6048: l_discount po_line_locations_all.price_discount%TYPE;
6049: l_rate_type po_headers_all.rate_type%TYPE;
6050: l_rate_date po_headers_all.rate_date%TYPE;
6051: l_rate po_headers_all.rate%TYPE;
6052: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6053: l_base_price po_lines_all.unit_price%TYPE;
6054: l_currency_price po_lines_all.unit_price%TYPE;
6055: l_currency_amount po_lines_all.unit_price%TYPE;
6056: l_base_amount po_lines_all.unit_price%TYPE;

Line 6053: l_base_price po_lines_all.unit_price%TYPE;

6049: l_rate_type po_headers_all.rate_type%TYPE;
6050: l_rate_date po_headers_all.rate_date%TYPE;
6051: l_rate po_headers_all.rate%TYPE;
6052: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6053: l_base_price po_lines_all.unit_price%TYPE;
6054: l_currency_price po_lines_all.unit_price%TYPE;
6055: l_currency_amount po_lines_all.unit_price%TYPE;
6056: l_base_amount po_lines_all.unit_price%TYPE;
6057: l_currency_code po_headers_all.currency_code%TYPE;

Line 6054: l_currency_price po_lines_all.unit_price%TYPE;

6050: l_rate_date po_headers_all.rate_date%TYPE;
6051: l_rate po_headers_all.rate%TYPE;
6052: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6053: l_base_price po_lines_all.unit_price%TYPE;
6054: l_currency_price po_lines_all.unit_price%TYPE;
6055: l_currency_amount po_lines_all.unit_price%TYPE;
6056: l_base_amount po_lines_all.unit_price%TYPE;
6057: l_currency_code po_headers_all.currency_code%TYPE;
6058: l_price_break_id po_line_locations_all.line_location_id%TYPE;

Line 6055: l_currency_amount po_lines_all.unit_price%TYPE;

6051: l_rate po_headers_all.rate%TYPE;
6052: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6053: l_base_price po_lines_all.unit_price%TYPE;
6054: l_currency_price po_lines_all.unit_price%TYPE;
6055: l_currency_amount po_lines_all.unit_price%TYPE;
6056: l_base_amount po_lines_all.unit_price%TYPE;
6057: l_currency_code po_headers_all.currency_code%TYPE;
6058: l_price_break_id po_line_locations_all.line_location_id%TYPE;
6059: l_price_diff_src_id po_price_differentials.entity_id%TYPE;

Line 6056: l_base_amount po_lines_all.unit_price%TYPE;

6052: l_base_unit_price po_lines_all.base_unit_price%TYPE; --
6053: l_base_price po_lines_all.unit_price%TYPE;
6054: l_currency_price po_lines_all.unit_price%TYPE;
6055: l_currency_amount po_lines_all.unit_price%TYPE;
6056: l_base_amount po_lines_all.unit_price%TYPE;
6057: l_currency_code po_headers_all.currency_code%TYPE;
6058: l_price_break_id po_line_locations_all.line_location_id%TYPE;
6059: l_price_diff_src_id po_price_differentials.entity_id%TYPE;
6060: l_using_organization_id po_approved_supplier_list.using_organization_id%TYPE;

Line 6064: l_src_doc_line_id po_lines_all.po_line_id%TYPE;

6060: l_using_organization_id po_approved_supplier_list.using_organization_id%TYPE;
6061: l_entity_type po_price_differentials.entity_type%TYPE;
6062: l_vendor_contact_id po_headers_all.vendor_contact_id%TYPE;
6063: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6064: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6065: l_src_doc_line_num po_lines_all.line_num%TYPE;
6066: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;

Line 6065: l_src_doc_line_num po_lines_all.line_num%TYPE;

6061: l_entity_type po_price_differentials.entity_type%TYPE;
6062: l_vendor_contact_id po_headers_all.vendor_contact_id%TYPE;
6063: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6064: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6065: l_src_doc_line_num po_lines_all.line_num%TYPE;
6066: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6069: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;

Line 6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;

6063: l_src_doc_header_id po_headers_all.po_header_id%TYPE;
6064: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6065: l_src_doc_line_num po_lines_all.line_num%TYPE;
6066: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6069: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6070: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6071:

Line 6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;

6064: l_src_doc_line_id po_lines_all.po_line_id%TYPE;
6065: l_src_doc_line_num po_lines_all.line_num%TYPE;
6066: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6069: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6070: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6071:
6072: l_api_version NUMBER := 1.0;

Line 6069: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;

6065: l_src_doc_line_num po_lines_all.line_num%TYPE;
6066: l_src_doc_type_code po_headers_all.type_lookup_code%TYPE;
6067: l_price_override_flag po_lines_all.allow_price_override_flag%TYPE;
6068: l_not_to_exceed_price po_lines_all.not_to_exceed_price%TYPE;
6069: l_unit_of_measure po_lines_all.unit_meas_lookup_code%TYPE;
6070: l_order_type_lookup_code po_line_types_b.order_type_lookup_code%TYPE;
6071:
6072: l_api_version NUMBER := 1.0;
6073: l_api_name VARCHAR2(60) := 'get_services_asl_list';

Line 6613: FROM po_lines_all

6609: , from_line_location_id
6610: INTO x_from_header_id
6611: , x_from_line_id
6612: , x_from_line_location_id
6613: FROM po_lines_all
6614: WHERE po_line_id = p_po_line_id;
6615:
6616: EXCEPTION
6617:

Line 6665: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;

6661: , p_from_line_location_id IN NUMBER
6662: )
6663: RETURN BOOLEAN
6664: IS
6665: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6666: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6667: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6668:
6669: BEGIN

Line 6666: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;

6662: )
6663: RETURN BOOLEAN
6664: IS
6665: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6666: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6667: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6668:
6669: BEGIN
6670:

Line 6667: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;

6663: RETURN BOOLEAN
6664: IS
6665: l_from_header_id_db PO_LINES_ALL.from_header_id%TYPE;
6666: l_from_line_id_db PO_LINES_ALL.from_line_id%TYPE;
6667: l_from_line_location_id_db PO_LINES_ALL.from_line_location_id%TYPE;
6668:
6669: BEGIN
6670:
6671: PO_AUTOSOURCE_SV.get_source_info

Line 6747: l_base_amount po_lines_all.amount%TYPE;

6743:
6744: l_rate_type po_headers_all.rate_type%TYPE;
6745: l_rate_date po_headers_all.rate_date%TYPE;
6746: l_rate po_headers_all.rate%TYPE;
6747: l_base_amount po_lines_all.amount%TYPE;
6748: l_currency_amount po_lines_all.amount%TYPE;
6749: l_currency_code po_headers_all.currency_code%TYPE;
6750: l_base_curr_ext_precision number;
6751: l_sob_id number;

Line 6748: l_currency_amount po_lines_all.amount%TYPE;

6744: l_rate_type po_headers_all.rate_type%TYPE;
6745: l_rate_date po_headers_all.rate_date%TYPE;
6746: l_rate po_headers_all.rate%TYPE;
6747: l_base_amount po_lines_all.amount%TYPE;
6748: l_currency_amount po_lines_all.amount%TYPE;
6749: l_currency_code po_headers_all.currency_code%TYPE;
6750: l_base_curr_ext_precision number;
6751: l_sob_id number;
6752:

Line 6762: po_lines_all pol

6758: pol.amount
6759: INTO l_currency_code ,
6760: l_currency_amount
6761: FROM po_headers_all poh,
6762: po_lines_all pol
6763: WHERE poh.po_header_id = pol.po_header_id
6764: AND poh.po_header_id = p_source_document_header_id
6765: AND pol.po_line_id = p_source_document_line_id;
6766: