742: WHERE PO_HEADER_ID = req_line.blanket_po_header_id;
743:
744: SELECT PAY_ON_CODE
745: INTO x_pay_on_code
746: FROM PO_HEADERS
747: WHERE PO_HEADER_ID = req_line.blanket_po_header_id;
748:
749: -- Bug 3570793 START
750: IF (g_debug_stmt) THEN
1080: x_country_of_origin_code);
1081:
1082: SELECT FC.EXTENDED_PRECISION
1083: INTO x_ext_precision
1084: FROM PO_HEADERS POH, FND_CURRENCIES FC
1085: WHERE POH.PO_HEADER_ID = req_line.blanket_po_header_id
1086: AND POH.CURRENCY_CODE = FC.CURRENCY_CODE;
1087:
1088: --
1549: PLL.shipment_type,
1550: PH.Org_Id --
1551: FROM PO_REQ_DISTRIBUTIONS PRD,
1552: PO_REQUISITION_LINES PRL,
1553: PO_HEADERS PH,
1554: PO_LINE_LOCATIONS PLL
1555: WHERE PRD.REQUISITION_LINE_ID = req_line.requisition_line_id
1556: AND PRL.REQUISITION_LINE_ID = req_line.requisition_line_id
1557: AND PH.PO_HEADER_ID = req_line.blanket_po_header_id
2265: SELECT nvl(sum(poll.quantity * poll.price_override),0)
2266: INTO total_release_amount
2267: FROM po_line_locations poll,
2268: po_releases por,
2269: po_headers poh
2270: WHERE poh.po_header_id = x_old_po_header_id
2271: AND poll.po_header_id = poh.po_header_id
2272: AND poll.shipment_type = 'BLANKET'
2273: AND poll.po_release_id = por.po_release_id
2276: AND nvl(poll.cancel_flag,'N') = 'N';
2277:
2278: SELECT nvl(poh.min_release_amount,0)
2279: INTO min_release_amount
2280: FROM po_headers poh
2281: WHERE po_header_id = x_old_po_header_id;
2282:
2283: SELECT nvl(poh.amount_limit,-1),segment1
2284: INTO max_release_amount,x_po_num
2281: WHERE po_header_id = x_old_po_header_id;
2282:
2283: SELECT nvl(poh.amount_limit,-1),segment1
2284: INTO max_release_amount,x_po_num
2285: FROM po_headers poh
2286: WHERE po_header_id = x_old_po_header_id;
2287:
2288:
2289: IF (release_amount < min_release_amount)
2603: --checking for tolerance
2604: BEGIN
2605: SELECT round(l_ship_price_in_base_curr(shipment_line),nvl(FND.extended_precision,5))
2606: INTO l_ship_price_ext_precn
2607: FROM FND_CURRENCIES FND, PO_HEADERS POH,
2608: PO_LINE_LOCATIONS POLL
2609: WHERE POH.po_header_id = POLL.po_header_id
2610: AND POH.currency_code = FND.currency_code
2611: AND POLL.line_location_id = l_line_location_id(shipment_line);
2863: -- If the profile option 'Enable Transaction Code' is set to Yes, then
2864: -- it is a federal instance, and we need to check vendor site registration
2865: -- status when necessary
2866: l_federal_instance VARCHAR2(1);
2867: l_vendor_id PO_HEADERS.vendor_id%TYPE;
2868: l_vendor_site_id PO_HEADERS.vendor_site_id%TYPE;
2869: l_valid_registration BOOLEAN := FALSE;
2870: --
2871: l_sob_id FINANCIALS_SYSTEM_PARAMS_ALL.set_of_books_id%TYPE;
2864: -- it is a federal instance, and we need to check vendor site registration
2865: -- status when necessary
2866: l_federal_instance VARCHAR2(1);
2867: l_vendor_id PO_HEADERS.vendor_id%TYPE;
2868: l_vendor_site_id PO_HEADERS.vendor_site_id%TYPE;
2869: l_valid_registration BOOLEAN := FALSE;
2870: --
2871: l_sob_id FINANCIALS_SYSTEM_PARAMS_ALL.set_of_books_id%TYPE;
2872: l_purch_enc_flag FINANCIALS_SYSTEM_PARAMS_ALL.purch_encumbrance_flag%TYPE;
3072: g_linemsg||g_delim||p_req_line_num||
3073: g_delim||l_textline,1,240)
3074: BULK COLLECT INTO l_error_messages
3075: FROM MTL_SYSTEM_ITEMS MSI, PO_LINE_LOCATIONS PLL,
3076: PO_RELEASES POR,PO_LINES POL, PO_HEADERS POH,
3077: FINANCIALS_SYSTEM_PARAMETERS FSP
3078: WHERE POR.po_release_id = x_po_release_id
3079: AND POR.po_header_id = POH.po_header_id
3080: AND POR.po_header_id = POL.po_header_id
3146: g_linemsg||g_delim||p_req_line_num||
3147: g_delim||l_textline,1,240)
3148: BULK COLLECT INTO l_error_messages
3149: FROM MTL_SYSTEM_ITEMS MSI, PO_LINE_LOCATIONS PLL,
3150: PO_RELEASES POR,PO_LINES POL, PO_HEADERS POH,
3151: FINANCIALS_SYSTEM_PARAMETERS FSP
3152: WHERE POR.po_release_id = x_po_release_id
3153: AND POR.po_header_id = POH.po_header_id
3154: AND POR.po_header_id = POL.po_header_id
3222: -- SQL Why: need to check vendor site registration status below
3223: BEGIN
3224: SELECT vendor_id, vendor_site_id
3225: INTO l_vendor_id, l_vendor_site_id
3226: FROM po_headers_all
3227: WHERE po_header_id = p_po_header_id;
3228: EXCEPTION
3229: WHEN OTHERS THEN
3230: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;