DBA Data[Home] [Help]

APPS.PO_HEADERS_PKG_S0 dependencies on PO_HEADERS

Line 1: PACKAGE BODY PO_HEADERS_PKG_S0 as

1: PACKAGE BODY PO_HEADERS_PKG_S0 as
2: /* $Header: POXP1PHB.pls 120.13 2011/10/12 12:11:54 sprao ship $ */
3:
4: /*===========================================================================
5:

Line 136: CURSOR C IS SELECT rowid FROM PO_HEADERS

132: p_enable_all_sites IN Varchar2, --
133: p_style_id IN VARCHAR2 DEFAULT NULL, -- bug 10017321
134: p_umbrella_program_id IN NUMBER DEFAULT NULL --umbrella program
135: ) IS
136: CURSOR C IS SELECT rowid FROM PO_HEADERS
137: WHERE po_header_id = X_Po_Header_Id;
138:
139: CURSOR C2 IS SELECT po_headers_s.nextval FROM sys.dual;
140:

Line 139: CURSOR C2 IS SELECT po_headers_s.nextval FROM sys.dual;

135: ) IS
136: CURSOR C IS SELECT rowid FROM PO_HEADERS
137: WHERE po_header_id = X_Po_Header_Id;
138:
139: CURSOR C2 IS SELECT po_headers_s.nextval FROM sys.dual;
140:
141: /* Ben: bug#465696 Locking the po_unique_identifier_control table at this
142: point of the form commit cycle is causing the performance problem.
143: It may take 5 to 10 seconds to commit a PO with many lines, shipments

Line 159: 'RFQ', 'PO_HEADERS_RFQ',

155: CURSOR C3 IS SELECT to_char(current_max_unique_identifier + 1)
156: FROM po_unique_identifier_control
157: WHERE table_name =
158: decode(x_type_lookup_code,
159: 'RFQ', 'PO_HEADERS_RFQ',
160: 'QUOTATION','PO_HEADERS_QUOTE',
161: 'PO_HEADERS')
162: FOR UPDATE OF current_max_unique_identifier;
163: */

Line 160: 'QUOTATION','PO_HEADERS_QUOTE',

156: FROM po_unique_identifier_control
157: WHERE table_name =
158: decode(x_type_lookup_code,
159: 'RFQ', 'PO_HEADERS_RFQ',
160: 'QUOTATION','PO_HEADERS_QUOTE',
161: 'PO_HEADERS')
162: FOR UPDATE OF current_max_unique_identifier;
163: */
164:

Line 161: 'PO_HEADERS')

157: WHERE table_name =
158: decode(x_type_lookup_code,
159: 'RFQ', 'PO_HEADERS_RFQ',
160: 'QUOTATION','PO_HEADERS_QUOTE',
161: 'PO_HEADERS')
162: FOR UPDATE OF current_max_unique_identifier;
163: */
164:
165: x_progress VARCHAR2(3) := NULL;

Line 167: l_document_creation_method po_headers_all.document_creation_method%type := NULL ; --

163: */
164:
165: x_progress VARCHAR2(3) := NULL;
166:
167: l_document_creation_method po_headers_all.document_creation_method%type := NULL ; --
168:
169: l_style_id PO_DOC_STYLE_HEADERS.style_id%type; --
170:
171: BEGIN

Line 222: INSERT INTO PO_HEADERS (

218: end if;
219:
220: --bug 12593680 : Populating segment1 to clm_document_number when document numbering is set to manual.
221: -- dbms_output.put_line('insert sql');
222: INSERT INTO PO_HEADERS (
223: po_header_id,
224: agent_id,
225: type_lookup_code,
226: last_update_date,

Line 516: during the ON-INSERT trigger on the PO_HEADERS,

512: It may take 5 to 10 seconds to commit a PO with many lines, shipments
513: and distributions.
514: The solution is to insert a bogus value into the SEGMENT1 column
515: of po_requisition_headers ( the negative of po_header_id)
516: during the ON-INSERT trigger on the PO_HEADERS,
517: then at the end of the commit cycle, i.e. the POST_FORMS-COMMIT
518: trigger on the form, update the po_headers table with
519: the real SEGMENT1 value from the po_unique_identifier_control table.
520: The advantage of this approach is that the

Line 518: trigger on the form, update the po_headers table with

514: The solution is to insert a bogus value into the SEGMENT1 column
515: of po_requisition_headers ( the negative of po_header_id)
516: during the ON-INSERT trigger on the PO_HEADERS,
517: then at the end of the commit cycle, i.e. the POST_FORMS-COMMIT
518: trigger on the form, update the po_headers table with
519: the real SEGMENT1 value from the po_unique_identifier_control table.
520: The advantage of this approach is that the
521: po_unique_identifier_control will be locked for only a short period
522: of time.

Line 540: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';

536: -- bug5176308 START
537: -- Call API to get the po number
538:
539: IF (x_type_lookup_code = 'RFQ') THEN
540: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
541: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
542: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
543: ELSE
544: l_unique_id_tbl_name := 'PO_HEADERS';

Line 542: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';

538:
539: IF (x_type_lookup_code = 'RFQ') THEN
540: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
541: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
542: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
543: ELSE
544: l_unique_id_tbl_name := 'PO_HEADERS';
545: END IF;
546:

Line 544: l_unique_id_tbl_name := 'PO_HEADERS';

540: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
541: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
542: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
543: ELSE
544: l_unique_id_tbl_name := 'PO_HEADERS';
545: END IF;
546:
547: x_segment1 :=
548: PO_CORE_SV1.default_po_unique_identifier

Line 554: UPDATE po_headers set segment1=x_segment1

550: );
551:
552: -- bug5176308 END
553:
554: UPDATE po_headers set segment1=x_segment1
555: ,clm_document_number = x_segment1
556: where po_header_id=x_po_header_id;
557:
558: /* bug# 465696 8/5/97. The previous fix to this performance problem introduced

Line 563: Therefore, removed the call below from po_headers_sv1.insert_row and moved

559: a problem with the notifications (the bogus value used temporarily as the
560: document number was being inserted into the fnd_notifications table, since
561: the call below was made before we called the procedure to get the real
562: document number (segment1) .
563: Therefore, removed the call below from po_headers_sv1.insert_row and moved
564: it to here.
565: */
566:
567: if (x_type_lookup_code not in ('RFQ', 'QUOTATION')) then

Line 616: END PO_HEADERS_PKG_S0;

612:
613: END get_real_segment1;
614:
615:
616: END PO_HEADERS_PKG_S0;