DBA Data[Home] [Help]

PACKAGE: APPS.HR_ELEMENTS

Source


1 package hr_elements AUTHID CURRENT_USER as
2 /* $Header: pyelemnt.pkh 120.0 2005/05/29 04:32:14 appldev noship $ */
3 --
4  /*
5  NAME
6  chk_element_name
7  DESCRIPTION
8    Checks element name for duplication.
9  */
10 --
11 PROCEDURE       chk_element_name(p_element_name         in varchar2,
12                                  p_element_type_id      in number,
13                                  p_val_start_date       in date,
14                                  p_val_end_date         in date,
15                                  p_business_group_id    in number,
16                                  p_legislation_code     in varchar2);
17 --
18 --
19  /*
20  NAME
21  chk_reporting_name
22  DESCRIPTION
23    Checks reporting name for duplication. Will only be called if reporting
24    name is not null.
25  */
26 --
27 PROCEDURE       chk_reporting_name(p_reporting_name     in varchar2,
28                                  p_element_type_id      in number,
29                                  p_val_start_date       in date,
30                                  p_val_end_date         in date,
31                                  p_business_group_id    in number,
32                                  p_legislation_code     in varchar2);
33 --
34  /*
35  NAME
36  chk_element_type
37  DESCRIPTION
38    Checks attributes of element type according to business rules
39  */
40 --
41  PROCEDURE chk_element_type(p_element_name                    in varchar2,
42                             p_element_type_id                 in number,
43                             p_val_start_date                  in date,
44                             p_val_end_date                    in date,
45                             p_reporting_name                  in varchar2,
46                             p_rowid                           in varchar2,
47                             p_recurring_flag                  in varchar2,
48                             p_standard_flag                   in varchar2,
49                             p_scndry_ent_allwd_flag           in varchar2,
50                             p_process_in_run_flag             in varchar2,
51                             p_indirect_only_flag              in varchar2,
52                             p_adjustment_only_flag            in varchar2,
53                             p_multiply_value_flag             in varchar2,
54                             p_classification_type             in varchar2,
55                             p_output_currency_code            in varchar2,
56                             p_input_currency_code            in varchar2,
57                             p_business_group_id               in number,
58                             p_legislation_code                in varchar2,
59                             p_bus_grp_currency_code           in varchar2);
60 --
61  /*
62  NAME
63  chk_upd_element_type
64  DESCRIPTION
65    Checks that the attributes of element type are allowed to be updated.
66  NOTES
67    Does not test for attributes which cannot be updated.
68    These are element_name and classification id.
69  */
70 --
71  PROCEDURE chk_upd_element_type(p_update_mode                 in varchar2,
72                                 p_val_start_date              in date,
73                                 p_val_end_date                in date,
74                                 p_element_type_id             in number,
75                                 p_business_group_id           in number,
76                                 p_old_name                    in varchar2,
77                                 p_name                        in varchar2,
78                                 p_old_process_in_run_flag     in varchar2,
79                                 p_process_in_run_flag         in varchar2,
80                                 p_old_input_currency          in varchar2,
81                                 p_input_currency              in varchar2,
82                                 p_old_output_currency         in varchar2,
83                                 p_output_currency             in varchar2,
84                                 p_old_standard_link_flag      in varchar2,
85                                 p_standard_link_flag          in varchar2,
86                                 p_old_adjustment_only_flag    in varchar2,
87                                 p_adjustment_only_flag        in varchar2,
88                                 p_old_indirect_only_flag      in varchar2,
89                                 p_indirect_only_flag          in varchar2,
90                                 p_old_scndry_ent_allwd_flag   in varchar2,
91                                 p_scndry_ent_allwd_flag       in varchar2,
92                                 p_old_post_termination_rule   in varchar2,
93                                 p_post_termination_rule       in varchar2,
94                                 p_old_processing_priority     in number,
95                                 p_processing_priority         in number);
96 --
97  /*
98  NAME
99  element_priority_ok
100  DESCRIPTION
101  should be called on any sitation where the processing priority of the element
102  can change. This is on update and on next change delete.
103  */
104 --
105 FUNCTION        element_priority_ok(p_element_type_id   number,
106                                         p_processing_priority   number,
107                                              p_val_start_date   date,
108                                              p_val_end_date     date)
109                                              return boolean;
110 --
111  /*
112  NAME
113  chk_del_element_type
114  DESCRIPTION
115    Checks that the element can be deleted. This is either complete delete or
116    Date effective delete.
117  NOTES
118   This procedure disallows delete for any element with element links.
119  */
120 --
121  PROCEDURE chk_del_element_type(p_mode             in varchar2,
122                                 p_element_type_id  in number,
123                                 p_processing_priority   number,
124                                 p_session_date     in date,
125                                 p_val_start_date   in date,
126                                 p_val_end_date     in date);
127 --
128  /*
129  NAME
130 ins_input_value
131  DESCRIPTION
132   inserts a pay value for an element type.
133  NOTES
134   This function requires a row to be in HR_LOOKUPS with a lookup type of
135   PAY_NAME_TRANSLATIONS for the PAY_VALUE and the correct legislation code.
136  */
137 --
138  PROCEDURE ins_input_value(p_element_type_id       in number,
139                            p_legislation_code      in varchar2,
140                            p_business_group_id     in number,
141                            p_classification_id     in number,
142                            p_val_start_date        in date,
143                            p_val_end_date          in date,
144                            p_startup_mode          in varchar2);
145 --
146  /*
147  NAME
148   ins_sub_classification_rules
149  DESCRIPTION
150   This procedure will create a sub_classification_rule for each
151   sub_classification that has the create_by_default_flag set to 'Y',,
152   It will then call hr_balances.ins_balance_feed to create the balance feeds.
153  */
154 --
155  PROCEDURE ins_sub_classification_rules(
156                                p_element_type_id       in number,
157                                p_legislation_code       in varchar2,
158                                p_business_group_id      in number,
159                                p_classification_id     in number,
160                                p_val_start_date        in date,
161                                p_val_end_date          in date,
162                                p_startup_mode           in varchar2);
163 --
164  /*
165  NAME
166   ins_3p_element_type
167  DESCRIPTION
168   Based on the process in run flag this will call the insert input value
169   and the insert status processing rules procedures.
170  */
171 --
172  PROCEDURE ins_3p_element_type(p_element_type_id       in number,
173                                p_process_in_run_flag   in varchar2,
174                                p_legislation_code      in varchar2,
175                                p_business_group_id     in number,
176                                p_classification_id     in number,
177                                p_non_payments_flag     in varchar,
178                                p_val_start_date        in date,
179                                p_val_end_date          in date,
180                                 p_startup_mode          in varchar2);
181 
182 --
183  /*
184  NAME
185   del_formula_result_rules
186  DESCRIPTION
187   This procedure deletes any formula result rules in existence for the element.  It is only called from del_status_processing_rules.
188 */
189 --
190 PROCEDURE       del_formula_result_rules(
191                                p_status_processing_rule_id in number,
192                                p_delete_mode            in varchar2,
193                                p_val_session_date       in date,
194                                p_val_start_date         in date,
195                                p_val_end_date           in date,
196                                 p_startup_mode          in varchar2);
197 --
198  /*
199  NAME
200   del_status_processing_ruleS
201  DESCRIPTION
202   This procedure deletes any status processing rules for this element and
203   calls a function to delete any formula result rules.
204  NOTES
205   Element types cannot be subject to a future change delete. They can be subject  to a next change delete but, in the case of status processing rules, this
206   does not cause the records to 'open up' if we are on the final record. A
207   warning will appear in the form telling the users that this is the case.
208 */
209 PROCEDURE       del_status_processing_rules(
210                                p_element_type_id        in number,
211                                p_delete_mode            in varchar2,
212                                p_val_session_date       in date,
213                                p_val_start_date         in date,
214                                p_val_end_date           in date,
215                                 p_startup_mode          in varchar2);
216 --
217 --
218  /*
219  NAME
220   del_sub_classification_rules
221  DESCRIPTION
222   This procedure deletes any existing sub_classification_rules and any
223   related balance feeds.
224  NOTES
225   Element types cannot be subject to a future change delete. They can, however,  be subject to a next change delete and this is handled in the code. This
226   procedure relies on the hr_input_values.del_3p_input_values being called
227   in the same commit unit as this will tidy up the balance feeds that may have
228   been created by the sub_classification rules.
229 */
230 --
231 PROCEDURE       del_sub_classification_rules(
232                                p_element_type_id        in number,
233                                p_delete_mode            in varchar2,
234                                p_val_session_date       in date,
235                                p_val_start_date         in date,
236                                p_val_end_date           in date,
237                                p_startup_mode           in varchar2);
238 --
239 --
240  /*
241  NAME
242   upd_3p_element_type
243  DESCRIPTION
244   This procedure does third party processing necessary on update. Currenctly
245   this only consists of deleting and recreating the database items
246 */
247 PROCEDURE       upd_3p_element_type(p_element_type_id   in number,
248                                     p_val_start_date    in date,
249                                     p_old_name          in varchar2,
250                                     p_name              in varchar2);
251 --
252  /*
253  NAME
254   del_3p_element_type
255  DESCRIPTION
256   This procedure does the necessary cascade deletes when an element type is
257   deleted. This affects the following tables: Input values, status processing
258   rules and formula result rules.
259  NOTES
260   Element types cannot be subject to a future change delete. They can, however,  be subject to a next change delete and this is handled in the code.
261  */
262 --
263  PROCEDURE del_3p_element_type(p_element_type_id       in number,
264                                p_delete_mode           in varchar2,
265                                p_val_session_date      in date,
266                                p_val_start_date        in date,
267                                p_val_end_date          in date,
268                                 p_startup_mode          in varchar2);
269 --
270 PROCEDURE       ins_ownerships(p_key_name       varchar2,
271                                p_key_value      number,
272                                p_element_type_id        number);
273  /*
274  NAME
275   check_element_freq
276  DESCRIPTION
277   This function checks whether there are any frequency rules for this
278   element and if they apply to the current period.
279  */
280 
281 PROCEDURE check_element_freq (  p_payroll_id    IN NUMBER,
282                                 p_bg_id         IN NUMBER,
283                                 p_pay_action_id IN NUMBER,
284                                 p_passed_date   IN DATE,
285                                 p_ele_type_id   IN NUMBER,
286                                 p_whole_period_only IN VARCHAR2,
287                                 p_skip_element  OUT NOCOPY VARCHAR2);
288 
289 PROCEDURE check_element_freq (  p_payroll_id    IN NUMBER,
290                                 p_bg_id         IN NUMBER,
291                                 p_pay_action_id IN NUMBER,
292                                 p_date_earned   IN DATE,
293                                 p_ele_type_id   IN NUMBER,
294                                 p_skip_element  OUT NOCOPY VARCHAR2);
295 
296 --
297 end hr_elements;