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: IF(p_po_release_id is null) THEN

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

1801:
1802: BEGIN
1803:
1804: IF(p_po_release_id is null) THEN
1805: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
1806: where document_header_id=p_po_header_id
1807: and change_active_flag='Y'
1808: and rownum=1;
1809: ELSE

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

1806: where document_header_id=p_po_header_id
1807: and change_active_flag='Y'
1808: and rownum=1;
1809: ELSE
1810: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
1811: where document_header_id=p_po_header_id
1812: and po_release_id = p_po_release_id
1813: and change_active_flag='Y'
1814: and rownum=1;

Line 1927: l_po_header_id po_change_requests.document_header_id%TYPE;

1923:
1924:
1925:
1926:
1927: l_po_header_id po_change_requests.document_header_id%TYPE;
1928: l_po_release_id po_change_requests.po_release_id%TYPE;
1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;

Line 1928: l_po_release_id po_change_requests.po_release_id%TYPE;

1924:
1925:
1926:
1927: l_po_header_id po_change_requests.document_header_id%TYPE;
1928: l_po_release_id po_change_requests.po_release_id%TYPE;
1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;
1932: l_old_shipamt po_change_requests.old_amount%TYPE;

Line 1929: l_po_line_id po_change_requests.document_line_id%TYPE;

1925:
1926:
1927: l_po_header_id po_change_requests.document_header_id%TYPE;
1928: l_po_release_id po_change_requests.po_release_id%TYPE;
1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;
1932: l_old_shipamt po_change_requests.old_amount%TYPE;
1933: l_new_shipamt po_change_requests.new_amount%TYPE;

Line 1930: l_change_group_id po_change_requests.change_request_group_id%type;

1926:
1927: l_po_header_id po_change_requests.document_header_id%TYPE;
1928: l_po_release_id po_change_requests.po_release_id%TYPE;
1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;
1932: l_old_shipamt po_change_requests.old_amount%TYPE;
1933: l_new_shipamt po_change_requests.new_amount%TYPE;
1934: l_old_ship_amt_rel NUMBER;

Line 1932: l_old_shipamt po_change_requests.old_amount%TYPE;

1928: l_po_release_id po_change_requests.po_release_id%TYPE;
1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;
1932: l_old_shipamt po_change_requests.old_amount%TYPE;
1933: l_new_shipamt po_change_requests.new_amount%TYPE;
1934: l_old_ship_amt_rel NUMBER;
1935: l_new_ship_amt_rel NUMBER;
1936: l_old_ship_amt_cw NUMBER;

Line 1933: l_new_shipamt po_change_requests.new_amount%TYPE;

1929: l_po_line_id po_change_requests.document_line_id%TYPE;
1930: l_change_group_id po_change_requests.change_request_group_id%type;
1931: l_matching_basis po_lines_all.matching_basis%TYPE;
1932: l_old_shipamt po_change_requests.old_amount%TYPE;
1933: l_new_shipamt po_change_requests.new_amount%TYPE;
1934: l_old_ship_amt_rel NUMBER;
1935: l_new_ship_amt_rel NUMBER;
1936: l_old_ship_amt_cw NUMBER;
1937: l_new_ship_amt_cw NUMBER;

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

2148: 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
2149: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
2150: (nvl(pcr.new_price,pl.unit_price) *
2151: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2152: FROM po_change_requests pcr, --line amount/price change
2153: po_change_requests pcr1, --shipment quantity change
2154: po_lines_all pl,
2155: po_line_locations_all pll
2156: WHERE pl.po_header_id = p_po_header_id_csr

Line 2153: po_change_requests pcr1, --shipment quantity change

2149: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr1.new_amount,pll.amount) - nvl(pll.amount_cancelled,0)),
2150: (nvl(pcr.new_price,pl.unit_price) *
2151: (nvl(pcr1.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2152: FROM po_change_requests pcr, --line amount/price change
2153: po_change_requests pcr1, --shipment quantity change
2154: po_lines_all pl,
2155: po_line_locations_all pll
2156: WHERE pl.po_header_id = p_po_header_id_csr
2157: AND pll.line_location_id = p_line_location_id_csr

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

2171: 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
2172: -- for splitted shipments
2173: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
2174: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
2175: FROM po_change_requests pcr, --line amount/price change
2176: po_change_requests pcr2, --for split shipments
2177: po_lines_all pl,
2178: po_line_locations_all pll
2179: WHERE pl.po_header_id = p_po_header_id_csr

Line 2176: po_change_requests pcr2, --for split shipments

2172: -- for splitted shipments
2173: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', nvl(pcr2.new_amount,pll.amount),
2174: (nvl(pcr.new_price,pl.unit_price) * pcr2.new_quantity))),0)
2175: FROM po_change_requests pcr, --line amount/price change
2176: po_change_requests pcr2, --for split shipments
2177: po_lines_all pl,
2178: po_line_locations_all pll
2179: WHERE pl.po_header_id = p_po_header_id_csr
2180: AND pll.line_location_id = p_line_location_id_csr

Line 2201: FROM po_change_requests pcr,

2197: 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
2198: SELECT nvl(sum(decode(pl.matching_basis, 'AMOUNT', (nvl(pcr.new_amount, pll.amount) - nvl(pll.amount_cancelled,0)),
2199: (nvl(nvl(pcr.new_price,pcr.old_price),pll.price_override) *
2200: (nvl(pcr.new_quantity,pll.quantity) - nvl(pll.quantity_cancelled,0))))),0)
2201: FROM po_change_requests pcr,
2202: po_lines_all pl,
2203: po_line_locations_all pll
2204: WHERE pll.po_header_id = p_po_header_id_csr
2205: AND pll.line_location_id = p_line_location_id_csr

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

2215: AND pcr.document_line_location_id(+) = pll.line_location_id;
2216:
2217: 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
2218: 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)
2219: FROM po_change_requests pcr2, -- for splitted shipments
2220: po_lines_all pl,
2221: po_line_locations_all pll
2222: WHERE pll.po_header_id = p_po_header_id_csr
2223: AND pll.line_location_id = p_line_location_id_csr

Line 2247: po_change_requests pcr, --shipment quantity changes

2243: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
2244: 'RATE',
2245: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
2246: FROM
2247: po_change_requests pcr, --shipment quantity changes
2248: po_lines_all pl,
2249: po_line_locations_all pll
2250: WHERE
2251: pl.po_header_id = p_po_header_id_csr

Line 2273: po_change_requests pcr, --shipment quantity changes

2269: (nvl(pcr.new_amount,pll.amount) - NVL(pll.amount_cancelled,0)),
2270: 'RATE',
2271: (nvl(pcr.new_quantity,pll.quantity) - NVL(pll.quantity_cancelled,0))*(nvl(pcr.new_price,pll.price_override))))),0)
2272: FROM
2273: po_change_requests pcr, --shipment quantity changes
2274: po_lines_all pl,
2275: po_line_locations_all pll
2276: WHERE
2277: pl.po_header_id = p_po_header_id_csr

Line 2290: req_status po_change_requests.request_status%TYPE;

2286: AND pcr.document_shipment_number = p_po_shipment_num;
2287:
2288: l_new_ship_amt NUMBER;
2289: x_progress VARCHAR2(1000);
2290: req_status po_change_requests.request_status%TYPE;
2291: req_initiator po_change_requests.initiator%TYPE;
2292:
2293: BEGIN
2294:

Line 2291: req_initiator po_change_requests.initiator%TYPE;

2287:
2288: l_new_ship_amt NUMBER;
2289: x_progress VARCHAR2(1000);
2290: req_status po_change_requests.request_status%TYPE;
2291: req_initiator po_change_requests.initiator%TYPE;
2292:
2293: BEGIN
2294:
2295: IF(p_po_release_id is null) THEN

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

2292:
2293: BEGIN
2294:
2295: IF(p_po_release_id is null) THEN
2296: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
2297: where document_header_id=p_po_header_id
2298: and change_active_flag='Y'
2299: and rownum=1;
2300: ELSE

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

2297: where document_header_id=p_po_header_id
2298: and change_active_flag='Y'
2299: and rownum=1;
2300: ELSE
2301: select distinct request_status ,initiator into req_status,req_initiator from po_change_requests
2302: where document_header_id=p_po_header_id
2303: and po_release_id = p_po_release_id
2304: and change_active_flag='Y'
2305: and rownum=1;

Line 2508: l_change_group_id po_change_requests.change_request_group_id%type;

2504:
2505: IS
2506: l_return_val VARCHAR2(1) ;
2507: l_po_header_id po_headers_all.po_header_id%TYPE;
2508: l_change_group_id po_change_requests.change_request_group_id%type;
2509: x_progress VARCHAR2(1000);
2510: l_po_style_type VARCHAR2(10);
2511: l_doc_type VARCHAR2(10);
2512: l_doc_subtype VARCHAR2(10);

Line 2596: select count(1) from po_change_requests pcr

2592: 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)
2593: return boolean is
2594:
2595: cursor c_promise_date_changed (p_po_header_id_csr_pd IN NUMBER,p_change_group_id_csr_pd IN NUMBER) is
2596: select count(1) from po_change_requests pcr
2597: where pcr.document_header_id=p_po_header_id_csr_pd
2598: AND pcr.change_request_group_id=p_change_group_id_csr_pd
2599: AND pcr.new_promised_date IS NOT NULL
2600: AND pcr.action_type='MODIFICATION'

Line 2608: select count(1) from po_change_requests pcr

2604:
2605:
2606:
2607: cursor c_ship_qty_changed(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2608: select count(1) from po_change_requests pcr
2609: where pcr.document_header_id=p_po_header_id_csr
2610: AND pcr.change_request_group_id=p_change_group_id_csr
2611: AND pcr.new_quantity IS NOT NULL
2612: AND pcr.action_type='MODIFICATION'

Line 2619: select count(1) from po_change_requests pcr

2615: AND pcr.initiator= 'SUPPLIER';
2616:
2617:
2618: cursor c_price_changed(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2619: select count(1) from po_change_requests pcr
2620: where pcr.document_header_id=p_po_header_id_csr
2621: AND pcr.change_request_group_id=p_change_group_id_csr
2622: AND nvl(pcr.new_price,pcr.new_amount) IS NOT NULL
2623: AND pcr.action_type='MODIFICATION'

Line 2629: select count(1) from po_change_requests pcr

2625: AND pcr.request_level IN ('LINE','SHIPMENT')
2626: AND pcr.initiator= 'SUPPLIER';
2627:
2628: cursor c_price_changed_rel(p_po_header_id_csr IN NUMBER,p_change_group_id_csr IN NUMBER) is
2629: select count(1) from po_change_requests pcr
2630: where pcr.document_header_id = p_po_header_id_csr
2631: AND pcr.change_request_group_id=p_change_group_id_csr
2632: AND nvl(pcr.new_price,pcr.new_amount) IS NOT NULL
2633: AND pcr.action_type='MODIFICATION'

Line 2781: l_change_group_id po_change_requests.change_request_group_id%TYPE;

2777: l_po_header_id po_headers_all.po_header_id%TYPE;
2778: l_po_release_id po_releases_all.po_release_id%TYPE;
2779: l_doc_type VARCHAR2(10);
2780: l_return_val VARCHAR2(1);
2781: l_change_group_id po_change_requests.change_request_group_id%TYPE;
2782: l_req_hdr_id po_requisition_headers_all.requisition_header_id%TYPE;
2783: x_progress VARCHAR2(1000);
2784: l_auto_app_flag VARCHAR2(1);
2785:

Line 3039: from po_change_requests pcr,

3035: -- Cursor for checking whether there is a price change for Catalog item.
3036:
3037: cursor c_cat_price_change(p_po_header_id_csr IN NUMBER) is
3038: select count(1)
3039: from po_change_requests pcr,
3040: po_requisition_lines_all porl1,
3041: po_line_locations_all pll
3042: where pcr.document_header_id = p_po_header_id_csr
3043: AND pcr.REQUEST_LEVEL = 'LINE'

Line 3054: from po_change_requests pcr,

3050:
3051: -- Curosr for getting the Releases Price changes for Catlog request should go to the buyer
3052: cursor c_ship_price_change(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3053: select count(1)
3054: from po_change_requests pcr,
3055: po_requisition_lines_all porl1,
3056: po_line_locations_all pll
3057: where pcr.document_header_id = p_po_header_id_csr
3058: AND pcr.po_release_id = p_po_release_id_csr

Line 3069: from po_change_requests pcr,

3065:
3066: -- Cursor for checking the FPS price changes for catalog requests
3067: cursor c_fps_price_change(p_po_header_id_csr IN NUMBER) IS
3068: select count(1)
3069: from po_change_requests pcr,
3070: po_requisition_lines_all porl1,
3071: po_line_locations_all pll
3072: where pcr.document_header_id = p_po_header_id_csr
3073: AND pcr.REQUEST_LEVEL = 'SHIPMENT'

Line 3301: from po_change_requests

3297: -- Split shipment check
3298:
3299: cursor c_split_ships(p_po_header_id_csr IN NUMBER) is
3300: select count(1)
3301: from po_change_requests
3302: where parent_line_location_id is not null
3303: AND action_type = 'MODIFICATION'
3304: AND document_header_id = p_po_header_id_csr
3305: AND request_level = 'SHIPMENT'

Line 3312: from po_change_requests

3308:
3309: -- Split shipment check for releses
3310: cursor c_split_ships_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3311: select count(1)
3312: from po_change_requests
3313: where parent_line_location_id is not null
3314: AND action_type = 'MODIFICATION'
3315: AND document_header_id = p_po_header_id_csr
3316: AND po_release_id = p_po_release_id_csr

Line 3324: from po_change_requests

3320: -- Cancellation request should go to buyer
3321:
3322: cursor c_cancel_requests(p_po_header_id_csr IN NUMBER) is
3323: SELECT count(1)
3324: from po_change_requests
3325: where action_type = 'CANCELLATION'
3326: AND request_status = 'PENDING'
3327: AND document_header_id = p_po_header_id_csr;
3328:

Line 3333: from po_change_requests

3329:
3330: -- Cancellation request should go to buyer for the releases
3331: cursor c_cancel_requests_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3332: SELECT count(1)
3333: from po_change_requests
3334: where action_type = 'CANCELLATION'
3335: AND request_status = 'PENDING'
3336: AND document_header_id = p_po_header_id_csr
3337: AND po_release_id = p_po_release_id_csr;

Line 3344: from po_change_requests

3340: --Additional Change Request the unstructured change request
3341:
3342: cursor c_add_changes(p_po_header_id_csr IN NUMBER) is
3343: select count(1)
3344: from po_change_requests
3345: where action_type = 'MODIFICATION'
3346: AND ADDITIONAL_CHANGES is not NULL
3347: AND request_status = 'PENDING'
3348: AND document_header_id = p_po_header_id_csr;

Line 3353: from po_change_requests

3349:
3350: --Additional Change Request the unstructured change request for the releases
3351: cursor c_add_changes_rel(p_po_header_id_csr IN NUMBER,p_po_release_id_csr IN NUMBER) is
3352: select count(1)
3353: from po_change_requests
3354: where action_type = 'MODIFICATION'
3355: AND ADDITIONAL_CHANGES is not NULL
3356: AND request_level = 'HEADER'
3357: AND request_status = 'PENDING'

Line 3438: FROM po_change_requests

3434: */
3435: -- Cursor for checking for a supplier Item Change
3436: CURSOR c_supp_item_chg(p_po_header_id_csr IN NUMBER) IS
3437: SELECT count(1)
3438: FROM po_change_requests
3439: WHERE action_type = 'MODIFICATION'
3440: AND request_status = 'PENDING'
3441: AND request_level = 'LINE'
3442: AND new_supplier_part_number is not null

Line 3660: l_change_group_id po_change_requests.change_request_group_id%TYPE;

3656: IS
3657:
3658: l_po_header_id po_headers_all.po_header_id%TYPE;
3659: x_progress VARCHAR2(1000);
3660: l_change_group_id po_change_requests.change_request_group_id%TYPE;
3661:
3662: BEGIN
3663:
3664:

Line 3719: from po_change_requests

3715: OLD_PRICE,
3716: NEW_PRICE,
3717: OLD_AMOUNT,
3718: NEW_AMOUNT
3719: from po_change_requests
3720: where initiator='SUPPLIER'
3721: AND action_type='MODIFICATION'
3722: AND request_level='SHIPMENT'
3723: AND change_request_group_id = l_change_group_id_csr

Line 3733: from po_change_requests

3729: );
3730:
3731: CURSOR c_line_change(l_po_header_id IN NUMBER,l_change_group_id_csr IN NUMBER) IS
3732: select count(1)
3733: from po_change_requests
3734: where initiator='SUPPLIER'
3735: AND action_type='MODIFICATION'
3736: AND change_request_group_id = l_change_group_id_csr
3737: AND request_level='LINE'

Line 3743: l_old_quantity po_change_requests.old_quantity%type;

3739: AND document_header_id=l_po_header_id;
3740:
3741:
3742: l_only_promised_date_change boolean :=TRUE;
3743: l_old_quantity po_change_requests.old_quantity%type;
3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;

Line 3744: l_new_quantity po_change_requests.new_quantity%type;

3740:
3741:
3742: l_only_promised_date_change boolean :=TRUE;
3743: l_old_quantity po_change_requests.old_quantity%type;
3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;

Line 3745: l_old_promised_date po_change_requests.old_promised_date%type;

3741:
3742: l_only_promised_date_change boolean :=TRUE;
3743: l_old_quantity po_change_requests.old_quantity%type;
3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;

Line 3746: l_new_promised_date po_change_requests.new_promised_date%type;

3742: l_only_promised_date_change boolean :=TRUE;
3743: l_old_quantity po_change_requests.old_quantity%type;
3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;
3750: l_new_amount po_change_requests.new_amount%type;

Line 3747: l_old_price po_change_requests.old_price%type;

3743: l_old_quantity po_change_requests.old_quantity%type;
3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;
3750: l_new_amount po_change_requests.new_amount%type;
3751: x_progress VARCHAR2(1000);

Line 3748: l_new_price po_change_requests.new_price%type;

3744: l_new_quantity po_change_requests.new_quantity%type;
3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;
3750: l_new_amount po_change_requests.new_amount%type;
3751: x_progress VARCHAR2(1000);
3752: l_line_changes_counter number:=0;

Line 3749: l_old_amount po_change_requests.old_amount%type;

3745: l_old_promised_date po_change_requests.old_promised_date%type;
3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;
3750: l_new_amount po_change_requests.new_amount%type;
3751: x_progress VARCHAR2(1000);
3752: l_line_changes_counter number:=0;
3753: l_api_name varchar2(50) := 'PROMISEDATECHANGE';

Line 3750: l_new_amount po_change_requests.new_amount%type;

3746: l_new_promised_date po_change_requests.new_promised_date%type;
3747: l_old_price po_change_requests.old_price%type;
3748: l_new_price po_change_requests.new_price%type;
3749: l_old_amount po_change_requests.old_amount%type;
3750: l_new_amount po_change_requests.new_amount%type;
3751: x_progress VARCHAR2(1000);
3752: l_line_changes_counter number:=0;
3753: l_api_name varchar2(50) := 'PROMISEDATECHANGE';
3754:

Line 3834: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

3830: actid IN NUMBER,
3831: funcmode IN VARCHAR2,
3832: resultout OUT NOCOPY VARCHAR2)
3833: IS
3834: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
3835: l_po_header_id po_headers_all.po_header_id%type;
3836: l_po_release_id po_releases_all.po_release_id%type;
3837: x_progress VARCHAR2(1000);
3838:

Line 3897: FROM po_change_requests pcr,

3893: prla.requisition_line_id,
3894: prla.requisition_header_id,
3895: prla.line_location_id,
3896: prda.distribution_id
3897: FROM po_change_requests pcr,
3898: po_requisition_lines_all prla,
3899: po_req_distributions_all prda,
3900: po_line_locations_all plla
3901: WHERE document_header_id= p_po_header_id_csr

Line 3932: FROM po_change_requests pcr,

3928: prla.requisition_line_id,
3929: prla.requisition_header_id,
3930: prla.line_location_id,
3931: null distribution_id
3932: FROM po_change_requests pcr,
3933: po_line_locations_all plla,
3934: po_requisition_lines_all prla
3935: WHERE document_header_id=p_po_header_id_csr
3936: AND request_status='BUYER_APP'

Line 3961: FROM po_change_requests pcr,

3957: prla.requisition_line_id,
3958: prla.requisition_header_id,
3959: prla.line_location_id,
3960: prda.distribution_id
3961: FROM po_change_requests pcr,
3962: po_requisition_lines_all prla,
3963: po_req_distributions_all prda,
3964: po_line_locations_all plla
3965: WHERE pcr.po_release_id= p_po_release_id_csr

Line 3997: FROM po_change_requests pcr,

3993: prla.requisition_line_id,
3994: prla.requisition_header_id,
3995: prla.line_location_id,
3996: null distribution_id
3997: FROM po_change_requests pcr,
3998: po_line_locations_all plla,
3999: po_requisition_lines_all prla
4000: WHERE pcr.po_release_id=p_po_release_id_csr
4001: AND request_status='BUYER_APP'

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

4007: AND plla.po_header_id=pcr.document_header_id;
4008:
4009:
4010:
4011: --l_change_group_id po_change_requests.change_request_group_id%type ;
4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;

Line 4012: l_change_group_id po_change_requests.change_request_group_id%type ;

4008:
4009:
4010:
4011: --l_change_group_id po_change_requests.change_request_group_id%type ;
4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;

Line 4013: l_new_price po_change_requests.new_price%type ;

4009:
4010:
4011: --l_change_group_id po_change_requests.change_request_group_id%type ;
4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;

Line 4014: l_new_quantity po_change_requests.new_quantity%type ;

4010:
4011: --l_change_group_id po_change_requests.change_request_group_id%type ;
4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;

Line 4015: l_new_start_date po_change_requests.new_start_date%type ;

4011: --l_change_group_id po_change_requests.change_request_group_id%type ;
4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;

Line 4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;

4012: l_change_group_id po_change_requests.change_request_group_id%type ;
4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;

Line 4017: l_new_amount po_change_requests.new_amount%type ;

4013: l_new_price po_change_requests.new_price%type ;
4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4021: l_request_reason po_change_requests.request_reason%type ;

Line 4018: l_request_level po_change_requests.request_level%type ;

4014: l_new_quantity po_change_requests.new_quantity%type ;
4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4021: l_request_reason po_change_requests.request_reason%type ;
4022: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;

Line 4019: l_new_promised_date po_change_requests.new_promised_date%type ;

4015: l_new_start_date po_change_requests.new_start_date%type ;
4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4021: l_request_reason po_change_requests.request_reason%type ;
4022: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4023: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;

Line 4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;

4016: l_new_expiration_date po_change_requests.new_expiration_date%type ;
4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4021: l_request_reason po_change_requests.request_reason%type ;
4022: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4023: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;
4024: l_line_location_id po_requisition_lines_all.line_location_id%type ;

Line 4021: l_request_reason po_change_requests.request_reason%type ;

4017: l_new_amount po_change_requests.new_amount%type ;
4018: l_request_level po_change_requests.request_level%type ;
4019: l_new_promised_date po_change_requests.new_promised_date%type ;
4020: l_new_need_by_date po_change_requests.new_need_by_date%type ;
4021: l_request_reason po_change_requests.request_reason%type ;
4022: l_requisition_line_id po_requisition_lines_all.requisition_line_id%type ;
4023: l_requisition_header_id po_requisition_lines_all.requisition_header_id%type ;
4024: l_line_location_id po_requisition_lines_all.line_location_id%type ;
4025: l_req_distribution_id po_req_distributions_all.distribution_id%type ;

Line 4197: update PO_CHANGE_REQUESTS

4193: x_progress := 'INITIATERCOFLOW:003';
4194:
4195:
4196: --- Ip requirement
4197: update PO_CHANGE_REQUESTS
4198: set Parent_change_request_id = x_change_group_id
4199: where change_request_group_id= l_change_group_id;
4200:
4201: Exception

Line 4223: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

4219: actid IN NUMBER,
4220: funcmode IN VARCHAR2,
4221: resultout OUT NOCOPY VARCHAR2) is
4222:
4223: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
4224: x_progress VARCHAR2(1000);
4225: x_apprv_status VARCHAR2(1);
4226:
4227: BEGIN

Line 4362: po_change_requests pcr,

4358: CURSOR l_requestors_csr(c_grp_id_csr IN NUMBER)
4359: IS
4360: select pda.deliver_to_person_id
4361: from
4362: po_change_requests pcr,
4363: po_distributions_all pda
4364: where pcr.change_request_group_id = c_grp_id_csr
4365: AND pcr.request_level = 'LINE'
4366: AND pcr.document_line_id = pda.po_line_id

Line 4370: po_change_requests pcr,

4366: AND pcr.document_line_id = pda.po_line_id
4367: union
4368: select pda.deliver_to_person_id
4369: from
4370: po_change_requests pcr,
4371: po_distributions_all pda
4372: where pcr.change_request_group_id = c_grp_id_csr
4373: AND pcr.request_level = 'SHIPMENT'
4374: AND pcr.document_line_location_id = pda.line_location_id;

Line 4376: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;

4372: where pcr.change_request_group_id = c_grp_id_csr
4373: AND pcr.request_level = 'SHIPMENT'
4374: AND pcr.document_line_location_id = pda.line_location_id;
4375:
4376: l_change_group_id PO_CHANGE_REQUESTS.CHANGE_REQUEST_GROUP_ID%type;
4377: x_progress VARCHAR2(1000);
4378: l_planner_username fnd_user.user_name%type;
4379: l_planner_disp_name VARCHAR2(2000);
4380: l_requester_username fnd_user.user_name%type;

Line 4446: update po_change_requests

4442: wf_engine.SetItemAttrText(itemtype => itemtype,
4443: itemkey => itemkey,
4444: aname => 'NOTIF_USAGE',
4445: avalue =>'REQ');
4446: update po_change_requests
4447: set request_status ='REQ_APP',
4448: responded_by = fnd_global.user_id,
4449: response_date = sysdate
4450: where change_request_group_id = l_change_group_id