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.9 2007/12/18 14:31:34 ggandhi ship $ */
3:
4: /*===========================================================================
5:

Line 134: CURSOR C IS SELECT rowid FROM PO_HEADERS

130: p_encumbrance_required_flag IN VARCHAR2 DEFAULT NULL, --
131: p_org_id IN NUMBER DEFAULT NULL , --
132: p_enable_all_sites IN Varchar2 --
133: ) IS
134: CURSOR C IS SELECT rowid FROM PO_HEADERS
135: WHERE po_header_id = X_Po_Header_Id;
136:
137: CURSOR C2 IS SELECT po_headers_s.nextval FROM sys.dual;
138:

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

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

Line 157: 'RFQ', 'PO_HEADERS_RFQ',

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

Line 158: 'QUOTATION','PO_HEADERS_QUOTE',

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

Line 159: 'PO_HEADERS')

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

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

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

Line 211: INSERT INTO PO_HEADERS (

207: END IF;
208:
209: l_style_id := PO_DOC_STYLE_GRP.GET_STANDARD_DOC_STYLE; --
210: -- dbms_output.put_line('insert sql');
211: INSERT INTO PO_HEADERS (
212: po_header_id,
213: agent_id,
214: type_lookup_code,
215: last_update_date,

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

497: It may take 5 to 10 seconds to commit a PO with many lines, shipments
498: and distributions.
499: The solution is to insert a bogus value into the SEGMENT1 column
500: of po_requisition_headers ( the negative of po_header_id)
501: during the ON-INSERT trigger on the PO_HEADERS,
502: then at the end of the commit cycle, i.e. the POST_FORMS-COMMIT
503: trigger on the form, update the po_headers table with
504: the real SEGMENT1 value from the po_unique_identifier_control table.
505: The advantage of this approach is that the

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

499: The solution is to insert a bogus value into the SEGMENT1 column
500: of po_requisition_headers ( the negative of po_header_id)
501: during the ON-INSERT trigger on the PO_HEADERS,
502: then at the end of the commit cycle, i.e. the POST_FORMS-COMMIT
503: trigger on the form, update the po_headers table with
504: the real SEGMENT1 value from the po_unique_identifier_control table.
505: The advantage of this approach is that the
506: po_unique_identifier_control will be locked for only a short period
507: of time.

Line 525: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';

521: -- bug5176308 START
522: -- Call API to get the po number
523:
524: IF (x_type_lookup_code = 'RFQ') THEN
525: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
526: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
527: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
528: ELSE
529: l_unique_id_tbl_name := 'PO_HEADERS';

Line 527: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';

523:
524: IF (x_type_lookup_code = 'RFQ') THEN
525: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
526: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
527: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
528: ELSE
529: l_unique_id_tbl_name := 'PO_HEADERS';
530: END IF;
531:

Line 529: l_unique_id_tbl_name := 'PO_HEADERS';

525: l_unique_id_tbl_name := 'PO_HEADERS_RFQ';
526: ELSIF (x_type_lookup_code = 'QUOTATION') THEN
527: l_unique_id_tbl_name := 'PO_HEADERS_QUOTE';
528: ELSE
529: l_unique_id_tbl_name := 'PO_HEADERS';
530: END IF;
531:
532: x_segment1 :=
533: PO_CORE_SV1.default_po_unique_identifier

Line 539: UPDATE po_headers set segment1=x_segment1

535: );
536:
537: -- bug5176308 END
538:
539: UPDATE po_headers set segment1=x_segment1
540: where po_header_id=x_po_header_id;
541:
542: /* bug# 465696 8/5/97. The previous fix to this performance problem introduced
543: a problem with the notifications (the bogus value used temporarily as the

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

543: a problem with the notifications (the bogus value used temporarily as the
544: document number was being inserted into the fnd_notifications table, since
545: the call below was made before we called the procedure to get the real
546: document number (segment1) .
547: Therefore, removed the call below from po_headers_sv1.insert_row and moved
548: it to here.
549: */
550:
551: if (x_type_lookup_code not in ('RFQ', 'QUOTATION')) then

Line 600: END PO_HEADERS_PKG_S0;

596:
597: END get_real_segment1;
598:
599:
600: END PO_HEADERS_PKG_S0;