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 393: FROM po_change_requests

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

Line 408: FROM po_change_requests

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

Line 417: FROM po_change_requests PCR,

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

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

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

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

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

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

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

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

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

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

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

Line 694: UPDATE po_change_requests

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

Line 775: l_wf_item_key po_change_requests.wf_item_key%TYPE;

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

Line 776: l_wf_item_type po_change_requests.wf_item_type%TYPE;

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

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

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

Line 784: update po_change_requests

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

Line 796: update po_change_requests

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

Line 813: from po_change_requests

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

Line 834: update po_change_requests

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

Line 859: update po_change_requests

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

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

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

Line 887: update po_change_requests

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