622: l_api_name VARCHAR2(30) := 'create_documents(wrapper2)'; --< Bug 3210331 >
623: l_return_status VARCHAR2(1);
624: l_msg_count NUMBER;
625: l_msg_data VARCHAR2(2000);
626: l_req_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
627: l_purch_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
628: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
629:
630: BEGIN
623: l_return_status VARCHAR2(1);
624: l_msg_count NUMBER;
625: l_msg_data VARCHAR2(2000);
626: l_req_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
627: l_purch_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
628: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
629:
630: BEGIN
631: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
860: --
861: l_api_version CONSTANT NUMBER := 1.0;
862: l_original_operating_unit_id NUMBER;
863: l_org_context_changed VARCHAR2(1) := 'N';
864: l_req_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
865: l_purch_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
866:
867: --
868: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
861: l_api_version CONSTANT NUMBER := 1.0;
862: l_original_operating_unit_id NUMBER;
863: l_org_context_changed VARCHAR2(1) := 'N';
864: l_req_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
865: l_purch_operating_unit_id PO_SYSTEM_PARAMETERS_ALL.org_id%TYPE;
866:
867: --
868: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
869:
3750: into item.inspection_required_flag,
3751: item.receipt_required_flag,
3752: item.invoice_close_tolerance,
3753: item.receive_close_tolerance
3754: FROM po_system_parameters_all posp --
3756:
3757: Exception
3758: when no_data_found then
4833: into item.inspection_required_flag,
4834: item.receipt_required_flag,
4835: item.invoice_close_tolerance,
4836: item.receive_close_tolerance
4837: FROM po_system_parameters_all posp --
4839:
4840: Exception
4841: when no_data_found then
12717: SELECT PLL.shipment_num
12718: INTO x_po_shipment_num
12719: FROM PO_LINE_LOCATIONS_ALL PLL, --
12720: PO_REQUISITION_LINES_ALL PRL, --
12721: PO_SYSTEM_PARAMETERS_ALL PSP --
12723: AND PRL.REQUISITION_LINE_ID = x_requisition_line_id
12724: AND rtrim(nvl(PLL.note_to_receiver,'99')) = rtrim(nvl(x_note_to_receiver,'99'))
12725: AND PLL.SHIPMENT_TYPE in ('STANDARD', 'SCHEDULED',
12788: SELECT PLL.shipment_num
12789: INTO x_po_shipment_num
12790: FROM PO_LINE_LOCATIONS_ALL PLL, --
12791: PO_REQUISITION_LINES_ALL PRL, --
12792: PO_SYSTEM_PARAMETERS_ALL PSP --
12794: AND PRL.REQUISITION_LINE_ID = x_requisition_line_id
12795: --Bug4599140 (included the following OR condition so that the SQL works correctly
12796: --for null need by date)
13023: po_requisition_lines_all prl, --
13024: mtl_system_items msi,
13025: po_line_types plt,
13026: po_vendors pov,
13027: po_system_parameters_all psp, --
13029: WHERE pli.item_id = msi.inventory_item_id(+)
13030: AND nvl(msi.organization_id,fsp.inventory_organization_id)=
13031: fsp.inventory_organization_id
13085: PO_REQUISITION_LINES_ALL PRL, --
13086: --bug 1942696 hr_location changes to reflect the new view
13087: MTL_SYSTEM_ITEMS MSI ,
13088: PO_LINE_TYPES PLT ,
13089: PO_SYSTEM_PARAMETERS_ALL PSP , --
13091: PO_VENDORS POV,
13092: PO_HEADERS_INTERFACE PHI
13093: WHERE PLI.LINE_NUM = x_po_line_num
13206: FROM PO_LINES_INTERFACE PLI,
13207: PO_REQUISITION_LINES_ALL PRL, --
13208: MTL_SYSTEM_ITEMS MSI ,
13209: PO_LINE_TYPES PLT ,
13210: PO_SYSTEM_PARAMETERS_ALL PSP , --
13212: PO_VENDORS POV,
13213: PO_HEADERS_INTERFACE PHI
13214: WHERE PLI.LINE_NUM = x_po_line_num
13334: PO_REQUISITION_LINES_ALL PRL, --
13335: --bug 1942696 hr_location changes to reflect the new view
13336: MTL_SYSTEM_ITEMS MSI ,
13337: PO_LINE_TYPES PLT ,
13338: PO_SYSTEM_PARAMETERS_ALL PSP , --
13340: PO_VENDORS POV,
13341: PO_HEADERS_INTERFACE PHI
13342: WHERE PLI.LINE_NUM = x_po_line_num
13427:
13428: IF (x_group_shipments IS NULL) THEN
13429: SELECT psp.group_shipments_flag
13430: INTO l_group_shipments
13431: FROM po_system_parameters_all psp
13432: where NVL(psp.org_id, -99) = NVL(g_purchasing_ou_id, -99);
13433: ELSE
13434: l_group_shipments := x_group_shipments;
13435: END IF;
14838: IF p_rate_type is NULL THEN
14839: l_progress := '020';
14840: select default_rate_type
14841: into l_rate_type
14842: from po_system_parameters_all psp
14843: where psp.org_id = p_purchasing_ou_id; --
14844: ELSE
14845: l_rate_type := p_rate_type;
14846: END IF;