1 PACKAGE BODY INV_THIRD_PARTY_STOCK_PO_MDTR AS
2 -- $Header: INVCPODB.pls 115.11 2002/12/19 23:59:18 pseshadr noship $
3 --+=======================================================================+
4 --| Copyright (c) 2002 Oracle Corporation |
5 --| Redwood Shores, CA, USA |
6 --| All rights reserved. |
7 --+=======================================================================+
8 --| FILENAME |
9 --| INVCPODB.pls |
10 --| |
11 --| DESCRIPTION |
12 --| Consigned inventory INV/PO dependency wrapper API |
13 --| |
14 --| PROCEDURE LIST |
15 --| Get_Blanket_Number |
16 --| Start_Workflow |
17 --| Get_Asl_Info |
18 --| Create_Documents |
19 --| Get_Price_Break |
20 --| Is_Global |
21 --| |
22 --| HISTORY |
23 --| 12/01/02 pseshadr Created |
24 --| 12/01/02 dherring Created |
25 --+========================================================================
26
27 --===================
28 -- GLOBALS
29 --===================
30
31 G_PKG_NAME CONSTANT VARCHAR2(30) := 'INV_THIRD_PARTY_STOCK_PO_MDTR';
32
33
34 --===================
35 -- PROCEDURES AND FUNCTIONS
36 --===================
37
38
39 --========================================================================
40 -- PROCEDURE : Get_Blanket_Number PUBLIC
41 -- PARAMETERS: p_inventory_item_id Item
42 -- p_vendor_site_id Vendor Site
43 -- p_organization_id Inventory Organization
44 -- x_document_header_id PO header id
45 -- x_document_line_id PO line id
46 -- COMMENT : Return document if a valid blanket exists for item,
47 -- supplier site,organization combination.
48 -- This procedure is invoked when
49 -- performing a Transfer to regular stock transaction.
50 --========================================================================
51 PROCEDURE Get_Blanket_Number
52 ( p_inventory_item_id IN NUMBER
53 , p_vendor_site_id IN NUMBER
54 , p_organization_id IN NUMBER
55 , x_document_header_id OUT NOCOPY NUMBER
56 , x_document_line_id OUT NOCOPY NUMBER
57 )
58 IS
59
60 BEGIN
61
62 NULL;
63 END Get_Blanket_Number;
64
65
66 --========================================================================
67 -- PROCEDURE : Start_Workflow PUBLIC
68 -- PARAMETERS : p_coa_id Chart of Accounts Id
69 -- p_destination_type_code INVENTORY
70 -- p_type_lookup_code Document type
71 -- p_item_id Item
72 -- p_vendor_id Vendor
73 -- p_vendor_site_id Vendor Site
74 -- p_destination_organization_id Inventory Organization
75 -- p_po_encumberance_flag PO encumberance
76 -- p_accrual_account_id Accrual account
77 -- p_charge_account_id Charge Account
78 -- p_variance_account_id Variance Account
79 -- COMMENT : The above inputs are the only relevent parameters for
80 -- generation of accounts for consigned transaction. All
81 -- the other parameters that are required for the
82 -- procedure are passed in as NULL . This is a wrapper
83 -- to the PO Account builder
84 --========================================================================
85
86 PROCEDURE Start_Workflow
87 ( p_charge_success IN OUT NOCOPY BOOLEAN
88 , p_budget_success IN OUT NOCOPY BOOLEAN
89 , p_accrual_success IN OUT NOCOPY BOOLEAN
90 , p_variance_success IN OUT NOCOPY BOOLEAN
91 , p_code_combination_id IN OUT NOCOPY NUMBER
92 , p_charge_account_id IN OUT NOCOPY NUMBER
93 , p_budget_account_id IN OUT NOCOPY NUMBER
94 , p_accrual_account_id IN OUT NOCOPY NUMBER
95 , p_variance_account_id IN OUT NOCOPY NUMBER
96 , p_charge_account_flex IN OUT NOCOPY VARCHAR2
97 , p_budget_account_flex IN OUT NOCOPY VARCHAR2
98 , p_accrual_account_flex IN OUT NOCOPY VARCHAR2
99 , p_variance_account_flex IN OUT NOCOPY VARCHAR2
100 , p_charge_account_desc IN OUT NOCOPY VARCHAR2
101 , p_budget_account_desc IN OUT NOCOPY VARCHAR2
102 , p_accrual_account_desc IN OUT NOCOPY VARCHAR2
103 , p_variance_account_desc IN OUT NOCOPY VARCHAR2
104 , p_coa_id IN NUMBER
105 , p_bom_resource_id IN NUMBER
106 , p_bom_cost_element_id IN NUMBER
107 , p_category_id IN NUMBER
108 , p_destination_type_code IN VARCHAR2
109 , p_deliver_to_location_id IN NUMBER
110 , p_destination_organization_id IN NUMBER
111 , p_destination_subinventory IN VARCHAR2
112 , p_expenditure_type IN VARCHAR2
113 , p_expenditure_organization_id IN NUMBER
114 , p_expenditure_item_date IN DATE
115 , p_item_id IN NUMBER
116 , p_line_type_id IN NUMBER
117 , p_result_billable_flag IN VARCHAR2
118 , p_agent_id IN NUMBER
119 , p_project_id IN NUMBER
120 , p_from_type_lookup_code IN VARCHAR2
121 , p_from_header_id IN NUMBER
122 , p_from_line_id IN NUMBER
123 , p_task_id IN NUMBER
124 , p_deliver_to_person_id IN NUMBER
125 , p_type_lookup_code IN VARCHAR2
126 , p_vendor_id IN NUMBER
127 , p_wip_entity_id IN NUMBER
128 , p_wip_entity_type IN VARCHAR2
129 , p_wip_line_id IN NUMBER
130 , p_wip_repetitive_schedule_id IN NUMBER
131 , p_wip_operation_seq_num IN NUMBER
132 , p_wip_resource_seq_num IN NUMBER
133 , p_po_encumberance_flag IN VARCHAR2
134 , p_gl_encumbered_date IN DATE
135 , p_wf_itemkey IN OUT NOCOPY VARCHAR2
136 , p_new_combination IN OUT NOCOPY BOOLEAN
137 , p_header_att1 IN VARCHAR2
138 , p_header_att2 IN VARCHAR2
139 , p_header_att3 IN VARCHAR2
140 , p_header_att4 IN VARCHAR2
141 , p_header_att5 IN VARCHAR2
142 , p_header_att6 IN VARCHAR2
143 , p_header_att7 IN VARCHAR2
144 , p_header_att8 IN VARCHAR2
145 , p_header_att9 IN VARCHAR2
146 , p_header_att10 IN VARCHAR2
147 , p_header_att11 IN VARCHAR2
148 , p_header_att12 IN VARCHAR2
149 , p_header_att13 IN VARCHAR2
150 , p_header_att14 IN VARCHAR2
151 , p_header_att15 IN VARCHAR2
152 , p_line_att1 IN VARCHAR2
153 , p_line_att2 IN VARCHAR2
154 , p_line_att3 IN VARCHAR2
155 , p_line_att4 IN VARCHAR2
156 , p_line_att5 IN VARCHAR2
157 , p_line_att6 IN VARCHAR2
158 , p_line_att7 IN VARCHAR2
159 , p_line_att8 IN VARCHAR2
160 , p_line_att9 IN VARCHAR2
161 , p_line_att10 IN VARCHAR2
162 , p_line_att11 IN VARCHAR2
163 , p_line_att12 IN VARCHAR2
164 , p_line_att13 IN VARCHAR2
165 , p_line_att14 IN VARCHAR2
166 , p_line_att15 IN VARCHAR2
167 , p_shipment_att1 IN VARCHAR2
168 , p_shipment_att2 IN VARCHAR2
169 , p_shipment_att3 IN VARCHAR2
170 , p_shipment_att4 IN VARCHAR2
171 , p_shipment_att5 IN VARCHAR2
172 , p_shipment_att6 IN VARCHAR2
173 , p_shipment_att7 IN VARCHAR2
174 , p_shipment_att8 IN VARCHAR2
175 , p_shipment_att9 IN VARCHAR2
176 , p_shipment_att10 IN VARCHAR2
177 , p_shipment_att11 IN VARCHAR2
178 , p_shipment_att12 IN VARCHAR2
179 , p_shipment_att13 IN VARCHAR2
180 , p_shipment_att14 IN VARCHAR2
181 , p_shipment_att15 IN VARCHAR2
182 , p_distribution_att1 IN VARCHAR2
183 , p_distribution_att2 IN VARCHAR2
184 , p_distribution_att3 IN VARCHAR2
185 , p_distribution_att4 IN VARCHAR2
186 , p_distribution_att5 IN VARCHAR2
187 , p_distribution_att6 IN VARCHAR2
188 , p_distribution_att7 IN VARCHAR2
189 , p_distribution_att8 IN VARCHAR2
190 , p_distribution_att9 IN VARCHAR2
191 , p_distribution_att10 IN VARCHAR2
192 , p_distribution_att11 IN VARCHAR2
193 , p_distribution_att12 IN VARCHAR2
194 , p_distribution_att13 IN VARCHAR2
195 , p_distribution_att14 IN VARCHAR2
196 , p_distribution_att15 IN VARCHAR2
197 , FB_ERROR_MSG IN OUT NOCOPY VARCHAR2
198 , p_Award_id IN NUMBER
199 , p_vendor_site_id IN NUMBER
200 )
201 IS
202
203 BEGIN
204
205 NULL;
206
207 END Start_Workflow;
208
209
210 --========================================================================
211 -- PROCEDURE : Get_Asl_Info PUBLIC
212 -- PARAMETERS: p_item_id Item
213 -- p_vendor_id Vendor Id
214 -- p_vendor_site_id Vendor Site Id
215 -- p_using_organization_id organization
216 -- x_asl_id asl id
217 -- x_vendor_product_num vendor product num
218 -- x_purchasing_uom Purchasing UOM
219 -- COMMENT: Wrapper for get asl info procedure in purchasing
220 --========================================================================
221 PROCEDURE Get_Asl_Info
222 ( p_item_id IN NUMBER
223 , p_vendor_id IN NUMBER
224 , p_vendor_site_id IN NUMBER
225 , p_using_organization_id IN NUMBER
226 , x_asl_id OUT NOCOPY NUMBER
227 , x_vendor_product_num OUT NOCOPY VARCHAR2
228 , x_purchasing_uom OUT NOCOPY VARCHAR2
229 )
230 IS
231 BEGIN
232
233 NULL;
234 END Get_Asl_Info;
235
236 --========================================================================
237 -- PROCEDURE : Create_Documents PUBLIC
238 -- PARAMETERS : p_batch_id Batch Id
239 -- p_document_id Document Id that was created
240 -- p_document_number Document number
241 -- p_line Number of lines created
242 -- x_error_code Return status
243 -- COMMENT : Wrapper to the PO autocreate to create document
244 -- This is invoked by Create Consumption Advice
245 --========================================================================
246 PROCEDURE create_documents
247 ( p_batch_id IN NUMBER
248 , p_document_id IN OUT NOCOPY NUMBER
249 , p_document_number IN OUT NOCOPY VARCHAR2
250 , p_line IN OUT NOCOPY NUMBER
251 , x_error_code OUT NOCOPY NUMBER
252 )
253 IS
254
255 BEGIN
256 NULL;
257 END create_documents;
258
259 --========================================================================
260 -- PROCEDURE : Get_Break_Price PUBLIC
261 -- PARAMETERS: p_order_quantity Quantity
262 -- p_ship_to_org Ship to Org
263 -- p_ship_to_loc Ship to location
264 -- p_po_line_id PO Line Id
265 -- p_cum_flag Cumulative flag
266 -- p_need_by_date Need by Date
267 -- p_line_location_id Line location
268 -- x_po_price PO price without tax
272 --========================================================================
269 -- COMMENT : Call the PO API to get price breaks
270 -- This is invoked by Get_PO_Info procedure to calculate
271 -- the PO price for the transaction.
273 PROCEDURE get_break_price
274 ( p_order_quantity IN NUMBER
275 , p_ship_to_org IN NUMBER
276 , p_ship_to_loc IN NUMBER
277 , p_po_line_id IN NUMBER
278 , p_cum_flag IN BOOLEAN
279 , p_need_by_date IN DATE
280 , p_line_location_id IN NUMBER
281 , x_po_price OUT NOCOPY NUMBER
282 )
283 IS
284 BEGIN
285 NULL;
286 END get_break_price;
287
288 --========================================================================
289 -- FUNCTION : Is_Global PUBLIC
290 -- PARAMETERS: p_order_quantity Quantity
291 -- p_ship_to_org Ship to Org
292 -- p_ship_to_loc Ship to location
293 -- p_po_line_id PO Line Id
294 -- p_cum_flag Cumulative flag
295 -- p_need_by_date Need by Date
296 -- p_line_location_id Line location
297 -- x_po_price PO price without tax
298 -- COMMENT : Call the PO API to check for Global Agreement
299 --========================================================================
300 FUNCTION is_global
301 ( p_header_id IN NUMBER
302 ) RETURN BOOLEAN
303 IS
304 l_global_flag BOOLEAN;
305 BEGIN
306 RETURN FALSE;
307 END is_global;
308
309 END INV_THIRD_PARTY_STOCK_PO_MDTR;