DBA Data[Home] [Help]

PACKAGE BODY: APPS.CSE_ASSET_CLIENT_EXT_STUB

Source


1 PACKAGE BODY CSE_ASSET_CLIENT_EXT_STUB AS
2 -- $Header: CSEFASTB.pls 120.5.12020000.2 2012/07/04 15:28:52 dsingire ship $
3 
4 l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('CSE_DEBUG_OPTION'),'N');
5 
6 -----------------------------------------------------------------------------
7 --      PLEASE set x_hook_used to 1 if you are deriving the value
8 --      By default x_hook_used to 0.
9 -----------------------------------------------------------------------------
10 
11 PROCEDURE get_asset_name(
12 	p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec,
13 	x_asset_name            OUT NOCOPY       VARCHAR2,
14 	x_hook_used             OUT NOCOPY       NUMBER,
15 	x_error_msg             OUT NOCOPY       VARCHAR2)
16 	IS
17 	BEGIN
18 	x_hook_used := 0 ;
19 	-- Please set the X_HOOK_USED to 1 if you are deriving the value
20 	x_error_msg := null ;
21 
22 	-- Please add your code here if you want to override the default
23 	-- functionality of deriving asset name.
24 	NULL ;
25 END get_asset_name;
26 
27 ---------------------------------------------------------------------------
28 
29 PROCEDURE get_asset_description(
30   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
31 , x_description           OUT NOCOPY       VARCHAR2
32 , x_hook_used             OUT NOCOPY       NUMBER
33 , x_error_msg             OUT NOCOPY       VARCHAR2)
34 IS
35 BEGIN
36    x_hook_used := 0 ;
37    --  PLEASE set the X_HOOK_USED to 1 if you are deriving the value
38    x_error_msg := null ;
39 
40 -- Please add your code here if you want to override the default
41 --   functionality of deriving asset description.
42 NULL ;
43 END get_asset_description ;
44 
45 ---------------------------------------------------------------------------
46 
47 PROCEDURE get_asset_category(
48   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
49 , x_hook_used             OUT NOCOPY       NUMBER
50 , x_error_msg             OUT NOCOPY       VARCHAR2)
51 IS
52 BEGIN
53    x_hook_used := 0 ;
54    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
55    x_error_msg := null ;
56 
57 -- Please add your code here if you want to override the default
58 -- functionality of deriving Asset Category
59 
60 NULL ;
61 END get_asset_category ;
62 
63 ---------------------------------------------------------------------------+
64 
65 PROCEDURE get_book_type(
66   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
67 , x_hook_used             OUT NOCOPY       NUMBER
68 , x_error_msg             OUT NOCOPY       VARCHAR2)
69 IS
70 BEGIN
71    x_hook_used := 0 ;
72    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
73    x_error_msg := null ;
74 
75 -- Please add your code here if you want to override the default
76 -- functionality of deriving FA book type code .
77 NULL ;
78 END get_book_type ;
79 
80 ---------------------------------------------------------------------------
81 
82 PROCEDURE get_date_place_in_service(
83     p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
84 , x_in_service_date       OUT NOCOPY       DATE
85 , x_hook_used             OUT NOCOPY       NUMBER
86 , x_error_msg             OUT NOCOPY       VARCHAR2)
87 IS
88 BEGIN
89    x_hook_used := 0 ;
90    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
91    x_error_msg := null ;
92 
93 -- Please add your code here if you want to override the default
94 --   functionality of deriving Date Placed In Service.
95 NULL ;
96 END get_date_place_in_service ;
97 
98 ---------------------------------------------------------------------------
99 
100 PROCEDURE get_asset_key(
101   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
102 , x_asset_key_ccid        OUT NOCOPY       NUMBER
103 , x_hook_used             OUT NOCOPY       NUMBER
104 , x_error_msg             OUT NOCOPY       VARCHAR2)
105 IS
106 BEGIN
107    x_hook_used := 0 ;
108    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
109    x_error_msg := null ;
110 
111 -- Please add your code here if you want to override the default
112 -- functionality of deriving asset key.
113 NULL ;
114 END get_asset_key ;
115 
116 ---------------------------------------------------------------------------
117 
118 PROCEDURE get_asset_location(
119   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
120 , x_hook_used             OUT NOCOPY       NUMBER
121 , x_error_msg             OUT NOCOPY       VARCHAR2)
122 IS
123 BEGIN
124    x_hook_used := 0 ;
125    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
126    x_error_msg := null ;
127 
128 -- Please add your code here if you want to override the default
129 -- functionality of deriving asset location.
130 NULL ;
131 END get_asset_location ;
132 
133 ---------------------------------------------------------------------------
134 
135 PROCEDURE get_deprn_expense_ccid(
136   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
137 , x_deprn_expense_ccid    OUT NOCOPY       NUMBER
138 , x_hook_used             OUT NOCOPY       NUMBER
139 , x_error_msg             OUT NOCOPY       VARCHAR2)
140 IS
141 BEGIN
142    x_hook_used := 0 ;
143    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
144    x_error_msg := null ;
145 
146 -- Please add your code here if you want to override the default
147 -- functionality of deriving Depreciation Expense CCID.
148 NULL ;
149 END get_deprn_expense_ccid ;
150 
151 --------------------------------------------------------------------------
152 
153 PROCEDURE get_search_method(
154   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
155 , x_search_method         OUT NOCOPY       VARCHAR2
156 , x_hook_used             OUT NOCOPY       NUMBER
157 , x_error_msg             OUT NOCOPY       VARCHAR2)
158 IS
159 BEGIN
160    x_hook_used := 0 ;
161    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
162    x_error_msg := null ;
163 
164 -- Please add your code here if you want to override the default
165 -- functionality of deriving search method .
166 NULL ;
167 END get_search_method ;
168 
169 ---------------------------------------------------------------------------
170 
171 PROCEDURE get_tag_number(
172   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
173 , x_tag_number         OUT NOCOPY       VARCHAR2
174 , x_hook_used             OUT NOCOPY       NUMBER
175 , x_error_msg             OUT NOCOPY       VARCHAR2)
176 IS
177 BEGIN
178    x_hook_used := 0 ;
179    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
180    x_error_msg := null ;
181 
182 -- Please add your code here if you want to override the default
183 --   functionality of deriving tag number.
184 NULL ;
185 END get_tag_number ;
186 
187 ---------------------------------------------------------------------------
188 
189 PROCEDURE get_model_number(
190    p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
191 , x_model_number         OUT NOCOPY       VARCHAR2
192 , x_hook_used             OUT NOCOPY       NUMBER
193 , x_error_msg             OUT NOCOPY       VARCHAR2)
194 IS
195 BEGIN
196    x_hook_used := 0 ;
197    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
198    x_error_msg := null ;
199 
200 -- Please add your code here if you want to override the default
201 -- functionality of deriving model number.
202 NULL ;
203 END get_model_number ;
204 
205 ---------------------------------------------------------------------------
206 
207 PROCEDURE get_manufacturer(
208    p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
209 , x_manufacturer_name     OUT NOCOPY       VARCHAR2
210 , x_hook_used             OUT NOCOPY       NUMBER
211 , x_error_msg             OUT NOCOPY       VARCHAR2)
212 IS
213 BEGIN
214    x_hook_used := 0 ;
215    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
216    x_error_msg := null ;
217 
218 -- Please add your code here if you want to override the default
219 -- functionality of deriving manufacturer name.
220 NULL ;
221 END get_manufacturer ;
222 
223 ---------------------------------------------------------------------------
224 
225 PROCEDURE get_employee(
226    p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
227 , x_employee_id           OUT NOCOPY       NUMBER
228 , x_hook_used             OUT NOCOPY       NUMBER
229 , x_error_msg             OUT NOCOPY       VARCHAR2)
230 IS
231 BEGIN
232    x_hook_used := 0 ;
233    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
234    x_error_msg := null ;
235 
236 -- Please add your code here if you want to override the default
237 --   functionality of deriving Employee ID.
238 NULL ;
239 END get_employee ;
240 
241 ---------------------------------------------------------------------------
242 
243 PROCEDURE get_payables_ccid(
244   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
245 , x_payables_ccid         OUT NOCOPY       NUMBER
246 , x_hook_used             OUT NOCOPY       NUMBER
247 , x_error_msg             OUT NOCOPY       VARCHAR2)
248 IS
249 BEGIN
250    x_hook_used := 0 ;
251    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
252    x_error_msg := null ;
253 
254 -- Please add your code here if you want to override the default
255 --   functionality of deriving Payables CCID.
256 NULL ;
257 END get_payables_ccid ;
258 
259 --------------------------------------------------------------------------
260 
261 PROCEDURE get_txn_class_flag(
262   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
263 , p_txn_class             IN        VARCHAR2
264 , x_process_flag          OUT NOCOPY       VARCHAR2
265 , x_hook_used             OUT NOCOPY       NUMBER
266 , x_error_msg             OUT NOCOPY       VARCHAR2)
267 IS
268 BEGIN
269 
270    x_hook_used := 0 ;
271     -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
272    x_error_msg := null ;
273 
274 -- Please add your code here if you want to override the default
275 --   functionality of deriving Transaction Class Flag.
276 END get_txn_class_flag ;
277 
278 
279 ---------------------------------------------------------------------------
280 
281 PROCEDURE get_catchup_flag(
282   p_asset_number          IN        VARCHAR2,
283   p_instance_asset_id     IN        NUMBER,
284   x_catchup_flag          OUT NOCOPY       VARCHAR2,
285   x_hook_used             OUT NOCOPY       NUMBER,
286   x_error_msg             OUT NOCOPY       VARCHAR2)
287 IS
288 BEGIN
289    x_hook_used := 0 ;
290    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
291    x_error_msg := null ;
292 
293 -- Please add your code here if you want to override the default
294 --   functionality of deriving Depreciation Catchup Flag.
295 
296 END get_catchup_flag ;
297 
298 ---------------------------------------------------------------------------
299 PROCEDURE get_inv_depr_acct(
300   p_mtl_transaction_id    IN        NUMBER
301 , x_dummy_acct_id         OUT NOCOPY       NUMBER
302 , x_hook_used             OUT NOCOPY       NUMBER
303 , x_error_msg             OUT NOCOPY       VARCHAR2)
304 IS
305 BEGIN
306 
307    x_hook_used := 0 ;
308    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
309    x_error_msg := null ;
310 
311 -- Please add your code here if you want to override the default
312 --  functionality of deriving the dummy inventory acct for depreciable items.
313 END get_inv_depr_acct ;
314 ---------------------------------------------------------------------------
315 PROCEDURE get_inventory_item(
316   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
317 , x_hook_used             OUT NOCOPY       NUMBER
318 , x_error_msg             OUT NOCOPY       VARCHAR2)
319 IS
320 BEGIN
321 
322    x_hook_used := 0 ;
323     -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
324    x_error_msg := null ;
325 
326 -- Please add your code here if you want to override the default
327 --   functionality of maintaining/creating Fixed Asset using Inventory Item.
328 --  By default Fixed Asset NOT will be created based on Inventory Item.
329 -- If you want to create Fixed Asset based on Inventory Item, please set the
330 --  x_inventory_item_id to the Inventory_item_id, which you can get from CSI_TRANSACTION_ID
331 
332 END get_inventory_item ;
333 
334 ---------------------------------------------------------------------------
335 PROCEDURE get_non_mtl_retire_flag(
336   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
337 , p_asset_id              IN        NUMBER
338 , x_retire_flag           OUT NOCOPY       VARCHAR2
339 , x_hook_used             OUT NOCOPY       NUMBER
340 , x_error_msg             OUT NOCOPY       VARCHAR2)
341 IS
342 BEGIN
343 
344    x_hook_used := 0 ;
345    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
346    x_error_msg := null ;
347 
348 -- Please add your code here if you want to override the default
349 --   functionality of Retiring Non Material Costs.
350 
351 END get_non_mtl_retire_flag ;
352 
353 ---------------------------------------------------------------------------
354 PROCEDURE get_product_code(
358 , x_error_msg             OUT NOCOPY       VARCHAR2)
355   p_asset_attrib_rec      IN OUT NOCOPY CSE_DATASTRUCTURES_PUB.asset_attrib_rec
356 , x_product_code          OUT NOCOPY       VARCHAR2
357 , x_hook_used             OUT NOCOPY       NUMBER
359 IS
360 BEGIN
361 
362    x_hook_used := 0 ;
363    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
364    x_error_msg := null ;
365 
366 -- Please add your code here if you want to override the default
367 --   functionality of deriving Product Code which will be used
368 --   in grouping the asset
369 
370 END get_product_code ;
371 
372 ---------------------------------------------------------------------------
373 --Added for bug 9644951
374 PROCEDURE get_redeploy_flag(
375   p_inventory_item_id     IN        NUMBER,
376   p_serial_number         IN        VARCHAR2,
377   p_transaction_date      IN        DATE,
378   x_redeploy_flag         OUT NOCOPY       VARCHAR2,
379   x_hook_used             OUT NOCOPY       NUMBER,
380   x_error_msg             OUT NOCOPY       VARCHAR2)
381 IS
382 BEGIN
383 
384    x_hook_used := 0 ;
385    -- PLEASE set the X_HOOK_USED to 1 if you are deriving the value
386    x_error_msg := null ;
387 
388 -- Please add your code here if you want to override the default
389 --   functionality to check if the asset is being redeployed
390 
391 END get_redeploy_flag ;
392 
393 ---------------------------------------------------------------------------
394 -- ER 13083427
395 -- Extend skip_asset_creation client hook to programatically block asset creation
396 -- Input parameters =>
397 -- p_inventory_item_id, p_organization_id, p_serial_number, p_transaction_date,
398 -- p_depreciable_item_flag (Y or N)
399 -- Output Parameters =>
400 -- x_skip_flag (Y or N) Set x_skip_flag as Y to skip generation of asset
401 
402 PROCEDURE skip_asset_creation(
403   p_inventory_item_id     IN OUT NOCOPY NUMBER
404 , p_organization_id       IN OUT NOCOPY NUMBER
405 , p_csi_transaction_id    IN OUT NOCOPY    NUMBER
406 , p_depreciable_item_flag IN OUT NOCOPY    VARCHAR2
407 , x_skip_flag             OUT NOCOPY       VARCHAR2
408 , x_hook_used             out nocopy       number
409 , x_error_msg             OUT NOCOPY       VARCHAR2)
410 IS
411 
412     l_return_status    varchar2(1) := fnd_api.g_ret_sts_success;
413     l_error_message         varchar2(2000);
414 
415 BEGIN
416    x_hook_used := 0 ;
417    --  PLEASE set the X_HOOK_USED to 1 if you are deriving the value
418    x_error_msg := null ;
419 
420    -- Please add your code here if you want to override asset
421    -- creation process
422 
423    -- After skipping Asset creation if the CSI transaction needs to be updated to
424    -- COMPLETE, please use API to complete the transaction
425    -- cse_asset_creation_pkg.complete_csi_txn(
426    --           p_csi_txn_id     => p_csi_transaction_id,
427    --           x_return_status  => l_return_status,
428    --           x_error_message  => l_error_message);
429 
430 
431 END skip_asset_creation ;
432 
433 ---------------------------------------------------------------------------
434 -- ER 13083427
435 -- Determines asset type and corresponding date placed in service
436 PROCEDURE get_asset_type_n_dpis (
437   p_instance_id           IN NUMBER
438 , p_inventory_item_id     IN NUMBER
439 , x_asset_type            OUT NOCOPY       VARCHAR2
440 , x_date_placed_inservice OUT NOCOPY DATE
441 , x_hook_used             out nocopy       number
442 , x_error_msg             OUT NOCOPY       VARCHAR2
443 )
444 IS
445 BEGIN
446    x_hook_used := 0 ;
447    --  PLEASE set the X_HOOK_USED to 1 if you are deriving the value
448    x_error_msg := null ;
449 
450    --  Please add your code here if you want to override the default
451    --  functionality of CAPITALIZED asset type
452 
453    -- Return either 'CAPITALIZED' or 'CIP' for x_asset_type
454    -- If asset type is 'CIP' then return FND_API.G_MISS_DATE for x_date_placde_inservice
455 END get_asset_type_n_dpis ;
456 
457 ---------------------------------------------------------------------------
458 -- ER 13083427
459 -- Use the hook to populate mass addition dff values
460 -- x_mass_add_rec has identifying input param like asset_number, tag_number
461 -- serial_number etc.
462 PROCEDURE populate_mass_addition_dff (
463   x_mass_add_rec         IN OUT NOCOPY     fa_mass_additions%rowtype
464 , x_hook_used             out nocopy       NUMBER
465 , x_error_msg             OUT NOCOPY       VARCHAR2
466 )
467 IS
468 BEGIN
469    x_hook_used := 0 ;
470    --  PLEASE set the X_HOOK_USED to 1 if you are deriving the value
471    x_error_msg := null ;
472 
473    --  Please add your code here if you want to pass mass
474    -- addition dff (ie) x_mass_add_rec.attribute1 to
475    -- x_mass_add_rec.attribute30, context etc
476 
477 END populate_mass_addition_dff;
478 
479 PROCEDURE derive_po_distribution_id (
480   p_invoice_distribution_id   IN NUMBER,
481   p_line_type_lookup_code     IN VARCHAR2,
482   x_derived_po_distribution_id OUT NOCOPY NUMBER,
483   x_hook_used             OUT NOCOPY       NUMBER,
484   x_error_msg             OUT NOCOPY       VARCHAR2)
485 IS
486 BEGIN
487    x_hook_used := 0 ;
488    --  PLEASE set the X_HOOK_USED to 1 if you are deriving the value
489    x_error_msg := null ;
490 
491   -- Please add the logic to derive po_distribution_id for the
492   -- line_type_lookup_code
493 
494 END derive_po_distribution_id;
495 
496 
497 END CSE_ASSET_CLIENT_EXT_STUB ;