DBA Data[Home] [Help]

PACKAGE: APPS.CTO_COST_ROLLUP_CONC_PK

Source


1 PACKAGE CTO_COST_ROLLUP_CONC_PK AUTHID CURRENT_USER as
2 /* $Header: CTOCRCNS.pls 120.1 2011/12/26 13:32:21 abhissri ship $*/
3 
4 
5 /*
6  *=========================================================================*
7  |                                                                         |
8  | Copyright (c) 2001, Oracle Corporation, Redwood Shores, California, USA |
9  |                           All rights reserved.                          |
10  |                                                                         |
11  *=========================================================================*
12  |                                                                         |
13  | NAME                                                                    |
14  |            CTO Cost rollup   package specification                      |
15  |                                                                         |
16  | DESCRIPTION                                                             |
17  |   PL/SQL package body containing the  routine  for cost rollup          |
18  |   of configuration items.                          			   |
19  |   For different combination of parameters passed , code gets the parent |
20  |   config item and its child and insert them into cst_sc_lists	   |
21  |									   |
22  |                                                                         |
23  | ARGUMENTS                                                               |
24  |   Input :  	Config Item 		: Select this config item          |
25  |		Base Model Item 	: All configs for this base model  |
26  |		Item Created Days Ago   : All configs created in last "n"  |
27  |					  days.				   |
28  |		Organization		: Calculate cost for all configs in|
29  |					  this org.			   |
30  | HISTORY                                                                 |
31  |   Date      Author   Comments                                           |
32  | --------- -------- ---------------------------------------------------- |
33  |  10/27/2003  KSARKAR  creation of package   CTO_COST_ROLLUP_CONC_PK     |
34  |                                                                         |
35  *=========================================================================*/
36 
37 	-- global variable
38 	gDebugLevel     NUMBER :=  to_number(nvl(FND_PROFILE.value('ONT_DEBUG_LEVEL'),0));
39 
40        --
41        -- PL/SQL tables for holding config items
42        --
43         TYPE r_cfg_item IS RECORD(
44      	cfg_item_id    		mtl_system_items.inventory_item_id%type,
45      	cfg_org_id    		number
46      	);
47 
48 	TYPE r_cfg_item_cum IS RECORD(
49      	cfg_item_id    		mtl_system_items.inventory_item_id%type
50      	);
51 
52         TYPE t_cfg_item     IS TABLE OF r_cfg_item     INDEX BY BINARY_INTEGER;
53 	TYPE t_cfg_item_cum IS TABLE OF r_cfg_item_cum INDEX BY BINARY_INTEGER;
54 
55         cfg_item_arr     		t_cfg_item;
56 	cfg_item_arr_cum     		t_cfg_item_cum;
57 
58 	--Bugfix 12957444: New variables.
59 	TYPE error_cache_tbl_type IS TABLE OF VARCHAR2(32767) INDEX BY LONG;
60         g_error_cache error_cache_tbl_type;
61 
62 
63 
64 /**********************************************************************************
65 Procedure spec:	CTO_COST_ROLLUP_CONC_PK :
66    This a stored PL/SQL concurrent program that rolls up config item cost based on
67    different criteria.
68 
69 INPUT arguments:
70  p_config_id 	: Configuration Item.
71  p_model_id  	: Configs with this base Model Item.
72  p_num_of_days	: Configs created in the last "n" days.
73  p_org_id	: Organization Id
74  p_upgrade	: If this is for upgrade
75  p_calc_costrollup : If costrollup is needed with upgrade
76 ***********************************************************************************/
77 PROCEDURE cto_cost_rollup
78                          (
79                                 errbuf 	 		OUT     NOCOPY VARCHAR2,
80                          	retcode 		OUT     NOCOPY VARCHAR2,
81                          	p_org_id        	IN      NUMBER,
82 				p_dummy			IN	NUMBER,
83 				p_config_item_id     	IN      NUMBER,
84 				p_dummy2		IN	NUMBER,
85 				p_model_id      	IN      NUMBER,
86 				p_num_of_days   	IN      NUMBER,
87 				p_upgrade		IN	VARCHAR2,
88 				p_calc_costrollup	IN	VARCHAR2
89 
90                         );
91 END CTO_COST_ROLLUP_CONC_PK;
92