DBA Data[Home] [Help]

APPS.PO_AUTOCREATE_GROUPING_PVT dependencies on PO_SESSION_GT

Line 477: FROM po_session_gt

473: c_po_line_num IN varchar2,
474: c_current_req_line_id IN NUMBER
475: ) IS
476: SELECT index_num1 -- requisition line ID
477: FROM po_session_gt
478: WHERE key = c_key
479: AND index_num2 = c_po_line_num
480: AND index_num1 <> c_current_req_line_id;
481: BEGIN

Line 513: INSERT INTO po_session_gt(

509: l_key := PO_CORE_S.get_session_gt_nextval;
510:
511: -- Insert req line ID and PO line num of all lines into temp table.
512: FORALL i IN 1..l_num_lines
513: INSERT INTO po_session_gt(
514: key, -- unique key
515: index_num1, -- req line ID
516: index_num2 -- PO line num
517: )

Line 547: FROM po_session_gt POSGT2

543: WHERE EXISTS(
544: -- Select all doc builder requisition lines that have the same PO line
545: -- number as the current line in the loop.
546: SELECT 'doc builder lines with same PO line number'
547: FROM po_session_gt POSGT2
548: WHERE POSGT2.index_num1 <> POSGT.index_num1 -- Not the current line
549: AND POSGT2.index_num2 = POSGT.index_num2 -- Same PO line number
550: )
551: OR EXISTS(

Line 562: FROM po_session_gt POSGT

558: )),
559: 'N' -- NVL to 'N' if no other req/PO lines with same PO line number
560: )
561: BULK COLLECT INTO l_line_combined_flag_tbl
562: FROM po_session_gt POSGT
563: WHERE key = l_key;
564: END IF;
565:
566: FOR i IN 1..l_num_lines -- Loop through all doc builder req lines

Line 673: DELETE FROM po_session_gt

669: END IF; -- If there is a mismatch, set error message
670: END LOOP; -- Loop through all doc builder req lines
671:
672: -- Clean up temp table
673: DELETE FROM po_session_gt
674: WHERE key = l_key;
675:
676: IF (PO_LOG.d_proc) THEN
677: PO_LOG.proc_end(d_mod, 'x_message_code_tbl', x_message_code_tbl);

Line 685: DELETE FROM po_session_gt

681:
682: EXCEPTION
683: WHEN OTHERS THEN
684: -- Clean up temp table
685: DELETE FROM po_session_gt
686: WHERE key = l_key;
687:
688: -- Close cursor if open
689: IF (req_line_ids_csr%ISOPEN)

Line 4186: INSERT INTO po_session_gt

4182: -- Bulk insert matching lines into GT table.
4183: --
4184: FORALL i IN p_start_index..p_end_index
4185:
4186: INSERT INTO po_session_gt
4187: ( key
4188: , num1
4189: , num2
4190: )

Line 4252: DELETE FROM po_session_gt

4248: d_position := 30;
4249:
4250: -- Clean up GT table and return the results into the output tables.
4251: --
4252: DELETE FROM po_session_gt
4253: WHERE key = l_key
4254: RETURNING num1, num2
4255: BULK COLLECT INTO x_req_line_id_tbl, x_po_line_num_tbl;
4256:

Line 4337: INSERT INTO po_session_gt

4333: -- Bulk insert matching lines into GT table.
4334: --
4335: FORALL i IN p_start_index..p_end_index
4336:
4337: INSERT INTO po_session_gt
4338: ( key
4339: , num1
4340: , num2
4341: , char1

Line 4406: DELETE FROM po_session_gt

4402:
4403: -- Clean up GT table and return the results into the output tables.
4404: --
4405:
4406: DELETE FROM po_session_gt
4407: WHERE key = l_key
4408: RETURNING num1, num2, char1
4409: BULK COLLECT INTO x_req_line_id_tbl, x_po_line_num_tbl, x_po_line_num_disp_tbl;
4410:

Line 5459: select PO_SESSION_GT_S.nextval into l_session_key from dual;

5455:
5456:
5457: p_po_line_num_disp_tbl.extend(l_end_index - l_start_index + 1);
5458: -- get the session key
5459: select PO_SESSION_GT_S.nextval into l_session_key from dual;
5460:
5461: -- get the action whether the line is being added(match case) or new line
5462: l_action_tbl := PO_AUTOCREATE_GROUPING_PVT.get_line_action_tbl(p_po_line_num_tbl,
5463: p_add_to_po_header_id,

Line 5499: insert into po_session_gt (key, num1, num2, num3, char1, char2, char3, char5, index_num1)

5495: END IF;
5496: END LOOP;
5497:
5498: FOR i IN l_start_index..l_end_index LOOP
5499: insert into po_session_gt (key, num1, num2, num3, char1, char2, char3, char5, index_num1)
5500: values ( l_session_key,
5501: p_source_line_id_tbl(i)
5502: , p_source_group_line_id_tbl(i)
5503: , p_po_line_num_tbl(i)

Line 5514: insert into po_session_gt (key, num1, num2, num3, char1, char2, char3, char5, index_num1)

5510: END LOOP;
5511:
5512: ELSE
5513: FOR i in l_start_index..l_end_index loop
5514: insert into po_session_gt (key, num1, num2, num3, char1, char2, char3, char5, index_num1)
5515: values ( l_session_key,
5516: p_source_line_id_tbl(i)
5517: , p_source_group_line_id_tbl(i)
5518: , p_po_line_num_tbl(i)

Line 5533: UPDATE po_session_gt

5529: -- this is for add case
5530: if p_add_to_po_header_id is not null THEN
5531:
5532: --Setting the po_line_id of the clins where action is 'ADD'
5533: UPDATE po_session_gt
5534: SET num4 = (select po_line_id
5535: FROM PO_LINES_MERGE_V
5536: where PO_HEADER_ID = p_add_to_po_header_id
5537: AND LINE_NUM_DISPLAY = char1

Line 5545: update po_session_gt

5541: and char3 = 'Y' -- renumber flag
5542: and index_num1 between l_start_index and l_end_index
5543: and key = l_session_key;
5544:
5545: update po_session_gt
5546: set
5547: char4 = PO_LINES_DRAFT_PVT.get_next_slin_num(num4, --po_line_id
5548: NULL,
5549: char1,--line_num_display

Line 5566: update po_session_gt

5562: and key = l_session_key;
5563: end if;
5564:
5565: -- for new cases
5566: update po_session_gt
5567: set char4 = char1 || '01',
5568: char6 = char1 || 'AA'
5569: where num2 is null -- group line id
5570: and char2 = 'NEW' -- action

Line 5584: from po_session_gt

5580: index and assign next info slin
5581: */
5582:
5583: for po_line_num in (select distinct num3, char4, char6 -- char4 is the next slin number, previous logic ensure that a given value of num3 will have same char4
5584: from po_session_gt
5585: where key = l_session_key
5586: and char3 = 'Y' -- renumber flag
5587: and index_num1 between l_start_index and l_end_index
5588: --and char5 = 'N' --priced

Line 5595: for rec in (select slins.num1, slins.char5 from po_session_gt clins, po_session_gt slins

5591: loop
5592: l_next_info_slin_num := po_line_num.char4;
5593: l_next_priced_slin_num := po_line_num.char6;
5594: -- loop through the list of slins pointing to clins with the same line number
5595: for rec in (select slins.num1, slins.char5 from po_session_gt clins, po_session_gt slins
5596: where clins.key = l_session_key
5597: and slins.key = l_session_key
5598: AND clins.num3 = po_line_num.num3 -- po line number
5599: and slins.num2 = clins.num1 -- slins.group line id = clins.line id

Line 5612: update po_session_gt

5608: l_next_slin_num := l_next_priced_slin_num;
5609: l_next_priced_slin_num := pon_clo_renumber_pkg.INCREMENT_PRICED_SLIN_NUMBER(l_next_priced_slin_num);
5610: END IF;
5611:
5612: update po_session_gt
5613: set char1 = l_next_slin_num
5614: where key = l_session_key
5615: and num1 = rec.num1;
5616:

Line 5624: from po_session_gt

5620:
5621: -- now select back in order
5622: select char1
5623: bulk collect into p_po_line_num_disp_tbl
5624: from po_session_gt
5625: where key = l_session_key
5626: order by index_num1; -- order is important
5627:
5628: IF PO_LOG.d_proc THEN