DBA Data[Home] [Help]

APPS.POS_SCO_TOLERANCE_PVT dependencies on PO_CHANGE_REQUESTS

Line 39: FROM po_change_requests

35: IS
36:
37: CURSOR getDocType(p_change_request_grp_id_csr IN NUMBER) IS
38: SELECT DISTINCT document_type
39: FROM po_change_requests
40: WHERE change_request_group_id = p_change_request_grp_id_csr;
41:
42: CURSOR getDocSubType(p_po_header_id_csr IN NUMBER) IS
43: SELECT type_lookup_code

Line 58: l_chg_req_grp_id po_change_requests.change_request_group_id%TYPE;

54: SELECT org_id
55: FROM po_headers_all
56: WHERE po_header_id = p_po_header_id_csr;
57:
58: l_chg_req_grp_id po_change_requests.change_request_group_id%TYPE;
59: l_po_header_id po_headers_all.po_header_id%TYPE;
60: l_po_release_id po_releases_all.po_release_id%TYPE;
61: l_doc_type po_change_requests.document_type%TYPE;
62: l_po_style varchar2(10);

Line 61: l_doc_type po_change_requests.document_type%TYPE;

57:
58: l_chg_req_grp_id po_change_requests.change_request_group_id%TYPE;
59: l_po_header_id po_headers_all.po_header_id%TYPE;
60: l_po_release_id po_releases_all.po_release_id%TYPE;
61: l_doc_type po_change_requests.document_type%TYPE;
62: l_po_style varchar2(10);
63: l_doc_subtype varchar2(10);
64: l_promise_date_incr NUMBER;
65: l_promise_date_decr NUMBER;

Line 495: FROM po_change_requests pcr,

491: -- Cursor to pick up old_promised_date and new_promised_date, handles the case when either of them is null
492: CURSOR c_promise_date_changes(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) IS
493: SELECT nvl(pcr.old_promised_date,pcr.old_need_by_date) old_promise_date,
494: pcr.new_promised_date, pll.promised_date,pll.need_by_date
495: FROM po_change_requests pcr,
496: po_line_locations_all pll
497: WHERE pcr.document_header_id=p_po_header_id_csr
498: AND pcr.document_line_location_id = pll.line_location_id
499: AND pcr.CHANGE_REQUEST_GROUP_ID=p_change_group_id_csr

Line 509: l_change_group_id po_change_requests.change_request_group_id%type;

505: (nvl(pcr.old_promised_date,nvl(pcr.old_need_by_date,pcr.new_promised_date - 1))<>pcr.new_promised_date)
506: );
507:
508: l_po_header_id po_headers_all.po_header_id%type;
509: l_change_group_id po_change_requests.change_request_group_id%type;
510: l_prom_date_dec NUMBER;
511: l_prom_date_incr NUMBER;
512: l_old_promise_date po_change_requests.old_promised_date%type;
513: l_new_promise_date po_change_requests.new_promised_date%type;

Line 512: l_old_promise_date po_change_requests.old_promised_date%type;

508: l_po_header_id po_headers_all.po_header_id%type;
509: l_change_group_id po_change_requests.change_request_group_id%type;
510: l_prom_date_dec NUMBER;
511: l_prom_date_incr NUMBER;
512: l_old_promise_date po_change_requests.old_promised_date%type;
513: l_new_promise_date po_change_requests.new_promised_date%type;
514: l_promised_date po_line_locations_all.promised_date%type;
515: l_need_by_date po_line_locations_all.need_by_date%type;
516: x_progress VARCHAR2(1000);

Line 513: l_new_promise_date po_change_requests.new_promised_date%type;

509: l_change_group_id po_change_requests.change_request_group_id%type;
510: l_prom_date_dec NUMBER;
511: l_prom_date_incr NUMBER;
512: l_old_promise_date po_change_requests.old_promised_date%type;
513: l_new_promise_date po_change_requests.new_promised_date%type;
514: l_promised_date po_line_locations_all.promised_date%type;
515: l_need_by_date po_line_locations_all.need_by_date%type;
516: x_progress VARCHAR2(1000);
517: l_return_val VARCHAR2(1):='Y';

Line 633: FROM po_change_requests

629: IS
630: -- This cursor picks up Unit Price chnages for SPO at Line Level
631: CURSOR c_unit_price_changes ( p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) IS
632: SELECT old_price,new_price
633: FROM po_change_requests
634: WHERE document_header_id=p_po_header_id_csr
635: AND CHANGE_REQUEST_GROUP_ID=p_change_group_id_csr
636: AND request_level = 'LINE'
637: AND new_price IS NOT NULL

Line 646: FROM po_change_requests pcr,

642: -- This cursor picks up unit price changes for BPA release at the shipment level
643: -- pcr.old_price is added to consider price breaks for release
644: CURSOR c_ship_unit_price_rel (p_po_release_id_csr IN NUMBER,p_po_header_id IN NUMBER,p_change_group_id_csr IN NUMBER) IS
645: SELECT plla.price_override,nvl(pcr.new_price,pcr.old_price)
646: FROM po_change_requests pcr,
647: po_line_locations_all plla
648: WHERE pcr.po_release_id= p_po_release_id_csr
649: AND pcr.CHANGE_REQUEST_GROUP_ID=p_change_group_id_csr
650: AND pcr.request_level = 'SHIPMENT'

Line 660: FROM po_change_requests pcr,

656:
657: -- cursor to check for the COMPLEX WORK (Financing Case)
658: CURSOR c_line_unit_price_cw (p_po_release_id_csr IN NUMBER,p_po_header_id IN NUMBER,p_change_group_id_csr IN NUMBER) IS
659: SELECT pl.unit_price,pcr.new_price
660: FROM po_change_requests pcr,
661: po_lines_all pl
662: WHERE pcr.document_header_id= p_po_header_id
663: AND pcr.CHANGE_REQUEST_GROUP_ID=p_change_group_id_csr
664: AND pcr.request_level = 'LINE'

Line 677: l_change_group_id po_change_requests.change_request_group_id%type;

673:
674:
675: l_po_header_id po_headers_all.po_header_id%TYPE;
676: l_po_release_id po_releases_all.po_release_id%TYPE;
677: l_change_group_id po_change_requests.change_request_group_id%type;
678: l_unitprice_lower_tol number;
679: l_unitprice_upper_tol number;
680: l_old_price po_change_requests.old_price%type;
681: l_new_price po_change_requests.new_price%type;

Line 680: l_old_price po_change_requests.old_price%type;

676: l_po_release_id po_releases_all.po_release_id%TYPE;
677: l_change_group_id po_change_requests.change_request_group_id%type;
678: l_unitprice_lower_tol number;
679: l_unitprice_upper_tol number;
680: l_old_price po_change_requests.old_price%type;
681: l_new_price po_change_requests.new_price%type;
682: x_progress VARCHAR2(1000);
683: l_return_val VARCHAR2(1):='Y';
684: l_po_style_type VARCHAR2(10);

Line 681: l_new_price po_change_requests.new_price%type;

677: l_change_group_id po_change_requests.change_request_group_id%type;
678: l_unitprice_lower_tol number;
679: l_unitprice_upper_tol number;
680: l_old_price po_change_requests.old_price%type;
681: l_new_price po_change_requests.new_price%type;
682: x_progress VARCHAR2(1000);
683: l_return_val VARCHAR2(1):='Y';
684: l_po_style_type VARCHAR2(10);
685: l_doc_type VARCHAR2(10);

Line 834: FROM po_change_requests pcr

830: -- This cursor picks up shipment quantity changes for SPO and BPA releases
831: CURSOR c_ship_qty_changes (p_change_group_id_csr IN NUMBER) IS
832: SELECT pcr.old_quantity,
833: pcr.new_quantity
834: FROM po_change_requests pcr
835: WHERE pcr.change_request_group_id=p_change_group_id_csr
836: AND pcr.new_quantity IS NOT NULL
837: AND pcr.action_type='MODIFICATION'
838: AND pcr.request_status= 'PENDING'

Line 842: l_old_ship_qty po_change_requests.old_quantity%TYPE;

838: AND pcr.request_status= 'PENDING'
839: AND pcr.request_level= 'SHIPMENT'
840: AND pcr.initiator= 'SUPPLIER';
841:
842: l_old_ship_qty po_change_requests.old_quantity%TYPE;
843: l_new_ship_qty po_change_requests.new_quantity%TYPE;
844: l_return_val VARCHAR2(1) :='Y';
845: l_ship_qty_max_incr_per NUMBER;
846: l_shipq_ty_max_dec_per NUMBER;

Line 843: l_new_ship_qty po_change_requests.new_quantity%TYPE;

839: AND pcr.request_level= 'SHIPMENT'
840: AND pcr.initiator= 'SUPPLIER';
841:
842: l_old_ship_qty po_change_requests.old_quantity%TYPE;
843: l_new_ship_qty po_change_requests.new_quantity%TYPE;
844: l_return_val VARCHAR2(1) :='Y';
845: l_ship_qty_max_incr_per NUMBER;
846: l_shipq_ty_max_dec_per NUMBER;
847: l_ship_qty_max_incr_val NUMBER;

Line 851: l_change_group_id po_change_requests.change_request_group_id%type;

847: l_ship_qty_max_incr_val NUMBER;
848: l_ship_qty_max_dec_val NUMBER;
849: x_progress VARCHAR2(1000);
850: l_po_header_id po_headers_all.po_header_id%TYPE;
851: l_change_group_id po_change_requests.change_request_group_id%type;
852: l_po_style_type VARCHAR2(10);
853: l_doc_type VARCHAR2(10);
854:
855: BEGIN

Line 995: l_po_header_id po_change_requests.document_header_id%TYPE;

991: (pl.amount)))
992: FROM po_lines_all pl
993: WHERE pl.po_header_id = p_po_header_id_csr;
994:
995: l_po_header_id po_change_requests.document_header_id%TYPE;
996: l_po_release_id po_change_requests.po_release_id%TYPE;
997: l_change_group_id po_change_requests.change_request_group_id%TYPE;
998: l_old_doc_amt NUMBER;
999: l_total_new_doc_amt NUMBER;

Line 996: l_po_release_id po_change_requests.po_release_id%TYPE;

992: FROM po_lines_all pl
993: WHERE pl.po_header_id = p_po_header_id_csr;
994:
995: l_po_header_id po_change_requests.document_header_id%TYPE;
996: l_po_release_id po_change_requests.po_release_id%TYPE;
997: l_change_group_id po_change_requests.change_request_group_id%TYPE;
998: l_old_doc_amt NUMBER;
999: l_total_new_doc_amt NUMBER;
1000: l_new_doc_amt_rel NUMBER;

Line 997: l_change_group_id po_change_requests.change_request_group_id%TYPE;

993: WHERE pl.po_header_id = p_po_header_id_csr;
994:
995: l_po_header_id po_change_requests.document_header_id%TYPE;
996: l_po_release_id po_change_requests.po_release_id%TYPE;
997: l_change_group_id po_change_requests.change_request_group_id%TYPE;
998: l_old_doc_amt NUMBER;
999: l_total_new_doc_amt NUMBER;
1000: l_new_doc_amt_rel NUMBER;
1001: l_return_val VARCHAR2(1) :='Y';

Line 1165: FROM po_change_requests pcr, --line amount/price change

1161: CURSOR c_new_doc_amt_changes(p_po_header_id_csr IN NUMBER) IS
1162: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT',(nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
1163: (nvl(pcr.new_price,pl.unit_price) *
1164: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1165: FROM po_change_requests pcr, --line amount/price change
1166: po_change_requests pcr1, --shipment quantity change
1167: po_lines_all pl,
1168: po_line_locations_all pll
1169: WHERE pl.po_header_id = p_po_header_id_csr

Line 1166: po_change_requests pcr1, --shipment quantity change

1162: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT',(nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
1163: (nvl(pcr.new_price,pl.unit_price) *
1164: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1165: FROM po_change_requests pcr, --line amount/price change
1166: po_change_requests pcr1, --shipment quantity change
1167: po_lines_all pl,
1168: po_line_locations_all pll
1169: WHERE pl.po_header_id = p_po_header_id_csr
1170: AND pll.po_line_id = pl.po_line_id

Line 1186: FROM po_change_requests pcr, --line amount/price change

1182: UNION ALL
1183: -- for splitted shipments
1184: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
1185: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
1186: FROM po_change_requests pcr, --line amount/price change
1187: po_change_requests pcr2, --for split shipments
1188: po_lines_all pl,
1189: po_line_locations_all pll
1190: WHERE pl.po_header_id = p_po_header_id_csr

Line 1187: po_change_requests pcr2, --for split shipments

1183: -- for splitted shipments
1184: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
1185: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
1186: FROM po_change_requests pcr, --line amount/price change
1187: po_change_requests pcr2, --for split shipments
1188: po_lines_all pl,
1189: po_line_locations_all pll
1190: WHERE pl.po_header_id = p_po_header_id_csr
1191: AND pll.po_line_id = pl.po_line_id

Line 1208: FROM po_change_requests pcr,

1204: -- Picks up new amount for releases
1205: -- old_price included for price breaks
1206: CURSOR c_new_doc_amt_changes_rel(p_po_header_id_csr IN NUMBER, p_po_release_id_csr IN NUMBER ) IS
1207: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr.new_amount, pll.amount) - nvl(pll.amount_cancelled,0)), (nvl(nvl(pcr.new_price,pcr.old_price),pll.price_override) * (nvl(pcr.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1208: FROM po_change_requests pcr,
1209: po_lines_all pl,
1210: po_line_locations_all pll
1211: WHERE pll.po_header_id = p_po_header_id_csr
1212: AND pll.po_release_id = p_po_release_id_csr

Line 1224: FROM po_change_requests pcr2, -- for splitted shipments

1220: AND pcr.initiator(+) = 'SUPPLIER'
1221: AND pcr.document_line_location_id(+) = pll.line_location_id
1222: UNION ALL
1223: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount, pll.amount), (nvl(pcr2.new_price,pll.price_override) * nvl(pcr2.new_quantity,pll.quantity)))),0)
1224: FROM po_change_requests pcr2, -- for splitted shipments
1225: po_lines_all pl,
1226: po_line_locations_all pll
1227: WHERE pll.po_header_id = p_po_header_id_csr
1228: AND pll.po_line_id = pl.po_line_id

Line 1251: po_change_requests pcr, --shipment changes

1247: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
1248: 'RATE',
1249: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
1250: FROM
1251: po_change_requests pcr, --shipment changes
1252: po_lines_all pl,
1253: po_line_locations_all pll
1254: WHERE
1255: pl.po_header_id = p_po_header_id_csr

Line 1275: po_change_requests pcr, --shipment changes

1271: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
1272: 'RATE',
1273: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
1274: FROM
1275: po_change_requests pcr, --shipment changes
1276: po_lines_all pl,
1277: po_line_locations_all pll
1278: WHERE
1279: pl.po_header_id = p_po_header_id_csr

Line 1295: po_change_requests pcr

1291: SELECT NVL(SUM(DECODE(pl.matching_basis,'QUANTITY',(pl.quantity*nvl(pcr.new_price,pl.unit_price)),
1292: 'AMOUNT',nvl(pcr.new_amount,pl.amount))),0)
1293: FROM
1294: po_lines_all pl,
1295: po_change_requests pcr
1296: WHERE
1297: pl.po_header_id = p_po_header_id_csr
1298: AND pcr.document_header_id (+) = p_po_header_id_csr
1299: AND pcr.document_line_id(+) = pl.po_line_id

Line 1434: l_old_lineamt po_change_requests.old_amount%TYPE;

1430: AND pll.po_line_id = pl.po_line_id
1431: GROUP BY pll.po_line_id;
1432:
1433:
1434: l_old_lineamt po_change_requests.old_amount%TYPE;
1435: l_temp_po_line_id NUMBER;
1436: l_return_val VARCHAR2(1) :='Y';
1437: l_line_amt_max_incr_per NUMBER;
1438: l_line_amt_max_dec_per NUMBER;

Line 1443: l_po_header_id po_change_requests.document_header_id%TYPE;

1439: l_line_amt_max_incr_val NUMBER;
1440: l_line_amt_max_dec_val NUMBER;
1441: l_temp_total_line_amt_new NUMBER;
1442: x_progress VARCHAR2(1000);
1443: l_po_header_id po_change_requests.document_header_id%TYPE;
1444: l_po_release_id NUMBER;
1445: l_po_style_type VARCHAR2(10);
1446: l_doc_type VARCHAR2(10);
1447: l_complex_po_style VARCHAR2(10);

Line 1646: FROM po_change_requests pcr, --line amount/price change

1642: CURSOR c_line_amt_new(p_po_header_id_csr IN NUMBER, p_temp_po_line_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR) IS
1643: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
1644: (nvl(pcr.new_price,pl.unit_price) *
1645: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1646: FROM po_change_requests pcr, --line amount/price change
1647: po_change_requests pcr1, --shipment quantity change
1648: po_lines_all pl,
1649: po_line_locations_all pll
1650: WHERE pl.po_header_id = p_po_header_id_csr

Line 1647: po_change_requests pcr1, --shipment quantity change

1643: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
1644: (nvl(pcr.new_price,pl.unit_price) *
1645: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1646: FROM po_change_requests pcr, --line amount/price change
1647: po_change_requests pcr1, --shipment quantity change
1648: po_lines_all pl,
1649: po_line_locations_all pll
1650: WHERE pl.po_header_id = p_po_header_id_csr
1651: AND pl.po_line_id = p_temp_po_line_id_csr

Line 1668: FROM po_change_requests pcr, --line amount/price change

1664: UNION ALL
1665: -- for splitted shipments
1666: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
1667: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
1668: FROM po_change_requests pcr, --line amount/price change
1669: po_change_requests pcr2, --for split shipments
1670: po_lines_all pl,
1671: po_line_locations_all pll
1672: WHERE pl.po_header_id = p_po_header_id_csr

Line 1669: po_change_requests pcr2, --for split shipments

1665: -- for splitted shipments
1666: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
1667: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
1668: FROM po_change_requests pcr, --line amount/price change
1669: po_change_requests pcr2, --for split shipments
1670: po_lines_all pl,
1671: po_line_locations_all pll
1672: WHERE pl.po_header_id = p_po_header_id_csr
1673: AND pl.po_line_id = p_temp_po_line_id_csr

Line 1694: FROM po_change_requests pcr,

1690: CURSOR c_line_amt_new_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER, p_temp_po_line_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR) IS
1691: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr.new_amount, pll.amount) - nvl(pll.amount_cancelled,0)),
1692: (nvl(nvl(pcr.new_price,pcr.old_price),pll.price_override) *
1693: (nvl(pcr.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
1694: FROM po_change_requests pcr,
1695: po_lines_all pl,
1696: po_line_locations_all pll
1697: WHERE pll.po_header_id = p_po_header_id_csr
1698: AND pll.po_line_id = p_temp_po_line_id_csr

Line 1711: FROM po_change_requests pcr2, -- for splitted shipments

1707: AND pcr.initiator(+) = req_initiator
1708: AND pcr.document_line_location_id(+) = pll.line_location_id
1709: UNION ALL
1710: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount, pll.amount), (nvl(nvl(pcr2.new_price,pcr2.old_price),pll.price_override) * nvl(pcr2.new_quantity,pll.quantity)))),0)
1711: FROM po_change_requests pcr2, -- for splitted shipments
1712: po_lines_all pl,
1713: po_line_locations_all pll
1714: WHERE pll.po_header_id = p_po_header_id_csr
1715: AND pll.po_line_id = p_temp_po_line_id_csr

Line 1739: po_change_requests pcr, --shipment quantity changes

1735: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
1736: 'RATE',
1737: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
1738: FROM
1739: po_change_requests pcr, --shipment quantity changes
1740: po_lines_all pl,
1741: po_line_locations_all pll
1742: WHERE
1743: pl.po_header_id = p_po_header_id_csr

Line 1764: po_change_requests pcr, --shipment quantity changes

1760: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
1761: 'RATE',
1762: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
1763: FROM
1764: po_change_requests pcr, --shipment quantity changes
1765: po_lines_all pl,
1766: po_line_locations_all pll
1767: WHERE
1768: pl.po_header_id = p_po_header_id_csr

Line 1785: po_change_requests pcr

1781: SELECT NVL(SUM(DECODE(pl.matching_basis,'QUANTITY',(pl.quantity*nvl(pcr.new_price,pl.unit_price)),
1782: 'AMOUNT',nvl(pcr.new_amount,pl.amount))),0)
1783: FROM
1784: po_lines_all pl,
1785: po_change_requests pcr
1786: WHERE
1787: pl.po_header_id = p_po_header_id_csr
1788: AND pl.po_line_id = p_temp_po_line_id_csr
1789: AND pcr.document_header_id (+) = p_po_header_id_csr

Line 1799: req_status po_change_requests.request_status%TYPE;

1795:
1796: l_new_line_amt NUMBER;
1797: l_total_new_line_amt NUMBER := 0;
1798: x_progress VARCHAR2(1000);
1799: req_status po_change_requests.request_status%TYPE;
1800: req_initiator po_change_requests.initiator%TYPE;
1801:
1802: BEGIN
1803:

Line 1800: req_initiator po_change_requests.initiator%TYPE;

1796: l_new_line_amt NUMBER;
1797: l_total_new_line_amt NUMBER := 0;
1798: x_progress VARCHAR2(1000);
1799: req_status po_change_requests.request_status%TYPE;
1800: req_initiator po_change_requests.initiator%TYPE;
1801:
1802: BEGIN
1803:
1804: /* Code Changes for Bug - 11794109 Start */

Line 1808: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests

1804: /* Code Changes for Bug - 11794109 Start */
1805: BEGIN
1806:
1807: IF(p_po_release_id is null) THEN
1808: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
1809: where document_header_id=p_po_header_id AND document_type = 'PO'
1810: and change_active_flag='Y'
1811: and rownum=1;
1812: ELSE

Line 1813: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests

1809: where document_header_id=p_po_header_id AND document_type = 'PO'
1810: and change_active_flag='Y'
1811: and rownum=1;
1812: ELSE
1813: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
1814: where document_header_id=p_po_header_id AND document_type = 'RELEASE'
1815: and po_release_id = p_po_release_id
1816: and change_active_flag='Y'
1817: and rownum=1;

Line 1936: l_po_header_id po_change_requests.document_header_id%TYPE;

1932:
1933:
1934:
1935:
1936: l_po_header_id po_change_requests.document_header_id%TYPE;
1937: l_po_release_id po_change_requests.po_release_id%TYPE;
1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;

Line 1937: l_po_release_id po_change_requests.po_release_id%TYPE;

1933:
1934:
1935:
1936: l_po_header_id po_change_requests.document_header_id%TYPE;
1937: l_po_release_id po_change_requests.po_release_id%TYPE;
1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;
1941: l_old_shipamt po_change_requests.old_amount%TYPE;

Line 1938: l_po_line_id po_change_requests.document_line_id%TYPE;

1934:
1935:
1936: l_po_header_id po_change_requests.document_header_id%TYPE;
1937: l_po_release_id po_change_requests.po_release_id%TYPE;
1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;
1941: l_old_shipamt po_change_requests.old_amount%TYPE;
1942: l_new_shipamt po_change_requests.new_amount%TYPE;

Line 1939: l_change_group_id po_change_requests.change_request_group_id%type;

1935:
1936: l_po_header_id po_change_requests.document_header_id%TYPE;
1937: l_po_release_id po_change_requests.po_release_id%TYPE;
1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;
1941: l_old_shipamt po_change_requests.old_amount%TYPE;
1942: l_new_shipamt po_change_requests.new_amount%TYPE;
1943: l_old_ship_amt_rel NUMBER;

Line 1941: l_old_shipamt po_change_requests.old_amount%TYPE;

1937: l_po_release_id po_change_requests.po_release_id%TYPE;
1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;
1941: l_old_shipamt po_change_requests.old_amount%TYPE;
1942: l_new_shipamt po_change_requests.new_amount%TYPE;
1943: l_old_ship_amt_rel NUMBER;
1944: l_new_ship_amt_rel NUMBER;
1945: l_old_ship_amt_cw NUMBER;

Line 1942: l_new_shipamt po_change_requests.new_amount%TYPE;

1938: l_po_line_id po_change_requests.document_line_id%TYPE;
1939: l_change_group_id po_change_requests.change_request_group_id%type;
1940: l_matching_basis po_lines_all.matching_basis%TYPE;
1941: l_old_shipamt po_change_requests.old_amount%TYPE;
1942: l_new_shipamt po_change_requests.new_amount%TYPE;
1943: l_old_ship_amt_rel NUMBER;
1944: l_new_ship_amt_rel NUMBER;
1945: l_old_ship_amt_cw NUMBER;
1946: l_new_ship_amt_cw NUMBER;

Line 2161: FROM po_change_requests pcr, --line amount/price change

2157: CURSOR c_new_shipment_amount (p_po_header_id_csr IN NUMBER,p_line_location_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR) IS
2158: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
2159: (nvl(pcr.new_price,pl.unit_price) *
2160: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2161: FROM po_change_requests pcr, --line amount/price change
2162: po_change_requests pcr1, --shipment quantity change
2163: po_lines_all pl,
2164: po_line_locations_all pll
2165: WHERE pl.po_header_id = p_po_header_id_csr

Line 2162: po_change_requests pcr1, --shipment quantity change

2158: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
2159: (nvl(pcr.new_price,pl.unit_price) *
2160: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2161: FROM po_change_requests pcr, --line amount/price change
2162: po_change_requests pcr1, --shipment quantity change
2163: po_lines_all pl,
2164: po_line_locations_all pll
2165: WHERE pl.po_header_id = p_po_header_id_csr
2166: AND pll.line_location_id = p_line_location_id_csr

Line 2184: FROM po_change_requests pcr, --line amount/price change

2180: CURSOR c_new_shipment_amount_split (p_po_header_id_csr IN NUMBER,p_line_location_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR,p_po_shipment_num IN NUMBER) IS
2181: -- for splitted shipments
2182: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
2183: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
2184: FROM po_change_requests pcr, --line amount/price change
2185: po_change_requests pcr2, --for split shipments
2186: po_lines_all pl,
2187: po_line_locations_all pll
2188: WHERE pl.po_header_id = p_po_header_id_csr

Line 2185: po_change_requests pcr2, --for split shipments

2181: -- for splitted shipments
2182: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
2183: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
2184: FROM po_change_requests pcr, --line amount/price change
2185: po_change_requests pcr2, --for split shipments
2186: po_lines_all pl,
2187: po_line_locations_all pll
2188: WHERE pl.po_header_id = p_po_header_id_csr
2189: AND pll.line_location_id = p_line_location_id_csr

Line 2210: FROM po_change_requests pcr,

2206: CURSOR c_new_shipment_amount_rel(p_po_header_id_csr IN NUMBER, p_po_release_id_csr IN NUMBER, p_line_location_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR) IS
2207: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr.new_amount, pll.amount) - nvl(pll.amount_cancelled,0)),
2208: (nvl(nvl(pcr.new_price,pcr.old_price),pll.price_override) *
2209: (nvl(pcr.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2210: FROM po_change_requests pcr,
2211: po_lines_all pl,
2212: po_line_locations_all pll
2213: WHERE pll.po_header_id = p_po_header_id_csr
2214: AND pll.line_location_id = p_line_location_id_csr

Line 2228: FROM po_change_requests pcr2, -- for splitted shipments

2224: AND pcr.document_line_location_id(+) = pll.line_location_id;
2225:
2226: CURSOR c_new_ship_amt_rel_split(p_po_header_id_csr IN NUMBER, p_po_release_id_csr IN NUMBER, p_line_location_id_csr IN NUMBER,req_status IN VARCHAR,req_initiator IN VARCHAR,p_po_shipment_num IN NUMBER) IS
2227: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount, pll.amount), (nvl(nvl(pcr2.new_price,pcr2.old_price),pll.price_override) * nvl(pcr2.new_quantity,pll.quantity)))),0)
2228: FROM po_change_requests pcr2, -- for splitted shipments
2229: po_lines_all pl,
2230: po_line_locations_all pll
2231: WHERE pll.po_header_id = p_po_header_id_csr
2232: AND pll.line_location_id = p_line_location_id_csr

Line 2256: po_change_requests pcr, --shipment quantity changes

2252: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
2253: 'RATE',
2254: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
2255: FROM
2256: po_change_requests pcr, --shipment quantity changes
2257: po_lines_all pl,
2258: po_line_locations_all pll
2259: WHERE
2260: pl.po_header_id = p_po_header_id_csr

Line 2282: po_change_requests pcr, --shipment quantity changes

2278: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
2279: 'RATE',
2280: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
2281: FROM
2282: po_change_requests pcr, --shipment quantity changes
2283: po_lines_all pl,
2284: po_line_locations_all pll
2285: WHERE
2286: pl.po_header_id = p_po_header_id_csr

Line 2299: req_status po_change_requests.request_status%TYPE;

2295: AND pcr.document_shipment_number = p_po_shipment_num;
2296:
2297: l_new_ship_amt NUMBER;
2298: x_progress VARCHAR2(1000);
2299: req_status po_change_requests.request_status%TYPE;
2300: req_initiator po_change_requests.initiator%TYPE;
2301:
2302: BEGIN
2303:

Line 2300: req_initiator po_change_requests.initiator%TYPE;

2296:
2297: l_new_ship_amt NUMBER;
2298: x_progress VARCHAR2(1000);
2299: req_status po_change_requests.request_status%TYPE;
2300: req_initiator po_change_requests.initiator%TYPE;
2301:
2302: BEGIN
2303:
2304: /* Code Changes for Bug - 11794109 Start */

Line 2308: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests

2304: /* Code Changes for Bug - 11794109 Start */
2305: BEGIN
2306:
2307: IF(p_po_release_id is null) THEN
2308: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
2309: where document_header_id=p_po_header_id AND document_type = 'PO'
2310: and change_active_flag='Y'
2311: and rownum=1;
2312: ELSE

Line 2313: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests

2309: where document_header_id=p_po_header_id AND document_type = 'PO'
2310: and change_active_flag='Y'
2311: and rownum=1;
2312: ELSE
2313: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
2314: where document_header_id=p_po_header_id AND document_type = 'RELEASE'
2315: and po_release_id = p_po_release_id
2316: and change_active_flag='Y'
2317: and rownum=1;

Line 2533: l_change_group_id po_change_requests.change_request_group_id%type;

2529:
2530: IS
2531: l_return_val VARCHAR2(1) ;
2532: l_po_header_id po_headers_all.po_header_id%TYPE;
2533: l_change_group_id po_change_requests.change_request_group_id%type;
2534: x_progress VARCHAR2(1000);
2535: l_po_style_type VARCHAR2(10);
2536: l_doc_type VARCHAR2(10);
2537: l_doc_subtype VARCHAR2(10);

Line 2621: select count(1) from po_change_requests pcr

2617: FUNCTION ROUTETOREQUESTER (p_po_header_id IN NUMBER ,p_change_group_id IN NUMBER, p_doc_type IN VARCHAR2, p_prm_date_app_flag IN VARCHAR2, p_ship_qty_app_flag IN VARCHAR2, p_unit_price_app_flag IN VARCHAR2)
2618: return boolean is
2619:
2620: cursor c_promise_date_changed (p_po_header_id_csr_pd IN NUMBER,p_change_group_id_csr_pd IN NUMBER) is
2621: select count(1) from po_change_requests pcr
2622: where pcr.document_header_id=p_po_header_id_csr_pd
2623: AND pcr.change_request_group_id=p_change_group_id_csr_pd
2624: AND pcr.new_promised_date IS NOT NULL
2625: AND pcr.action_type='MODIFICATION'

Line 2633: select count(1) from po_change_requests pcr

2629:
2630:
2631:
2632: cursor c_ship_qty_changed(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2633: select count(1) from po_change_requests pcr
2634: where pcr.document_header_id=p_po_header_id_csr
2635: AND pcr.change_request_group_id=p_change_group_id_csr
2636: AND pcr.new_quantity IS NOT NULL
2637: AND pcr.action_type='MODIFICATION'

Line 2644: select count(1) from po_change_requests pcr

2640: AND pcr.initiator= 'SUPPLIER';
2641:
2642:
2643: cursor c_price_changed(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2644: select count(1) from po_change_requests pcr
2645: where pcr.document_header_id=p_po_header_id_csr
2646: AND pcr.change_request_group_id=p_change_group_id_csr
2647: AND nvl(pcr.new_price,pcr.new_amount) IS NOT NULL
2648: AND pcr.action_type='MODIFICATION'

Line 2654: select count(1) from po_change_requests pcr

2650: AND pcr.request_level IN ('LINE','SHIPMENT')
2651: AND pcr.initiator= 'SUPPLIER';
2652:
2653: cursor c_price_changed_rel(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2654: select count(1) from po_change_requests pcr
2655: where pcr.document_header_id = p_po_header_id_csr
2656: AND pcr.change_request_group_id=p_change_group_id_csr
2657: AND nvl(pcr.new_price,pcr.new_amount) IS NOT NULL
2658: AND pcr.action_type='MODIFICATION'

Line 2846: l_change_group_id po_change_requests.change_request_group_id%TYPE;

2842: l_po_header_id po_headers_all.po_header_id%TYPE;
2843: l_po_release_id po_releases_all.po_release_id%TYPE;
2844: l_doc_type VARCHAR2(10);
2845: l_return_val VARCHAR2(1);
2846: l_change_group_id po_change_requests.change_request_group_id%TYPE;
2847: l_req_hdr_id po_requisition_headers_all.requisition_header_id%TYPE;
2848: x_progress VARCHAR2(1000);
2849: l_auto_app_flag VARCHAR2(1);
2850:

Line 3104: from po_change_requests pcr,

3100: -- Cursor for checking whether there is a price change for Catalog item.
3101:
3102: cursor c_cat_price_change(p_po_header_id_csr IN NUMBER) is
3103: select count(1)
3104: from po_change_requests pcr,
3105: po_requisition_lines_all porl1,
3106: po_line_locations_all pll
3107: where pcr.document_header_id = p_po_header_id_csr
3108: AND pcr.REQUEST_LEVEL = 'LINE'

Line 3119: from po_change_requests pcr,

3115:
3116: -- Curosr for getting the Releases Price changes for Catlog request should go to the buyer
3117: cursor c_ship_price_change(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3118: select count(1)
3119: from po_change_requests pcr,
3120: po_requisition_lines_all porl1,
3121: po_line_locations_all pll
3122: where pcr.document_header_id = p_po_header_id_csr
3123: AND pcr.po_release_id = p_po_release_id_csr

Line 3134: from po_change_requests pcr,

3130:
3131: -- Cursor for checking the FPS price changes for catalog requests
3132: cursor c_fps_price_change(p_po_header_id_csr IN NUMBER) IS
3133: select count(1)
3134: from po_change_requests pcr,
3135: po_requisition_lines_all porl1,
3136: po_line_locations_all pll
3137: where pcr.document_header_id = p_po_header_id_csr
3138: AND pcr.REQUEST_LEVEL = 'SHIPMENT'

Line 3181: po_change_requests pcr,

3177: CURSOR l_requestors_csr(c_grp_id_csr IN NUMBER)
3178: IS
3179: select UNIQUE(pda.deliver_to_person_id)
3180: from
3181: po_change_requests pcr,
3182: po_distributions_all pda
3183: where pcr.change_request_group_id = c_grp_id_csr
3184: AND pcr.request_level = 'LINE'
3185: AND pcr.document_line_id = pda.po_line_id

Line 3190: po_change_requests pcr,

3186: and pda.deliver_to_person_id is not null
3187: union
3188: select UNIQUE(pda.deliver_to_person_id)
3189: from
3190: po_change_requests pcr,
3191: po_distributions_all pda
3192: where pcr.change_request_group_id = c_grp_id_csr
3193: AND pcr.request_level = 'SHIPMENT'
3194: AND pcr.document_line_location_id = pda.line_location_id

Line 3413: from po_change_requests

3409: -- Split shipment check
3410:
3411: cursor c_split_ships(p_po_header_id_csr IN NUMBER) is
3412: select count(1)
3413: from po_change_requests
3414: where parent_line_location_id is not null
3415: AND action_type = 'MODIFICATION'
3416: AND document_header_id = p_po_header_id_csr
3417: AND request_level = 'SHIPMENT'

Line 3424: from po_change_requests

3420:
3421: -- Split shipment check for releses
3422: cursor c_split_ships_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3423: select count(1)
3424: from po_change_requests
3425: where parent_line_location_id is not null
3426: AND action_type = 'MODIFICATION'
3427: AND document_header_id = p_po_header_id_csr
3428: AND po_release_id = p_po_release_id_csr

Line 3436: from po_change_requests

3432: -- Cancellation request should go to buyer
3433:
3434: cursor c_cancel_requests(p_po_header_id_csr IN NUMBER) is
3435: SELECT count(1)
3436: from po_change_requests
3437: where action_type = 'CANCELLATION'
3438: AND request_status = 'PENDING'
3439: AND document_header_id = p_po_header_id_csr;
3440:

Line 3445: from po_change_requests

3441:
3442: -- Cancellation request should go to buyer for the releases
3443: cursor c_cancel_requests_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3444: SELECT count(1)
3445: from po_change_requests
3446: where action_type = 'CANCELLATION'
3447: AND request_status = 'PENDING'
3448: AND document_header_id = p_po_header_id_csr
3449: AND po_release_id = p_po_release_id_csr;

Line 3456: from po_change_requests

3452: --Additional Change Request the unstructured change request
3453:
3454: cursor c_add_changes(p_po_header_id_csr IN NUMBER) is
3455: select count(1)
3456: from po_change_requests
3457: where action_type = 'MODIFICATION'
3458: AND ADDITIONAL_CHANGES is not NULL
3459: AND request_status = 'PENDING'
3460: AND document_header_id = p_po_header_id_csr;

Line 3465: from po_change_requests

3461:
3462: --Additional Change Request the unstructured change request for the releases
3463: cursor c_add_changes_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3464: select count(1)
3465: from po_change_requests
3466: where action_type = 'MODIFICATION'
3467: AND ADDITIONAL_CHANGES is not NULL
3468: AND request_level = 'HEADER'
3469: AND request_status = 'PENDING'

Line 3550: FROM po_change_requests

3546: */
3547: -- Cursor for checking for a supplier Item Change
3548: CURSOR c_supp_item_chg(p_po_header_id_csr IN NUMBER) IS
3549: SELECT count(1)
3550: FROM po_change_requests
3551: WHERE action_type = 'MODIFICATION'
3552: AND request_status = 'PENDING'
3553: AND request_level = 'LINE'
3554: AND new_supplier_part_number is not null

Line 3777: l_change_group_id po_change_requests.change_request_group_id%TYPE;

3773: IS
3774:
3775: l_po_header_id po_headers_all.po_header_id%TYPE;
3776: x_progress VARCHAR2(1000);
3777: l_change_group_id po_change_requests.change_request_group_id%TYPE;
3778:
3779: BEGIN
3780:
3781:

Line 3836: from po_change_requests

3832: OLD_PRICE,
3833: NEW_PRICE,
3834: OLD_AMOUNT,
3835: NEW_AMOUNT
3836: from po_change_requests
3837: where initiator='SUPPLIER'
3838: AND action_type='MODIFICATION'
3839: AND request_level='SHIPMENT'
3840: AND change_request_group_id = l_change_group_id_csr

Line 3850: from po_change_requests

3846: );
3847:
3848: CURSOR c_line_change(l_po_header_id IN NUMBER,l_change_group_id_csr IN NUMBER) IS
3849: select count(1)
3850: from po_change_requests
3851: where initiator='SUPPLIER'
3852: AND action_type='MODIFICATION'
3853: AND change_request_group_id = l_change_group_id_csr
3854: AND request_level='LINE'

Line 3860: l_old_quantity po_change_requests.old_quantity%type;

3856: AND document_header_id=l_po_header_id;
3857:
3858:
3859: l_only_promised_date_change boolean :=TRUE;
3860: l_old_quantity po_change_requests.old_quantity%type;
3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;

Line 3861: l_new_quantity po_change_requests.new_quantity%type;

3857:
3858:
3859: l_only_promised_date_change boolean :=TRUE;
3860: l_old_quantity po_change_requests.old_quantity%type;
3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;

Line 3862: l_old_promised_date po_change_requests.old_promised_date%type;

3858:
3859: l_only_promised_date_change boolean :=TRUE;
3860: l_old_quantity po_change_requests.old_quantity%type;
3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;

Line 3863: l_new_promised_date po_change_requests.new_promised_date%type;

3859: l_only_promised_date_change boolean :=TRUE;
3860: l_old_quantity po_change_requests.old_quantity%type;
3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;
3867: l_new_amount po_change_requests.new_amount%type;

Line 3864: l_old_price po_change_requests.old_price%type;

3860: l_old_quantity po_change_requests.old_quantity%type;
3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;
3867: l_new_amount po_change_requests.new_amount%type;
3868: x_progress VARCHAR2(1000);

Line 3865: l_new_price po_change_requests.new_price%type;

3861: l_new_quantity po_change_requests.new_quantity%type;
3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;
3867: l_new_amount po_change_requests.new_amount%type;
3868: x_progress VARCHAR2(1000);
3869: l_line_changes_counter number:=0;

Line 3866: l_old_amount po_change_requests.old_amount%type;

3862: l_old_promised_date po_change_requests.old_promised_date%type;
3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;
3867: l_new_amount po_change_requests.new_amount%type;
3868: x_progress VARCHAR2(1000);
3869: l_line_changes_counter number:=0;
3870: l_api_name varchar2(50) := 'PROMISEDATECHANGE';

Line 3867: l_new_amount po_change_requests.new_amount%type;

3863: l_new_promised_date po_change_requests.new_promised_date%type;
3864: l_old_price po_change_requests.old_price%type;
3865: l_new_price po_change_requests.new_price%type;
3866: l_old_amount po_change_requests.old_amount%type;
3867: l_new_amount po_change_requests.new_amount%type;
3868: x_progress VARCHAR2(1000);
3869: l_line_changes_counter number:=0;
3870: l_api_name varchar2(50) := 'PROMISEDATECHANGE';
3871:

Line 3951: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

3947: actid IN NUMBER,
3948: funcmode IN VARCHAR2,
3949: resultout OUT NOCOPY VARCHAR2)
3950: IS
3951: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
3952: l_po_header_id po_headers_all.po_header_id%type;
3953: l_po_release_id po_releases_all.po_release_id%type;
3954: x_progress VARCHAR2(1000);
3955:

Line 4014: FROM po_change_requests pcr,

4010: prla.requisition_line_id,
4011: prla.requisition_header_id,
4012: prla.line_location_id,
4013: prda.distribution_id
4014: FROM po_change_requests pcr,
4015: po_requisition_lines_all prla,
4016: po_req_distributions_all prda,
4017: po_line_locations_all plla
4018: WHERE document_header_id= p_po_header_id_csr

Line 4049: FROM po_change_requests pcr,

4045: prla.requisition_line_id,
4046: prla.requisition_header_id,
4047: prla.line_location_id,
4048: null distribution_id
4049: FROM po_change_requests pcr,
4050: po_line_locations_all plla,
4051: po_requisition_lines_all prla
4052: WHERE document_header_id=p_po_header_id_csr
4053: AND request_status='BUYER_APP'

Line 4078: FROM po_change_requests pcr,

4074: prla.requisition_line_id,
4075: prla.requisition_header_id,
4076: prla.line_location_id,
4077: prda.distribution_id
4078: FROM po_change_requests pcr,
4079: po_requisition_lines_all prla,
4080: po_req_distributions_all prda,
4081: po_line_locations_all plla
4082: WHERE pcr.po_release_id= p_po_release_id_csr

Line 4114: FROM po_change_requests pcr,

4110: prla.requisition_line_id,
4111: prla.requisition_header_id,
4112: prla.line_location_id,
4113: null distribution_id
4114: FROM po_change_requests pcr,
4115: po_line_locations_all plla,
4116: po_requisition_lines_all prla
4117: WHERE pcr.po_release_id=p_po_release_id_csr
4118: AND request_status='BUYER_APP'

Line 4128: --l_change_group_id po_change_requests.change_request_group_id%type ;

4124: AND plla.po_header_id=pcr.document_header_id;
4125:
4126:
4127:
4128: --l_change_group_id po_change_requests.change_request_group_id%type ;
4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;

Line 4129: l_change_group_id po_change_requests.change_request_group_id%type ;

4125:
4126:
4127:
4128: --l_change_group_id po_change_requests.change_request_group_id%type ;
4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;

Line 4130: l_new_price po_change_requests.new_price%type ;

4126:
4127:
4128: --l_change_group_id po_change_requests.change_request_group_id%type ;
4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;

Line 4131: l_new_quantity po_change_requests.new_quantity%type ;

4127:
4128: --l_change_group_id po_change_requests.change_request_group_id%type ;
4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;

Line 4132: l_new_start_date po_change_requests.new_start_date%type ;

4128: --l_change_group_id po_change_requests.change_request_group_id%type ;
4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;

Line 4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;

4129: l_change_group_id po_change_requests.change_request_group_id%type ;
4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;

Line 4134: l_new_amount po_change_requests.new_amount%type ;

4130: l_new_price po_change_requests.new_price%type ;
4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4138: l_request_reason po_change_requests.request_reason%type ;

Line 4135: l_request_level po_change_requests.request_level%type ;

4131: l_new_quantity po_change_requests.new_quantity%type ;
4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4138: l_request_reason po_change_requests.request_reason%type ;
4139: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;

Line 4136: l_new_promised_date po_change_requests.new_promised_date%type ;

4132: l_new_start_date po_change_requests.new_start_date%type ;
4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4138: l_request_reason po_change_requests.request_reason%type ;
4139: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4140: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;

Line 4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;

4133: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4138: l_request_reason po_change_requests.request_reason%type ;
4139: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4140: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;
4141: l_line_location_id po_requisition_lines_all.line_location_id%type ;

Line 4138: l_request_reason po_change_requests.request_reason%type ;

4134: l_new_amount po_change_requests.new_amount%type ;
4135: l_request_level po_change_requests.request_level%type ;
4136: l_new_promised_date po_change_requests.new_promised_date%type ;
4137: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4138: l_request_reason po_change_requests.request_reason%type ;
4139: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4140: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;
4141: l_line_location_id po_requisition_lines_all.line_location_id%type ;
4142: l_req_distribution_id po_req_distributions_all.distribution_id%type ;

Line 4344: update PO_CHANGE_REQUESTS

4340: );
4341: end if;
4342: /* Bug 7422622 - End */
4343: --- Ip requirement
4344: update PO_CHANGE_REQUESTS
4345: set Parent_change_request_id = x_change_group_id
4346: where change_request_group_id= l_change_group_id;
4347:
4348: Exception

Line 4370: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

4366: actid IN NUMBER,
4367: funcmode IN VARCHAR2,
4368: resultout OUT NOCOPY VARCHAR2) is
4369:
4370: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
4371: x_progress VARCHAR2(1000);
4372: x_apprv_status VARCHAR2(1);
4373:
4374: BEGIN

Line 4509: po_change_requests pcr,

4505: CURSOR l_requestors_csr(c_grp_id_csr IN NUMBER)
4506: IS
4507: select pda.deliver_to_person_id
4508: from
4509: po_change_requests pcr,
4510: po_distributions_all pda
4511: where pcr.change_request_group_id = c_grp_id_csr
4512: AND pcr.request_level = 'LINE'
4513: AND pcr.document_line_id = pda.po_line_id

Line 4517: po_change_requests pcr,

4513: AND pcr.document_line_id = pda.po_line_id
4514: union
4515: select pda.deliver_to_person_id
4516: from
4517: po_change_requests pcr,
4518: po_distributions_all pda
4519: where pcr.change_request_group_id = c_grp_id_csr
4520: AND pcr.request_level = 'SHIPMENT'
4521: AND pcr.document_line_location_id = pda.line_location_id;

Line 4523: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

4519: where pcr.change_request_group_id = c_grp_id_csr
4520: AND pcr.request_level = 'SHIPMENT'
4521: AND pcr.document_line_location_id = pda.line_location_id;
4522:
4523: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
4524: x_progress VARCHAR2(1000);
4525: l_planner_username fnd_user.user_name%type;
4526: l_planner_disp_name VARCHAR2(2000);
4527: l_requester_username fnd_user.user_name%type;

Line 4608: update po_change_requests

4604: wf_engine.SetItemAttrText(itemtype => itemtype,
4605: itemkey => itemkey,
4606: aname => 'NOTIF_USAGE',
4607: avalue =>'REQ');
4608: update po_change_requests
4609: set request_status ='REQ_APP',
4610: responded_by = fnd_global.user_id,
4611: response_date = sysdate
4612: where change_request_group_id = l_change_group_id