DBA Data[Home] [Help]

APPS.PO_DOCUMENT_CHECKS_PVT dependencies on PO_LINES

Line 66: PROCEDURE populate_po_lines_gt(

62: , p_draft_id IN NUMBER := -1 -- CLM Aprvl
63: );
64:
65: --
66: PROCEDURE populate_po_lines_gt(
67: p_doc_type IN VARCHAR2
68: , p_doc_level IN VARCHAR2
69: , p_doc_level_id IN NUMBER
70: , p_draft_id IN NUMBER := -1 -- CLM Aprvl

Line 1179: l_user_id po_lines.last_updated_by%TYPE := -1;

1175: l_num_messages NUMBER := 0; -- bug3574165: Changed l_num_errors to l_num_messages
1176: l_num_warnings NUMBER := 0; -- bug3574165
1177:
1178: l_online_report_id NUMBER;
1179: l_user_id po_lines.last_updated_by%TYPE := -1;
1180: l_login_id po_lines.last_update_login%TYPE := -1;
1181: p_sequence po_online_report_text.sequence%TYPE :=0;
1182:
1183: l_return_status varchar2(1);

Line 1180: l_login_id po_lines.last_update_login%TYPE := -1;

1176: l_num_warnings NUMBER := 0; -- bug3574165
1177:
1178: l_online_report_id NUMBER;
1179: l_user_id po_lines.last_updated_by%TYPE := -1;
1180: l_login_id po_lines.last_update_login%TYPE := -1;
1181: p_sequence po_online_report_text.sequence%TYPE :=0;
1182:
1183: l_return_status varchar2(1);
1184:

Line 1688: FROM po_lines_gt pol,

1684: FND_MESSAGE.GET_STRING('PO', 'PO_PRICING_MISMATCH'),
1685: 'PO_PRICING_MISMATCH',
1686: 'E',
1687: pol.line_num
1688: FROM po_lines_gt pol,
1689: po_lines_all_ext_b ple,
1690: po_uda_ag_template_usages ptu
1691: WHERE ple.po_line_id = pol.po_line_id
1692: AND ple.draft_id = p_draft_id

Line 1689: po_lines_all_ext_b ple,

1685: 'PO_PRICING_MISMATCH',
1686: 'E',
1687: pol.line_num
1688: FROM po_lines_gt pol,
1689: po_lines_all_ext_b ple,
1690: po_uda_ag_template_usages ptu
1691: WHERE ple.po_line_id = pol.po_line_id
1692: AND ple.draft_id = p_draft_id
1693: AND ple.attr_group_id = ptu.attribute_group_id

Line 1739: FROM po_lines_gt pol

1735: FND_MESSAGE.GET_STRING('PO', 'PO_PRICING_MISMATCH'),
1736: 'PO_PRICING_MISMATCH',
1737: 'E',
1738: pol.line_num
1739: FROM po_lines_gt pol
1740: WHERE pol.order_type_lookup_code <> 'QUANTITY'
1741: AND NOT EXISTS ( Select 1
1742: FROM po_uda_ag_template_usages ptu,
1743: po_lines_all_ext_b ple

Line 1743: po_lines_all_ext_b ple

1739: FROM po_lines_gt pol
1740: WHERE pol.order_type_lookup_code <> 'QUANTITY'
1741: AND NOT EXISTS ( Select 1
1742: FROM po_uda_ag_template_usages ptu,
1743: po_lines_all_ext_b ple
1744: WHERE ptu.attribute_category = 'PRICING'
1745: AND ptu.attribute2 = pol.contract_type
1746: AND ptu.attribute1 = pol.clm_idc_type
1747: AND ptu.template_id = ple.uda_template_id

Line 1753: AND ( EXISTS ( SELECT 1 FROM po_lines_draft_all

1749: AND ple.draft_id = p_draft_id
1750: AND ple.attr_group_id = ptu.attribute_group_id
1751: )
1752: --Bug 13543817
1753: AND ( EXISTS ( SELECT 1 FROM po_lines_draft_all
1754: WHERE draft_id = p_draft_id
1755: AND po_line_id = pol.po_line_id
1756: )
1757: OR nvl(p_draft_id,-1) = -1

Line 3236: l_user_id PO_LINES.last_updated_by%TYPE := -1;

3232: l_progress VARCHAR2(3);
3233:
3234: l_num_errors NUMBER := 0;
3235: l_online_report_id NUMBER;
3236: l_user_id PO_LINES.last_updated_by%TYPE := -1;
3237: l_login_id PO_LINES.last_update_login%TYPE := -1;
3238: p_sequence PO_ONLINE_REPORT_TEXT.sequence%TYPE :=0;
3239:
3240: l_return_status VARCHAR2(1);

Line 3237: l_login_id PO_LINES.last_update_login%TYPE := -1;

3233:
3234: l_num_errors NUMBER := 0;
3235: l_online_report_id NUMBER;
3236: l_user_id PO_LINES.last_updated_by%TYPE := -1;
3237: l_login_id PO_LINES.last_update_login%TYPE := -1;
3238: p_sequence PO_ONLINE_REPORT_TEXT.sequence%TYPE :=0;
3239:
3240: l_return_status VARCHAR2(1);
3241:

Line 4484: FROM PO_LINE_LOCATIONS_GT PLL,PO_LINES POL

4480: decode ( POL.order_type_lookup_code --
4481: , 'FIXED PRICE' , 'PO_SUB_REL_SHIP_PRICE_GT_LIMIT'
4482: , 'PO_SUB_REL_SHIP_AMT_GT_LIMIT'
4483: )
4484: FROM PO_LINE_LOCATIONS_GT PLL,PO_LINES POL
4485: WHERE PLL.po_line_id = POL.po_line_id
4486: AND PLL.po_release_id = p_document_id
4487: AND nvl(PLL.cancel_flag,'N')= 'N'
4488: AND nvl(PLL.closed_code,'OPEN') <> 'FINALLY CLOSED'

Line 4698: PO_LINE_LOCATIONS_GT POLL,PO_LINES POL,

4694: ||g_distmsg||g_delim||POD.distribution_num||g_delim
4695: ||l_textline,1,240),
4696: 'PO_SUB_REL_RATE_NULL'
4697: FROM PO_DISTRIBUTIONS_GT POD, --
4698: PO_LINE_LOCATIONS_GT POLL,PO_LINES POL,
4699: PO_RELEASES_GT POR,PO_HEADERS_GT POH,GL_SETS_OF_BOOKS SOB,
4700: FINANCIALS_SYSTEM_PARAMETERS FSP
4701: WHERE POLL.po_release_id = POR.po_release_id
4702: AND POD.line_location_id = POLL.line_location_id

Line 4937: FROM PO_LINES_ALL POL,PO_RELEASES_GT POR,PO_LINE_LOCATIONS_GT PLL

4933: l_shipment_num,
4934: l_dist_num,
4935: l_quantity1,
4936: l_quantity2
4937: FROM PO_LINES_ALL POL,PO_RELEASES_GT POR,PO_LINE_LOCATIONS_GT PLL
4938: WHERE PLL.po_release_id = POR.po_release_id
4939: AND PLL.po_release_id = p_document_id
4940: AND POL.po_line_id = PLL.po_line_id
4941: AND POL.min_release_amount is not null

Line 5080: PO_LINES POL, MTL_UOM_CLASSES_TL MTL1,

5076: substr(g_shipmsg||g_delim||POLL.shipment_num||g_delim||l_textline||
5077: MTL1.uom_class||' , '||MTL2.uom_class,1,240),
5078: 'PO_SUB_UOM_CLASS_CONVERSION'
5079: FROM MTL_UOM_CLASS_CONVERSIONS MOU, PO_LINE_LOCATIONS_GT POLL,
5080: PO_LINES POL, MTL_UOM_CLASSES_TL MTL1,
5081: MTL_UOM_CLASSES_TL MTL2
5082: WHERE MOU.inventory_item_id = POL.item_id
5083: AND (NVL(MOU.disable_date, TRUNC(SYSDATE)) + 1) < TRUNC(SYSDATE)
5084: AND POL.po_line_id = POLL.po_line_id

Line 5146: PO_RELEASES_GT POR,PO_LINES POL, PO_HEADERS_GT POH,

5142: ||l_textline,1,240),
5143: --
5144: 'PO_SUB_ITEM_NOT_APPROVED_REL'
5145: FROM MTL_SYSTEM_ITEMS MSI, PO_LINE_LOCATIONS_GT PLL,
5146: PO_RELEASES_GT POR,PO_LINES POL, PO_HEADERS_GT POH,
5147: FINANCIALS_SYSTEM_PARAMETERS FSP
5148: WHERE POR.po_release_id = p_document_id
5149: AND POR.po_header_id = POH.po_header_id
5150: AND POR.po_header_id = POL.po_header_id

Line 5248: PO_RELEASES_GT POR,PO_LINES POL, PO_HEADERS_GT POH,

5244: ||l_textline,1,240),
5245: --
5246: 'PO_SUB_ITEM_ASL_DEBARRED_REL'
5247: FROM PO_LINE_LOCATIONS_GT PLL,
5248: PO_RELEASES_GT POR,PO_LINES POL, PO_HEADERS_GT POH,
5249: FINANCIALS_SYSTEM_PARAMETERS FSP
5250: WHERE POR.po_release_id = p_document_id
5251: AND POR.po_header_id = POH.po_header_id
5252: AND POR.po_header_id = POL.po_header_id

Line 5330: FROM po_lines POL,

5326: substr(g_linemsg||g_delim||POL.line_num||g_delim
5327: ||g_shipmsg||g_delim||PLL.shipment_num||g_delim
5328: ||l_textline,1,240),
5329: 'PO_ATO_ITEM_NA'
5330: FROM po_lines POL,
5331: po_line_locations_gt PLL,
5332: financials_system_parameters FSP,
5333: mtl_system_items MSI
5334: WHERE PLL.po_release_id = p_document_id

Line 5385: from po_releases_gt por,po_lines pl,po_line_locations_gt pll,mtl_system_items itm,po_line_types_b plt

5381: 0,
5382: p_sequence + ROWNUM,
5383: substr(g_shipmsg||g_delim||pll.shipment_num||g_delim||l_textline,1,240),
5384: 'PO_ALL_NO_ITEM'
5385: from po_releases_gt por,po_lines pl,po_line_locations_gt pll,mtl_system_items itm,po_line_types_b plt
5386: where itm.inventory_item_id = pl.item_id
5387: and pl.item_id is not null
5388:
5389: and pl.po_line_id = pll.po_line_id

Line 5924: TYPE unit_of_measure IS TABLE of PO_LINES.unit_meas_lookup_code%TYPE;

5920: l_enforce_price_tolerance po_system_parameters.enforce_price_change_allowance%TYPE;
5921: l_enforce_price_amount po_system_parameters.enforce_price_change_amount%TYPE;
5922: l_amount_tolerance po_system_parameters.price_change_amount%TYPE;
5923:
5924: TYPE unit_of_measure IS TABLE of PO_LINES.unit_meas_lookup_code%TYPE;
5925: TYPE NumTab IS TABLE of NUMBER;
5926: l_ship_price_in_base_curr NumTab;
5927: l_ship_unit_of_measure unit_of_measure;
5928: l_ship_num NumTab;

Line 5967: l_po_line_type PO_LINES_ALL.ORDER_TYPE_LOOKUP_CODE%TYPE;

5963: TYPE CurrencyTab IS TABLE of FND_CURRENCIES.CURRENCY_CODE%TYPE;
5964: l_is_same_foreign_currency VARCHAR2(1);
5965: l_req_line_curr_unit_price NumTab;
5966: l_req_line_curr_code CurrencyTab;
5967: l_po_line_type PO_LINES_ALL.ORDER_TYPE_LOOKUP_CODE%TYPE;
5968: -- End of Bug# 13857241
5969: /*
5970: ** Setup the PO select cursor
5971: ** Select shipment price and convert it to base currency.

Line 6005: PO_LINES_GT POL,

6001: nvl(POL.item_id,-1) item_id,
6002: nvl( POLL.line_location_id,0) line_loc_id
6003: FROM PO_LINE_LOCATIONS_GT POLL,
6004: PO_LINE_TYPES_B PLT, -- bug3413891
6005: PO_LINES_GT POL,
6006: PO_DISTRIBUTIONS_GT POD
6007: WHERE POLL.po_line_id = POL.po_line_id
6008: AND POLL.line_location_id = POD.line_location_id
6009: AND POLL.po_header_id = p_document_id

Line 6040: PO_LINES_GT POL,

6036: POL.quantity quantity,
6037: nvl(POL.item_id,-1) item_id,
6038: POLL.line_location_id line_loc_id
6039: FROM PO_LINE_LOCATIONS_GT POLL,
6040: PO_LINES_GT POL,
6041: PO_DISTRIBUTIONS_GT POD
6042: WHERE POL.po_header_id = p_document_id
6043: AND POD.line_location_id = POLL.line_location_id
6044: AND POLL.line_location_id =

Line 6090: PO_LINES POL,

6086: nvl(POL.item_id,0) item_id,
6087: nvl( POLL.line_location_id,0) line_loc_id
6088: FROM PO_LINE_LOCATIONS_GT POLL,
6089: PO_LINE_TYPES_B PLT, -- bug3413891
6090: PO_LINES POL,
6091: PO_DISTRIBUTIONS_GT POD --
6092: WHERE POLL.po_line_id = POL.po_line_id
6093: AND POLL.line_location_id = POD.line_location_id
6094: AND POLL.po_release_id = p_document_id

Line 6111: PO_LINES POL

6107: min(POLL.shipment_num),
6108: min(PRL.org_id) --
6109: FROM PO_REQUISITION_LINES_ALL PRL, --
6110: PO_LINE_LOCATIONS_GT POLL,
6111: PO_LINES POL
6112: WHERE PRL.line_location_id = POLL.line_location_id
6113: AND POLL.line_location_id = p_line_location_id
6114: AND PRL.unit_price >= 0
6115: AND POLL.po_line_id = POL.po_line_id

Line 6129: PO_LINES POL

6125: MIN(POLL.shipment_num) ,
6126: MIN(PRL.org_id) --
6127: FROM PO_REQUISITION_LINES_ALL PRL, --
6128: PO_LINE_LOCATIONS_GT POLL ,
6129: PO_LINES POL
6130: WHERE PRL.line_location_id = POLL.line_location_id
6131: AND POLL.line_location_id = p_line_location_id
6132: AND PRL.unit_price >= 0
6133: AND POLL.po_line_id = POL.po_line_id

Line 6146: PO_LINES POL,

6142: min(POLL.shipment_num),
6143: min(PRL.org_id) --
6144: FROM PO_REQUISITION_LINES_ALL PRL, --
6145: PO_LINE_LOCATIONS_GT POLL,
6146: PO_LINES POL,
6147: PO_DISTRIBUTIONS PD,
6148: PO_REQ_DISTRIBUTIONS_ALL PRD --
6149: WHERE POLL.line_location_id = p_line_location_id
6150: AND POLL.po_line_id = POL.po_line_id

Line 6168: PO_LINES POL,

6164: min(POLL.shipment_num),
6165: min(PRL.org_id) --
6166: FROM PO_REQUISITION_LINES_ALL PRL, --
6167: PO_LINE_LOCATIONS_GT POLL,
6168: PO_LINES POL,
6169: PO_DISTRIBUTIONS PD,
6170: PO_REQ_DISTRIBUTIONS_ALL PRD --
6171: WHERE POLL.line_location_id = p_line_location_id
6172: AND POLL.po_line_id = POL.po_line_id

Line 6346: PO_LINES_GT POL

6342: BEGIN
6343: SELECT POL.ORDER_TYPE_LOOKUP_CODE
6344: INTO l_po_line_type
6345: FROM PO_LINE_LOCATIONS_GT POLL,
6346: PO_LINES_GT POL
6347: WHERE POLL.po_line_id = POL.po_line_id
6348: AND POLL.line_location_id = l_line_location_id(shipment_line);
6349: EXCEPTION
6350: WHEN no_data_found THEN

Line 7685: FROM po_lines_gt POL

7681: , l_textline
7682: , 'PO_SUB_USER_RATE_TYPE'
7683: FROM dual
7684: WHERE exists ( SELECT 'Rate-based lines exist'
7685: FROM po_lines_gt POL
7686: , po_line_types_b PLT
7687: WHERE p_document_id = POL.po_header_id
7688: AND POL.line_type_id = PLT.line_type_id
7689: AND PLT.order_type_lookup_code = 'RATE'

Line 8310: FROM PO_LINES_GT POL

8306: 'PO_SUB_HEADER_NO_LINES'
8307: FROM PO_HEADERS_GT POH
8308: WHERE POH.po_header_id = p_document_id AND
8309: NOT EXISTS (SELECT 'Lines Exist'
8310: FROM PO_LINES_GT POL
8311: WHERE POL.po_header_id = POH.po_header_id
8312: --Bug 3289638 Check for any line to exist irrespective of cancel_flag
8313: --AND nvl(POL.cancel_flag,'N') = 'N'
8314: )

Line 8368: FROM PO_LINES_GT POL

8364: 0,
8365: p_sequence + ROWNUM,
8366: substr(g_linemsg||g_delim||POL.line_num||g_delim||l_textline,1,240),
8367: 'PO_SUB_LINE_NO_SHIP'
8368: FROM PO_LINES_GT POL
8369: WHERE POL.po_header_id = p_document_id AND
8370: nvl(POL.cancel_flag,'N') = 'N' AND
8371: -- CLM Aprvl Info Lines will not be having Shipments
8372: Nvl(POL.CLM_INFO_FLAG,'N')= 'N' AND

Line 8438: FROM PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL

8434: substr(g_linemsg||g_delim||Nvl(POL.line_num_display,POL.line_num)||g_delim||
8435: g_shipmsg||g_delim||PLL.shipment_num||g_delim||l_textline,1,240),
8436: Decode(l_clm_document, 'Y', 'PO_CLM_SUB_SHIP_NO_DIST_WARN', 'PO_SUB_SHIP_NO_DIST'),
8437: Decode(l_clm_document, 'Y', 'W', NULL)
8438: FROM PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL
8439: WHERE PLL.po_line_id = POL.po_line_id AND
8440: PLL.po_header_id = p_document_id AND
8441: nvl(PLL.cancel_flag, 'N') = 'N' AND
8442: nvl(POL.cancel_flag, 'N') = 'N' AND

Line 8522: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL,

8518: ||g_shipmsg||g_delim||PLL.shipment_num||g_delim
8519: ||g_distmsg||g_delim||POD.distribution_num||g_delim
8520: ||l_textline,1,240),
8521: 'PO_SUB_DIST_RATE_NULL'
8522: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL,
8523: PO_HEADERS_GT POH,GL_SETS_OF_BOOKS SOB,FINANCIALS_SYSTEM_PARAMETERS FSP
8524: WHERE POD.po_header_id = POH.po_header_id
8525: AND POD.line_location_id = PLL.line_location_id
8526: AND PLL.po_line_id = POL.po_line_id

Line 8581: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL,

8577: ||g_shipmsg||g_delim||PLL.shipment_num||g_delim
8578: ||g_distmsg||g_delim||POD.distribution_num||g_delim
8579: ||l_textline,1,240),
8580: 'PO_SUB_DIST_RATE_NOT_NULL'
8581: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL,PO_LINES_GT POL,
8582: PO_HEADERS_GT POH,GL_SETS_OF_BOOKS SOB,FINANCIALS_SYSTEM_PARAMETERS FSP
8583: WHERE POD.po_header_id = POH.po_header_id
8584: AND POD.line_location_id = PLL.line_location_id
8585: AND PLL.po_line_id = POL.po_line_id

Line 8697: FROM PO_LINES_GT POL,

8693: 0,
8694: p_sequence + ROWNUM,
8695: substr(g_linemsg||g_delim||POL.line_num||g_delim||l_textline,1,240),
8696: 'PO_SUB_REF_UNAPPROVED_CONTRACT'
8697: FROM PO_LINES_GT POL,
8698: PO_HEADERS_ALL POC -- : use all table
8699: WHERE POL.po_header_id = p_document_id
8700: AND POL.contract_id = POC.po_header_id --
8701: AND POC.type_lookup_code = 'CONTRACT'

Line 8758: FROM PO_LINES_GT POL,

8754: p_sequence + ROWNUM,
8755: substr(g_linemsg||g_delim||POL.line_num||g_delim||l_textline,1,240),
8756: 'PO_SUB_LINE_CONTRACT_MISMATCH',
8757: Decode(is_approved_clm_document(p_document_id), 'Y', 'W', NULL)
8758: FROM PO_LINES_GT POL,
8759: PO_HEADERS_ALL POC, -- : Use _ALL table
8760: PO_HEADERS_GT POH
8761: WHERE POH.po_header_id = p_document_id
8762: AND POL.po_header_id = POH.po_header_id

Line 8853: FROM MTL_UOM_CLASS_CONVERSIONS MOU, PO_LINES_GT POL,

8849: p_sequence + ROWNUM,
8850: substr(g_linemsg||g_delim||POL.line_num||g_delim||l_textline||
8851: MTL1.uom_class||' , '||MTL2.uom_class,1,240),
8852: 'PO_SUB_UOM_CLASS_CONVERSION'
8853: FROM MTL_UOM_CLASS_CONVERSIONS MOU, PO_LINES_GT POL,
8854: MTL_UOM_CLASSES_TL MTL1, MTL_UOM_CLASSES_TL MTL2
8855: WHERE POL.item_id = MOU.inventory_item_id
8856: AND (nvl(MOU.disable_date, TRUNC(SYSDATE))+1) < TRUNC(SYSDATE)
8857: AND POL.po_header_id = p_document_id

Line 8965: PO_LINES_GT POL, PO_HEADERS_GT POH,

8961: g_shipmsg||g_delim||PLL.shipment_num||g_delim
8962: ||l_textline,1,240),
8963: 'PO_SUB_ITEM_NOT_APPROVED'
8964: FROM MTL_SYSTEM_ITEMS MSI, PO_LINE_LOCATIONS_GT PLL,
8965: PO_LINES_GT POL, PO_HEADERS_GT POH,
8966: FINANCIALS_SYSTEM_PARAMETERS FSP
8967: WHERE POH.po_header_id = p_document_id
8968: AND POH.po_header_id = POL.po_header_id
8969: AND PLL.po_line_id(+) = POL.po_line_id

Line 9069: PO_LINES_GT POL, PO_HEADERS_GT POH,

9065: ||g_shipmsg||g_delim||PLL.shipment_num||g_delim
9066: ||l_textline,1,240),
9067: 'PO_SUB_ITEM_ASL_DEBARRED'
9068: FROM PO_LINE_LOCATIONS_GT PLL,
9069: PO_LINES_GT POL, PO_HEADERS_GT POH,
9070: FINANCIALS_SYSTEM_PARAMETERS FSP
9071: WHERE POH.po_header_id = p_document_id
9072: AND POH.po_header_id = POL.po_header_id
9073: AND PLL.po_line_id(+) = POL.po_line_id

Line 9155: FROM po_lines_gt POL,

9151: p_sequence + ROWNUM,
9152: SUBSTR (g_linemsg || g_delim || POL.line_num ||g_delim ||
9153: l_textline,1,240),
9154: 'PO_SUB_LINE_CONTRACT_HOLD'
9155: FROM po_lines_gt POL,
9156: po_headers_gt POH,
9157: po_headers_all POC
9158: WHERE POH.po_header_id = p_document_id
9159: AND NVL(POH.authorization_status, 'INCOMPLETE') = 'INCOMPLETE'

Line 9211: FROM po_lines_gt POL,

9207: p_sequence + ROWNUM,
9208: SUBSTR (g_linemsg || g_delim || POL.line_num ||g_delim ||
9209: l_textline,1,240),
9210: 'PO_SUB_LINE_CONTRACT_EXP'
9211: FROM po_lines_gt POL,
9212: po_headers_gt POH,
9213: po_headers_all POC
9214: WHERE POH.po_header_id = p_document_id
9215: AND NVL(POH.authorization_status, 'INCOMPLETE') = 'INCOMPLETE'

Line 9267: FROM po_lines_gt POL,

9263: p_sequence + ROWNUM,
9264: SUBSTR (g_linemsg || g_delim || POL.line_num ||g_delim ||
9265: l_textline,1,240),
9266: 'PO_ATO_ITEM_NA'
9267: FROM po_lines_gt POL,
9268: po_headers_gt POH,
9269: financials_system_params_all FSP,
9270: mtl_system_items MSI
9271: WHERE fsp.org_id = poh.org_id

Line 9323: from po_headers_gt ph, po_lines_gt pl,mtl_system_items itm,financials_system_params_all fsp,po_line_types_b plt

9319: 0,
9320: p_sequence + ROWNUM,
9321: substr(g_linemsg||g_delim||pl.line_num||g_delim||l_textline,1,240),
9322: 'PO_ALL_NO_ITEM'
9323: from po_headers_gt ph, po_lines_gt pl,mtl_system_items itm,financials_system_params_all fsp,po_line_types_b plt
9324: where fsp.org_id = ph.org_id
9325: and itm.inventory_item_id = pl.item_id
9326: and pl.item_id is not null
9327: and itm.organization_id = fsp.inventory_organization_id

Line 9372: from po_headers_gt ph,po_lines_gt pl,po_line_locations_gt pll,mtl_system_items itm,po_line_types_b plt

9368: p_sequence + ROWNUM,
9369: substr(g_linemsg||g_delim||pl.line_num||g_delim||
9370: g_shipmsg||g_delim||pll.shipment_num||g_delim||l_textline,1,240),
9371: 'PO_ALL_NO_ITEM'
9372: from po_headers_gt ph,po_lines_gt pl,po_line_locations_gt pll,mtl_system_items itm,po_line_types_b plt
9373: where itm.inventory_item_id = pl.item_id
9374: and pl.item_id is not null
9375: and itm.organization_id = pll.ship_to_organization_id
9376: and itm.purchasing_enabled_flag = 'N'

Line 9436: FROM po_lines_gt POL,

9432: p_sequence + ROWNUM,
9433: SUBSTR (g_linemsg || g_delim || POL.line_num ||g_delim ||
9434: g_shipmsg || g_delim || PLL.shipment_num ||g_delim || l_textline,1,240),
9435: 'PO_PO_PLANNED_ITEM_DATE_REQ'
9436: FROM po_lines_gt POL,
9437: po_headers_gt POH,
9438: po_line_locations_gt PLL,
9439: financials_system_parameters FSP,
9440: mtl_system_items MSI

Line 9484: po_lines_gt pol,

9480: l_line_num,
9481: l_shipment_num,
9482: l_ship_to_location_tbl
9483: FROM
9484: po_lines_gt pol,
9485: po_line_locations_gt poll,
9486: hr_locations_all hla,
9487: hr_locations_all_tl hlat
9488: WHERE poll.po_header_id=p_document_id

Line 9695: FROM PO_LINES_GT POL,

9691: l_textline,
9692: 1,240),
9693: 'PO_SUB_VMI_ASL_EXISTS',
9694: 'W'
9695: FROM PO_LINES_GT POL,
9696: PO_HEADERS_GT POH,
9697: PO_LINE_LOCATIONS_GT PLL,
9698: PO_APPROVED_SUPPLIER_LIS_VAL_V PASL,
9699: PO_ASL_ATTRIBUTES PAA,

Line 9774: FROM po_lines_gt pol

9770: p_sequence + ROWNUM,
9771: po_core_s.GET_TRANSLATED_TEXT('PO_INVALID_OKE_CONTRACT_VER_ID',
9772: 'LINE_NUM',pol.line_num),
9773: 'PO_INVALID_OKE_CONTRACT_VER_ID'
9774: FROM po_lines_gt pol
9775: WHERE pol.oke_contract_version_id IS NOT NULL
9776: AND NVL(pol.cancel_flag,'N') = 'N' ----
9777: AND pol.oke_contract_version_id NOT IN (SELECT major_version
9778: FROM oke_k_vers_numbers_v

Line 9819: po_lines_gt pol

9815: 'DIST_NUM',pod.distribution_num),
9816: 'PO_INVALID_OKE_CONTRACT_LNE_ID'
9817: FROM po_distributions_gt pod,
9818: po_line_locations_gt pos,
9819: po_lines_gt pol
9820: WHERE pod.po_line_id = pol.po_line_id
9821: AND pod.line_location_id = pos.line_location_id
9822: AND pod.oke_contract_line_id IS NOT NULL
9823: AND NVL(pol.cancel_flag,'N') = 'N' ----

Line 9868: po_lines_gt pol

9864: 'DIST_NUM',pod.distribution_num),
9865: 'PO_INVALID_OKE_CONTRACT_DLV_ID'
9866: FROM po_distributions_gt pod,
9867: po_line_locations_gt pos,
9868: po_lines_gt pol
9869: WHERE pod.po_line_id = pol.po_line_id
9870: AND pod.line_location_id = pos.line_location_id
9871: AND pod.oke_contract_deliverable_id IS NOT NULL
9872: AND NVL(pol.cancel_flag,'N') = 'N' ----

Line 9892: from po_line_locations_gt poll, po_lines_gt pol

9888: -- the Sum of pay items price will be equal to the line price.
9889: IF NOT l_is_complex_po THEN
9890: --Bug 9430831 start.Submission Check for unit_price and price_override mismatch
9891: FOR price_rec in (select pol.line_num,poll.shipment_num,pol.unit_price, poll.price_override,rownum
9892: from po_line_locations_gt poll, po_lines_gt pol
9893: where pol.po_header_id = p_document_id AND
9894: pol.po_line_id = poll.po_line_id AND
9895: pol.unit_price <> poll.price_override AND
9896: nvl(pol.cancel_flag,'N') = 'N' AND

Line 9972: PO_LINES_GT POL,

9968: substr(g_linemsg||g_delim||POL.line_num||g_delim||g_shipmsg||g_delim||
9969: PLL.shipment_num||g_delim||l_textline,1,240),
9970: 'PO_SUB_PO_SHIP_INV_MATCH_NE_R'
9971: FROM PO_HEADERS_GT POH,
9972: PO_LINES_GT POL,
9973: PO_LINE_LOCATIONS_GT PLL
9974: WHERE POH.po_header_id = POL.po_header_id
9975: AND POL.po_line_id = PLL.po_line_id
9976: AND POH.po_header_id = p_document_id

Line 10024: PO_LINES_GT POL,

10020: substr(g_linemsg||g_delim||POL.line_num||g_delim||g_shipmsg||g_delim||PLL.shipment_num||g_delim
10021: ||g_distmsg||g_delim||POD.distribution_num||g_delim||l_textline,1,240),
10022: 'PO_SUB_PO_DIST_DEST_TYPE_NE_IN'
10023: FROM PO_HEADERS_GT POH,
10024: PO_LINES_GT POL,
10025: PO_LINE_LOCATIONS_GT PLL,
10026: PO_DISTRIBUTIONS_GT POD
10027: WHERE POH.po_header_id = POD.po_header_id
10028: AND POD.line_location_id = PLL.line_location_id

Line 10088: , PO_LINES_GT POL

10084: 'PO_PDOI_INVALID_FUND_VAL_ENC'
10085: FROM
10086: PO_DISTRIBUTIONS_GT POD
10087: , PO_LINE_LOCATIONS_GT POLL
10088: , PO_LINES_GT POL
10089: WHERE POLL.line_location_id(+) = POD.line_location_id --JOIN
10090: AND POL.po_line_id(+) = POD.po_line_id --JOIN
10091: -- PA distributions don't have associated lines or shipments
10092: AND NVL(POD.encumbered_flag,'N') = 'N'

Line 10158: PO_LINES_GT POL

10154: BULK COLLECT INTO
10155: l_line_num
10156: FROM PO_DISTRIBUTIONS_GT POD1,
10157: PO_DISTRIBUTIONS_GT POD2,
10158: PO_LINES_GT POL
10159: WHERE POD1.po_line_id = POL.po_line_id
10160: AND POD2.po_line_id = POL.po_line_id
10161: AND POL.po_header_id = p_document_id
10162: AND NVL(POD1.distribution_type, 'STANDARD') = 'STANDARD'

Line 10379: PO_LINES_GT POL

10375: substr(g_linemsg || g_delim || POL.line_num || g_delim
10376: || l_textline,1,240),
10377: 'PO_IDV_REF_NOT_EQUAL'
10378: FROM PO_HEADERS_GT POH,
10379: PO_LINES_GT POL
10380: WHERE POH.po_header_id = p_document_id
10381: AND POH.po_header_id = POL.po_header_id
10382: AND POH.type_lookup_code = 'STANDARD'
10383: AND Nvl(POH.clm_source_document_id, -1) <> Nvl(Nvl(POL.from_header_id,POL.contract_id), -1)

Line 10699: FROM PO_LINES_GT POL

10695: p_sequence + ROWNUM,
10696: substr(g_linemsg||g_delim||POL.line_num
10697: ||g_delim||l_textline,1,240),
10698: 'PO_SVC_PRICE_LIMIT_LT_PRICE'
10699: FROM PO_LINES_GT POL
10700: WHERE POL.po_header_id = p_document_id
10701: AND trunc(sysdate) <= trunc(nvl(POL.expiration_date, sysdate + 1)) -- bug 3449694
10702: AND nvl(POL.cancel_flag,'N')= 'N'
10703: AND nvl(POL.closed_code,'OPEN') <> 'FINALLY CLOSED'

Line 10813: FROM PO_LINES_GT POL

10809: 'PO_SUB_HEADER_NO_LINES'
10810: FROM PO_HEADERS_GT POH
10811: WHERE POH.po_header_id = p_document_id AND
10812: NOT EXISTS (SELECT 'Lines Exist'
10813: FROM PO_LINES_GT POL
10814: WHERE POL.po_header_id = POH.po_header_id);
10815: --AND nvl(POL.cancel_flag,'N') = 'N');
10816: -- bug 3300632
10817:

Line 10941: from po_headers_gt ph,po_lines_gt pl,mtl_system_items itm,financials_system_parameters fsp,po_line_types_b plt

10937: 0,
10938: p_sequence + ROWNUM,
10939: substr(g_linemsg||g_delim||pl.line_num||g_delim||l_textline,1,240),
10940: 'PO_ALL_NO_ITEM'
10941: from po_headers_gt ph,po_lines_gt pl,mtl_system_items itm,financials_system_parameters fsp,po_line_types_b plt
10942: where itm.inventory_item_id = pl.item_id
10943: and pl.item_id is not null
10944: and itm.organization_id = fsp.inventory_organization_id
10945: and itm.purchasing_enabled_flag = 'N'

Line 11035: FROM po_headers_gt ph, po_lines_gt pl, po_line_locations_gt pll

11031: THEN PO_MESSAGE_S.POX_EFFECTIVE_DATES6
11032: WHEN pll.end_date > pl.expiration_date
11033: THEN PO_MESSAGE_S.POX_EFFECTIVE_DATES2
11034: END
11035: FROM po_headers_gt ph, po_lines_gt pl, po_line_locations_gt pll
11036: WHERE ph.po_header_id = p_document_id
11037: AND pl.po_header_id = ph.po_header_id
11038: AND pll.po_line_id = pl.po_line_id
11039: AND pll.shipment_type = 'PRICE BREAK'

Line 11088: FROM po_headers_gt ph, po_lines_gt pl

11084: 0,
11085: p_sequence + ROWNUM,
11086: substr(g_linemsg||g_delim||pl.line_num||g_delim||l_textline,1,240),
11087: PO_MESSAGE_S.POX_EXPIRATION_DATES
11088: FROM po_headers_gt ph, po_lines_gt pl
11089: WHERE ph.po_header_id = p_document_id
11090: AND pl.po_header_id = ph.po_header_id
11091: AND (pl.expiration_date < ph.start_date
11092: or pl.expiration_date > ph.end_date)

Line 11143: PO_LINES_GT POL, PO_HEADERS_GT POH,

11139: ||g_shipmsg||g_delim||PLL.shipment_num||g_delim
11140: ||l_textline,1,240),
11141: 'PO_SUB_ITEM_ASL_DEBARRED'
11142: FROM PO_LINE_LOCATIONS_GT PLL,
11143: PO_LINES_GT POL, PO_HEADERS_GT POH,
11144: FINANCIALS_SYSTEM_PARAMETERS FSP
11145: WHERE POH.po_header_id = p_document_id
11146: AND POH.po_header_id = POL.po_header_id
11147: AND PLL.po_line_id(+) = POL.po_line_id

Line 11246: FROM PO_HEADERS_GT POH, PO_LINES_GT POL, PO_HEADERS_ALL POHA

11242: -- Bug 2818810. Added extra join to alias POHA to return 'Y' only if at least
11243: -- one line references a GA.
11244: CURSOR std_ga_ref_cursor(p_document_id NUMBER) IS
11245: SELECT 'Y'
11246: FROM PO_HEADERS_GT POH, PO_LINES_GT POL, PO_HEADERS_ALL POHA
11247: WHERE POH.po_header_id = p_document_id
11248: AND POH.po_header_id = POL.po_header_id
11249: AND POL.from_header_id = POHA.po_header_id
11250: AND POHA.type_lookup_code = 'BLANKET'

Line 11256: FROM po_lines_gt POL,

11252:
11253: --
11254: CURSOR std_gc_ref_cursor (p_doc_id NUMBER) IS
11255: SELECT 'Y'
11256: FROM po_lines_gt POL,
11257: po_headers_all POHA
11258: WHERE POL.po_header_id = p_doc_id
11259: AND POL.contract_id = POHA.po_header_id
11260: AND POHA.global_agreement_flag = 'Y';

Line 11384: * 2) Document references cannot exist for PO lines with one or

11380: * project in order to enforce the following:
11381: * 1) Consigned status on any new or modified shipment that is not
11382: * partially received or partially invoiced should match the
11383: * consigned setting on the corresponding ASL entry.
11384: * 2) Document references cannot exist for PO lines with one or
11385: * more consigned shipments
11386: * Returns:
11387: * p_sequence: This parameter contains the current count of number of error
11388: * messages inserted

Line 11482: -- FROM po_lines_gt pol,

11478: -- p_sequence + ROWNUM,
11479: -- substr(g_linemsg||g_delim||POL.line_num||g_delim||g_shipmsg
11480: -- ||g_delim||PLL.shipment_num||':'||g_delim||l_textline,1,240),
11481: -- 'PO_DOC_REF_SUP_CONS_COEXIST'
11482: -- FROM po_lines_gt pol,
11483: -- po_line_locations_gt pll
11484: -- WHERE pol.po_header_id = p_document_id
11485: -- AND pol.po_line_id = pll.po_line_id
11486: -- AND pll.shipment_type = 'STANDARD'

Line 11547: PO_LINES_GT POL

11543: l_shipment_num,
11544: l_line_location_id
11545: FROM PO_HEADERS_GT POH,
11546: PO_LINE_LOCATIONS_GT PLL,
11547: PO_LINES_GT POL
11548: WHERE POH.po_header_id = p_document_id AND
11549: POH.po_header_id = POL.po_header_id AND
11550: -- POH.po_header_id = PLL.po_header_id AND
11551: POL.po_line_id = PLL.po_line_id AND

Line 11753: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

11749: END IF;
11750:
11751: --
11752: --Check 1: The GA should be enabled for purchasing in the current OU.
11753: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
11754: l_textline := FND_MESSAGE.GET_STRING('PO', 'PO_SUB_STD_GA_DISABLED');
11755: INSERT into po_online_report_text_gt(online_report_id,
11756: last_update_login,
11757: last_updated_by,

Line 11768: --SQL Querying for PO lines that reference GAs that are not enabled

11764: sequence,
11765: text_line,
11766: message_name)
11767: --
11768: --SQL Querying for PO lines that reference GAs that are not enabled
11769: --SQL for purchasing in this org, to report an error message.
11770: SELECT p_online_report_id,
11771: p_login_id,
11772: p_user_id,

Line 11783: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH

11779: p_sequence + ROWNUM,
11780: substr(g_linemsg||g_delim||POL.line_num||g_delim
11781: ||l_textline,1,240),
11782: 'PO_SUB_STD_GA_DISABLED'
11783: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH
11784: WHERE POH1.po_header_id = p_document_id
11785: AND POL.po_header_id = POH1.po_header_id
11786: AND POL.from_header_id = POH.po_header_id --JOIN
11787: AND POH.type_lookup_code = 'BLANKET'

Line 11819: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

11815: END IF;
11816:
11817: --Check 2: If the standard PO line is referencing a GA then that GA
11818: --should be in an approved status.
11819: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
11820: --< Bug 3422733 > Only do this check if GA is not ON HOLD. The ON HOLD check
11821: -- is done later. Avoids showing 2 msgs for Contract that is ON HOLD.
11822:
11823: l_textline := FND_MESSAGE.GET_STRING('PO', 'PO_SUB_STD_GA_APPROVED');

Line 11836: --SQL What: Querying for PO lines that reference GAs that are not approved.

11832: distribution_num,
11833: sequence,
11834: text_line,
11835: message_name)
11836: --SQL What: Querying for PO lines that reference GAs that are not approved.
11837: --SQL Why: Add appropriate error message to po_online_report_text_gt
11838: SELECT p_online_report_id,
11839: p_login_id,
11840: p_user_id,

Line 11851: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH2

11847: p_sequence + ROWNUM,
11848: substr(g_linemsg||g_delim||POL.line_num||g_delim
11849: ||l_textline,1,240),
11850: 'PO_SUB_STD_GA_APPROVED'
11851: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH2
11852: WHERE POH1.po_header_id = p_document_id
11853: AND POL.po_header_id = POH1.po_header_id --JOIN
11854: AND POH2.po_header_id = POL.from_header_id --JOIN
11855: AND POH2.type_lookup_code = 'BLANKET'

Line 11879: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

11875: END IF;
11876: END IF;
11877:
11878: --Check 3: The GA should not be on hold.
11879: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
11880: l_textline := FND_MESSAGE.GET_STRING('PO', 'PO_SUB_STD_GA_ON_HOLD');
11881: INSERT into po_online_report_text_gt(online_report_id,
11882: last_update_login,
11883: last_updated_by,

Line 11893: --SQL What: Querying for PO lines that reference GAs that are on hold

11889: distribution_num,
11890: sequence,
11891: text_line,
11892: message_name)
11893: --SQL What: Querying for PO lines that reference GAs that are on hold
11894: --SQL Why: Add appropriate error message to po_online_report_text_gt
11895: SELECT p_online_report_id,
11896: p_login_id,
11897: p_user_id,

Line 11908: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH2

11904: p_sequence + ROWNUM,
11905: substr(g_linemsg||g_delim||POL.line_num||g_delim
11906: ||l_textline,1,240),
11907: 'PO_SUB_STD_GA_ON_HOLD'
11908: FROM PO_HEADERS_GT POH1, PO_LINES_GT POL, PO_HEADERS_ALL POH2
11909: WHERE POH1.po_header_id = p_document_id
11910: AND POL.po_header_id = POH1.po_header_id --JOIN
11911: AND POH2.po_header_id = POL.from_header_id --JOIN
11912: AND POH2.type_lookup_code = 'BLANKET'

Line 11955: --SQL What: Querying for PO lines whose vendor does not

11951: sequence,
11952: text_line,
11953: message_name,
11954: message_type)
11955: --SQL What: Querying for PO lines whose vendor does not
11956: --SQL match the vendor of the referenced GA
11957: --SQL Why: Add appropriate error message to po_online_report_text_gt
11958: SELECT p_online_report_id,
11959: p_login_id,

Line 11972: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2

11968: substr(g_linemsg||g_delim||POL.line_num||g_delim
11969: ||l_textline,1,240),
11970: 'PO_SUB_STD_GA_VENDOR_MISMATCH',
11971: Decode(is_approved_clm_document(p_document_id), 'Y', 'W', NULL)
11972: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2
11973: WHERE POL.po_header_id = p_document_id
11974: AND POL.po_header_id = POH1.po_header_id --JOIN
11975: AND POL.from_header_id = POH2.po_header_id --JOIN
11976: AND POH2.type_lookup_code = 'BLANKET'

Line 11995: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

11991: END IF;
11992:
11993: --Check 5: The vendor site on the PO should match a vendor site on one of
11994: -- the GA's enabled org assignments.
11995: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
11996: --< CLM Novation > bug13059027 - This check is a Warning for OrderOfIDV Modifications
11997: -- or Re-approval Base docs whose Supplier is different from that of referenced IDV
11998: l_textline :=
11999: FND_MESSAGE.GET_STRING('PO', 'PO_SUB_STD_GA_VDR_SITE_MISMT');

Line 12013: --SQL What: Querying for PO lines whose vendor_site_id does not

12009: sequence,
12010: text_line,
12011: message_name,
12012: message_type)
12013: --SQL What: Querying for PO lines whose vendor_site_id does not
12014: --SQL match a valid vendor_site_id in the GA's org assignments
12015: --SQL Why: Add appropriate error message to po_online_report_text_gt
12016: SELECT p_online_report_id,
12017: p_login_id,

Line 12030: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2

12026: substr(g_linemsg||g_delim||POL.line_num||g_delim
12027: ||l_textline,1,240),
12028: 'PO_SUB_STD_GA_VDR_SITE_MISMT',
12029: Decode(is_approved_clm_document(p_document_id), 'Y', Decode(POH1.vendor_id, POH2.vendor_id, NULL, 'W'), NULL)
12030: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2
12031: WHERE POL.po_header_id = p_document_id
12032: AND POL.po_header_id = POH1.po_header_id --JOIN
12033: AND POL.from_header_id = POH2.po_header_id --JOIN
12034: AND POH2.type_lookup_code = 'BLANKET'

Line 12081: --SQL What: Querying for PO lines that were not created within

12077: distribution_num,
12078: sequence,
12079: text_line,
12080: message_name)
12081: --SQL What: Querying for PO lines that were not created within
12082: --SQL the effective dates of the referenced GA
12083: --SQL Why: Add appropriate error message to po_online_report_text_gt
12084: SELECT p_online_report_id,
12085: p_login_id,

Line 12097: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINES_ALL POL2, PO_LINE_LOCATIONS_GT PLL

12093: p_sequence + ROWNUM,
12094: substr(g_linemsg||g_delim||POL.line_num||g_delim
12095: ||l_textline,1,240),
12096: 'PO_SUB_STD_AFTER_GA_DATE'
12097: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINES_ALL POL2, PO_LINE_LOCATIONS_GT PLL
12098: WHERE POL.po_header_id = p_document_id
12099: AND POL.po_header_id = POH.po_header_id -- JOIN
12100: AND PLL.po_line_id = POL.po_line_id --JOIN, Bug #5415428 - Get the Need by date
12101: AND POL.from_header_id = POH2.po_header_id --JOIN

Line 12145: --SQL What: Querying for PO lines that were not created within

12141: distribution_num,
12142: sequence,
12143: text_line,
12144: message_name)
12145: --SQL What: Querying for PO lines that were not created within
12146: --SQL the effective dates of the referenced GA
12147: --SQL Why: Add appropriate error message to po_online_report_text_gt
12148: SELECT p_online_report_id,
12149: p_login_id,

Line 12161: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINE_LOCATIONS_GT PLL

12157: p_sequence + ROWNUM,
12158: substr(g_linemsg||g_delim||POL.line_num||g_delim||
12159: g_shipmsg||g_delim||PLL.shipment_num||g_delim||l_textline,1,240),
12160: 'PO_SUB_STD_BEFORE_GA_DATE'
12161: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINE_LOCATIONS_GT PLL
12162: WHERE POL.po_header_id = p_document_id
12163: AND POL.po_header_id = POH.po_header_id
12164: AND PLL.po_line_id = POL.po_line_id --JOIN
12165: AND POL.from_header_id = POH2.po_header_id --JOIN

Line 12199: --SQL What: Querying for PO lines whose currency code does not

12195: distribution_num,
12196: sequence,
12197: text_line,
12198: message_name)
12199: --SQL What: Querying for PO lines whose currency code does not
12200: --SQL match the currency code of the referenced GA
12201: --SQL Why: Add appropriate error message to po_online_report_text_gt
12202: SELECT p_online_report_id,
12203: p_login_id,

Line 12215: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2

12211: p_sequence + ROWNUM,
12212: substr(g_linemsg||g_delim||POL.line_num||g_delim
12213: ||l_textline,1,240),
12214: 'PO_SUB_STD_GA_CURR_MISMATCH'
12215: FROM PO_LINES_GT POL, PO_HEADERS_GT POH1, PO_HEADERS_ALL POH2
12216: WHERE POL.po_header_id = p_document_id
12217: AND POL.po_header_id = POH1.po_header_id --JOIN
12218: AND POL.from_header_id = POH2.po_header_id --JOIN
12219: AND POH2.type_lookup_code = 'BLANKET'

Line 12286: FROM PO_LINES_GT POL, PO_HEADERS_ALL POH1, PO_LINE_LOCATIONS_GT PLL1

12282: )
12283: , 0 )
12284: , POH1.amount_limit
12285: BULK COLLECT INTO l_curr_doc_line_num,l_po_amount,l_amount_limit
12286: FROM PO_LINES_GT POL, PO_HEADERS_ALL POH1, PO_LINE_LOCATIONS_GT PLL1
12287: WHERE PLL1.from_header_id = POL.from_header_id
12288: AND POL.po_header_id = p_document_id
12289: AND POL.from_header_id = POH1.po_header_id
12290: AND POH1.type_lookup_code = 'BLANKET'

Line 12321: PO_HEADERS_ALL POH2, PO_LINES_GT POL

12317: )
12318: , 0 )
12319: BULK COLLECT INTO l_prev_doc_line_num, l_prev_rel_amount
12320: FROM PO_LINE_LOCATIONS_ALL PLL2, PO_HEADERS_ALL POH1,
12321: PO_HEADERS_ALL POH2, PO_LINES_GT POL
12322: WHERE POL.po_header_id = p_document_id
12323: AND POL.from_header_id = POH1.po_header_id --JOIN
12324: AND POH1.type_lookup_code = 'BLANKET'
12325: AND POH1.global_agreement_flag = 'Y'

Line 12466: FROM PO_LINES_GT POL1, PO_LINES_ALL POL2, PO_HEADERS_ALL POH

12462: decode ( POL1.order_type_lookup_code --
12463: , 'FIXED PRICE' , 'PO_SUB_PO_LINE_GT_GA_AMT_TOL'
12464: , 'PO_SUB_PO_LINE_GT_GA_PRICE_TOL'
12465: )
12466: FROM PO_LINES_GT POL1, PO_LINES_ALL POL2, PO_HEADERS_ALL POH
12467: WHERE POL1.po_header_id = p_document_id
12468: AND POH.po_header_id = POL1.from_header_id --JOIN
12469: AND POH.type_lookup_code = 'BLANKET'
12470: AND POH.global_agreement_flag = 'Y'

Line 12538: FROM PO_LINES_GT POL1, PO_LINES_ALL POL2, PO_HEADERS_ALL POH

12534: p_sequence + ROWNUM,
12535: substr(g_linemsg||g_delim||POL1.line_num||g_delim
12536: ||l_textline,1,240),
12537: 'PO_SUB_STD_GA_LINE_LESS_MINREL' -- <2710030>
12538: FROM PO_LINES_GT POL1, PO_LINES_ALL POL2, PO_HEADERS_ALL POH
12539: WHERE POL1.po_header_id = p_document_id
12540: AND POL1.from_header_id = POL2.po_header_id --JOIN
12541: AND POL1.from_line_id = POL2.po_line_id --JOIN
12542: AND POL1.from_header_id = POH.po_header_id --JOIN

Line 12673: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

12669: END IF;
12670:
12671: -- Check 1: Current OU should still be enabled for purchasing on the GC
12672: -- being referenced
12673: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
12674:
12675: l_textline := FND_MESSAGE.get_string ('PO', 'PO_SUB_STD_GC_NOT_EN_PUR');
12676:
12677: INSERT INTO po_online_report_text_gt (

Line 12708: po_lines_gt POL,

12704: 240),
12705: 'PA_SUB_STD_GC_NOT_EN_PUR'
12706: FROM
12707: po_headers_gt POH,
12708: po_lines_gt POL,
12709: po_headers_all POHA
12710: WHERE
12711: POH.po_header_id = p_document_id
12712: AND POL.po_header_id = POH.po_header_id

Line 12743: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines

12739: END IF;
12740:
12741: -- Check 2: Supplier Site should be a purchasing site defined in GC
12742: -- Org Assignments
12743: --< Shared Proc FPJ > Bug 3301427: Only do this check for new SPO lines
12744: /* R12 GCPA
12745: Skip Vendor Site validation for Contracts having "Enable All Sites" is set to Y
12746: */
12747: --< CLM Novation > bug13059027 - This check is a Warning for OrderOfIDV Modifications

Line 12784: po_lines_gt POL,

12780: 'PA_SUB_STD_GC_INVALID_SITE',
12781: Decode(is_approved_clm_document(p_document_id), 'Y', Decode(POH.vendor_id, POHA.vendor_id, NULL, 'W'), NULL)
12782: FROM
12783: po_headers_gt POH,
12784: po_lines_gt POL,
12785: po_headers_all POHA
12786: WHERE
12787: POH.po_header_id = p_document_id
12788: AND POL.po_header_id = POH.po_header_id

Line 12832: -- POs separately because current PO lines (stored in

12828: -- SQL What: For each line that has a contract reference, get the
12829: -- total amount released for that contract on this PO
12830: -- SQL Why: Need to calculate the total amount released for the
12831: -- contract and we are calculating current PO and other
12832: -- POs separately because current PO lines (stored in
12833: -- po_lines_gt) may not go to po_lines_all eventually
12834: --: changed query to use Line qty/amt/price
12835: --instead of summing up the Line Loc values. The results should be
12836: --equivalent for SPOs.

Line 12833: -- po_lines_gt) may not go to po_lines_all eventually

12829: -- total amount released for that contract on this PO
12830: -- SQL Why: Need to calculate the total amount released for the
12831: -- contract and we are calculating current PO and other
12832: -- POs separately because current PO lines (stored in
12833: -- po_lines_gt) may not go to po_lines_all eventually
12834: --: changed query to use Line qty/amt/price
12835: --instead of summing up the Line Loc values. The results should be
12836: --equivalent for SPOs.
12837:

Line 12861: FROM po_lines_gt POL, -- target_line

12857: l_amount_limit,
12858: l_current_different,
12859: l_current_rate,
12860: l_contract_rate
12861: FROM po_lines_gt POL, -- target_line
12862: po_headers_all POHA, -- global contract
12863: po_lines_gt POL1, -- all lines in current doc
12864: -- having the same contract ref
12865: po_headers_all POHA1 -- document

Line 12863: po_lines_gt POL1, -- all lines in current doc

12859: l_current_rate,
12860: l_contract_rate
12861: FROM po_lines_gt POL, -- target_line
12862: po_headers_all POHA, -- global contract
12863: po_lines_gt POL1, -- all lines in current doc
12864: -- having the same contract ref
12865: po_headers_all POHA1 -- document
12866: WHERE
12867: POL.po_header_id = p_document_id

Line 12915: FROM po_lines_gt POL, -- target line

12911: BULK COLLECT INTO l_prev_doc_line_num,
12912: l_prev_rel_amount,
12913: l_prev_different,
12914: l_prev_rate
12915: FROM po_lines_gt POL, -- target line
12916: po_headers_all POHA, -- global contract
12917: --bug 9242146, force tables
12918: --to be joined in the order specified.
12919: po_lines_all POL1, -- all lines from other doc with

Line 12919: po_lines_all POL1, -- all lines from other doc with

12915: FROM po_lines_gt POL, -- target line
12916: po_headers_all POHA, -- global contract
12917: --bug 9242146, force tables
12918: --to be joined in the order specified.
12919: po_lines_all POL1, -- all lines from other doc with
12920: -- the same GC ref
12921: po_headers_all POH1 -- headers of lines in POL1
12922:
12923: WHERE

Line 13059: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINE_LOCATIONS_GT PLL

13055: x_sequence + ROWNUM,
13056: substr(g_linemsg||g_delim||POL.line_num||g_delim
13057: ||l_textline,1,240),
13058: 'PO_SUB_STD_AFTER_GA_DATE'
13059: FROM PO_LINES_GT POL, PO_HEADERS_GT POH, PO_HEADERS_ALL POH2, PO_LINE_LOCATIONS_GT PLL
13060: WHERE POL.po_header_id = p_document_id
13061: AND POL.po_header_id = POH.po_header_id
13062: AND PLL.po_line_id = POL.po_line_id
13063: AND POL.contract_id = POH2.po_header_id

Line 13203: po_lines POL1

13199: , POL1.quantity * POL1.unit_price)
13200: * NVL(POH1.rate,1)
13201: )
13202: FROM po_headers POH1,
13203: po_lines POL1
13204: WHERE POL1.contract_id = POH.po_header_id
13205: AND POL1.po_header_id = POH1.po_header_id
13206: AND NVL(POL1.cancel_flag, 'N') = 'N'
13207: ) -- amt released in fn currency

Line 13485: DELETE FROM po_lines_gt;

13481: -- Clean up gt tables to make sure that all the records in GT tables are from
13482: -- the same document
13483:
13484: DELETE FROM po_headers_gt;
13485: DELETE FROM po_lines_gt;
13486: DELETE FROM po_line_locations_gt;
13487: DELETE FROM po_distributions_gt;
13488: DELETE FROM po_releases_gt;
13489: DELETE FROM po_req_headers_gt;

Line 13555: -- Change populate logic for po_lines_gt to handle document levels

13551: l_progress := '005';
13552:
13553: --populate the global line table
13554: --
13555: -- Change populate logic for po_lines_gt to handle document levels
13556:
13557: populate_po_lines_gt(
13558: p_doc_type => p_doc_type
13559: , p_doc_level => p_doc_level

Line 13557: populate_po_lines_gt(

13553: --populate the global line table
13554: --
13555: -- Change populate logic for po_lines_gt to handle document levels
13556:
13557: populate_po_lines_gt(
13558: p_doc_type => p_doc_type
13559: , p_doc_level => p_doc_level
13560: , p_doc_level_id => p_doc_level_id
13561: , p_draft_id => p_draft_id -- CLM Aprvl

Line 13722: UPDATE po_lines_gt

13718: -- in values or if NULL then with existing values in the table
13719: -- SQL Why: Need to apply requested line level changes to global temp table
13720: -- SQL Join: po_line_id
13721: FORALL i IN 1..p_requested_changes.line_changes.po_line_id.COUNT
13722: UPDATE po_lines_gt
13723: SET unit_price = nvl(p_requested_changes.line_changes.unit_price(i),unit_price),
13724: vendor_product_num = nvl(p_requested_changes.line_changes.vendor_product_num(i),
13725: vendor_product_num),
13726: --

Line 14123: , po_lines_all pol --

14119: -- Note: the value basis decode assumes Milestone Pay Items are Amount
14120: -- Milestones, since payment type is not changeable on Qty-based lines
14121: --
14122: FROM po_line_locations poll
14123: , po_lines_all pol --
14124: WHERE poll.line_location_id =
14125: p_requested_changes.shipment_changes.parent_line_location_id(i)
14126: AND p_requested_changes.shipment_changes.po_line_location_id(i) IS NULL
14127: AND poll.po_line_id = pol.po_line_id; --

Line 14590: --Name: populate_po_lines_gt

14586:
14587: --
14588: -------------------------------------------------------------------------------
14589: --Start of Comments
14590: --Name: populate_po_lines_gt
14591: --Pre-reqs:
14592: -- None.
14593: --Modifies:
14594: -- PO_LINES_GT

Line 14594: -- PO_LINES_GT

14590: --Name: populate_po_lines_gt
14591: --Pre-reqs:
14592: -- None.
14593: --Modifies:
14594: -- PO_LINES_GT
14595: --Locks:
14596: -- None.
14597: --Function:
14598: -- Populates the lines GTT for submission checks.

Line 14621: PROCEDURE populate_po_lines_gt(

14617: --Testing:
14618: --
14619: --End of Comments
14620: -------------------------------------------------------------------------------
14621: PROCEDURE populate_po_lines_gt(
14622: p_doc_type IN VARCHAR2
14623: , p_doc_level IN VARCHAR2
14624: , p_doc_level_id IN NUMBER
14625: , p_draft_id IN NUMBER -- CLM Aprvl

Line 14630: l_api_name CONSTANT varchar2(40) := 'POPULATE_PO_LINES_GT';

14626: , x_return_status OUT NOCOPY VARCHAR2
14627: )
14628: IS
14629:
14630: l_api_name CONSTANT varchar2(40) := 'POPULATE_PO_LINES_GT';
14631: l_progress VARCHAR2(3);
14632:
14633: l_line_id_tbl po_tbl_number;
14634: -- PAR Project

Line 14676: INSERT INTO po_lines_gt(

14672: END IF;
14673:
14674:
14675: FORALL i IN 1 .. l_line_id_tbl.COUNT
14676: INSERT INTO po_lines_gt(
14677: PO_LINE_ID ,
14678: LAST_UPDATE_DATE ,
14679: LAST_UPDATED_BY ,
14680: PO_HEADER_ID ,

Line 14995: FROM po_lines_merge_v pol

14991: pol.CLM_UNDEF_FLAG ,
14992: pol.CLM_UNDEF_ACTION_CODE , --UCA Project - CLMR4 Changes End
14993: pol.CLM_EXHIBIT_NAME , -- CLM Phase 4 - Elins project
14994: pol.COST_CONSTRAINT -- CLM Phase 4 - Elins project
14995: FROM po_lines_merge_v pol
14996: Where pol.po_line_id = l_line_id_tbl(i)
14997: and pol.draft_id = p_draft_id
14998: /*-- CLM Aprvl
14999: FROM po_lines_all pol

Line 14999: FROM po_lines_all pol

14995: FROM po_lines_merge_v pol
14996: Where pol.po_line_id = l_line_id_tbl(i)
14997: and pol.draft_id = p_draft_id
14998: /*-- CLM Aprvl
14999: FROM po_lines_all pol
15000: WHERE pol.po_line_id = l_line_id_tbl(i)
15001: -- CLM Aprvl*/
15002: -- need to change the entities which should be validated. Only records in the draft tables should be validated.
15003: AND (l_draft_type <> 'PAR'

Line 15032: END POPULATE_PO_LINES_GT;

15028: || l_progress || ' SQL CODE is '||sqlcode);
15029: END IF;
15030: END IF;
15031:
15032: END POPULATE_PO_LINES_GT;
15033: --
15034:
15035:
15036: /**

Line 16292: OR EXISTS (SELECT null from po_lines_all l

16288: AND (h.closed_code is NULL or h.closed_code NOT IN ('FINALLY CLOSED'))
16289: AND (h.frozen_flag is NULL or h.frozen_flag <> 'Y')))
16290: AND (p_line_id(i) IS NULL
16291: --Case 3: Optionally, Line is specified
16292: OR EXISTS (SELECT null from po_lines_all l
16293: WHERE l.po_line_id = p_line_id(i)
16294: AND (l.cancel_flag is null or l.cancel_flag <> 'Y')
16295: AND (l.closed_code is NULL or l.closed_code NOT IN ('FINALLY CLOSED'))))
16296: AND (p_line_location_id(i) IS NULL

Line 16526: OR EXISTS (SELECT null from po_lines_all l

16522: AND (h.hold_flag is NULL or h.hold_flag <> 'Y')))
16523: AND (p_line_id(i) IS NULL
16524: --Case 3: Optionally, Line is specified
16525: -- Bug 3407980: Modified closed_code condition so that it only discards 'FINALLY CLOSED'
16526: OR EXISTS (SELECT null from po_lines_all l
16527: WHERE l.po_line_id = p_line_id(i)
16528: AND (l.closed_code is NULL or l.closed_code <> 'FINALLY CLOSED')))
16529: AND (p_line_location_id(i) IS NULL
16530: --Case 4: Optionally, Line Location is specified

Line 16695: OR EXISTS (SELECT null from po_lines_all l

16691: AND (h.hold_flag is NULL or h.hold_flag <> 'Y')))
16692: AND (p_line_id(i) IS NULL
16693: --Case 3: Optionally, Line is specified
16694: -- Bug 3407980: Modified closed_code condition so that it only discards 'FINALLY CLOSED'
16695: OR EXISTS (SELECT null from po_lines_all l
16696: WHERE l.po_line_id = p_line_id(i)
16697: AND (l.closed_code is NULL or l.closed_code <> 'FINALLY CLOSED')))
16698: AND (p_line_location_id(i) IS NULL
16699: --Case 4: Optionally, Line Location is specified

Line 16866: FROM po_lines_all s

16862: UPDATE po_headers_gt gt
16863: SET (closed_code, cancel_flag, user_hold_flag)
16864: =
16865: (SELECT nvl(closed_code, 'OPEN'), NVL(cancel_flag, 'N'), NVL(user_hold_flag, 'N')
16866: FROM po_lines_all s
16867: WHERE s.po_line_id = p_line_id(i))
16868: WHERE p_line_id(i) is not null and gt.po_header_id = l_sequence(i)
16869: ;
16870:

Line 17260: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.

17256: , 'PO_SUB_SHIP_BILL_GT_ORD_QTY'
17257: )
17258: FROM
17259: PO_LINE_LOCATIONS_GT POLL
17260: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.
17261: WHERE POLL.po_line_id = POL.po_line_id
17262: AND nvl(POLL.cancel_flag, 'N') = 'N'
17263: AND nvl(POLL.closed_code, 'OPEN') <> 'FINALLY CLOSED'
17264: AND ( --

Line 17348: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.

17344: )
17345: FROM
17346: PO_DISTRIBUTIONS_GT POD
17347: , PO_LINE_LOCATIONS_GT POLL
17348: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.
17349: WHERE POD.line_location_id = POLL.line_location_id
17350: AND POL.po_line_id = POLL.po_line_id
17351: AND nvl(POLL.cancel_flag, 'N') = 'N'
17352: AND nvl(POLL.closed_code, 'OPEN') <> 'FINALLY CLOSED'

Line 17435: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.

17431: )
17432: FROM
17433: PO_DISTRIBUTIONS_GT POD
17434: , PO_LINE_LOCATIONS_GT POLL
17435: , PO_LINES_ALL POL -- For releases, PO_LINES_GT table isn't populated.
17436: WHERE POD.line_location_id = POLL.line_location_id
17437: AND POL.po_line_id = POLL.po_line_id
17438: AND nvl(POLL.cancel_flag,'N') = 'N'
17439: AND nvl(POLL.closed_code,'OPEN') <> 'FINALLY CLOSED'

Line 18419: , PO_LINES_ALL POL -- For Releases, PO_LINES_GT doesn't get populated.

18415: , l_distribution_num_tbl
18416: FROM
18417: PO_DISTRIBUTIONS_GT POD
18418: , PO_LINE_LOCATIONS_GT POLL
18419: , PO_LINES_ALL POL -- For Releases, PO_LINES_GT doesn't get populated.
18420: , PO_HEADERS_GT POH
18421: WHERE POLL.line_location_id(+) = POD.line_location_id --JOIN
18422: AND POL.po_line_id(+) = POD.po_line_id --JOIN
18423: -- PA distributions don't have associated lines or shipments

Line 19384: FROM po_lines_gt pol

19380: , 0
19381: , p_sequence + ROWNUM
19382: , substr(g_linemsg || g_delim || pol.line_num || g_delim || l_textline, 1, 240)
19383: , 'PO_CAN_POL_WITH_RCV_TRX'
19384: FROM po_lines_gt pol
19385: WHERE EXISTS
19386: (
19387: SELECT 'Eligible shipment'
19388: FROM po_line_locations_gt poll

Line 19463: FROM po_lines_gt pol, po_line_locations_gt poll

19459: || poll.shipment_num || g_delim || l_textline, 1, 240)
19460: )
19461: , DECODE(p_document_type, g_document_type_RELEASE, 'PO_CAN_RELS_WITH_RCV_TRX',
19462: 'PO_CAN_POLL_WITH_RCV_TRX')
19463: FROM po_lines_gt pol, po_line_locations_gt poll
19464: WHERE pol.po_line_id = poll.po_line_id
19465: AND NVL(poll.cancel_flag, 'N') = 'N'
19466: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED'
19467: AND EXISTS

Line 19653: FROM po_lines_gt pol, po_line_locations_gt poll

19649: substr(g_linemsg || g_delim || pol.line_num || g_delim || g_shipmsg || g_delim
19650: || poll.shipment_num || g_delim ||
19651: DECODE(poll.payment_type , NULL, l_text_normal_po, l_text_complex_po), 1, 240))
19652: , DECODE(poll.payment_type, NULL, 'PO_CAN_POLL_WITH_ASN', 'PO_CAN_POLL_WITH_PENDING_WCR')
19653: FROM po_lines_gt pol, po_line_locations_gt poll
19654: WHERE NVL(poll.cancel_flag, 'N') = 'N'
19655: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED'
19656: AND EXISTS
19657: (

Line 19723: PO Lines being finally closed.*/

19719: /*Bug 9012072 END Determine if there are any ASNs that have not been fully received for the shipments of the
19720: PO or Release being finally closed.*/
19721:
19722: /*Bug 9012072 START Determine if there are any ASNs that have not been fully received for the shipments of the
19723: PO Lines being finally closed.*/
19724:
19725: ELSIF (p_document_level = g_document_level_LINE)
19726: THEN
19727:

Line 19762: FROM po_lines_gt pol, po_line_locations_gt poll

19758: , substr(g_linemsg || g_delim || pol.line_num || g_delim || g_shipmsg || g_delim
19759: || poll.shipment_num || g_delim ||
19760: DECODE(poll.payment_type , NULL, l_text_normal_po, l_text_complex_po), 1, 240)
19761: , DECODE(poll.payment_type, NULL, 'PO_CAN_POLL_WITH_ASN', 'PO_CAN_POLL_WITH_PENDING_WCR')
19762: FROM po_lines_gt pol, po_line_locations_gt poll
19763: WHERE poll.po_line_id = pol.po_line_id
19764: AND NVL(poll.cancel_flag, 'N') = 'N'
19765: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED'
19766: AND EXISTS

Line 19777: PO Lines being finally closed.*/

19773: AND NVL(rsl.shipment_line_status_code, 'EXPECTED') <> 'CANCELLED'
19774: );
19775:
19776: /*Bug 9012072 END Determine if there are any ASNs that have not been fully received for the shipments of the
19777: PO Lines being finally closed.*/
19778:
19779: d_progress := 40;
19780:
19781: ELSIF (p_document_level = g_document_level_SHIPMENT)

Line 19824: FROM po_lines_gt pol, po_line_locations_gt poll

19820: , substr(g_linemsg || g_delim || pol.line_num || g_delim || g_shipmsg || g_delim
19821: || poll.shipment_num || g_delim ||
19822: DECODE(poll.payment_type , NULL, l_text_normal_po, l_text_complex_po), 1, 240)
19823: , DECODE(poll.payment_type, NULL, 'PO_CAN_POLL_WITH_ASN', 'PO_CAN_POLL_WITH_PENDING_WCR')
19824: FROM po_lines_gt pol, po_line_locations_gt poll
19825: WHERE poll.po_line_id = pol.po_line_id
19826: AND NVL(poll.cancel_flag, 'N') = 'N'
19827: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED'
19828: AND EXISTS

Line 20008: FROM po_lines_gt pol, po_line_locations_gt poll, po_distributions_gt pod

20004: , 'QTY1', round(sum(NVL(pod.quantity_delivered, 0)),5) /* Bug:13427569 rounded to 5 digits */
20005: )
20006: ), 1, 240)
20007: , 'PO_CAN_POLL_REC_NOT_DEL'
20008: FROM po_lines_gt pol, po_line_locations_gt poll, po_distributions_gt pod
20009: WHERE pod.line_location_id = poll.line_location_id
20010: AND pol.po_line_id = poll.po_line_id
20011: AND pol.order_type_lookup_code NOT IN ('RATE', 'FIXED PRICE')
20012: AND NVL(poll.cancel_flag, 'N') = 'N'

Line 20131: FROM po_lines_gt pol, po_line_locations_gt poll, po_distributions_gt pod

20127: , 'QTY1', sum(NVL(pod.amount_delivered, 0))
20128: )
20129: ), 1, 240)
20130: , 'PO_CAN_POLL_AMT_REC_NOT_DEL'
20131: FROM po_lines_gt pol, po_line_locations_gt poll, po_distributions_gt pod
20132: WHERE pod.line_location_id = poll.line_location_id
20133: AND pol.po_line_id = poll.po_line_id
20134: AND pol.order_type_lookup_code IN ('RATE', 'FIXED PRICE')
20135: AND NVL(poll.cancel_flag, 'N') = 'N'

Line 20266: FROM po_lines_gt pol, po_line_locations_gt poll

20262: , g_linemsg || g_delim || pol.line_num || g_delim || g_shipmsg || g_delim
20263: || poll.shipment_num || g_delim || g_distmsg || g_delim || l_textline
20264: ), 1, 240)
20265: , 'PO_CAN_POLL_INVALID_ACCT_FLEX'
20266: FROM po_lines_gt pol, po_line_locations_gt poll
20267: , po_distributions_gt pod, gl_code_combinations gcc
20268: WHERE pod.line_location_id = poll.line_location_id
20269: AND pol.po_line_id = poll.po_line_id
20270: AND poll.shipment_type IN ('STANDARD', 'PLANNED', 'PREPAYMENT') --

Line 20365: FROM po_lines_gt pol

20361: , 0
20362: , p_sequence + ROWNUM
20363: , substr(g_linemsg || g_delim || pol.line_num || g_delim || l_textline,1,240) --Bug5096900
20364: , 'PO_CAN_POL_PLAN_WITH_OPEN_REL'
20365: FROM po_lines_gt pol
20366: WHERE EXISTS
20367: (
20368: SELECT 'Uncancelled Open Releases Exist'
20369: FROM po_line_locations pll

Line 20462: FROM po_lines_gt pol

20458: , 0
20459: , p_sequence + ROWNUM
20460: , substr(g_linemsg || g_delim || pol.line_num || g_delim || l_textline,1,240) --Bug5096900
20461: , 'PO_CAN_GAL_WITH_OPEN_STD_REF'
20462: FROM po_lines_gt pol
20463: WHERE EXISTS
20464: (
20465: SELECT 'Uncancelled Std PO lines referencing this GA line exist'
20466: FROM po_lines_all pol2

Line 20465: SELECT 'Uncancelled Std PO lines referencing this GA line exist'

20461: , 'PO_CAN_GAL_WITH_OPEN_STD_REF'
20462: FROM po_lines_gt pol
20463: WHERE EXISTS
20464: (
20465: SELECT 'Uncancelled Std PO lines referencing this GA line exist'
20466: FROM po_lines_all pol2
20467: WHERE pol2.from_line_id = pol.po_line_id
20468: AND NVL(pol2.cancel_flag, 'N') = 'N'
20469: AND NVL(pol2.closed_code, 'OPEN') <> 'FINALLY CLOSED'

Line 20466: FROM po_lines_all pol2

20462: FROM po_lines_gt pol
20463: WHERE EXISTS
20464: (
20465: SELECT 'Uncancelled Std PO lines referencing this GA line exist'
20466: FROM po_lines_all pol2
20467: WHERE pol2.from_line_id = pol.po_line_id
20468: AND NVL(pol2.cancel_flag, 'N') = 'N'
20469: AND NVL(pol2.closed_code, 'OPEN') <> 'FINALLY CLOSED'
20470: );

Line 20561: SELECT 'Open Std PO lines referencing this contract exist'

20557: , 'PO_CAN_CGA_WITH_OPEN_STD_REF'
20558: FROM po_headers_gt poh
20559: WHERE EXISTS
20560: (
20561: SELECT 'Open Std PO lines referencing this contract exist'
20562: FROM po_lines_all pol
20563: WHERE pol.contract_id = poh.po_header_id
20564: AND NVL(pol.cancel_flag, 'N') = 'N'
20565: AND NVL(pol.closed_code, 'OPEN') <> 'FINALLY CLOSED'

Line 20562: FROM po_lines_all pol

20558: FROM po_headers_gt poh
20559: WHERE EXISTS
20560: (
20561: SELECT 'Open Std PO lines referencing this contract exist'
20562: FROM po_lines_all pol
20563: WHERE pol.contract_id = poh.po_header_id
20564: AND NVL(pol.cancel_flag, 'N') = 'N'
20565: AND NVL(pol.closed_code, 'OPEN') <> 'FINALLY CLOSED'
20566: );

Line 20655: FROM po_lines_gt pol, po_line_locations_gt poll

20651: , p_sequence + ROWNUM
20652: , substr(g_linemsg || g_delim || pol.line_num || g_delim || g_shipmsg
20653: || poll.shipment_num || g_delim || l_textline,1,240) --Bug5096900
20654: , 'PO_CAN_POLL_PLAN_WITH_OPEN_REL'
20655: FROM po_lines_gt pol, po_line_locations_gt poll
20656: WHERE poll.po_line_id = pol.po_line_id
20657: AND NVL(poll.cancel_flag, 'N') = 'N'
20658: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED'
20659: AND EXISTS

Line 20776: , PO_LINES_GT POL

20772: , l_lineloc_qty_tbl --
20773: , l_lineloc_amt_tbl --
20774: FROM
20775: PO_LINE_LOCATIONS_GT PLL
20776: , PO_LINES_GT POL
20777: WHERE
20778: POL.po_line_id = PLL.po_line_id
20779: AND PLL.shipment_type in ('STANDARD', 'PLANNED')
20780: AND POL.po_header_id = p_document_id

Line 20962: , PO_LINES_GT POL

20958: PLL.amount
20959: END) financing_advance_amount
20960: FROM
20961: PO_LINE_LOCATIONS_GT PLL
20962: , PO_LINES_GT POL
20963: WHERE
20964: POL.po_line_id = PLL.po_line_id
20965: AND ( (l_is_financing_flag = 'N' AND PLL.shipment_type = 'STANDARD')
20966: OR (l_is_financing_flag = 'Y' and PLL.shipment_type = 'PREPAYMENT'))

Line 21091: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL, PO_LINES_GT POL

21087: , l_lineloc_amt_tbl
21088: , l_dist_qty_tbl
21089: , l_dist_amt_tbl
21090: , l_line_id_tbl -- bug 16474947
21091: FROM PO_DISTRIBUTIONS_GT POD,PO_LINE_LOCATIONS_GT PLL, PO_LINES_GT POL
21092: WHERE PLL.po_line_id = POL.po_line_id
21093: AND POD.line_location_id = PLL.line_location_id
21094: AND PLL.po_header_id = p_document_id
21095: AND nvl(PLL.cancel_flag,'N') = 'N'

Line 21193: (l_draft_type = 'PAR' AND NOT EXISTS (SELECT 1 FROM po_lines_draft_all WHERE po_line_id = l_line_id_tbl(i)

21189: Decode(l_draft_type,'PAR','W',NULL) --WARNING FOR PAR and ERROR FOR OTHERS
21190: FROM DUAL --bug 16474947
21191: WHERE
21192: ( (l_draft_type <> 'PAR') OR
21193: (l_draft_type = 'PAR' AND NOT EXISTS (SELECT 1 FROM po_lines_draft_all WHERE po_line_id = l_line_id_tbl(i)
21194: AND draft_id = l_draft_id AND change_status = 'NEW'))
21195: );
21196: --CLM Phase 4: PAR Changes End.
21197: l_progress := '037';

Line 21471: FROM po_lines_gt pol

21467: , null -- distribution_num
21468: , p_sequence + ROWNUM
21469: , substr(l_textline, 1, 240)
21470: , l_message_name
21471: FROM po_lines_gt pol
21472: WHERE pol.po_line_id=p_doc_level_id
21473: AND chk_unv_invoices(l_invoice_type, pol.po_header_id, NULL, pol.po_line_id,NULL, NULL, p_origin_doc_id, 'CHECK_PO_LINE_FINAL_CLOSE') = 1;
21474: END IF;
21475: --

Line 21642: FROM po_lines_gt

21638: l_document_id := p_doc_level_id;
21639: ELSIF p_document_level = g_document_level_LINE THEN
21640: SELECT po_header_id
21641: INTO l_document_id
21642: FROM po_lines_gt
21643: WHERE po_line_id=p_doc_level_id;
21644: ELSIF p_document_level = g_document_level_SHIPMENT THEN
21645: SELECT po_header_id
21646: INTO l_document_id

Line 21776: po_lines_all pol,

21772: l_consigned_flag,
21773: l_outsourced_assembly,
21774: l_line_location_id
21775: FROM po_line_locations_all poll,
21776: po_lines_all pol,
21777: po_headers_all poh
21778: WHERE poh.po_header_id = pol.po_header_id
21779: AND pol.po_line_id = poll.po_line_id
21780: AND poll.line_location_id = p_line_location_id;

Line 22741: FROM PO_HEADERS_GT POH, PO_LINES_GT POL

22737: WHEN (POH.clm_max_order_amount is null and POL.clm_max_order_amount is NULL)
22738: THEN 'PO_IDV_MXPM_H_GT_MN_AMT_L'
22739: END
22740: , 'E'
22741: FROM PO_HEADERS_GT POH, PO_LINES_GT POL
22742: WHERE POH.po_header_id = p_header_id
22743: AND POH.po_header_id = POL.po_header_id
22744: AND nvl(POH.clm_max_order_amount, POH.amount_limit) < nvl(POL.clm_max_order_amount, POL.clm_min_order_amount);
22745:

Line 22803: PO_LINES_GT POL

22799: 'PO_CHARGE_NOT_NULL'
22800: FROM
22801: PO_DISTRIBUTIONS_GT POD,
22802: PO_LINE_LOCATIONS_GT PLL,
22803: PO_LINES_GT POL
22804: WHERE POD.CODE_COMBINATION_ID IS NULL
22805: AND POD.PO_HEADER_ID = P_DOCUMENT_ID
22806: AND NVL(POD.DISTRIBUTION_TYPE, 'STANDARD') <> 'AGREEMENT'
22807: AND POD.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID

Line 22852: PO_LINES_GT POL

22848: 'PO_ALL_NO_BUDGET_FLEX'
22849: FROM
22850: PO_DISTRIBUTIONS_GT POD,
22851: PO_LINE_LOCATIONS_GT PLL,
22852: PO_LINES_GT POL
22853: WHERE POD.BUDGET_ACCOUNT_ID IS NULL
22854: AND POD.PO_HEADER_ID = P_DOCUMENT_ID
22855: AND NVL(POD.DISTRIBUTION_TYPE, 'STANDARD') <> 'AGREEMENT'
22856: AND Nvl(PREVENT_ENCUMBRANCE_FLAG,'N') = 'N'

Line 22959: PO_LINES_ALL POL

22955: 'PO_LINE_SHIP_UOM_MISMATCH'
22956:
22957: FROM
22958: PO_LINE_LOCATIONS_ALL PLL,
22959: PO_LINES_ALL POL
22960: WHERE POL.PO_LINE_ID=PLL.PO_LINE_ID
22961: AND NVL(PLL.unit_meas_lookup_code,-1) <> NVL(POL.unit_meas_lookup_code,-1)
22962: AND PLL.PO_RELEASE_ID = P_DOCUMENT_ID;
22963:

Line 22997: PO_LINES_ALL POL

22993: ),
22994: 'PO_LINE_SHIP_UOM_MISMATCH'
22995: FROM
22996: PO_LINE_LOCATIONS_ALL PLL,
22997: PO_LINES_ALL POL
22998: WHERE POL.PO_LINE_ID=PLL.PO_LINE_ID
22999: AND NVL(PLL.unit_meas_lookup_code,-1)<>NVL(POL.unit_meas_lookup_code,-1)
23000: -- bug 12597958 : bypassing check for amount based lines.
23001: AND (PLL.VALUE_BASIS not in ('FIXED PRICE','AMOUNT') -- Bug 12332819 # Do not consider Advance and Fixed Priced Shipments

Line 23553: po_lines_gt pl,

23549: ' of line ' ||
23550: pl.line_num,
23551: 'PO_CLOSE_WIP_JOB'
23552: FROM po_headers_gt ph,
23553: po_lines_gt pl,
23554: po_line_locations_gt pll,
23555: po_distributions_gt pd
23556: WHERE 1=1
23557: AND ph.po_header_id = pl.po_header_id

Line 24152: PO_LINES_GT POL

24148: FROM
24149: PO_DISTRIBUTIONS_GT POD,
24150: gl_sets_of_books sob,
24151: PO_LINE_LOCATIONS_GT POLL,
24152: PO_LINES_GT POL
24153: WHERE
24154: POD.PO_HEADER_ID = P_DOCUMENT_ID
24155: AND POD.line_location_id = POLL.line_location_id
24156: AND POLL.po_line_id = POL.po_line_id

Line 24215: PO_LINES_GT POL

24211: FROM
24212: PO_DISTRIBUTIONS_GT POD,
24213: gl_sets_of_books sob,
24214: PO_LINE_LOCATIONS_GT POLL,
24215: PO_LINES_GT POL
24216: WHERE
24217: POD.PO_HEADER_ID = P_DOCUMENT_ID
24218: AND POD.po_release_id IS NULL
24219: AND POD.line_location_id = POLL.line_location_id(+)

Line 24282: PO_LINES_GT POL

24278: FROM
24279: PO_DISTRIBUTIONS_GT POD,
24280: gl_sets_of_books sob,
24281: PO_LINE_LOCATIONS_GT POLL,
24282: PO_LINES_GT POL
24283: WHERE
24284: POD.PO_HEADER_ID = P_DOCUMENT_ID
24285: AND POD.line_location_id = POLL.line_location_id
24286: AND POLL.po_line_id = POL.po_line_id

Line 24344: PO_LINES_GT POL

24340: FROM
24341: PO_DISTRIBUTIONS_GT POD,
24342: gl_sets_of_books sob,
24343: PO_LINE_LOCATIONS_GT POLL,
24344: PO_LINES_GT POL
24345: WHERE
24346: POD.PO_HEADER_ID = P_DOCUMENT_ID
24347: AND POD.line_location_id = POLL.line_location_id
24348: AND POLL.po_line_id = POL.po_line_id

Line 24578: FROM po_lines_gt POL,

24574: || g_delim
24575: || l_textline, 1, 240),
24576: 'CLM_NO_DELIVERY_PERIOD',
24577: 'E'
24578: FROM po_lines_gt POL,
24579: po_headers_gt POH,
24580: po_line_locations_gt PLL
24581: WHERE POH.po_header_id = p_document_id
24582: AND POL.po_header_id = POH.po_header_id

Line 24714: po_lines_gt POL,

24710: g_distmsg || g_delim || POD.distribution_num ||g_delim || l_textline,1,240),
24711: 'PO_PAY_INSTR_SEQ_NOT_SPECIFIED',
24712: 'E'
24713: FROM po_headers_gt POH,
24714: po_lines_gt POL,
24715: po_line_locations_gt POLL,
24716: po_distributions_gt POD
24717: WHERE POH.po_header_id = p_document_id
24718: AND POL.po_header_id = POH.po_header_id

Line 24773: FROM po_lines_gt POL

24769: p_sequence + ROWNUM,
24770: SUBSTR (g_linemsg || g_delim || Nvl(POL.line_num_display, POL.line_num) ||g_delim || l_textline,1,240),
24771: 'PO_PAYMENT_INSTR_SINGLE_FUND',
24772: 'E'
24773: FROM po_lines_gt POL
24774: WHERE POL.po_header_id = p_document_id
24775: AND POL.clm_payment_instr_code = 'SINGLE_FUNDING'
24776: AND EXISTS ( SELECT 1
24777: FROM po_distributions_gt POD, po_distributions_gt POD2

Line 24818: FROM po_lines_gt POL,

24814: p_sequence + ROWNUM,
24815: SUBSTR (g_linemsg || g_delim || Nvl(POL.line_num_display, POL.line_num) || g_delim || l_textline,1,240),
24816: 'PO_PAYMENT_INSTR_BLANK',
24817: 'W'
24818: FROM po_lines_gt POL,
24819: po_headers_gt POH
24820: WHERE POH.po_header_id = p_document_id
24821: AND POL.po_header_id = POH.po_header_id
24822: AND Nvl(POL.clm_info_flag,'N')= 'N'

Line 24912: FROM po_lines_gt POL,

24908: SUBSTR ( g_linemsg || g_delim || Nvl(POL.line_num_display, POL.line_num) || g_delim ||
24909: l_textline ||g_delim||plc.displayed_field||'.',1,240),
24910: 'PO_PAY_INSTR_CHANGED_TO_MANUAL',
24911: 'W'
24912: FROM po_lines_gt POL,
24913: po_lines_all POL1,
24914: po_lookup_codes plc
24915: WHERE POL.po_header_id = p_document_id
24916: AND POL1.po_header_id = POL.po_header_id

Line 24913: po_lines_all POL1,

24909: l_textline ||g_delim||plc.displayed_field||'.',1,240),
24910: 'PO_PAY_INSTR_CHANGED_TO_MANUAL',
24911: 'W'
24912: FROM po_lines_gt POL,
24913: po_lines_all POL1,
24914: po_lookup_codes plc
24915: WHERE POL.po_header_id = p_document_id
24916: AND POL1.po_header_id = POL.po_header_id
24917: AND POL1.po_line_id = POL.po_line_id

Line 25035: FROM po_lines_gt pol,

25031: ||g_delim
25032: || l_textline, 1, 240),
25033: 'CLM_POP_BEYOND_12',
25034: 'E'
25035: FROM po_lines_gt pol,
25036: po_line_types plt,
25037: po_headers_gt pha
25038: WHERE pha.po_header_id = p_document_id
25039: AND pol.po_header_id = pha.po_header_id

Line 25120: po_lines_gt pol,

25116: po_line_locations_gt pll,
25117: (SELECT pol.po_line_id,
25118: Nvl(POL.line_num_display,POL.line_num) line_num
25119: FROM po_headers_gt pha,
25120: po_lines_gt pol,
25121: po_line_types plt
25122: WHERE pha.po_header_id = p_document_id
25123: AND pol.po_header_id = pha.po_header_id
25124: AND pol.line_type_id = plt. line_type_id

Line 25187: FROM po_lines_gt pol,

25183: || g_delim
25184: || l_textline, 1, 240),
25185: 'CLM_POP_DURATION_BEYOND_12',
25186: 'E'
25187: FROM po_lines_gt pol,
25188: po_line_types plt,
25189: po_headers_gt pha,
25190: po_line_locations_gt poll
25191: WHERE pha.po_header_id = p_document_id

Line 25305: po_lines_gt pol,

25301: 'LINE_NUM', pol.line_num_display),
25302: 'PO_UCA_PDD_PAST_DATE',
25303: 'W'
25304: FROM po_line_ucas uc,
25305: po_lines_gt pol,
25306: po_headers_gt poh
25307: WHERE Nvl(pol.clm_undef_flag, 'N') = 'Y'
25308: AND uc.planned_def_date IS NOT NULL
25309: AND uc.planned_def_date < SYSDATE

Line 25355: po_lines_gt pol,

25351: pol.line_num_display),
25352: 'PO_UCA_UNDEF_INCOMPLETE',
25353: 'E'
25354: FROM po_line_ucas uc,
25355: po_lines_gt pol,
25356: po_headers_gt poh
25357: WHERE Nvl(pol.clm_undef_flag, 'N') = 'Y'
25358: AND ( NOT ( ( uc.planned_def_date IS NOT NULL
25359: AND uc.undef_amount IS NOT NULL

Line 25410: po_lines_gt pol,

25406: uc.undef_clm_document_number, 'LINE_NUM', pol.line_num_display),
25407: 'PO_UCA_DEF_DESC_ERR',
25408: 'E'
25409: FROM po_line_ucas uc,
25410: po_lines_gt pol,
25411: po_headers_gt poh
25412: WHERE Nvl(pol.clm_undef_action_code, 'X') = 'DEF'
25413: AND uc.undef_amount IS NULL
25414: AND uc.not_to_exceed_amount IS NULL

Line 25488: FROM po_lines_gt pol,

25484: pol.contract_type,
25485: pol.clm_idc_type) cp_label,
25486: line_num_display,
25487: line_num
25488: FROM po_lines_gt pol,
25489: po_headers_gt ph
25490: WHERE pol.po_header_id = ph.po_header_id
25491: AND ph.po_header_id = p_document_id
25492: AND Nvl(pol.clm_undef_action_code, 'X') = 'DEF')

Line 25497: --UCA Line level validation on PO Lines Find out

25493: WHERE change_in_ext_price > max_change;
25494:
25495: p_sequence := p_sequence + SQL%ROWCOUNT;
25496: l_progress := '004';
25497: --UCA Line level validation on PO Lines Find out
25498: --whether def is actually done or not.
25499: l_progress := '004';
25500:
25501: INSERT INTO po_online_report_text_gt

Line 25529: FROM po_lines_gt pol,

25525: po_core_s.Get_translated_text('PO_UCA_LINE_DEF_NO_UCAS', 'LINE_NUM',
25526: line_num_display),
25527: 'PO_UCA_LINE_DEF_NO_UCAS',
25528: 'E'
25529: FROM po_lines_gt pol,
25530: po_headers_gt ph
25531: WHERE ph.po_header_id = p_document_id
25532: AND ph.po_header_id = pol.po_header_id
25533: AND Nvl(pol.clm_undef_action_code,'X') = 'DEF'

Line 25685: FROM po_lines_gt pol,

25681: p_sequence + ROWNUM,
25682: po_core_s.Get_translated_text('PO_CLM_EXHIBIT_INVALID_REF', 'EXHIBIT_NAME', poed.exhibit_name),
25683: 'PO_CLM_EXHIBIT_INVALID_REF',
25684: 'E'
25685: FROM po_lines_gt pol,
25686: po_exhibit_details_merge_v poed,
25687: (SELECT exhibit_name,
25688: (SELECT Decode( Count(1), 0, fnd_message.get_string('PO','PO_EXHIBIT_NSP_LABEL'), fnd_message.get_string('PO','PO_EXHIBIT_PRICED_LABEL'))
25689: FROM po_lines_gt pl

Line 25689: FROM po_lines_gt pl

25685: FROM po_lines_gt pol,
25686: po_exhibit_details_merge_v poed,
25687: (SELECT exhibit_name,
25688: (SELECT Decode( Count(1), 0, fnd_message.get_string('PO','PO_EXHIBIT_NSP_LABEL'), fnd_message.get_string('PO','PO_EXHIBIT_PRICED_LABEL'))
25689: FROM po_lines_gt pl
25690: WHERE
25691: pl.po_header_id = ped.PO_HEADER_ID AND
25692: pl.clm_exhibit_name = ped.EXHIBIT_NAME AND
25693: Nvl(pl.cost_constraint,'Priced') NOT IN ('NSP','NC')

Line 25828: po_lines_gt POL

25824: po_req_distributions_all PRD,
25825: po_requisition_lines_all PRL,
25826: po_requisition_headers_all PRH,
25827: po_line_locations_gt POLL,
25828: po_lines_gt POL
25829: WHERE POD.po_header_id = p_document_id
25830: AND POD.req_distribution_id = PRD.distribution_id
25831: AND PRD.requisition_line_id = PRL.requisition_line_id
25832: AND PRL.requisition_header_id = PRH.requisition_header_id

Line 26323: PO_LINES_GT POL,

26319: 'PO_RI_INVALID_ACCRUE_ON_RCT'
26320: FROM
26321: PO_DISTRIBUTIONS_GT POD,
26322: PO_LINE_LOCATIONS_GT POLL,
26323: PO_LINES_GT POL,
26324: PO_HEADERS_GT POH
26325:
26326: WHERE
26327: POH.po_header_id = P_DOCUMENT_ID

Line 26374: PO_LINES POL,

26370: 'PO_RI_INVALID_ACCRUE_ON_RCT'
26371: FROM
26372: PO_DISTRIBUTIONS_GT POD,
26373: PO_LINE_LOCATIONS_GT POLL,
26374: PO_LINES POL,
26375: PO_RELEASES_GT POR
26376:
26377: WHERE
26378: POR.po_release_id = P_DOCUMENT_ID