The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE NAME: lock_row_for_status_update
===========================================================================*/
PROCEDURE lock_row_for_status_update (x_po_release_id IN NUMBER)
IS
CURSOR C IS
SELECT *
FROM po_releases
WHERE po_release_id = x_po_release_id
FOR UPDATE of po_release_id NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
PO_MESSAGE_S.SQL_ERROR('LOCK_ROW_FOR_STATUS_UPDATE', x_progress, sqlcode);
PROCEDURE NAME: delete_release
===========================================================================*/
PROCEDURE delete_release
(X_po_release_id IN NUMBER,
X_row_id IN VARCHAR2) IS
X_progress VARCHAR2(3) := '';
** Call the table handler to delete the release shipment row.
*/
/* Bug 2904413 */
X_progress := '010';
SELECT wf_item_key, wf_item_type, release_type
INTO x_item_key, x_item_type, X_release_type
FROM po_releases
WHERE po_release_id = X_po_release_id;
Delete From po_action_history
Where OBJECT_TYPE_CODE = 'RELEASE' and
OBJECT_SUB_TYPE_CODE = X_release_type and
OBJECT_ID = X_po_release_id;
fnd_attached_documents2_pkg.delete_attachments('PO_RELEASES', X_po_release_id,'', '', '', '', 'Y');
po_releases_pkg_s2.delete_row(X_row_id);
** Call the cover routine to delete all of the children
*/
po_releases_sv.delete_children(X_po_release_id);
-- dbms_output.put_line('after delete children');
po_message_s.sql_error('delete_release', X_progress, sqlcode);
END delete_release;
PROCEDURE NAME: delete_children
===========================================================================*/
PROCEDURE delete_children
(X_po_release_id IN NUMBER) IS
X_progress VARCHAR2(3) := '';
SELECT line_location_id
FROM po_line_locations
WHERE po_release_id = X_po_release_id;
** Call the routine to delete all of the release shipments.
*/
po_shipments_sv4.delete_all_shipments(X_po_release_id,
X_entity_level,
'NOT RFQ/QUOTE');
** Call the routine to delete all of the release distributions.
*/
po_distributions_sv.delete_distributions(X_po_release_id,
'RELEASE');
** Call the routine to delete all attachements.
*/
fnd_attached_documents2_pkg.delete_attachments('PO_RELEASE',
X_po_release_id,
'', '', '', '', 'Y');
fnd_attached_documents2_pkg.delete_attachments('PO_SHIPMENT',
x_line_location_id,
'', '', '', '', 'Y');
** Call the routine to delete all notifications.
*/
/*hvadlamu : commenting out the delete and adding the workflow call*/
/*po_notifications_sv1.delete_po_notif ('RELEASE',
X_po_release_id); */
SELECT wf_item_type,wf_item_key
INTO x_item_type,x_item_key
FROM PO_RELEASES
WHERE po_release_id = x_po_release_id;
po_message_s.sql_error('delete_children', X_progress, sqlcode);
END delete_children;