DBA Data[Home] [Help]

APPS.PO_DRAFTS_PVT dependencies on PO_LINES_ALL

Line 378: UPDATE po_lines_all pla

374: WHERE po_header_id = p_po_header_id;
375:
376: --
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

Line 4011: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all,

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
4014: --Function:
4015: -- This procedure generates the change data for the passed entities PKs,

Line 4012: -- po_headers_all_ext_b,po_lines_all_ext_b,po_line_locations_all_ext_b,

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
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

Line 4494: -- po_lines_all, po_attribute_values, po_attribute_values_tlp, price breaks, po_price_differentials.

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,
4497: -- creates entries in po_entity_locks table corresponding to the modified
4498: -- attributes, and locks the required rows in transaction tables.

Line 4620: FROM po_lines_all pol,

4616: NVL(pol.from_header_id, G_NULL_NUM),
4617: NVL(pol.from_line_id, G_NULL_NUM),
4618: NVL(pol.clm_idc_type, G_NULL_CHAR)
4619: ) f_lock_attrs
4620: FROM po_lines_all pol,
4621: po_session_gt pogt
4622: WHERE pol.po_line_id = pogt.char1 -- po_line_id
4623: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4624: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4991: FROM po_lines_all pol,

4987: G_LOCK_LINE_ENTITY,
4988: pol.po_line_id,
4989: p_draft_id,
4990: 'S'
4991: FROM po_lines_all pol,
4992: po_drafts dft
4993: WHERE EXISTS ( SELECT line_location_id -- new shipment added
4994: FROM po_line_locations_draft_all poll_draft
4995: WHERE poll_draft.po_line_id = pol.po_line_id

Line 5021: FROM po_lines_all pol,

5017: G_LOCK_LINE_ENTITY,
5018: pol.po_line_id,
5019: p_draft_id,
5020: 'S'
5021: FROM po_lines_all pol,
5022: po_drafts dft
5023: WHERE EXISTS ( SELECT po_distribution_id -- new distribution added
5024: FROM po_distributions_draft_all pod_draft
5025: WHERE pod_draft.po_line_id = pol.po_line_id

Line 6749: -- po_lines_all_ext_b, po_lines_all_ext_tl, complex pricing attributes.

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,
6752: -- creates entries in po_entity_locks table corresponding to the modified
6753: -- attributes, and locks the required rows in transaction tables.

Line 6771: -- Identify Line level locks required because of change in po_lines_all_ext_b

6767: d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
6768: d_position NUMBER;
6769:
6770: BEGIN
6771: -- Identify Line level locks required because of change in po_lines_all_ext_b
6772: d_position:=0;
6773: IF (PO_LOG.d_proc) THEN
6774: PO_LOG.proc_begin(d_module);
6775: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);

Line 6890: FROM po_lines_all_ext_b plb,

6886: NVL(plb.d_ext_attr9 ,G_NULL_DATE),
6887: NVL(plb.d_ext_attr10 ,G_NULL_DATE)
6888: ) p_lock_attrs,
6889: plb.attr_group_id
6890: FROM po_lines_all_ext_b plb,
6891: po_session_gt pogt
6892: WHERE plb.po_line_id = pogt.char1 -- po_line_id
6893: AND plb.draft_id = G_DRAFT_ID_MINUS_1
6894: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 6898: po_lines_all pla

6894: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
6895: and pogt.index_char2 = g_lock_line_entity
6896: AND NOT EXISTS (SELECT 'exclude PRICING attribute category'
6897: FROM po_uda_ag_template_usages puatu,
6898: po_lines_all pla
6899: WHERE puatu.template_id = pla.uda_template_id
6900: AND puatu.attribute_category = 'PRICING'
6901: AND pla.po_line_id = plb.po_line_id
6902: AND puatu.attribute_group_id = plb.attr_group_id

Line 7000: FROM po_lines_all_ext_b plbd,

6996: NVL(plbd.d_ext_attr9 ,G_NULL_DATE),
6997: NVL(plbd.d_ext_attr10 ,G_NULL_DATE)
6998: ) p_lock_attrs,
6999: plbd.attr_group_id
7000: FROM po_lines_all_ext_b plbd,
7001: po_session_gt pogt
7002: WHERE plbd.draft_id = p_draft_id
7003: AND plbd.po_line_id = pogt.char1 -- po_line_id
7004: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 7008: po_lines_all pla

7004: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7005: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
7006: AND NOT EXISTS (SELECT 'exclude PRICING attribute category'
7007: FROM po_uda_ag_template_usages puatu,
7008: po_lines_all pla
7009: where puatu.template_id = pla.uda_template_id
7010: AND puatu.attribute_category = 'PRICING'
7011: AND pla.po_line_id = plbd.po_line_id
7012: AND puatu.attribute_group_id = plbd.attr_group_id

Line 7026: -- for such attribute groups are not created in po_lines_all_ext_b.

7022: END IF;
7023:
7024: -- When a UDA attribute group does not have any attribute which has default
7025: -- value and user also does not enter any attribute value, then records
7026: -- for such attribute groups are not created in po_lines_all_ext_b.
7027: -- Now if user modifies such attribute groups in Mod, then a new record is
7028: -- created with the draft_id. We need to identify such records and lock the
7029: -- line as P lock.
7030: INSERT INTO po_session_gt(

Line 7051: FROM po_lines_all_ext_b draft,

7047: AND plbd.po_line_id = pogt.char1 -- po_line_id
7048: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7049: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
7050: AND EXISTS (SELECT draft.attr_group_id
7051: FROM po_lines_all_ext_b draft,
7052: po_uda_ag_template_usages uda_usg
7053: WHERE draft.po_line_id = plbd.po_line_id
7054: AND draft.draft_id = p_draft_id
7055: AND draft.uda_template_id = uda_usg.template_id

Line 7060: FROM po_lines_all_ext_b base,

7056: AND draft.attr_group_id = uda_usg.attribute_group_id
7057: AND uda_usg.attribute_category <> 'PRICING'
7058: MINUS
7059: SELECT base.attr_group_id
7060: FROM po_lines_all_ext_b base,
7061: po_uda_ag_template_usages uda_usg
7062: WHERE base.po_line_id = plbd.po_line_id
7063: AND base.draft_id = -1
7064: AND base.uda_template_id = uda_usg.template_id

Line 7075: -- Identify Line level locks required because of change in po_lines_all_ext_tl

7071: PO_LOG.stmt_all_session_gt(d_module, d_position, G_LOCKS_REQUIRED_ID);
7072: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
7073: END IF;
7074:
7075: -- Identify Line level locks required because of change in po_lines_all_ext_tl
7076: INSERT INTO po_session_gt(
7077: key,
7078: index_char1, -- records identifier
7079: index_char2, -- entity_name

Line 7139: FROM po_lines_all_ext_tl plt,

7135: NVL(plt.tl_ext_attr40 ,G_NULL_CHAR)
7136: ) p_lock_attrs,
7137: plt.attr_group_id,
7138: plt.language
7139: FROM po_lines_all_ext_tl plt,
7140: po_session_gt pogt
7141: where plt.po_line_id = pogt.char1 -- po_line_id
7142: AND plt.draft_id = G_DRAFT_ID_MINUS_1
7143: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 7192: FROM po_lines_all_ext_tl pltd,

7188: NVL(pltd.tl_ext_attr40 ,G_NULL_CHAR)
7189: ) p_lock_attrs,
7190: pltd.attr_group_id,
7191: pltd.language
7192: FROM po_lines_all_ext_tl pltd,
7193: po_session_gt pogt
7194: WHERE pltd.draft_id = p_draft_id
7195: AND pltd.po_line_id = pogt.char1 -- po_header_id
7196: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 7227: FROM po_lines_all_ext_b polext_base,

7223: G_LOCK_LINE_ENTITY,
7224: polext_base.po_line_id,
7225: polext_draft.draft_id,
7226: 'S'
7227: FROM po_lines_all_ext_b polext_base,
7228: po_lines_all_ext_b polext_draft,
7229: po_session_gt pogt
7230: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7231: FROM po_uda_ag_template_usages agtu,

Line 7228: po_lines_all_ext_b polext_draft,

7224: polext_base.po_line_id,
7225: polext_draft.draft_id,
7226: 'S'
7227: FROM po_lines_all_ext_b polext_base,
7228: po_lines_all_ext_b polext_draft,
7229: po_session_gt pogt
7230: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7231: FROM po_uda_ag_template_usages agtu,
7232: po_lines_all pol

Line 7232: po_lines_all pol

7228: po_lines_all_ext_b polext_draft,
7229: po_session_gt pogt
7230: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7231: FROM po_uda_ag_template_usages agtu,
7232: po_lines_all pol
7233: WHERE polext_base.po_line_id = pol.po_line_id
7234: AND pol.uda_template_id = agtu.template_id
7235: AND polext_base.attr_group_id = agtu.attribute_group_id
7236: AND agtu.attribute_category = 'PRICING')

Line 7281: FROM po_lines_all_ext_b polext_base,

7277: G_LOCK_LINE_ENTITY,
7278: polext_base.po_line_id,
7279: polext_draft.draft_id,
7280: 'F'
7281: FROM po_lines_all_ext_b polext_base,
7282: po_lines_all_ext_b polext_draft,
7283: po_session_gt pogt
7284: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7285: FROM po_uda_ag_template_usages agtu,

Line 7282: po_lines_all_ext_b polext_draft,

7278: polext_base.po_line_id,
7279: polext_draft.draft_id,
7280: 'F'
7281: FROM po_lines_all_ext_b polext_base,
7282: po_lines_all_ext_b polext_draft,
7283: po_session_gt pogt
7284: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7285: FROM po_uda_ag_template_usages agtu,
7286: po_lines_all pol

Line 7286: po_lines_all pol

7282: po_lines_all_ext_b polext_draft,
7283: po_session_gt pogt
7284: WHERE EXISTS (SELECT 'Is Complex Pricig Attribute'
7285: FROM po_uda_ag_template_usages agtu,
7286: po_lines_all pol
7287: WHERE polext_base.po_line_id = pol.po_line_id
7288: AND pol.uda_template_id = agtu.template_id
7289: AND polext_base.attr_group_id = agtu.attribute_group_id
7290: AND agtu.attribute_category = 'PRICING')

Line 7307: po_lines_all pol

7303: AND EXISTS (SELECT 'n_ext_attr2 used as UNIT_PRICE'
7304: FROM ego_attrs_v attrs,
7305: ego_obj_attr_grp_assocs_v att_assoc,
7306: po_uda_ag_template_usages agtu,
7307: po_lines_all pol
7308: WHERE attrs.attr_group_type = att_assoc.attr_group_type
7309: AND attrs.attr_group_name = att_assoc.attr_group_name
7310: --AND attrs.attr_group_type = 'PO_LINE_EXT_ATTRS'
7311: --AND attrs.attr_group_name LIKE 'AMT%'

Line 7960: -- po_headers_all, po_lines_all, po_line_locations_all, po_distributions_all

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:
7962: -- This procedure locks the required rows in transaction tables, and checks if
7963: -- the requested locks are compatible with existing locks.
7964: --Parameters:

Line 8032: FROM po_lines_all pol

8028: -- Lock line rows
8029: SELECT pol.po_line_id
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

Line 8552: FROM po_lines_all_ext_b

8548: END IF;
8549:
8550: FORALL i IN 1..po_line_ids_tbl.Count()
8551: DELETE
8552: FROM po_lines_all_ext_b
8553: WHERE (po_line_id = po_line_ids_tbl(i) -- main record for Mod
8554: AND draft_id = p_po_draft_id)
8555: OR -- old record for Mod complex pricing attribute
8556: (po_line_id = po_line_ids_tbl(i)

Line 8566: FROM po_lines_all_ext_tl

8562: AND pk1_value = -p_po_draft_id);
8563:
8564: FORALL i IN 1..po_line_ids_tbl.Count()
8565: DELETE
8566: FROM po_lines_all_ext_tl
8567: WHERE (po_line_id = po_line_ids_tbl(i) -- main record for Mod
8568: AND draft_id = p_po_draft_id)
8569: OR -- old record for Mod complex pricing attribute
8570: (po_line_id = po_line_ids_tbl(i)

Line 8682: DELETE FROM po_lines_all_ext_b

8678: WHERE po_line_id = l_line_id_tbl(i)
8679: AND draft_id = p_draft_id;
8680:
8681: FORALL i IN 1..l_line_id_tbl.Count()
8682: DELETE FROM po_lines_all_ext_b
8683: WHERE po_line_id = l_line_id_tbl(i)
8684: AND draft_id = p_draft_id;
8685:
8686: FORALL i IN 1..l_line_id_tbl.Count()

Line 8687: DELETE FROM po_lines_all_ext_tl

8683: WHERE po_line_id = l_line_id_tbl(i)
8684: AND draft_id = p_draft_id;
8685:
8686: FORALL i IN 1..l_line_id_tbl.Count()
8687: DELETE FROM po_lines_all_ext_tl
8688: WHERE po_line_id = l_line_id_tbl(i)
8689: AND draft_id = p_draft_id;
8690:
8691: --Bug 13938456

Line 8867: -- po_lines_all_ext_b --> cleans up extra records for PRICING attribute

8863: --Name: clean_up_extra_uda
8864: -- Bug 13006217
8865: --Function:
8866: --This procedure deletes extra uda from ext tables
8867: -- po_lines_all_ext_b --> cleans up extra records for PRICING attribute
8868: -- po_headers_all_ext_b --> cleans up extra records for FORMS attribute
8869: -- po_lines_all_ext_tl --> cleans up extra records for PRICING attribute
8870: -- po_headers_all_ext_tl --> cleans up extra records for FORMS attribute
8871: --Parameters:

Line 8869: -- po_lines_all_ext_tl --> cleans up extra records for PRICING attribute

8865: --Function:
8866: --This procedure deletes extra uda from ext tables
8867: -- po_lines_all_ext_b --> cleans up extra records for PRICING attribute
8868: -- po_headers_all_ext_b --> cleans up extra records for FORMS attribute
8869: -- po_lines_all_ext_tl --> cleans up extra records for PRICING attribute
8870: -- po_headers_all_ext_tl --> cleans up extra records for FORMS attribute
8871: --Parameters:
8872: --IN:
8873: --p_draft_id:

Line 8897: --Delete extra PRICING attribute record from po_lines_all_ext_b

8893: IF (PO_LOG.d_stmt) THEN
8894: PO_LOG.proc_begin(d_module, 'p_draft_id: ', p_draft_id);
8895: END IF;
8896:
8897: --Delete extra PRICING attribute record from po_lines_all_ext_b
8898: DELETE FROM po_lines_all_ext_b ple
8899: where ( Abs(ple.po_line_id), Abs(ple.draft_id) ) IN ( SELECT po_line_id, Decode(draft_id,-1,1,draft_id)
8900: FROM po_lines_merge_v
8901: WHERE po_header_id = p_po_header_id

Line 8898: DELETE FROM po_lines_all_ext_b ple

8894: PO_LOG.proc_begin(d_module, 'p_draft_id: ', p_draft_id);
8895: END IF;
8896:
8897: --Delete extra PRICING attribute record from po_lines_all_ext_b
8898: DELETE FROM po_lines_all_ext_b ple
8899: where ( Abs(ple.po_line_id), Abs(ple.draft_id) ) IN ( SELECT po_line_id, Decode(draft_id,-1,1,draft_id)
8900: FROM po_lines_merge_v
8901: WHERE po_header_id = p_po_header_id
8902: AND draft_id = p_draft_id

Line 8920: PO_LOG.stmt(d_module,d_position ,'Deleted extra prcing uda records from po_lines_all_ext_b');

8916: AND ple.attr_group_id = ptu.attribute_group_id
8917: );
8918:
8919: IF (PO_LOG.d_stmt) THEN
8920: PO_LOG.stmt(d_module,d_position ,'Deleted extra prcing uda records from po_lines_all_ext_b');
8921: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8922: END IF;
8923:
8924: d_position := 10;

Line 8925: --Delete extra PRICING attribute record from po_lines_all_ext_tl

8921: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8922: END IF;
8923:
8924: d_position := 10;
8925: --Delete extra PRICING attribute record from po_lines_all_ext_tl
8926: DELETE FROM po_lines_all_ext_tl ple
8927: where ( Abs(ple.po_line_id), Abs(ple.draft_id) ) IN ( SELECT po_line_id, Decode(draft_id,-1,1,draft_id)
8928: FROM po_lines_merge_v
8929: WHERE po_header_id = p_po_header_id

Line 8926: DELETE FROM po_lines_all_ext_tl ple

8922: END IF;
8923:
8924: d_position := 10;
8925: --Delete extra PRICING attribute record from po_lines_all_ext_tl
8926: DELETE FROM po_lines_all_ext_tl ple
8927: where ( Abs(ple.po_line_id), Abs(ple.draft_id) ) IN ( SELECT po_line_id, Decode(draft_id,-1,1,draft_id)
8928: FROM po_lines_merge_v
8929: WHERE po_header_id = p_po_header_id
8930: AND draft_id = p_draft_id

Line 8948: PO_LOG.stmt(d_module,d_position ,'Deleted extra prcing uda records from po_lines_all_ext_tl');

8944: )
8945: AND ple.attr_group_id = ptu.attribute_group_id
8946: );
8947: IF (PO_LOG.d_stmt) THEN
8948: PO_LOG.stmt(d_module,d_position ,'Deleted extra prcing uda records from po_lines_all_ext_tl');
8949: PO_LOG.stmt(d_module,d_position ,'number of rows deleted ',SQL%ROWCOUNT);
8950: END IF;
8951:
8952: d_position := 20;

Line 9270: AND NOT EXISTS (SELECT 1 FROM po_lines_all pl

9266: AND NOT EXISTS (SELECT 1 FROM po_lines_draft_all PLD
9267: WHERE PLD.draft_id = ex.draft_id
9268: AND ex.exhibit_name = PLD.clm_exhibit_name
9269: AND NVL(PLD.delete_flag, 'N') <> 'Y')
9270: AND NOT EXISTS (SELECT 1 FROM po_lines_all pl
9271: WHERE pl.po_header_id = p_po_header_id
9272: AND ex.exhibit_name = pl.clm_exhibit_name
9273: AND NOT EXISTS (SELECT 1 FROM po_lines_draft_all pd
9274: WHERE pl.po_line_id = pd.po_line_id