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 115.0 2003/11/12 04:11:40 ksarkar noship $*/
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 
59 
60 /**********************************************************************************
61 Procedure spec:	CTO_COST_ROLLUP_CONC_PK :
62    This a stored PL/SQL concurrent program that rolls up config item cost based on
63    different criteria.
64 
65 INPUT arguments:
66  p_config_id 	: Configuration Item.
67  p_model_id  	: Configs with this base Model Item.
68  p_num_of_days	: Configs created in the last "n" days.
69  p_org_id	: Organization Id
70  p_upgrade	: If this is for upgrade
71  p_calc_costrollup : If costrollup is needed with upgrade
72 ***********************************************************************************/
73 PROCEDURE cto_cost_rollup
74                          (
75                                 errbuf 	 		OUT     NOCOPY VARCHAR2,
76                          	retcode 		OUT     NOCOPY VARCHAR2,
77                          	p_org_id        	IN      NUMBER,
78 				p_dummy			IN	NUMBER,
79 				p_config_item_id     	IN      NUMBER,
80 				p_dummy2		IN	NUMBER,
81 				p_model_id      	IN      NUMBER,
82 				p_num_of_days   	IN      NUMBER,
83 				p_upgrade		IN	VARCHAR2,
84 				p_calc_costrollup	IN	VARCHAR2
85 
86                         );
87 END CTO_COST_ROLLUP_CONC_PK;
88