DBA Data[Home] [Help]

APPS.PO_DRAFTS_PVT dependencies on PO_SESSION_GT

Line 4073: DELETE FROM po_session_gt

4069: PO_LOG.proc_begin(d_module);
4070: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
4071: END IF;
4072: -- Clean up the gt table
4073: DELETE FROM po_session_gt
4074: WHERE index_char1 IN (G_CHANGED_ENTTIES_ID, G_LOCKS_REQUIRED_ID);
4075:
4076: -- Insert changed entities into gt table
4077: FORALL i IN 1..p_entity_name_tbl.COUNT

Line 4078: INSERT INTO po_session_gt(

4074: WHERE index_char1 IN (G_CHANGED_ENTTIES_ID, G_LOCKS_REQUIRED_ID);
4075:
4076: -- Insert changed entities into gt table
4077: FORALL i IN 1..p_entity_name_tbl.COUNT
4078: INSERT INTO po_session_gt(
4079: key,
4080: index_char1, -- records identifier
4081: index_char2, -- entity name
4082: char1, -- entity_pk1

Line 4088: po_session_gt_s.NEXTVAL,

4084: char3, -- entity_pk3
4085: char4 -- entity_pk4
4086: )
4087: VALUES(
4088: po_session_gt_s.NEXTVAL,
4089: G_CHANGED_ENTTIES_ID,
4090: p_entity_name_tbl(i),
4091: p_pk1_tbl(i),
4092: p_pk2_tbl(i),

Line 4199: INSERT INTO po_session_gt(

4195: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
4196: END IF;
4197:
4198: -- Insert Header level locks required into gt table
4199: INSERT INTO po_session_gt(
4200: key,
4201: index_char1, -- records identifier
4202: index_char2, -- entity_name
4203: char1, -- entity_pk1

Line 4207: SELECT po_session_gt_s.NEXTVAL,

4203: char1, -- entity_pk1
4204: num1, -- lock_by_draft_id
4205: char5 -- lock_type
4206: )
4207: SELECT po_session_gt_s.NEXTVAL,
4208: G_LOCKS_REQUIRED_ID,
4209: G_LOCK_HEADER_ENTITY,
4210: draft.po_header_id,
4211: draft.draft_id,

Line 4278: po_session_gt pogt

4274: NVL(poh.clm_contract_finance_code, G_NULL_CHAR),
4275: NVL(poh.clm_payment_instr_code, G_NULL_CHAR)
4276: ) p_lock_attrs
4277: FROM po_headers_all poh,
4278: po_session_gt pogt
4279: WHERE poh.po_header_id = pogt.char1 -- po_header_id
4280: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4281: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY
4282: ) base,

Line 4344: po_session_gt pogt

4340: NVL(pohd.clm_contract_finance_code, G_NULL_CHAR),
4341: NVL(pohd.clm_payment_instr_code, G_NULL_CHAR)
4342: ) p_lock_attrs
4343: FROM po_headers_draft_all pohd,
4344: po_session_gt pogt
4345: WHERE pohd.draft_id = p_draft_id
4346: AND pohd.po_header_id = pogt.char1 -- po_header_id
4347: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4348: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 4360: INSERT INTO po_session_gt(

4356: PO_LOG.stmt(d_module, d_position, 'Number of Records Inserted',SQL%ROWCOUNT);
4357: END IF;
4358:
4359: -- Identify Header level locks required because of change in po_ga_org_assignments
4360: INSERT INTO po_session_gt(
4361: key,
4362: index_char1, -- records identifier
4363: index_char2, -- entity_name
4364: char1, -- entity_pk1

Line 4368: SELECT po_session_gt_s.NEXTVAL,

4364: char1, -- entity_pk1
4365: num1, -- lock_by_draft_id
4366: char5 -- lock_type
4367: )
4368: SELECT po_session_gt_s.NEXTVAL,
4369: G_LOCKS_REQUIRED_ID,
4370: G_LOCK_HEADER_ENTITY,
4371: draft.po_header_id,
4372: draft.draft_id,

Line 4385: po_session_gt pogt

4381: NVL(pgoa.vendor_site_id ,G_NULL_NUM)
4382: ) p_lock_attrs,
4383: pgoa.org_assignment_id
4384: FROM po_ga_org_assignments pgoa,
4385: po_session_gt pogt
4386: WHERE pgoa.po_header_id = pogt.char1 -- po_header_id
4387: and pogt.index_char1 = G_CHANGED_ENTTIES_ID
4388: and pogt.index_char2 = G_LOCK_HEADER_ENTITY
4389: ) base,--done

Line 4398: po_session_gt pogt

4394: NVL(pgoad.vendor_site_id ,G_NULL_NUM)
4395: ) P_LOCK_ATTRS,
4396: pgoad.org_assignment_id
4397: FROM po_ga_org_assign_draft pgoad,
4398: po_session_gt pogt
4399: WHERE pgoad.draft_id = p_draft_id
4400: AND pgoad.po_header_id = pogt.char1 -- po_header_id
4401: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4402: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 4414: INSERT INTO po_session_gt(

4410: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
4411: END IF;
4412:
4413: -- Identify Header level locks required because of change in po_notification_controls
4414: INSERT INTO po_session_gt(
4415: key,
4416: index_char1, -- records identifier
4417: index_char2, -- entity_name
4418: char1, -- entity_pk1

Line 4422: SELECT po_session_gt_s.NEXTVAL,

4418: char1, -- entity_pk1
4419: num1, -- lock_by_draft_id
4420: char5 -- lock_type
4421: )
4422: SELECT po_session_gt_s.NEXTVAL,
4423: G_LOCKS_REQUIRED_ID,
4424: G_LOCK_HEADER_ENTITY,
4425: draft.po_header_id,
4426: draft.draft_id,

Line 4442: po_session_gt pogt

4438: NVL(pnc.end_date_active ,G_NULL_DATE)
4439: ) p_lock_attrs,
4440: pnc.notification_id
4441: FROM po_notification_controls pnc,
4442: po_session_gt pogt
4443: WHERE pnc.po_header_id = pogt.char1 -- po_header_id
4444: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4445: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY
4446: ) base,

Line 4458: po_session_gt pogt

4454: NVL(pncd.end_date_active ,G_NULL_DATE)
4455: ) p_lock_attrs,
4456: pncd.notification_id
4457: FROM po_notification_ctrl_draft pncd,
4458: po_session_gt pogt
4459: WHERE pncd.draft_id = p_draft_id
4460: AND pncd.po_header_id = pogt.char1 -- po_header_id
4461: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4462: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 4522: INSERT INTO po_session_gt(

4518: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
4519: END IF;
4520:
4521: -- Identify Line level locks required and insert into gt table
4522: INSERT INTO po_session_gt(
4523: key,
4524: index_char1, -- records identifier
4525: index_char2, -- entity_name
4526: char1, -- entity_pk1

Line 4530: SELECT po_session_gt_s.NEXTVAL,

4526: char1, -- entity_pk1
4527: num1, -- lock_by_draft_id
4528: char5 -- lock_type
4529: )
4530: SELECT po_session_gt_s.NEXTVAL,
4531: G_LOCKS_REQUIRED_ID,
4532: G_LOCK_LINE_ENTITY,
4533: draft.po_line_id,
4534: draft.draft_id,

Line 4621: po_session_gt pogt

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
4625: ) base,

Line 4706: po_session_gt pogt

4702: NVL(pold.from_line_id, G_NULL_NUM),
4703: NVL(pold.clm_idc_type, G_NULL_CHAR)
4704: ) f_lock_attrs
4705: FROM po_lines_draft_all pold,
4706: po_session_gt pogt
4707: WHERE pold.draft_id = p_draft_id
4708: AND pold.po_line_id = pogt.char1 -- po_line_id
4709: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4710: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4724: INSERT INTO po_session_gt(

4720: PO_LOG.stmt(d_module,d_position ,'number of rows Updated ',SQL%ROWCOUNT);
4721: END IF;
4722:
4723: -- Identify Line level locks required because of change in po_attribute_values
4724: INSERT INTO po_session_gt(
4725: key,
4726: index_char1, -- records identifier
4727: index_char2, -- entity_name
4728: char1, -- entity_pk1

Line 4732: SELECT po_session_gt_s.NEXTVAL,

4728: char1, -- entity_pk1
4729: num1, -- lock_by_draft_id
4730: char5 -- lock_type
4731: )
4732: SELECT po_session_gt_s.NEXTVAL,
4733: G_LOCKS_REQUIRED_ID,
4734: G_LOCK_LINE_ENTITY,
4735: draft.po_line_id,
4736: draft.draft_id,

Line 4756: po_session_gt pogt

4752: NVL(poav.availability ,G_NULL_CHAR)
4753: ) p_lock_attrs,
4754: poav.attribute_values_id
4755: FROM po_attribute_values poav,
4756: po_session_gt pogt
4757: WHERE poav.po_line_id = pogt.char1 -- po_line_id
4758: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4759: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
4760: ) base,

Line 4776: po_session_gt pogt

4772: NVL(poavd.availability ,G_NULL_CHAR)
4773: ) p_lock_attrs,
4774: poavd.attribute_values_id
4775: FROM po_attribute_values_draft poavd,
4776: po_session_gt pogt
4777: WHERE poavd.draft_id = p_draft_id
4778: AND poavd.po_line_id = pogt.char1 -- po_line_id
4779: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4780: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4792: INSERT INTO po_session_gt(

4788: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
4789: END IF;
4790:
4791: -- Identify Line level locks required because of change in po_attribute_values_tlp
4792: INSERT INTO po_session_gt(
4793: key,
4794: index_char1, -- records identifier
4795: index_char2, -- entity_name
4796: char1, -- entity_pk1

Line 4800: SELECT po_session_gt_s.NEXTVAL,

4796: char1, -- entity_pk1
4797: num1, -- lock_by_draft_id
4798: char5 -- lock_type
4799: )
4800: SELECT po_session_gt_s.NEXTVAL,
4801: G_LOCKS_REQUIRED_ID,
4802: G_LOCK_LINE_ENTITY,
4803: draft.po_line_id,
4804: draft.draft_id,

Line 4819: po_session_gt pogt

4815: NVL(poavt.comments ,G_NULL_CHAR)
4816: ) p_lock_attrs,
4817: poavt.attribute_values_tlp_id
4818: FROM po_attribute_values_tlp poavt,
4819: po_session_gt pogt
4820: WHERE poavt.po_line_id = pogt.char1 -- po_line_id
4821: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4822: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
4823: ) base,

Line 4834: po_session_gt pogt

4830: NVL(poavtd.comments ,G_NULL_CHAR)
4831: ) p_lock_attrs,
4832: poavtd.attribute_values_tlp_id
4833: FROM po_attribute_values_tlp_draft poavtd,
4834: po_session_gt pogt
4835: WHERE poavtd.draft_id = p_draft_id
4836: AND poavtd.po_line_id = pogt.char1 -- po_line_id
4837: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4838: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4849: INSERT INTO po_session_gt(

4845: PO_LOG.stmt_all_session_gt(d_module, d_position, G_LOCKS_REQUIRED_ID);
4846: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
4847: END IF;
4848: -- Identify Line level locks required because of change in price breaks
4849: INSERT INTO po_session_gt(
4850: key,
4851: index_char1, -- records identifier
4852: index_char2, -- entity_name
4853: char1, -- entity_pk1

Line 4857: SELECT po_session_gt_s.NEXTVAL,

4853: char1, -- entity_pk1
4854: num1, -- lock_by_draft_id
4855: char5 -- lock_type
4856: )
4857: SELECT po_session_gt_s.NEXTVAL,
4858: G_LOCKS_REQUIRED_ID,
4859: G_LOCK_LINE_ENTITY,
4860: draft.po_line_id,
4861: draft.draft_id,

Line 4880: po_session_gt pogt

4876: NVL(ppbr.end_date ,G_NULL_DATE)
4877: ) p_lock_attrs ,
4878: ppbr.line_location_id
4879: FROM po_line_locations_all ppbr,
4880: po_session_gt pogt
4881: WHERE ppbr.po_line_id = pogt.char1 -- po_header_id
4882: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4883: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
4884: AND ppbr.shipment_type = 'PRICE BREAK'

Line 4900: po_session_gt pogt

4896: NVL(ppbrd.end_date ,G_NULL_DATE)
4897: ) p_lock_attrs,
4898: ppbrd.line_location_id
4899: FROM po_line_locations_draft_all ppbrd,
4900: po_session_gt pogt
4901: WHERE ppbrd.draft_id = p_draft_id
4902: AND ppbrd.po_line_id = pogt.char1 -- po_line_id
4903: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4904: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4916: INSERT INTO po_session_gt(

4912: PO_LOG.stmt_all_session_gt(d_module, d_position, G_LOCKS_REQUIRED_ID);
4913: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
4914: END IF;
4915: -- Identify Line level locks required because of change in po_price_differentials
4916: INSERT INTO po_session_gt(
4917: key,
4918: index_char1, -- records identifier
4919: index_char2, -- entity_name
4920: char1, -- entity_pk1

Line 4924: SELECT po_session_gt_s.NEXTVAL,

4920: char1, -- entity_pk1
4921: num1, -- lock_by_draft_id
4922: char5 -- lock_type
4923: )
4924: SELECT po_session_gt_s.NEXTVAL,
4925: G_LOCKS_REQUIRED_ID,
4926: G_LOCK_LINE_ENTITY,
4927: draft.entity_id, -- po_lin
4928: draft.draft_id,

Line 4944: po_session_gt pogt

4940: NVL(ppd.max_multiplier ,G_NULL_NUM)
4941: ) p_lock_attrs,
4942: ppd.price_differential_id
4943: FROM po_price_differentials ppd,
4944: po_session_gt pogt
4945: WHERE ppd.entity_id = pogt.char1 -- po_line_id
4946: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4947: AND pogt.index_char2 = G_LOCK_LINE_ENTITY
4948: ) base,

Line 4960: po_session_gt pogt

4956: NVL(ppdr.max_multiplier ,G_NULL_NUM)
4957: ) p_lock_attrs,
4958: ppdr.price_differential_id
4959: FROM po_price_diff_draft ppdr,
4960: po_session_gt pogt
4961: WHERE ppdr.draft_id = p_draft_id
4962: AND ppdr.entity_id = pogt.char1 -- po_header_id
4963: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
4964: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 4977: INSERT INTO po_session_gt(

4973: END IF;
4974:
4975: -- if new shipment is added via Mod, then lock the line as S so that another
4976: -- Mod can not take a full lock on the line.
4977: INSERT INTO po_session_gt(
4978: key,
4979: index_char1, -- records identifier
4980: index_char2, -- entity_name
4981: char1, -- entity_pk1

Line 4985: SELECT po_session_gt_s.NEXTVAL,

4981: char1, -- entity_pk1
4982: num1, -- lock_by_draft_id
4983: char5 -- lock_type
4984: )
4985: SELECT po_session_gt_s.NEXTVAL,
4986: G_LOCKS_REQUIRED_ID,
4987: G_LOCK_LINE_ENTITY,
4988: pol.po_line_id,
4989: p_draft_id,

Line 5007: INSERT INTO po_session_gt(

5003: AND dft.draft_id = p_draft_id;
5004:
5005: -- if new distribution is added via Mod, then lock the line as S so that
5006: -- another Mod can not take a full lock on the line.
5007: INSERT INTO po_session_gt(
5008: key,
5009: index_char1, -- records identifier
5010: index_char2, -- entity_name
5011: char1, -- entity_pk1

Line 5015: SELECT po_session_gt_s.NEXTVAL,

5011: char1, -- entity_pk1
5012: num1, -- lock_by_draft_id
5013: char5 -- lock_type
5014: )
5015: SELECT po_session_gt_s.NEXTVAL,
5016: G_LOCKS_REQUIRED_ID,
5017: G_LOCK_LINE_ENTITY,
5018: pol.po_line_id,
5019: p_draft_id,

Line 5085: INSERT INTO po_session_gt(

5081: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
5082: END IF;
5083:
5084: -- Identify Shipment level locks required and insert into gt table
5085: INSERT INTO po_session_gt(
5086: key,
5087: index_char1, -- records identifier
5088: index_char2, -- entity_name
5089: char1, -- entity_pk1

Line 5093: SELECT po_session_gt_s.NEXTVAL,

5089: char1, -- entity_pk1
5090: num1, -- lock_by_draft_id
5091: char5 -- lock_type
5092: )
5093: SELECT po_session_gt_s.NEXTVAL,
5094: G_LOCKS_REQUIRED_ID,
5095: G_LOCK_SHIPMENT_ENTITY,
5096: draft.line_location_id,
5097: draft.draft_id,

Line 5164: po_session_gt pogt

5160: NVL(poll.unit_meas_lookup_code, G_NULL_CHAR),
5161: NVL(poll.transaction_flow_header_id ,G_NULL_NUM)
5162: ) f_lock_attrs
5163: FROM po_line_locations_all poll,
5164: po_session_gt pogt
5165: WHERE poll.line_location_id = pogt.char1 -- po_line_id
5166: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5167: AND pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY
5168: AND poll.shipment_type <> 'PRICE BREAK'

Line 5230: po_session_gt pogt

5226: NVL(polld.unit_meas_lookup_code, G_NULL_CHAR),
5227: NVL(polld.transaction_flow_header_id ,G_NULL_NUM)
5228: ) f_lock_attrs
5229: FROM po_line_locations_draft_all polld,
5230: po_session_gt pogt
5231: WHERE polld.draft_id = p_draft_id
5232: AND polld.line_location_id = pogt.char1 -- line_location_id
5233: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5234: AND pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 5253: INSERT INTO po_session_gt(

5249: -- Here we need to consider two cases:
5250: -- 1. When the line is changed in the currest request
5251: -- 2. When the line is changed in earlier request and already locked, and
5252: -- not changed in current request.
5253: INSERT INTO po_session_gt(
5254: key,
5255: index_char1, -- records identifier
5256: index_char2, -- entity_name
5257: char1, -- entity_pk1

Line 5261: SELECT po_session_gt_s.NEXTVAL,

5257: char1, -- entity_pk1
5258: num1, -- lock_by_draft_id
5259: char5 -- lock_type
5260: )
5261: SELECT po_session_gt_s.NEXTVAL,
5262: G_LOCKS_REQUIRED_ID,
5263: G_LOCK_SHIPMENT_ENTITY,
5264: poll.line_location_id,
5265: p_draft_id,

Line 5272: FROM po_session_gt pol_lcks

5268: po_drafts dft
5269: WHERE poll.po_header_id = dft.document_id
5270: AND dft.draft_id = p_draft_id
5271: AND (EXISTS (SELECT 'Line is modified in current txn and requires F lock'
5272: FROM po_session_gt pol_lcks
5273: WHERE pol_lcks.index_char1 = G_LOCKS_REQUIRED_ID
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

Line 5279: po_session_gt poll_ch

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
5283: AND poll_ch.index_char1 = G_CHANGED_ENTTIES_ID

Line 5287: FROM po_session_gt pol_ch

5283: AND poll_ch.index_char1 = G_CHANGED_ENTTIES_ID
5284: AND poll_ch.index_char2 = G_LOCK_SHIPMENT_ENTITY -- entity_name
5285: AND poll_ch.char1 = poll.line_location_id -- entity_pk1
5286: AND NOT EXISTS (SELECT 'Line modified in current txn'
5287: FROM po_session_gt pol_ch
5288: WHERE pol_ch.index_char1 = G_CHANGED_ENTTIES_ID
5289: AND pol_ch.index_char2 = G_LOCK_LINE_ENTITY -- entity_name
5290: AND pol_ch.char1 = poel.entity_pk1) -- entity_pk1
5291: )

Line 5351: INSERT INTO po_session_gt(

5347: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
5348: END IF;
5349:
5350: -- Identify Distribution level locks required and insert into gt table
5351: INSERT INTO po_session_gt(
5352: key,
5353: index_char1, -- records identifier
5354: index_char2, -- entity_name
5355: char1, -- entity_pk1

Line 5359: SELECT po_session_gt_s.NEXTVAL,

5355: char1, -- entity_pk1
5356: num1, -- lock_by_draft_id
5357: char5 -- lock_type
5358: )
5359: SELECT po_session_gt_s.NEXTVAL,
5360: G_LOCKS_REQUIRED_ID,
5361: G_LOCK_DIST_ENTITY,
5362: draft.po_distribution_id,
5363: draft.draft_id,

Line 5425: po_session_gt pogt

5421: NVL(pod.destination_type_code ,G_NULL_CHAR),
5422: NVL(pod.destination_subinventory ,G_NULL_CHAR)
5423: ) f_lock_attrs
5424: FROM po_distributions_all pod,
5425: po_session_gt pogt
5426: WHERE pod.po_distribution_id = pogt.char1 -- po_line_id
5427: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5428: AND pogt.index_char2 = G_LOCK_DIST_ENTITY
5429: ) base,

Line 5485: po_session_gt pogt

5481: NVL(podd.destination_type_code ,G_NULL_CHAR),
5482: NVL(podd.destination_subinventory ,G_NULL_CHAR)
5483: ) f_lock_attrs
5484: FROM po_distributions_draft_all podd,
5485: po_session_gt pogt
5486: WHERE podd.draft_id = p_draft_id
5487: AND podd.po_distribution_id = pogt.char1 -- po_distribution_id
5488: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5489: AND pogt.index_char2 = G_LOCK_DIST_ENTITY

Line 5511: INSERT INTO po_session_gt(

5507: -- not changed in current request.
5508: -- 3. When the shipment is changed in the currest request
5509: -- 4. When the shipment is changed in earlier request and already locked, and
5510: -- not changed in current request.
5511: INSERT INTO po_session_gt(
5512: key,
5513: index_char1, -- records identifier
5514: index_char2, -- entity_name
5515: char1, -- entity_pk1

Line 5519: SELECT po_session_gt_s.NEXTVAL,

5515: char1, -- entity_pk1
5516: num1, -- lock_by_draft_id
5517: char5 -- lock_type
5518: )
5519: SELECT po_session_gt_s.NEXTVAL,
5520: G_LOCKS_REQUIRED_ID,
5521: G_LOCK_DIST_ENTITY,
5522: pod.po_distribution_id,
5523: p_draft_id,

Line 5530: FROM po_session_gt pol_lcks

5526: po_drafts dft
5527: WHERE pod.po_header_id = dft.document_id
5528: AND dft.draft_id = p_draft_id
5529: AND (EXISTS (SELECT 'Line is modified in current txn and requires F lock'
5530: FROM po_session_gt pol_lcks
5531: WHERE pol_lcks.index_char1 = G_LOCKS_REQUIRED_ID
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

Line 5537: po_session_gt pod_ch

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
5541: AND pod_ch.index_char1 = G_CHANGED_ENTTIES_ID

Line 5545: FROM po_session_gt pol_ch

5541: AND pod_ch.index_char1 = G_CHANGED_ENTTIES_ID
5542: AND pod_ch.index_char2 = G_LOCK_DIST_ENTITY -- entity_name
5543: AND pod_ch.char1 = pod.po_distribution_id -- entity_pk1
5544: AND NOT EXISTS (SELECT 'Line modified in current txn'
5545: FROM po_session_gt pol_ch
5546: WHERE pol_ch.index_char1 = G_CHANGED_ENTTIES_ID
5547: AND pol_ch.index_char2 = G_LOCK_LINE_ENTITY -- entity_name
5548: AND pol_ch.char1 = poel.entity_pk1) -- entity_pk1
5549: )

Line 5551: FROM po_session_gt poll_lcks

5547: AND pol_ch.index_char2 = G_LOCK_LINE_ENTITY -- entity_name
5548: AND pol_ch.char1 = poel.entity_pk1) -- entity_pk1
5549: )
5550: OR EXISTS (SELECT 'shipment is modified in current txn and requires F lock'
5551: FROM po_session_gt poll_lcks
5552: WHERE poll_lcks.index_char1 = G_LOCKS_REQUIRED_ID
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

Line 5558: po_session_gt pod_ch

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
5562: AND pod_ch.index_char1 = G_CHANGED_ENTTIES_ID

Line 5566: FROM po_session_gt poll_ch

5562: AND pod_ch.index_char1 = G_CHANGED_ENTTIES_ID
5563: AND pod_ch.index_char2 = G_LOCK_DIST_ENTITY -- entity_name
5564: AND pod_ch.char1 = pod.po_distribution_id -- entity_pk1
5565: AND NOT EXISTS (SELECT 'Shipment modified in current txn'
5566: FROM po_session_gt poll_ch
5567: WHERE poll_ch.index_char1 = G_CHANGED_ENTTIES_ID
5568: AND poll_ch.index_char2 = G_LOCK_SHIPMENT_ENTITY -- entity_name
5569: AND poll_ch.char1 = poel.entity_pk1) -- entity_pk1
5570: )

Line 5630: INSERT INTO po_session_gt(

5626: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
5627: END IF;
5628:
5629: -- Identify Header level locks required because of change in po_headers_all_ext_b
5630: INSERT INTO po_session_gt(
5631: key,
5632: index_char1, -- records identifier
5633: index_char2, -- entity_name
5634: char1, -- entity_pk1

Line 5638: SELECT po_session_gt_s.NEXTVAL,

5634: char1, -- entity_pk1
5635: num1, -- lock_by_draft_id
5636: char5 -- lock_type
5637: )
5638: SELECT po_session_gt_s.NEXTVAL,
5639: G_LOCKS_REQUIRED_ID,
5640: G_LOCK_HEADER_ENTITY,
5641: draft.po_header_id,
5642: draft.draft_id,

Line 5743: po_session_gt pogt,

5739: NVL(phb.d_ext_attr10 ,G_NULL_DATE)
5740: ) p_lock_attrs,
5741: phb.attr_group_id
5742: FROM po_headers_all_ext_b phb,
5743: po_session_gt pogt,
5744: ego_fnd_dsc_flx_ctx_ext ag
5745: WHERE phb.po_header_id = pogt.char1 -- po_header_id
5746: AND phb.draft_id = G_DRAFT_ID_MINUS_1
5747: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 5848: po_session_gt pogt,

5844: NVL(phbd.d_ext_attr10 ,G_NULL_DATE)
5845: ) p_lock_attrs,
5846: phbd.attr_group_id
5847: FROM po_headers_all_ext_b phbd,
5848: po_session_gt pogt,
5849: ego_fnd_dsc_flx_ctx_ext ag
5850: WHERE phbd.draft_id = p_draft_id
5851: AND phbd.po_header_id = pogt.char1 -- po_header_id
5852: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID

Line 5877: INSERT INTO po_session_gt(

5873: -- for such attribute groups are not created in po_headers_all_ext_b.
5874: -- Now if user modifies such attribute groups in Mod, then a new record is
5875: -- created with the draft_id. We need to identify such records and lock the
5876: -- header as P lock.
5877: INSERT INTO po_session_gt(
5878: key,
5879: index_char1, -- records identifier
5880: index_char2, -- entity_name
5881: char1, -- entity_pk1

Line 5885: SELECT po_session_gt_s.NEXTVAL,

5881: char1, -- entity_pk1
5882: num1, -- lock_by_draft_id
5883: char5 -- lock_type
5884: )
5885: SELECT po_session_gt_s.NEXTVAL,
5886: G_LOCKS_REQUIRED_ID,
5887: G_LOCK_HEADER_ENTITY,
5888: phda.po_header_id,
5889: p_draft_id,

Line 5892: po_session_gt pogt

5888: phda.po_header_id,
5889: p_draft_id,
5890: 'P'
5891: FROM po_headers_draft_all phda,
5892: po_session_gt pogt
5893: WHERE phda.draft_id= p_draft_id
5894: AND phda.po_header_id = pogt.char1 -- po_header_id
5895: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5896: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 5931: INSERT INTO po_session_gt(

5927:
5928: -- Identify Header level locks required because of change in multi-row
5929: -- attribute groups in po_headers_all_ext_b.
5930: -- Ignore the addresses.
5931: INSERT INTO po_session_gt(
5932: key,
5933: index_char1, -- records identifier
5934: index_char2, -- entity_name
5935: char1, -- entity_pk1

Line 5939: SELECT po_session_gt_s.NEXTVAL,

5935: char1, -- entity_pk1
5936: num1, -- lock_by_draft_id
5937: char5 -- lock_type
5938: )
5939: SELECT po_session_gt_s.NEXTVAL,
5940: G_LOCKS_REQUIRED_ID,
5941: G_LOCK_HEADER_ENTITY,
5942: pohd.po_header_id,
5943: pohd.draft_id,

Line 5946: po_session_gt pogt

5942: pohd.po_header_id,
5943: pohd.draft_id,
5944: 'P'
5945: FROM po_headers_draft_all pohd,
5946: po_session_gt pogt
5947: WHERE pohd.draft_id = p_draft_id
5948: AND pohd.po_header_id = pogt.char1 -- po_header_id
5949: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
5950: AND pogt.index_char2 = G_LOCK_HEADER_ENTITY

Line 6356: INSERT INTO po_session_gt(

6352: PO_LOG.stmt(d_module,d_position ,'number of rows Updated ',SQL%ROWCOUNT);
6353: END IF;
6354:
6355: -- Identify Header level locks required because of change in po_headers_all_ext_tl
6356: INSERT INTO po_session_gt(
6357: key,
6358: index_char1, -- records identifier
6359: index_char2, -- entity_name
6360: char1, -- entity_pk1

Line 6364: SELECT po_session_gt_s.NEXTVAL,

6360: char1, -- entity_pk1
6361: num1, -- lock_by_draft_id
6362: char5 -- lock_type
6363: )
6364: SELECT po_session_gt_s.NEXTVAL,
6365: G_LOCKS_REQUIRED_ID,
6366: G_LOCK_HEADER_ENTITY,
6367: draft.po_header_id,
6368: draft.draft_id,

Line 6420: po_session_gt pogt

6416: ) p_lock_attrs,
6417: put.attr_group_id,
6418: put.language
6419: FROM po_headers_all_ext_tl put,
6420: po_session_gt pogt
6421: where put.po_header_id = pogt.char1 -- po_header_id
6422: AND put.draft_id =G_DRAFT_ID_MINUS_1
6423: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
6424: and pogt.index_char2 = g_lock_header_entity

Line 6473: po_session_gt pogt

6469: ) p_lock_attrs,
6470: putd.attr_group_id,
6471: putd.language
6472: FROM po_headers_all_ext_tl putd,
6473: po_session_gt pogt
6474: WHERE putd.draft_id = p_draft_id
6475: AND putd.po_header_id = pogt.char1 -- po_header_id
6476: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
6477: and pogt.index_char2 = g_lock_header_entity

Line 6489: INSERT INTO po_session_gt(

6485: PO_LOG.stmt(d_module,d_position ,'number of rows Updated ',SQL%ROWCOUNT);
6486: END IF;
6487:
6488: -- Identify UDA Addresses level locks required and insert into gt table
6489: INSERT INTO po_session_gt(
6490: key,
6491: index_char1, -- records identifier
6492: index_char2, -- entity_name
6493: char1, -- entity_pk1

Line 6498: SELECT po_session_gt_s.NEXTVAL,

6494: char2, -- entity_pk2
6495: num1, -- lock_by_draft_id
6496: char5 -- lock_type
6497: )
6498: SELECT po_session_gt_s.NEXTVAL,
6499: G_LOCKS_REQUIRED_ID,
6500: G_LOCK_ADDRESS_ENTITY,
6501: draft.po_header_id,
6502: draft.c_ext_attr39,

Line 6605: po_session_gt pogt

6601: ) P_LOCK_ATTRS,
6602: phb.attr_group_id,
6603: phb.c_ext_attr39
6604: FROM po_headers_all_ext_b phb,
6605: po_session_gt pogt
6606: WHERE phb.po_header_id = pogt.char1 -- po_header_id
6607: AND phb.draft_id = G_DRAFT_ID_MINUS_1
6608: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
6609: AND pogt.index_char2 = G_LOCK_ADDRESS_ENTITY

Line 6709: po_session_gt pogt

6705: ) p_lock_attrs,
6706: phbd.attr_group_id,
6707: phbd.c_ext_attr39
6708: FROM po_headers_all_ext_b phbd,
6709: po_session_gt pogt
6710: WHERE phbd.draft_id = p_draft_id
6711: AND phbd.po_header_id = pogt.char1 -- po_header_id
6712: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
6713: AND pogt.index_char2 = G_LOCK_ADDRESS_ENTITY

Line 6778: INSERT INTO po_session_gt(

6774: PO_LOG.proc_begin(d_module);
6775: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
6776: END IF;
6777:
6778: INSERT INTO po_session_gt(
6779: key,
6780: index_char1, -- records identifier
6781: index_char2, -- entity_name
6782: char1, -- entity_pk1

Line 6786: SELECT po_session_gt_s.NEXTVAL,

6782: char1, -- entity_pk1
6783: num1, -- lock_by_draft_id
6784: char5 -- lock_type
6785: )
6786: SELECT po_session_gt_s.NEXTVAL,
6787: G_LOCKS_REQUIRED_ID,
6788: G_LOCK_LINE_ENTITY,
6789: draft.po_line_id,
6790: draft.draft_id,

Line 6891: po_session_gt pogt

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
6895: and pogt.index_char2 = g_lock_line_entity

Line 7001: po_session_gt pogt

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
7005: AND pogt.index_char2 = G_LOCK_LINE_ENTITY

Line 7030: INSERT INTO po_session_gt(

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(
7031: key,
7032: index_char1, -- records identifier
7033: index_char2, -- entity_name
7034: char1, -- entity_pk1

Line 7038: SELECT po_session_gt_s.NEXTVAL,

7034: char1, -- entity_pk1
7035: num1, -- lock_by_draft_id
7036: char5 -- lock_type
7037: )
7038: SELECT po_session_gt_s.NEXTVAL,
7039: G_LOCKS_REQUIRED_ID,
7040: G_LOCK_LINE_ENTITY,
7041: plbd.po_line_id,
7042: p_draft_id,

Line 7045: po_session_gt pogt

7041: plbd.po_line_id,
7042: p_draft_id,
7043: 'P'
7044: FROM po_lines_draft_all plbd,
7045: po_session_gt pogt
7046: WHERE plbd.draft_id = p_draft_id
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

Line 7076: INSERT INTO po_session_gt(

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
7080: char1, -- entity_pk1

Line 7084: SELECT po_session_gt_s.NEXTVAL,

7080: char1, -- entity_pk1
7081: num1, -- lock_by_draft_id
7082: char5 -- lock_type
7083: )
7084: SELECT po_session_gt_s.NEXTVAL,
7085: G_LOCKS_REQUIRED_ID,
7086: G_LOCK_LINE_ENTITY,
7087: draft.po_line_id,
7088: draft.draft_id,

Line 7140: po_session_gt pogt

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
7144: and pogt.index_char2 = g_lock_header_entity

Line 7193: po_session_gt pogt

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
7197: and pogt.index_char2 = g_lock_header_entity

Line 7213: INSERT INTO po_session_gt(

7209: -- Identify Line level Complex Pricing Attribtues changes and corresponding
7210: -- lock required and insert into gt table
7211:
7212: -- Identify S type of locks required
7213: INSERT INTO po_session_gt(
7214: key,
7215: index_char1, -- records identifier
7216: index_char2, -- entity_name
7217: char1, -- entity_pk1

Line 7221: SELECT po_session_gt_s.NEXTVAL,

7217: char1, -- entity_pk1
7218: num1, -- lock_by_draft_id
7219: char5 -- lock_type
7220: )
7221: SELECT po_session_gt_s.NEXTVAL,
7222: G_LOCKS_REQUIRED_ID,
7223: G_LOCK_LINE_ENTITY,
7224: polext_base.po_line_id,
7225: polext_draft.draft_id,

Line 7229: po_session_gt pogt

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
7233: WHERE polext_base.po_line_id = pol.po_line_id

Line 7267: INSERT INTO po_session_gt(

7263: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
7264: END IF;
7265:
7266: -- Identify F type of locks required, i.e. if UOM or UNIT_PRICE have changed
7267: INSERT INTO po_session_gt(
7268: key,
7269: index_char1, -- records identifier
7270: index_char2, -- entity_name
7271: char1, -- entity_pk1

Line 7275: SELECT po_session_gt_s.NEXTVAL,

7271: char1, -- entity_pk1
7272: num1, -- lock_by_draft_id
7273: char5 -- lock_type
7274: )
7275: SELECT po_session_gt_s.NEXTVAL,
7276: G_LOCKS_REQUIRED_ID,
7277: G_LOCK_LINE_ENTITY,
7278: polext_base.po_line_id,
7279: polext_draft.draft_id,

Line 7283: po_session_gt pogt

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
7287: WHERE polext_base.po_line_id = pol.po_line_id

Line 7376: INSERT INTO po_session_gt(

7372: PO_LOG.proc_begin(d_module);
7373: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
7374: END IF;
7375: -- Identify Shipment level locks required because of change in po_line_locations_all_ext_b
7376: INSERT INTO po_session_gt(
7377: key,
7378: index_char1, -- records identifier
7379: index_char2, -- entity_name
7380: char1, -- entity_pk1

Line 7384: SELECT po_session_gt_s.NEXTVAL,

7380: char1, -- entity_pk1
7381: num1, -- lock_by_draft_id
7382: char5 -- lock_type
7383: )
7384: SELECT po_session_gt_s.NEXTVAL,
7385: G_LOCKS_REQUIRED_ID,
7386: G_LOCK_SHIPMENT_ENTITY,
7387: draft.line_location_id,
7388: draft.draft_id,

Line 7489: po_session_gt pogt

7485: NVL(pllb.d_ext_attr10 ,G_NULL_DATE)
7486: ) p_lock_attrs,
7487: pllb.attr_group_id
7488: FROM po_line_locations_all_ext_b pllb,
7489: po_session_gt pogt
7490: WHERE pllb.line_location_id = pogt.char1 -- po_header_id
7491: AND pllb.draft_id = G_DRAFT_ID_MINUS_1
7492: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7493: AND pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 7591: po_session_gt pogt

7587: NVL(pllbd.d_ext_attr10 ,G_NULL_DATE)
7588: ) p_lock_attrs,
7589: pllbd.attr_group_id
7590: FROM po_line_locations_all_ext_b pllbd,
7591: po_session_gt pogt
7592: WHERE pllbd.draft_id = p_draft_id
7593: AND pllbd.line_location_id = pogt.char1 -- line_location_id
7594: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7595: AND pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 7612: INSERT INTO po_session_gt(

7608: -- for such attribute groups are not created in po_line_locations_all_ext_b.
7609: -- Now if user modifies such attribute groups in Mod, then a new record is
7610: -- created with the draft_id. We need to identify such records and lock the
7611: -- shipment as P lock.
7612: INSERT INTO po_session_gt(
7613: key,
7614: index_char1, -- records identifier
7615: index_char2, -- entity_name
7616: char1, -- entity_pk1

Line 7620: SELECT po_session_gt_s.NEXTVAL,

7616: char1, -- entity_pk1
7617: num1, -- lock_by_draft_id
7618: char5 -- lock_type
7619: )
7620: SELECT po_session_gt_s.NEXTVAL,
7621: G_LOCKS_REQUIRED_ID,
7622: G_LOCK_SHIPMENT_ENTITY,
7623: pllbd.line_location_id,
7624: p_draft_id,

Line 7627: po_session_gt pogt

7623: pllbd.line_location_id,
7624: p_draft_id,
7625: 'P'
7626: FROM po_line_locations_draft_all pllbd,
7627: po_session_gt pogt
7628: WHERE pllbd.draft_id = p_draft_id
7629: AND pllbd.line_location_id = pogt.char1 -- line_location_id
7630: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7631: AND pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 7649: INSERT INTO po_session_gt(

7645: PO_LOG.stmt(d_module,d_position ,'number of rows Inserted ',SQL%ROWCOUNT);
7646: END IF;
7647:
7648: -- Identify Shipment level locks required because of change in po_line_locations_all_ext_tl
7649: INSERT INTO po_session_gt(
7650: key,
7651: index_char1, -- records identifier
7652: index_char2, -- entity_name
7653: char1, -- entity_pk1

Line 7657: SELECT po_session_gt_s.NEXTVAL,

7653: char1, -- entity_pk1
7654: num1, -- lock_by_draft_id
7655: char5 -- lock_type
7656: )
7657: SELECT po_session_gt_s.NEXTVAL,
7658: G_LOCKS_REQUIRED_ID,
7659: G_LOCK_SHIPMENT_ENTITY,
7660: draft.line_location_id,
7661: draft.draft_id,

Line 7713: po_session_gt pogt

7709: ) p_lock_attrs,
7710: pllt.attr_group_id,
7711: pllt.language
7712: FROM po_line_locations_all_ext_tl pllt,
7713: po_session_gt pogt
7714: where pllt.line_location_id = pogt.char1 -- line_location_id
7715: AND pllt.draft_id = G_DRAFT_ID_MINUS_1
7716: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7717: and pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 7766: po_session_gt pogt

7762: ) p_lock_attrs,
7763: plltd.attr_group_id,
7764: plltd.language
7765: FROM po_line_locations_all_ext_tl plltd,
7766: po_session_gt pogt
7767: WHERE plltd.draft_id = p_draft_id
7768: AND plltd.line_location_id = pogt.char1 -- po_header_id
7769: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
7770: and pogt.index_char2 = G_LOCK_SHIPMENT_ENTITY

Line 7838: FROM po_session_gt pogt

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
7839: WHERE pogt.index_char1 = G_LOCKS_REQUIRED_ID
7840: AND pogt.index_char2 = poel.entity_name
7841: AND pogt.num1 = poel.lock_by_draft_id
7842: AND pogt.char1 = poel.entity_pk1

Line 7849: FROM po_session_gt pogt

7845: AND NVL(pogt.char4, G_NULL_CHAR) = NVL(poel.entity_pk4, G_NULL_CHAR)
7846: )
7847: AND EXISTS
7848: (SELECT 'Entity changed in current transaction'
7849: FROM po_session_gt pogt
7850: WHERE pogt.index_char1 = G_CHANGED_ENTTIES_ID
7851: AND pogt.index_char2 = poel.entity_name
7852: AND pogt.char1 = poel.entity_pk1
7853: AND NVL(pogt.char2, G_NULL_CHAR) = NVL(poel.entity_pk2, G_NULL_CHAR)

Line 7877: FROM po_session_gt pogt

7873: WHEN 'S' THEN '1-S'
7874: ELSE NULL
7875: END),
7876: 3) lock_type
7877: FROM po_session_gt pogt
7878: WHERE pogt.index_char1 = G_LOCKS_REQUIRED_ID
7879: GROUP BY pogt.index_char2, -- entity_name
7880: pogt.char1, -- entity_pk1
7881: pogt.char2, -- entity_pk2

Line 9496: INSERT INTO po_session_gt(

9492: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
9493: END IF;
9494:
9495: -- Insert Exhibit level locks required into gt table
9496: INSERT INTO po_session_gt(
9497: key,
9498: index_char1, -- records identifier
9499: index_char2, -- entity_name
9500: char1, -- entity_pk1

Line 9504: SELECT po_session_gt_s.NEXTVAL,

9500: char1, -- entity_pk1
9501: num1, -- lock_by_draft_id
9502: char5 -- lock_type
9503: )
9504: SELECT po_session_gt_s.NEXTVAL,
9505: G_LOCKS_REQUIRED_ID,
9506: G_LOCK_EXHIBIT_ENTITY,
9507: draft.po_exhibit_details_id, -- po_exhibit_details_id
9508: draft.draft_id,

Line 9520: po_session_gt pogt

9516: NVL(pex.exhibit_description ,G_NULL_CHAR),
9517: NVL(pex.reference_line_id ,G_NULL_NUM)
9518: ) p_lock_attrs
9519: FROM po_exhibit_details pex,
9520: po_session_gt pogt
9521: WHERE pex.po_exhibit_details_id = pogt.char1 -- po_exhibit_details_id
9522: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
9523: AND pogt.index_char2 = G_LOCK_EXHIBIT_ENTITY
9524: ) base,

Line 9532: po_session_gt pogt

9528: NVL(pexd.exhibit_description ,G_NULL_CHAR),
9529: NVL(pexd.reference_line_id ,G_NULL_NUM)
9530: ) p_lock_attrs
9531: FROM po_exhibit_details_draft pexd,
9532: po_session_gt pogt
9533: WHERE pexd.draft_id = p_draft_id
9534: AND pexd.po_exhibit_details_id = pogt.char1 -- po_exhibit_details_id
9535: AND pogt.index_char1 = G_CHANGED_ENTTIES_ID
9536: AND pogt.index_char2 = G_LOCK_EXHIBIT_ENTITY