[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
INSERT INTO PO_SESSION_GT
( key,
index_num1
)
VALUES
( p_key,
p_req_list(i)
);
INSERT INTO po_session_gt
( key
, index_num1
) VALUES
( l_key
, p_req_line_id_tbl(i)
);
DELETE FROM PO_SESSION_GT
WHERE key = p_key;
SELECT pool.requisition_line_id
BULK COLLECT INTO x_req_line_id_in_pool_tbl
FROM po_req_lines_in_pool_sec_v pool
WHERE pool.requisition_line_id IN ( SELECT selected.index_num1
FROM po_session_gt selected
WHERE selected.key = l_key
)
FOR UPDATE NOWAIT;
SELECT pool.requisition_line_id
BULK COLLECT INTO x_req_line_id_in_pool_tbl
FROM po_req_lines_in_pool_sec_v pool
WHERE pool.requisition_line_id IN ( SELECT selected.index_num1
FROM po_session_gt selected
WHERE selected.key = l_key
);
SELECT FND_API.G_TRUE
INTO l_crosslinked_option_exist
FROM dual
WHERE EXISTS(
SELECT 'Cross Linked Child Exists'
FROM po_requisition_lines_all base_line,
po_requisition_lines_all child_line
WHERE base_line.requisition_line_id = Nvl(child_line.clm_base_line_num,-1)
AND Nvl(base_line.group_line_id,-1) <> Nvl(child_line.group_line_id,-1)
AND child_line.group_line_id =p_req_line_id
);
Select FND_API.G_TRUE
INTO l_is_par_option_line_editable
from dual
where EXISTS
( select 1 from po_requisition_lines_all prla where requisition_line_id = p_req_line_id
and par_draft_id is not null
AND
((clm_base_line_num IS NULL AND group_line_id IS NULL ) OR
( clm_base_line_num IS NULL AND
EXISTS (select 1 from po_lines_draft_all plda where po_line_id = prla.clm_base_line_num and plda.draft_id = prla.par_draft_id
and plda.change_status = 'UPDATE'))));
During selection of dependent lines in Demand work bench.
For PAR requisitions, Lines with Clm_base_line_num or group_line_id
as 0 are not to be deemed as dependent, as this signifies that
it is a group line in the award and its parent is not available in
dwb. this value can be around multiple clin - slin structures
so they should not be considered for grouping.
*/
CURSOR C_lines(c_req_line_id po_requisition_lines_all.requisition_line_id%TYPE) IS
SELECT Nvl(( CASE
WHEN ( (clm_base_line_num = 0) AND par_line_id IS NOT NULL )THEN NULL
ELSE clm_base_line_num
END ), -1) clm_base_line_num
FROM po_requisition_lines_all
WHERE requisition_line_id IN (c_req_line_id,(SELECT group_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id = c_req_line_id))
OR group_line_id IN (c_req_line_id,(SELECT group_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id = c_req_line_id
AND ( par_line_id IS NULL OR
(par_line_id IS NOT NULL AND group_line_id <> 0) )));
SELECT requisition_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id IN (c_req_line_id,(SELECT group_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id = c_req_line_id))
OR group_line_id IN (c_req_line_id,(SELECT group_line_id
FROM po_requisition_lines_all
WHERE requisition_line_id = c_req_line_id
AND ( par_line_id IS NULL OR
(par_line_id IS NOT NULL AND group_line_id <> 0) )));