The following lines contain the word 'select', 'insert', 'update' or 'delete':
inserted_ind VARCHAR2(1) := NULL;
| PROCEDURE NAME po_resub_insert |
| |
| DESCRIPTION This private procedure will call procedure to |
| insert rows in cpg_purchasing_interface table |
| |
| |
| MODIFICATION HISTORY |
| Uday Phadtare new procedure created for Bug2048971. |
============================================================================*/
PROCEDURE po_resub_insert (v_po_header_id IN NUMBER,
v_po_line_id IN NUMBER,
v_po_line_location_id IN NUMBER,
v_po_release_id IN NUMBER,
v_transaction_type IN VARCHAR2) IS
CURSOR get_failed_releases (v_po_header_id NUMBER, v_po_line_id NUMBER,
v_po_line_location_id NUMBER, v_po_release_id NUMBER) IS
SELECT po_release_id, invalid_ind
FROM cpg_purchasing_interface
WHERE po_header_id = v_po_header_id
AND po_line_id = v_po_line_id
AND po_line_location_id = v_po_line_location_id
AND po_release_id = v_po_release_id
AND release_num <> 0
ORDER BY transaction_id DESC;
SELECT po_header_id, po_line_id, line_location_id, ship_to_location_id
FROM po_line_locations_all
WHERE po_header_id = v_po_header_id
AND po_release_id = v_release_id
ORDER BY po_header_id, po_line_id,line_location_id;
SELECT po_header_id, po_line_id, line_location_id, ship_to_location_id
FROM po_line_locations_all
WHERE po_header_id = v_po_header_id
AND approved_flag ='Y'
ORDER BY po_header_id, po_line_id, line_location_id;
Gml_Po_Interface.insert_rec( shipping_details_rec.po_header_id,
shipping_details_rec.po_line_id,
shipping_details_rec.line_location_id,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, 'N',
NULL, shipping_details_rec.ship_to_location_id, NULL);
inserted_ind := 'Y';
Gml_Po_Interface.insert_rec( get_failed_release_details_rec.po_header_id,
get_failed_release_details_rec.po_line_id,
get_failed_release_details_rec.line_location_id,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, 'N',
NULL, get_failed_release_details_rec.ship_to_location_id, NULL);
inserted_ind := 'Y';
END po_resub_insert;
SELECT po_header_id,
po_line_id,
line_location_id,
po_release_id
FROM po_line_locations_all
WHERE (creation_date >= v_date_from AND creation_date < v_date_to + 1 )
ORDER BY po_header_id,po_release_id,po_line_id,line_location_id;
SELECT type_lookup_code
FROM po_headers_all
WHERE po_header_id = v_po_head_id;
SELECT type_lookup_code, po_header_id
FROM po_headers_all
WHERE segment1 = v_po_no;
SELECT po_header_id,
po_line_id,
line_location_id,
po_release_id
FROM po_line_locations_all
WHERE po_header_id = v_po_header_id
ORDER BY po_header_id,po_release_id,po_line_id,line_location_id;
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,NULL,v_transaction_type);
IF get_synch_failed_rows_DT_rec.po_header_id = v_po_header_id AND inserted_ind = 'Y' THEN
NULL;
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,NULL,v_transaction_type);
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,v_po_release_id,v_transaction_type);
AND inserted_ind = 'Y' THEN
NULL;
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,v_po_release_id,v_transaction_type);
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,NULL,get_trans_type_rec.type_lookup_code);
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,v_po_release_id,get_trans_type_rec.type_lookup_code);
AND inserted_ind = 'Y' THEN
NULL;
inserted_ind := 'N';
po_resub_insert(v_po_header_id,v_po_line_id,v_line_location_id,v_po_release_id,get_trans_type_rec.type_lookup_code);
SELECT po_id, line_id
FROM po_ordr_dtl
WHERE po_id = (SELECT po_id
FROM po_ordr_hdr
WHERE po_no = v_po_no)
ORDER BY line_id;