[Home] [Help]
PACKAGE: APPS.PO_AUTOCREATE_PARAMS
Source
1 PACKAGE po_autocreate_params AUTHID CURRENT_USER AS
2 /* $Header: PO_AUTOCREATE_PARAMS.pls 120.6 2012/01/17 12:40:56 sprao ship $ */
3
4
5 -- Record type to store system parameters
6 TYPE sys_param_rec_type IS RECORD
7 ( currency_code GL_SETS_OF_BOOKS.currency_code%TYPE,
8 coa_id GL_SETS_OF_BOOKS.chart_of_accounts_id%TYPE,
9 po_encumbrance_flag FINANCIALS_SYSTEM_PARAMETERS.purch_encumbrance_flag%TYPE,
10 req_encumbrance_flag FINANCIALS_SYSTEM_PARAMETERS.req_encumbrance_flag%TYPE,
11 sob_id FINANCIALS_SYSTEM_PARAMETERS.set_of_books_id%TYPE,
12 ship_to_location_id FINANCIALS_SYSTEM_PARAMETERS.ship_to_location_id%TYPE,
13 bill_to_location_id FINANCIALS_SYSTEM_PARAMETERS.bill_to_location_id%TYPE,
14 fob_lookup_code FINANCIALS_SYSTEM_PARAMETERS.fob_lookup_code%TYPE,
15 freight_terms_lookup_code FINANCIALS_SYSTEM_PARAMETERS.freight_terms_lookup_code%TYPE,
16 terms_id FINANCIALS_SYSTEM_PARAMETERS.terms_id%TYPE,
17 default_rate_type PO_SYSTEM_PARAMETERS.default_rate_type%TYPE,
18 taxable_flag PO_SYSTEM_PARAMETERS.taxable_flag%TYPE,
19 receiving_flag PO_SYSTEM_PARAMETERS.receiving_flag%TYPE,
20 enforce_buyer_name_flag varchar2(1),
21 enforce_buyer_auth_flag varchar2(1),
22 line_type_id PO_SYSTEM_PARAMETERS.line_type_id%TYPE,
23 manual_po_num_type PO_SYSTEM_PARAMETERS.manual_po_num_type%TYPE,
24 user_defined_po_num_code PO_SYSTEM_PARAMETERS.user_defined_po_num_code%TYPE,
25 price_type_lookup_code PO_SYSTEM_PARAMETERS.price_type_lookup_code%TYPE,
26 def_inv_org_id FINANCIALS_SYSTEM_PARAMETERS.inventory_organization_id%TYPE,
27 rev_sort_ordering NUMBER ,
28 min_rel_amount PO_SYSTEM_PARAMETERS.min_release_amount%TYPE,
29 notify_blanket_flag varchar2(1),
30 def_quote_warning_delay PO_SYSTEM_PARAMETERS.default_quote_warning_delay%TYPE,
31 inspection_required_flag PO_SYSTEM_PARAMETERS.inspection_required_flag%TYPE,
32 user_defined_quote_num_code PO_SYSTEM_PARAMETERS.user_defined_quote_num_code%TYPE,
33 manual_quote_num_type PO_SYSTEM_PARAMETERS.manual_quote_num_type%TYPE,
34 ship_via_lookup_code FINANCIALS_SYSTEM_PARAMETERS.ship_via_lookup_code%TYPE,
35 qty_rcv_tolerance RCV_PARAMETERS.qty_rcv_tolerance%TYPE,
36 price_break_lookup_code PO_SYSTEM_PARAMETERS.price_break_lookup_code%TYPE,
37 invoice_close_tolerance PO_SYSTEM_PARAMETERS.invoice_close_tolerance%TYPE,
38 receive_close_tolerance PO_SYSTEM_PARAMETERS.receive_close_tolerance%TYPE,
39 security_structure_id number,
40 expense_accrual_code PO_SYSTEM_PARAMETERS.expense_accrual_code%TYPE,
41 master_inv_org_id MTL_PARAMETERS.organization_id%TYPE,
42 enforce_ship_to_loc RCV_PARAMETERS.enforce_ship_to_location_code%TYPE,
43 allow_substitutes RCV_PARAMETERS.allow_substitute_receipts_flag%TYPE,
44 routing_id RCV_PARAMETERS.receiving_routing_id%TYPE,
45 qty_rcv_exception RCV_PARAMETERS.qty_rcv_exception_code%TYPE,
46 days_early_receipt RCV_PARAMETERS.days_early_receipt_allowed%TYPE,
47 days_late_receipt RCV_PARAMETERS.days_late_receipt_allowed%TYPE,
48 rcv_days_exception RCV_PARAMETERS.receipt_days_exception_code%TYPE,
49 supplier_auth_acc PO_SYSTEM_PARAMETERS.supplier_authoring_acceptance%TYPE,
50 cat_admin_auth_acc PO_SYSTEM_PARAMETERS.cat_admin_authoring_acceptance%TYPE,
51 invoice_match_option FINANCIALS_SYSTEM_PARAMETERS.match_option%TYPE,
52 when_to_archive_blanket PO_DOCUMENT_TYPES.archive_external_revision_code%TYPE,
53 when_to_archive_std_po PO_DOCUMENT_TYPES.archive_external_revision_code%TYPE,
54 def_business_group_id FINANCIALS_SYSTEM_PARAMETERS.business_group_id%TYPE,
55 def_structure_id MTL_CATEGORY_SETS.structure_id%TYPE,
56 def_cat_set_id MTL_CATEGORY_SETS.category_set_id%TYPE,
57 def_category_id MTL_CATEGORY_SETS.default_category_id%TYPE,
58 acceptance_required_flag PO_SYSTEM_PARAMETERS.acceptance_required_flag%TYPE, /* Bug 7518967 : Default Acceptance Required Check ER */
59 budgetary_control_flag varchar2(1),
60 user_defined_req_num_code po_system_parameters.user_defined_req_num_code%type,
61 rfq_required_flag varchar2(1),
62 manual_req_num_type po_system_parameters.manual_req_num_type%type,
63 enforce_full_lot_qty po_system_parameters.enforce_full_lot_quantities%type,
64 disposition_warning_flag varchar2(1),
65 reserve_at_completion_flag varchar2(1),
66 user_defined_rcpt_num_code po_system_parameters.user_defined_receipt_num_code%type,
67 manual_rcpt_num_type po_system_parameters.manual_receipt_num_type%type,
68 use_positions_flag varchar2(1),
69 default_quote_warning_delay number,
70 user_defined_rfq_num_code po_system_parameters.user_defined_rfq_num_code%type,
71 manual_rfq_num_type po_system_parameters.manual_rfq_num_type%type,
72 period_name gl_period_statuses.period_name%type
73 );
74
75 -- Record type to store profile options
76 TYPE profile_param_rec_type IS RECORD
77 ( service_uom_class VARCHAR2(2000),
78 federal_instance VARCHAR2(2000), -- TODO: This profile is no longer at use
79 override_funds VARCHAR2(2000),
80 xbg VARCHAR2(2000),
81 po_price_update_tolerance VARCHAR2(2000),
82 allow_tax_rate_override VARCHAR2(2000),
83 allow_tax_code_override VARCHAR2(2000)
84 );
85
86 TYPE product_param_rec_type IS RECORD
87 ( wip_installed VARCHAR2(1),
88 inv_installed VARCHAR2(1),
89 project_11510_installed VARCHAR2(1),
90 pa_installed VARCHAR2(1),
91 gms_enabled VARCHAR2(1),
92 project_cwk_installed VARCHAR2(1)
93 );
94
95
96 -- instances of the record structures defined above
97 g_sys sys_param_rec_type;
98 g_profile profile_param_rec_type;
99 g_product product_param_rec_type;
100
101
102 /* -----------------------------------------------------
103 ------------- GLOBAL VARIABLE LIST ------------------
104 ----------------------------------------------------- */
105
106 -- document related
107 g_document_subtype po_headers_interface.document_subtype%type := null;
108 g_document_type VARCHAR2(25) := null;
109 g_interface_source_code VARCHAR2(25);
110 g_is_complex_work_po BOOLEAN := FALSE;
111 g_is_clm_po VARCHAR2(1) := 'N';
112 g_old_document_num po_headers.clm_document_number%type:=null; --Bug 10136310
113 g_interface_header_id NUMBER;
114
115 -- organization
116 g_purchasing_ou_id NUMBER;
117 g_hdr_requesting_ou_id NUMBER;
118
119 -- action
120 g_mode po_headers_interface.action%type := null;
121 g_group_code po_headers_interface.group_code%type := null;
122
123 -- rate
124 g_rate_for_req_fields NUMBER;
125
126 --tax
127 g_calculate_tax_flag VARCHAR2(1):= null; --<eTax Integration Enhancement R12>
128 --<ENCUMBRANCE FPJ>
129 g_dest_type_code_SHOP_FLOOR CONSTANT
130 po_distributions_all.destination_type_code%TYPE
131 := 'SHOP FLOOR';
132
133 g_is_mod_exists BOOLEAN := FALSE;
134
135 g_draft_id NUMBER;
136 g_draft_old_id NUMBER;
137 g_po_header_id NUMBER;
138
139 g_vendor_receipt_req_flag VARCHAR2(1);
140 g_vendor_inspect_req_flag varchar2(1);
141 g_vendor_invoice_match_option varchar2(30);
142 g_vendor_Ship_Via_Lookup_Code varchar2(100);
143
144 g_sourcing_errorcode number;
145 g_number_records_processed number;
146 g_org_context_changed VARCHAR2(1);
147 g_original_operating_unit_id number;
148
149
150 -- Global parameters for the given iteration.
151 x_interface_header_id NUMBER;
152 x_req_operating_unit_id NUMBER;
153 x_purch_operating_unit_id NUMBER;
154 x_orig_org_id NUMBER;
155 x_sourcing_k_doc_type VARCHAR2(50);
156 x_conterms_exist_flag VARCHAR2(1);
157
158 g_clm_source_document_id PO_HEADERS_ALL.clm_source_document_id%TYPE;
159
160 -- Added for linking requisition to modification project
161 g_process_code po_headers_interface.process_code%TYPE;
162
163 -- CLM Phase 2 changes.
164 --Maintain a table to hold all error messages.
165 -- A count variabl;e to determine number of error messages
166 g_error_code_tbl PO_TBL_VARCHAR2000 := PO_TBL_VARCHAR2000();
167 --Bug 13547051 Removed the variable g_error_count since its no longer in use.
168
169 END PO_AUTOCREATE_PARAMS;