DBA Data[Home] [Help]

APPS.PO_DRAFTS_PVT dependencies on PO_ENTITY_LOCKS

Line 160: FROM po_entity_locks poel

156: IF l_is_mod_document ='Y' THEN
157: UPDATE po_headers_all_ext_b phaeb
158: SET revision_num = l_header_revision
159: WHERE EXISTS ( SELECT 'Lock exists for the address'
160: FROM po_entity_locks poel
161: WHERE poel.entity_pk1 = phaeb.po_header_id
162: AND poel.entity_pk2 = phaeb.c_ext_attr39 -- address type
163: AND poel.lock_by_draft_id = p_draft_id
164: AND poel.entity_name = G_LOCK_ADDRESS_ENTITY

Line 381: FROM po_entity_locks poel

377: -- Update the revision number for all lines locked by the current mod
378: UPDATE po_lines_all pla
379: SET revision_num = l_header_revision
380: WHERE EXISTS ( SELECT 'Lock exists for the line'
381: FROM po_entity_locks poel
382: WHERE poel.entity_pk1 = pla.po_line_id
383: AND poel.lock_by_draft_id = p_draft_id
384: AND poel.entity_name = G_LOCK_LINE_ENTITY
385: )

Line 399: FROM po_entity_locks poel

395: -- Update the revision number for all line_location locked by the current mod
396: UPDATE po_line_locations_all plla
397: SET revision_num = l_header_revision
398: WHERE EXISTS ( SELECT 'Lock exists for the shipment'
399: FROM po_entity_locks poel
400: WHERE poel.entity_pk1 = plla.line_location_id
401: AND poel.lock_by_draft_id = p_draft_id
402: AND poel.entity_name = G_LOCK_SHIPMENT_ENTITY
403: )

Line 417: FROM po_entity_locks poel

413: -- Update the revision number for all distributions locked by the current mod
414: UPDATE po_distributions_all pda
415: SET revision_num = l_header_revision
416: WHERE EXISTS ( SELECT 'Lock exists for the distribution'
417: FROM po_entity_locks poel
418: WHERE poel.entity_pk1 = pda.po_distribution_id
419: AND poel.lock_by_draft_id = p_draft_id
420: AND poel.entity_name = G_LOCK_DIST_ENTITY
421: )

Line 435: FROM po_entity_locks poel

431: -- Update the revision number for all exhibits locked/modofied by the current mod
432: UPDATE po_exhibit_details pex
433: SET revision_num = l_header_revision
434: WHERE EXISTS ( SELECT 'Lock exists for the exhibit'
435: FROM po_entity_locks poel
436: WHERE poel.entity_pk1 = pex.po_exhibit_details_id
437: AND poel.lock_by_draft_id = p_draft_id
438: --AND poel.entity_name = G_LOCK_EXHIBIT_ENTITY
439: )

Line 4009: -- po_entity_locks

4005: --Name: lock_entities
4006: --
4007: --Pre-reqs: None
4008: --Modifies:
4009: -- po_entity_locks
4010: --Locks:
4011: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all,
4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,
4013: -- po_distributions_all_ext_b, tl tables

Line 4016: -- creates entries in po_entity_locks table corresponding to the modified

4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,
4013: -- po_distributions_all_ext_b, tl tables
4014: --Function:
4015: -- This procedure generates the change data for the passed entities PKs,
4016: -- creates entries in po_entity_locks table corresponding to the modified
4017: -- attributes, and locks the required rows in transaction tables.
4018: --Parameters:
4019: --IN:
4020: --p_document_type

Line 4167: -- po_entity_locks

4163: --Name: identify_header_locks
4164: --
4165: --Pre-reqs: None
4166: --Modifies:
4167: -- po_entity_locks
4168: --Locks:
4169: -- po_headers_all, po_ga_org_assignments, po_notification_controls
4170: --Function:
4171: -- This procedure generates the change data for the passed entities PKs,

Line 4172: -- creates entries in po_entity_locks table corresponding to the modified

4168: --Locks:
4169: -- po_headers_all, po_ga_org_assignments, po_notification_controls
4170: --Function:
4171: -- This procedure generates the change data for the passed entities PKs,
4172: -- creates entries in po_entity_locks table corresponding to the modified
4173: -- attributes, and locks the required rows in transaction tables.
4174: --Parameters:
4175: --IN:
4176: --p_draft_id

Line 4492: -- po_entity_locks

4488: --Name: identify_line_locks
4489: --
4490: --Pre-reqs: None
4491: --Modifies:
4492: -- po_entity_locks
4493: --Locks:
4494: -- po_lines_all, po_attribute_values, po_attribute_values_tlp, price breaks, po_price_differentials.
4495: --Function:
4496: -- This procedure generates the change data for the passed entities PKs,

Line 4497: -- creates entries in po_entity_locks table corresponding to the modified

4493: --Locks:
4494: -- po_lines_all, po_attribute_values, po_attribute_values_tlp, price breaks, po_price_differentials.
4495: --Function:
4496: -- This procedure generates the change data for the passed entities PKs,
4497: -- creates entries in po_entity_locks table corresponding to the modified
4498: -- attributes, and locks the required rows in transaction tables.
4499: --Parameters:
4500: --IN:
4501: --p_draft_id

Line 5055: -- po_entity_locks

5051: --Name: identify_shipment_locks
5052: --
5053: --Pre-reqs: None
5054: --Modifies:
5055: -- po_entity_locks
5056: --Locks:
5057: -- po_line_locations_all, locks because of line F lock.
5058: --Function:
5059: -- This procedure generates the change data for the passed entities PKs,

Line 5060: -- creates entries in po_entity_locks table corresponding to the modified

5056: --Locks:
5057: -- po_line_locations_all, locks because of line F lock.
5058: --Function:
5059: -- This procedure generates the change data for the passed entities PKs,
5060: -- creates entries in po_entity_locks table corresponding to the modified
5061: -- attributes, and locks the required rows in transaction tables.
5062: --Parameters:
5063: --IN:
5064: --p_draft_id

Line 5278: FROM po_entity_locks poel,

5274: AND pol_lcks.index_char2 = G_LOCK_LINE_ENTITY
5275: AND pol_lcks.char5 = 'F' -- lock_type
5276: AND poll.po_line_id = pol_lcks.char1) -- entity_pk1
5277: OR EXISTS (SELECT 'Line is already F locked and not modified in current txn'
5278: FROM po_entity_locks poel,
5279: po_session_gt poll_ch
5280: WHERE poel.entity_name = G_LOCK_LINE_ENTITY
5281: AND poel.lock_type = 'F'
5282: AND poel.entity_pk1 = poll.po_line_id

Line 5321: -- po_entity_locks

5317: --Name: identify_dist_locks
5318: --
5319: --Pre-reqs: None
5320: --Modifies:
5321: -- po_entity_locks
5322: --Locks:
5323: -- po_distributions_all, locks because of line/shipment F lock
5324: --Function:
5325: -- This procedure generates the change data for the passed entities PKs,

Line 5326: -- creates entries in po_entity_locks table corresponding to the modified

5322: --Locks:
5323: -- po_distributions_all, locks because of line/shipment F lock
5324: --Function:
5325: -- This procedure generates the change data for the passed entities PKs,
5326: -- creates entries in po_entity_locks table corresponding to the modified
5327: -- attributes, and locks the required rows in transaction tables.
5328: --Parameters:
5329: --IN:
5330: --p_draft_id

Line 5536: FROM po_entity_locks poel,

5532: AND pol_lcks.index_char2 = G_LOCK_LINE_ENTITY
5533: AND pol_lcks.char5 = 'F' -- lock_type
5534: AND pod.po_line_id = pol_lcks.char1) -- entity_pk1
5535: OR EXISTS (SELECT 'Line is already F locked and not modified in current txn'
5536: FROM po_entity_locks poel,
5537: po_session_gt pod_ch
5538: WHERE poel.entity_name = G_LOCK_LINE_ENTITY
5539: AND poel.lock_type = 'F'
5540: AND poel.entity_pk1 = pod.po_line_id

Line 5557: FROM po_entity_locks poel,

5553: AND poll_lcks.index_char2 = G_LOCK_SHIPMENT_ENTITY
5554: AND poll_lcks.char5 = 'F' -- lock_type
5555: AND pod.line_location_id = poll_lcks.char1) -- entity_pk1
5556: OR EXISTS (SELECT 'Shipment is already F locked and not modified in current txn'
5557: FROM po_entity_locks poel,
5558: po_session_gt pod_ch
5559: WHERE poel.entity_name = G_LOCK_SHIPMENT_ENTITY
5560: AND poel.lock_type = 'F'
5561: AND poel.entity_pk1 = pod.line_location_id

Line 5599: -- po_entity_locks

5595: --Name: identify_uda_header_locks
5596: --
5597: --Pre-reqs: None
5598: --Modifies:
5599: -- po_entity_locks
5600: --Locks:
5601: -- po_headers_all_ext_b, header multi-row, po_headers_all_ext_tl, addresses
5602: --Function:
5603: -- This procedure generates the change data for the passed entities PKs,

Line 5604: -- creates entries in po_entity_locks table corresponding to the modified

5600: --Locks:
5601: -- po_headers_all_ext_b, header multi-row, po_headers_all_ext_tl, addresses
5602: --Function:
5603: -- This procedure generates the change data for the passed entities PKs,
5604: -- creates entries in po_entity_locks table corresponding to the modified
5605: -- attributes, and locks the required rows in transaction tables.
5606: --Parameters:
5607: --IN:
5608: --p_draft_id

Line 6747: -- po_entity_locks

6743: --Name: identify_uda_line_locks
6744: --
6745: --Pre-reqs: None
6746: --Modifies:
6747: -- po_entity_locks
6748: --Locks:
6749: -- po_lines_all_ext_b, po_lines_all_ext_tl, complex pricing attributes.
6750: --Function:
6751: -- This procedure generates the change data for the passed entities PKs,

Line 6752: -- creates entries in po_entity_locks table corresponding to the modified

6748: --Locks:
6749: -- po_lines_all_ext_b, po_lines_all_ext_tl, complex pricing attributes.
6750: --Function:
6751: -- This procedure generates the change data for the passed entities PKs,
6752: -- creates entries in po_entity_locks table corresponding to the modified
6753: -- attributes, and locks the required rows in transaction tables.
6754: --Parameters:
6755: --IN:
6756: --p_draft_id

Line 7346: -- po_entity_locks

7342: --Name: identify_uda_shipment_locks
7343: --
7344: --Pre-reqs: None
7345: --Modifies:
7346: -- po_entity_locks
7347: --Locks:
7348: -- po_line_locations_all_ext_b, po_line_locations_all_ext_tl
7349: --Function:
7350: -- This procedure generates the change data for the passed entities PKs,

Line 7351: -- creates entries in po_entity_locks table corresponding to the modified

7347: --Locks:
7348: -- po_line_locations_all_ext_b, po_line_locations_all_ext_tl
7349: --Function:
7350: -- This procedure generates the change data for the passed entities PKs,
7351: -- creates entries in po_entity_locks table corresponding to the modified
7352: -- attributes, and locks the required rows in transaction tables.
7353: --Parameters:
7354: --IN:
7355: --p_draft_id

Line 7802: -- po_entity_locks

7798: --Name: create_update_locks
7799: --
7800: --Pre-reqs: None
7801: --Modifies:
7802: -- po_entity_locks
7803: --Function:
7804: -- sqls to delete/insert/update locks in po_entity_locks table.
7805: --Parameters:
7806: --IN:

Line 7804: -- sqls to delete/insert/update locks in po_entity_locks table.

7800: --Pre-reqs: None
7801: --Modifies:
7802: -- po_entity_locks
7803: --Function:
7804: -- sqls to delete/insert/update locks in po_entity_locks table.
7805: --Parameters:
7806: --IN:
7807: --p_draft_id
7808: -- draft id of the current Modification - Award/IDV

Line 7834: FROM po_entity_locks poel

7830: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
7831: END IF;
7832: -- Delete locks for enties being updated for which lock is not required
7833: DELETE
7834: FROM po_entity_locks poel
7835: WHERE poel.lock_by_draft_id = p_draft_id
7836: AND NOT EXISTS
7837: (SELECT 'Lock required'
7838: FROM po_session_gt pogt

Line 7861: -- Create/Update lock entries in po_entity_locks

7857: d_position:=10;
7858: IF (PO_LOG.d_stmt) THEN
7859: PO_LOG.stmt(d_module, d_position, 'Number of Rows Deleted',SQL%ROWCOUNT);
7860: END IF;
7861: -- Create/Update lock entries in po_entity_locks
7862: MERGE INTO po_entity_locks lck_tbl
7863: USING (
7864: SELECT pogt.index_char2 entity_name,
7865: pogt.char1 entity_pk1,

Line 7862: MERGE INTO po_entity_locks lck_tbl

7858: IF (PO_LOG.d_stmt) THEN
7859: PO_LOG.stmt(d_module, d_position, 'Number of Rows Deleted',SQL%ROWCOUNT);
7860: END IF;
7861: -- Create/Update lock entries in po_entity_locks
7862: MERGE INTO po_entity_locks lck_tbl
7863: USING (
7864: SELECT pogt.index_char2 entity_name,
7865: pogt.char1 entity_pk1,
7866: pogt.char2 entity_pk2,

Line 7915: po_entity_locks_s.NEXTVAL,

7911: lck_tbl.last_update_login,
7912: lck_tbl.creation_date,
7913: lck_tbl.created_by)
7914: VALUES(
7915: po_entity_locks_s.NEXTVAL,
7916: lck_dat.entity_name,
7917: lck_dat.entity_pk1,
7918: lck_dat.entity_pk2,
7919: lck_dat.entity_pk3,

Line 7957: -- po_entity_locks is populated

7953: --Start of Comments
7954: --Name: lock_and_check_compatibility
7955: --
7956: --Pre-reqs:
7957: -- po_entity_locks is populated
7958: --Modifies: None
7959: --Locks:
7960: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all
7961: --Function:

Line 8006: -- in the current transaction, and rows exists in po_entity_locks

8002: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
8003: END IF;
8004: --------------------------------------------------------------------
8005: -- Lock the transaction table entity rows which have been modified
8006: -- in the current transaction, and rows exists in po_entity_locks
8007: --------------------------------------------------------------------
8008:
8009: -- Lock header row
8010: SELECT poh.po_header_id

Line 8015: FROM po_entity_locks poel

8011: BULK COLLECT
8012: INTO l_entity_id_tbl
8013: FROM po_headers_all poh
8014: WHERE EXISTS (SELECT 'lock exists'
8015: FROM po_entity_locks poel
8016: WHERE poel.entity_name = G_LOCK_HEADER_ENTITY
8017: AND poel.lock_by_draft_id = p_draft_id
8018: AND poel.entity_pk1 = poh.po_header_id)
8019: FOR UPDATE;

Line 8034: FROM po_entity_locks poel

8030: BULK COLLECT
8031: INTO l_entity_id_tbl
8032: FROM po_lines_all pol
8033: WHERE EXISTS (SELECT 'lock exists'
8034: FROM po_entity_locks poel
8035: WHERE poel.entity_name = G_LOCK_LINE_ENTITY
8036: AND poel.lock_by_draft_id = p_draft_id
8037: AND poel.entity_pk1 = pol.po_line_id)
8038: FOR UPDATE;

Line 8053: FROM po_entity_locks poel

8049: BULK COLLECT
8050: INTO l_entity_id_tbl
8051: FROM po_line_locations_all poll
8052: WHERE EXISTS (SELECT 'lock exists'
8053: FROM po_entity_locks poel
8054: WHERE poel.entity_name = G_LOCK_SHIPMENT_ENTITY
8055: AND poel.lock_by_draft_id = p_draft_id
8056: AND poel.entity_pk1 = poll.line_location_id)
8057: FOR UPDATE;

Line 8070: FROM po_entity_locks poel

8066: BULK COLLECT
8067: INTO l_entity_id_tbl
8068: FROM po_distributions_all pod
8069: WHERE EXISTS (SELECT 'lock exists'
8070: FROM po_entity_locks poel
8071: WHERE poel.entity_name = G_LOCK_DIST_ENTITY
8072: AND poel.lock_by_draft_id = p_draft_id
8073: AND poel.entity_pk1 = pod.po_distribution_id)
8074: FOR UPDATE;

Line 8093: FROM po_entity_locks poel_curr,

8089: BULK COLLECT
8090: INTO l_err_entity_tbl,
8091: l_err_pk1_tbl,
8092: l_lock_by_mod_num_tbl
8093: FROM po_entity_locks poel_curr,
8094: po_entity_locks poel_oth,
8095: TABLE(g_entity_lock_comp_tbl) comp,
8096: po_drafts pod
8097: WHERE poel_curr.lock_by_draft_id = p_draft_id

Line 8094: po_entity_locks poel_oth,

8090: INTO l_err_entity_tbl,
8091: l_err_pk1_tbl,
8092: l_lock_by_mod_num_tbl
8093: FROM po_entity_locks poel_curr,
8094: po_entity_locks poel_oth,
8095: TABLE(g_entity_lock_comp_tbl) comp,
8096: po_drafts pod
8097: WHERE poel_curr.lock_by_draft_id = p_draft_id
8098: AND poel_oth.lock_by_draft_id <> p_draft_id

Line 8258: FROM po_entity_locks pel

8254:
8255: d_position := 30;
8256:
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:

Line 8264: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');

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);
8266: END IF;
8267:
8268:

Line 8359: FROM po_entity_locks pel

8355: AND draft_id = p_po_draft_id;
8356:
8357: FORALL itr IN 1..po_dest_line_ids_tbl.Count
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:

Line 8365: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');

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);
8367: END IF;
8368: x_return_status := FND_API.G_RET_STS_SUCCESS;
8369:

Line 8425: FROM po_entity_locks pel

8421: AND draft_id = p_po_draft_id;
8422:
8423: FORALL itr IN 1..po_ship_ids_tbl.Count
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:

Line 8431: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');

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);
8433: END IF;
8434:
8435: FORALL itr IN 1..po_ship_ids_tbl.Count

Line 8540: FROM po_entity_locks pel

8536: AND draft_id = p_po_draft_id;
8537:
8538: FORALL i IN 1..po_line_ids_tbl.Count()
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:

Line 8546: PO_LOG.stmt(d_module,d_position ,'Deleted po_entity_locks');

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);
8548: END IF;
8549:
8550: FORALL i IN 1..po_line_ids_tbl.Count()

Line 9086: INSERT INTO po_entity_locks(

9082: PO_LOG.proc_begin(d_module, 'p_to_entity_name: ', p_to_entity_name);
9083: PO_LOG.proc_begin(d_module, 'p_orig_attach_doc_id: ', p_orig_attach_doc_id);
9084: END IF;
9085:
9086: INSERT INTO po_entity_locks(
9087: po_entity_lock_id,
9088: entity_name,
9089: entity_pk1,
9090: entity_pk2,

Line 9102: po_entity_locks_s.NEXTVAL,

9098: creation_date,
9099: created_by
9100: )
9101: VALUES(
9102: po_entity_locks_s.NEXTVAL,
9103: p_lock_entity_name,
9104: p_lock_entity_pk1,
9105: TO_CHAR(p_orig_attach_doc_id),
9106: p_lock_entity_pk3,

Line 9464: -- po_entity_locks

9460: --Name: identify_exhibit_locks
9461: --
9462: --Pre-reqs: None
9463: --Modifies:
9464: -- po_entity_locks
9465: --Locks:
9466: -- po_exhibit_details
9467: --Function:
9468: -- This procedure generates the change data for the passed entities PKs,

Line 9469: -- creates entries in po_entity_locks table corresponding to the modified

9465: --Locks:
9466: -- po_exhibit_details
9467: --Function:
9468: -- This procedure generates the change data for the passed entities PKs,
9469: -- creates entries in po_entity_locks table corresponding to the modified
9470: -- attributes, and locks the required rows in transaction tables.
9471: --Parameters:
9472: --IN:
9473: --p_draft_id