DBA Data[Home] [Help]

APPS.PO_CHANGE_RESPONSE_PVT dependencies on PO_CHANGE_REQUESTS

Line 9: * Effects: Creates a distribution record in PO_CHANGE_REQUESTS for each

5: */
6:
7: /**
8: * Private Procedure: CreateSingleDistributionRecords
9: * Effects: Creates a distribution record in PO_CHANGE_REQUESTS for each
10: * shipment change where the shipment has a single distribution.
11: * Note: Normally, distribution records are created by the
12: * "Respond to Changes" page. However, for the single distribution case,
13: * we allow users to respond through a notification, so we need to create

Line 15: * Modifies: Creates distribution records in PO_CHANGE_REQUESTS for any

11: * Note: Normally, distribution records are created by the
12: * "Respond to Changes" page. However, for the single distribution case,
13: * we allow users to respond through a notification, so we need to create
14: * the distribution records here.
15: * Modifies: Creates distribution records in PO_CHANGE_REQUESTS for any
16: * changes to shipments with one distribution.
17: **/
18:
19: PROCEDURE CreateSingleDistribution (

Line 25: FROM po_change_requests PCR

21: ) IS
22:
23: CURSOR single_dist_shipments_csr IS
24: SELECT change_request_id
25: FROM po_change_requests PCR
26: WHERE request_status = 'BUYER_APP'
27: AND change_request_group_id = p_change_request_group_id
28: AND request_level = 'SHIPMENT'
29: AND initiator = 'SUPPLIER'

Line 48: INSERT INTO po_change_requests

44: EXIT WHEN single_dist_shipments_csr%NOTFOUND;
45:
46: -- Create a distribution CR record by copying most of the fields from
47: -- the shipment record.
48: INSERT INTO po_change_requests
49: ( Change_Request_Group_Id, Change_Request_Id, Initiator, Action_Type, Request_Reason,
50: Document_Type, Request_Level,
51: Request_Status, Document_Header_Id, Document_Num, Document_Revision_Num, Created_By, Creation_Date,
52: Last_Updated_By, Last_Update_Date, Last_Update_Login, Vendor_Id, Vendor_Site_Id, Vendor_Contact_Id,

Line 92: FROM po_change_requests PCR, po_distributions_all POD

88: PCR.WF_Item_type, PCR.WF_Item_key, PCR.Parent_Change_Request_Id,
89: PCR.Validation_Error, PCR.Approval_Required_Flag,
90: PCR.Old_Supplier_Order_Number, PCR.New_Supplier_Order_Number,
91: PCR.Old_Supplier_Order_Line_Number, PCR.New_Supplier_Order_Line_Number,PCR.Old_Amount,PCR.New_Amount
92: FROM po_change_requests PCR, po_distributions_all POD
93: WHERE PCR.change_request_id = l_change_request_id
94: AND POD.line_location_id =
95: NVL(PCR.document_line_location_id, PCR.parent_line_location_id);
96:

Line 209: from po_change_requests

205:
206: if (p_po_release_id is null) then
207:
208: select count(*) into l_change_shipment_count
209: from po_change_requests
210: where document_header_id = p_po_header_id
211: and po_release_id is null
212: and change_request_group_id = p_change_request_group_id
213: and request_level = 'SHIPMENT'

Line 219: from po_change_requests

215:
216: else
217:
218: select count(*) into l_change_shipment_count
219: from po_change_requests
220: where po_release_id = p_po_release_id
221: and change_request_group_id = p_change_request_group_id
222: and request_level = 'SHIPMENT'
223: and parent_line_location_id is null;

Line 309: from po_change_requests

305: from po_headers_all
306: where po_header_id = p_po_header_id;
307:
308: select count(*) into l_pending_count
309: from po_change_requests
310: where document_header_id = p_po_header_id
311: and document_revision_num = l_revision_num
312: and request_status = 'PENDING';
313:

Line 394: FROM po_change_requests

390:
391: CURSOR changed_lines_cursor IS
392: SELECT document_line_id, new_price, new_supplier_part_number,
393: new_start_date, new_expiration_date, new_amount
394: FROM po_change_requests
395: where request_status = 'BUYER_APP'
396: AND document_header_id = p_po_header_id
397: AND change_request_group_id = p_change_request_group_id
398: AND request_level = 'LINE';

Line 409: FROM po_change_requests

405: new_amount,
406: new_progress_type, -- << Complex work changes for R12 >>
407: new_pay_description,
408: new_supplier_order_line_number
409: FROM po_change_requests
410: where request_status = 'BUYER_APP'
411: AND document_header_id = p_po_header_id
412: AND change_request_group_id = p_change_request_group_id
413: AND request_level = 'SHIPMENT';

Line 418: FROM po_change_requests PCR,

414:
415: CURSOR changed_distributions_cursor IS
416: SELECT PCR.document_distribution_id, PCR.new_quantity, Decode(PCR.parent_line_location_id, null, null, PCR.document_shipment_number),
417: POD.po_distribution_id parent_distribution_id, PCR.new_amount
418: FROM po_change_requests PCR,
419: po_distributions POD
420: where PCR.request_status = 'BUYER_APP'
421: AND PCR.document_header_id = p_po_header_id
422: AND PCR.change_request_group_id = p_change_request_group_id

Line 516: -- For shipments with a single distribution create distribution records in PO_CHANGE_REQUESTS

512: PO_MOAC_UTILS_PVT.set_org_context(l_s_org_id) ; --
513:
514: l_progress := '002';
515:
516: -- For shipments with a single distribution create distribution records in PO_CHANGE_REQUESTS
517:
518: CreateSingleDistribution(p_change_request_group_id);
519:
520: l_progress := '003';

Line 522: -- Fetch the line changes from the PO_CHANGE_REQUESTS table and construct the line changes object

518: CreateSingleDistribution(p_change_request_group_id);
519:
520: l_progress := '003';
521:
522: -- Fetch the line changes from the PO_CHANGE_REQUESTS table and construct the line changes object
523:
524: OPEN changed_lines_cursor;
525: FETCH changed_lines_cursor BULK COLLECT INTO
526: l_po_line_id_tbl,

Line 547: -- Fetch the shipment changes from the PO_CHANGE_REQUESTS table and construct the shipment changes object

543: );
544:
545: l_progress := '005';
546:
547: -- Fetch the shipment changes from the PO_CHANGE_REQUESTS table and construct the shipment changes object
548:
549: OPEN changed_shipments_cursor;
550: FETCH changed_shipments_cursor BULK COLLECT INTO
551: l_po_line_location_id_tbl,

Line 583: -- Fetch the distribution changes from the PO_CHANGE_REQUESTS table and

579: );
580:
581: l_progress := '007';
582:
583: -- Fetch the distribution changes from the PO_CHANGE_REQUESTS table and
584: -- construct the distribution changes object
585:
586: OPEN changed_distributions_cursor;
587: FETCH changed_distributions_cursor BULK COLLECT INTO

Line 691: -- split shipments. Update the PO_CHANGE_REQUESTS table with these IDs

687:
688: l_progress := '014';
689:
690: -- update_document generates a new PO_LINE_LOCATION_ID for each of the
691: -- split shipments. Update the PO_CHANGE_REQUESTS table with these IDs
692:
693: --FOR i IN shipment changes LOOP
694: FOR i IN 1..l_changes.shipment_changes.PO_LINE_LOCATION_ID.COUNT LOOP
695: IF (l_changes.shipment_changes.parent_line_location_id(i) IS NOT NULL) THEN

Line 696: UPDATE po_change_requests

692:
693: --FOR i IN shipment changes LOOP
694: FOR i IN 1..l_changes.shipment_changes.PO_LINE_LOCATION_ID.COUNT LOOP
695: IF (l_changes.shipment_changes.parent_line_location_id(i) IS NOT NULL) THEN
696: UPDATE po_change_requests
697: SET document_line_location_id =
698: l_changes.shipment_changes.po_line_location_id(i)
699: WHERE parent_line_location_id =
700: l_changes.shipment_changes.parent_line_location_id(i)

Line 777: l_wf_item_key po_change_requests.wf_item_key%TYPE;

773: p_line_location_id in NUMBER,
774: p_splitFlag in VARCHAR2,
775: p_cancel_backing_req in VARCHAR2) is
776:
777: l_wf_item_key po_change_requests.wf_item_key%TYPE;
778: l_wf_item_type po_change_requests.wf_item_type%TYPE;
779:
780: BEGIN
781:

Line 778: l_wf_item_type po_change_requests.wf_item_type%TYPE;

774: p_splitFlag in VARCHAR2,
775: p_cancel_backing_req in VARCHAR2) is
776:
777: l_wf_item_key po_change_requests.wf_item_key%TYPE;
778: l_wf_item_type po_change_requests.wf_item_type%TYPE;
779:
780: BEGIN
781:
782: -- first update the line or shipment record in po_change_requests

Line 782: -- first update the line or shipment record in po_change_requests

778: l_wf_item_type po_change_requests.wf_item_type%TYPE;
779:
780: BEGIN
781:
782: -- first update the line or shipment record in po_change_requests
783:
784: if (p_request_status = 'REJECTED') then
785:
786: update po_change_requests

Line 786: update po_change_requests

782: -- first update the line or shipment record in po_change_requests
783:
784: if (p_request_status = 'REJECTED') then
785:
786: update po_change_requests
787: set request_status = p_request_status,
788: -- change_active_flag = 'N', /* commented out due to bug 3574114 */
789: responded_by = p_responded_by,
790: response_date = sysdate,

Line 798: update po_change_requests

794: where change_request_id = p_change_request_id;
795:
796: else
797:
798: update po_change_requests
799: set request_status = p_request_status,
800: cancel_backing_req = p_cancel_backing_req,
801: responded_by = p_responded_by,
802: response_date = sysdate,

Line 815: from po_change_requests

811: begin
812:
813: select wf_item_type, wf_item_key
814: into l_wf_item_type, l_wf_item_key
815: from po_change_requests
816: where change_request_id = p_change_request_id;
817:
818: if (Wf_Item.Item_Exist(l_wf_item_type, l_wf_item_key)) then
819:

Line 836: update po_change_requests

832:
833: -- update the corresponding distribution records
834: if (p_splitFlag = 'N') then
835:
836: update po_change_requests
837: set request_status = p_request_status,
838: responded_by = p_responded_by,
839: response_date = sysdate,
840: last_updated_by = p_responded_by,

Line 861: update po_change_requests

857: end if;
858:
859: else /* p_splitFlag is not 'N' */
860:
861: update po_change_requests
862: set request_status = p_request_status,
863: responded_by = p_responded_by,
864: response_date = sysdate,
865: last_updated_by = p_responded_by,

Line 881: * in po_change_requests to 'PENDING' when a validation error is

877: END update_change_response;
878:
879:
880: /* roll_back_acceptance is used to roll back buyer acceptance responses
881: * in po_change_requests to 'PENDING' when a validation error is
882: * encountered during PO update validation and we decide to roll back the transaction
883: */
884:
885: PROCEDURE roll_back_acceptance (p_change_request_group_id in NUMBER) is

Line 889: update po_change_requests

885: PROCEDURE roll_back_acceptance (p_change_request_group_id in NUMBER) is
886:
887: BEGIN
888:
889: update po_change_requests
890: set request_status = 'PENDING'
891: where change_request_group_id = p_change_request_group_id
892: and request_status in ('BUYER_APP', 'WAIT_MGR_APP');
893: