1: PACKAGE BODY po_drafts_pvt AS
2: /* $Header: PO_DRAFTS_PVT.plb 120.59.12020000.8 2013/03/25 08:25:54 mabaig ship $ */
3:
4: d_pkg_name CONSTANT varchar2(50) :=
5: PO_LOG.get_package_base('PO_DRAFTS_PVT');
1: PACKAGE BODY po_drafts_pvt AS
2: /* $Header: PO_DRAFTS_PVT.plb 120.59.12020000.8 2013/03/25 08:25:54 mabaig ship $ */
3:
4: d_pkg_name CONSTANT varchar2(50) :=
5: PO_LOG.get_package_base('PO_DRAFTS_PVT');
6:
1: PACKAGE BODY po_drafts_pvt AS
2: /* $Header: PO_DRAFTS_PVT.plb 120.59.12020000.8 2013/03/25 08:25:54 mabaig ship $ */
3:
4: d_pkg_name CONSTANT varchar2(50) :=
5: PO_LOG.get_package_base('PO_DRAFTS_PVT');
6:
7: --
8: -- Declare a table to store lock (F, P, S) compatibilities
9: g_entity_lock_comp_tbl po_entity_lock_comp_tbl_type;
1827: IF (PO_LOG.d_stmt) THEN
1828: PO_LOG.stmt(d_module, d_position, 'need to remove draft changes');
1829: END IF;
1830:
1831: PO_DRAFTS_PVT.remove_draft_changes
1832: ( p_draft_id => l_draft_id,
1833: p_exclude_ctrl_tbl => FND_API.G_FALSE,
1834: x_return_status => l_return_status
1835: );
8257: DELETE
8258: FROM po_entity_locks pel
8259: WHERE pel.entity_pk1 = p_po_header_id
8260: AND pel.lock_by_draft_id = p_draft_id
8261: AND pel.entity_name IN (PO_DRAFTS_PVT.G_LOCK_ADDRESS_ENTITY, PO_DRAFTS_PVT.G_LOCK_HEADER_ENTITY,G_LOCK_HEADER_ATTACH_ENTITY);
8262:
8263: IF (PO_LOG.d_stmt) THEN
8264: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');
8265: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8358: DELETE
8359: FROM po_entity_locks pel
8360: WHERE pel.entity_pk1 = po_dest_line_ids_tbl(itr)
8361: AND pel.lock_by_draft_id = p_po_draft_id
8362: AND pel.entity_name = PO_DRAFTS_PVT.G_LOCK_DIST_ENTITY;
8363:
8364: IF (PO_LOG.d_stmt) THEN
8365: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');
8366: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8424: DELETE
8425: FROM po_entity_locks pel
8426: WHERE pel.entity_pk1 = po_ship_ids_tbl(itr)
8427: AND pel.lock_by_draft_id = p_po_draft_id
8428: AND pel.entity_name IN (PO_DRAFTS_PVT.G_LOCK_SHIPMENT_ENTITY,PO_DRAFTS_PVT.G_LOCK_SHIPMENT_ATTACH_ENTITY);
8429:
8430: IF (PO_LOG.d_stmt) THEN
8431: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');
8432: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8539: DELETE
8540: FROM po_entity_locks pel
8541: WHERE pel.entity_pk1 = po_line_ids_tbl(i)
8542: AND pel.lock_by_draft_id = p_po_draft_id
8543: AND pel.entity_name IN (PO_DRAFTS_PVT.G_LOCK_LINE_ENTITY,PO_DRAFTS_PVT.G_LOCK_LINE_ATTACH_ENTITY);
8544:
8545: IF (PO_LOG.d_stmt) THEN
8546: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');
8547: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
9578: g_entity_lock_comp_tbl(7) := po_entity_lock_comp_type('F', 'S', 'I');
9579: g_entity_lock_comp_tbl(8) := po_entity_lock_comp_type('F', 'P', 'I');
9580: g_entity_lock_comp_tbl(9) := po_entity_lock_comp_type('F', 'F', 'I');
9581:
9582: END PO_DRAFTS_PVT;