1 PACKAGE PON_CF_TYPE_GRP AUTHID CURRENT_USER AS
2 /* $Header: PONGCFTS.pls 120.0 2005/06/01 19:57:00 appldev noship $ */
3
4
5 --------------------------------------------------------------------------------
6 -- get_cost_factor_details --
7 --------------------------------------------------------------------------------
8 -- Start of Comments
9 --
10 -- API Name: get_cost_factor_details
11 --
12 -- Type: Group
13 --
14 -- Pre-reqs: None
15 --
16 -- Function: The procedure queries the pon_price_element_types_vl to retrieve
17 -- the cost factor details and returns them in a record of type
18 -- pon_price_element_types%ROWTYPE.
19 --
20 -- Since the intended use of this API is to for Oracle Recieveing ROI, the API will
21 -- accept cost factor id, code or name and attempt to query the VL in that order
22 -- If no record correponding record is found, the API will return status of E to
23 -- indicate an error. Otherwise, the corresponding record will be returned with a
24 -- return status of success
25 --
26 -- IN Parameters:
27 -- p_api_version NUMBER
28 -- p_price_element_id pon_price_element_types.price_element_type_id%TYPE
29 -- p_price_element_code pon_price_element_types.price_element_code%TYPE
30 -- p_name pon_price_element_types_tl.name%TYPE
31 --
32 -- OUT Parameters
33 --
34 -- x_cost_factor_rec pon_price_element_types_vl%ROWTYPE;
35 --
36 -- x_return_status OUT NOCOPY VARCHAR2
37 -- U indicates Unexpected Error, S indicates success
38 -- x_msg_data OUT NOCOPY VARCHAR2
39 -- x_msg_count OUT NOCOPY NUMBER
40 --
41 -- RETURNS: None
42 --
43 -- End of Comments
44 --------------------------------------------------------------------------------
45
46 PROCEDURE get_Cost_Factor_details(
47 p_api_version IN NUMBER
48 ,p_price_element_id IN pon_price_element_types.price_element_type_id%TYPE DEFAULT NULL
49 ,p_price_element_code IN pon_price_element_types.price_element_code%TYPE DEFAULT NULL
50 ,p_name IN pon_price_element_types_tl.name%TYPE DEFAULT NULL
51 ,x_cost_factor_rec OUT NOCOPY pon_price_element_types_vl%ROWTYPE
52 ,x_return_status OUT NOCOPY VARCHAR2
53 ,x_msg_data OUT NOCOPY VARCHAR2
54 ,x_msg_count OUT NOCOPY NUMBER
55 );
56
57
58
59 --------------------------------------------------------------------------------
60 -- opm_create_update_cost_factor --
61 --------------------------------------------------------------------------------
62 -- Start of Comments
63 --
64 -- API Name: opm_create_update_cost_factor
65 --
66 -- Type: Group
67 --
68 -- Pre-reqs: None
69 --
70 -- Function: This function has been specifically code to enable the OPM team
71 -- to migrate their user defined cost factors into the Sourcing
72 -- tables.
73 --
74 -- Matching is performed with the input price_element_code. If the code
75 -- exists in Sourcing tables, then only certain fields are updated
76 -- If it does not exist, then a new price element type is created
77 -- and the corresponding _TL records are also updated
78 --
79 -- If the pricing basis of an updated cost factor is different from
80 -- that passed in, OPM will print an error in their logs so that
81 -- their customers can decide how to handle it
82 --
83 -- IN Parameters:
84 -- p_api_version IN NUMBER
85 -- p_price_element_code pon_price_element_types.price_element_code%TYPE
86 -- p_pricing_basis pon_price_element_types.pricing_basis%TYPE
87 -- p_cost_component_class_id pon_price_element_types.cost_component_class_id%TYPE
88 -- p_cost_analysis_code pon_price_element_types.cost_analysis_code%TYPE
89 -- p_cost_acquisition_code pon_price_element_types.cost_acquisition_code%TYPE
90 -- p_name pon_price_element_types_tl.name%TYPE
91 -- p_description pon_price_element_types_tl.name%TYPE
92 --
93 -- OUT Parameters
94 --
95 --
96 -- x_insert_update_action OUT NOCOPY VARCHAR2
97 -- indicates whether a new cost factor was created
98 -- or whether an existing one was updated
99 -- Contains value INSERT or UPDATE
100 --
101 -- x_price_element_type_id OUT NOCOPY pon_price_element_types.price_element_type_id%TYPE
102 -- Identifier of the cost factor inserted or updated.
103 -- OPM will use this to update their mapping tables
104 --
105 -- x_pricing_basis OUT NOCOPY pon_price_element_types.pricing_basis%TYPE
106 -- If the record is updated and OPM finds that the
107 -- pricing basis passed in is different from that
108 -- present in the table, then an error will be printed
109 -- in the patch log
110 --
111 -- x_return_status OUT NOCOPY VARCHAR2
112 -- x_msg_data OUT NOCOPY VARCHAR2
113 -- x_msg_count OUT NOCOPY NUMBER
114 --
115 -- RETURNS: None
116 --
117 -- End of Comments
118 --------------------------------------------------------------------------------
119 PROCEDURE opm_create_update_cost_factor(
120 p_api_version IN NUMBER
121 ,p_price_element_code IN pon_price_element_types.price_element_code%TYPE
122 ,p_pricing_basis IN pon_price_element_types.pricing_basis%TYPE
123 ,p_cost_component_class_id IN pon_price_element_types.cost_component_class_id%TYPE
124 ,p_cost_analysis_code IN pon_price_element_types.cost_analysis_code%TYPE
125 ,p_cost_acquisition_code IN pon_price_element_types.cost_acquisition_code%TYPE
126 ,p_name IN pon_price_element_types_tl.name%TYPE
127 ,p_description IN pon_price_element_types_tl.name%TYPE
128 ,x_insert_update_action OUT NOCOPY VARCHAR2
129 ,x_price_element_type_id OUT NOCOPY pon_price_element_types.price_element_type_id%TYPE
130 ,x_pricing_basis OUT NOCOPY pon_price_element_types.pricing_basis%TYPE
131 ,x_return_status OUT NOCOPY VARCHAR2
132 ,x_msg_data OUT NOCOPY VARCHAR2
133 ,x_msg_count OUT NOCOPY NUMBER
134 );
135
136
137 --------------------------------------------------------------------------------
138 -- get_cost_factor_details --
139 --------------------------------------------------------------------------------
140 -- Start of Comments
141 --
142 -- API Name: get_cost_factor_details
143 --
144 -- Type: Group
145 --
146 -- Pre-reqs: None
147 --
148 -- Function: The OVERLOADED API queries the pon_price_element_types_vl to retrieve
149 -- the cost factor details and returns them in a record of type
150 -- pon_price_element_types%ROWTYPE.
151 --
152 -- The intended use of this API is to for Oracle Recieveing ROI, the API will
153 -- accept cost factor id and attempt to query the VL.
154 -- If no record correponding record is found, the API will return a null record.
155 -- Otherwise, the corresponding record will be returned.
156 --
157 -- IN Parameters:
158 -- p_price_element_id pon_price_element_types.price_element_type_id%TYPE
159 --
160 -- OUT Parameters
161 -- None
162 --
163 -- RETURNS:
164 -- pon_price_element_types_vl%ROWTYPE
165 --
166 -- End of Comments
167 --------------------------------------------------------------------------------
168
169 FUNCTION get_Cost_Factor_details(
170 p_price_element_id IN pon_price_element_types.price_element_type_id%TYPE)
171 RETURN pon_price_element_types_vl%ROWTYPE;
172
173 --------------------------------------------------------------------------------
174 -- get_cost_factor_details --
175 --------------------------------------------------------------------------------
176 -- Start of Comments
177 --
178 -- API Name: get_cost_factor_details
179 --
180 -- Type: Group
181 --
182 -- Pre-reqs: None
183 --
184 -- Function: The OVERLOADED API queries the pon_price_element_types_vl to retrieve
185 -- the cost factor details and returns them in a record of type
186 -- pon_price_element_types%ROWTYPE.
187 --
188 -- The intended use of this API is to for Oracle Recieveing ROI, the API will
189 -- accept cost factor code and attempt to query the VL.
190 -- If no record correponding record is found, the API will return a null record.
191 -- Otherwise, the corresponding record will be returned.
192 --
193 -- IN Parameters:
194 -- p_price_element_code pon_price_element_types.price_element_code%TYPE
195 --
196 -- OUT Parameters
197 -- None
198 --
199 -- RETURNS:
200 -- pon_price_element_types_vl%ROWTYPE
201 --
202 -- End of Comments
203 --------------------------------------------------------------------------------
204
205 FUNCTION get_Cost_Factor_details(
206 p_price_element_code IN pon_price_element_types.price_element_code%TYPE)
207 RETURN pon_price_element_types_vl%ROWTYPE;
208
209 END PON_CF_TYPE_GRP;