DBA Data[Home] [Help]

PACKAGE: APPS.PAY_GRR_INS

Source


1 Package pay_grr_ins AUTHID CURRENT_USER as
2 /* $Header: pygrrrhi.pkh 115.3 2002/12/10 09:48:11 pkakar ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |------------------------------< insert_dml >------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure calls the dt_insert_dml control logic which handles
11 --   the actual datetrack dml.
12 --
13 -- Pre Conditions:
14 --   This is an internal private procedure which must be called from the ins
15 --   procedure and must have all mandatory arguments set (except the
16 --   object_version_number which is initialised within the dt_insert_dml
17 --   procedure).
18 --
19 -- In Arguments:
20 --   A Pl/Sql record structre.
21 --
22 -- Post Success:
23 --   Processing contines.
24 --
25 -- Post Failure:
26 --   No specific error handling is required within this procedure.
27 --
28 -- Developer Implementation Notes:
29 --   None.
30 --
31 -- Access Status:
32 --   Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 -- ----------------------------------------------------------------------------
36 Procedure insert_dml
37 	(p_rec 			 in out nocopy pay_grr_shd.g_rec_type,
38 	 p_effective_date	 in	date,
39 	 p_datetrack_mode	 in	varchar2,
40 	 p_validation_start_date in	date,
41 	 p_validation_end_date	 in	date);
42 --
43 -- ----------------------------------------------------------------------------
44 -- |---------------------------------< ins >----------------------------------|
45 -- ----------------------------------------------------------------------------
46 -- {Start Of Comments}
47 --
48 -- Description:
49 --   This procedure is the record interface for the insert business process
50 --   for the specified entity. The role of this process is to insert a fully
51 --   validated row, into the HR schema passing back to  the calling process,
52 --   any system generated values (e.g. primary and object version number
53 --   attributes). This process is the main backbone of the ins business
54 --   process. The processing of this procedure is as follows:
55 --   1) If the p_validate argument has been set to true then a savepoint is
56 --      issued.
57 --   2) We must lock parent rows (if any exist).
58 --   3) The controlling validation process insert_validate is then executed
59 --      which will execute all private and public validation business rule
60 --      processes.
61 --   4) The pre_insert business process is then executed which enables any
62 --      logic to be processed before the insert dml process is executed.
63 --   5) The insert_dml process will physical perform the insert dml into the
64 --      specified entity.
65 --   6) The post_insert business process is then executed which enables any
66 --      logic to be processed after the insert dml process.
67 --   7) If the p_validate argument has been set to true an exception is raised
68 --      which is handled and processed by performing a rollback to the
69 --      savepoint which was issued at the beginning of the Ins process.
70 --
71 -- Pre Conditions:
72 --   The main arguments to the business process have to be in the record
73 --   format. The following attributes in p_rec are mandatory:
74 --   business_group_id, grade_or_spinal_point_id, rate_id and rate_type
75 --
76 -- In Arguments:
77 --   p_effective_date
78 --    Specifies the date of the datetrack insert operation.
79 --   p_validate
80 --     Determines if the business process is to be validated. Setting this
81 --     boolean value to true will invoke the process to be validated. The
82 --     default is false. The validation is controlled by a savepoint and
83 --     rollback mechanism. The savepoint is issued at the beginning of the
84 --     business process and is rollbacked at the end of the business process
85 --     when all the processing has been completed. The rollback is controlled
86 --     by raising and handling the exception hr_api.validate_enabled. We use
87 --     the exception because, by raising the exception with the business
88 --     process, we can exit successfully without having any of the 'OUT'
89 --     arguments being set.
90 --   p_rec
91 --     Contains the attributes of the grade rule record.
92 --
93 -- Post Success:
94 --   A fully validated row will be inserted into the specified entity
95 --   without being committed. If the p_validate argument has been set to true
96 --   then all the work will be rolled back.
97 --   p_rec
98 --     The primary key and object version number details for the inserted
99 --     grade rule will be returned in p_rec.
100 --
101 -- Post Failure:
102 --   If an error has occurred, an error message will be supplied with the work
103 --   rolled back. A failure will occur if any of the following conditions are
104 --   found:
105 --     1) All of the mandatory arguments have not been set.
106 --     2) The p_rec.business_group_id business group does not exist.
107 --     3) If the grade rule is defined for a grade, the
108 --        p_rec.grade_or_spinal_point_id does not exist on per_grades
109 --        (grade_id) or if the grade rule is defined for a spinal point, the
110 --        p_rec.grade_or_spinal_point_id does not exist on per_spinal_points
111 --        (spinal_point_id).
112 --     4) The combination of p_rec.grade_or_spinal_point_id,
113 --        p_rec.business_group_id, p_rec.rate_id, p_rec.rate_type already
114 --        exists on pay_grade_rules_f as of the effective date.
115 --     5) The p_rec.rate_id does not exist in pay_rates.
116 --     6) The p_rec.rate_type value not in 'G' or 'SP'.
117 --     7) The combination of p_rec.rate_id and p_rec.rate_type does not
118 --        exist in pay_rates.
119 --     8) The p_rec.maximum value is less than the p_rec.minimum value.
120 --     9) The p_rec.maximum value is less than the p_rec.minimum value.
121 --     10)The p_rec.mid_value value is less than the p_rec.minimum value.
122 --     11)The p_rec.mid_value value is greater than the p_rec.maximum value.
123 --     12)The p_rec.minimum value is greater than the p_rec.value value.
124 --     13)The combination of p_rec.sequence, p_rec.business_group_id,
125 --        p_rec.rate_id and p_rate.rate_type already exists on
126 --        pay_grade_rules_f as of the effective date.
127 --     14)If the grade rule is defined for a grade, the p_rec.sequence does
128 --        not correspond to a grade sequence on per_grades (sequence) or if
129 --        the grade rule is defined for a spinal_point_sequence, the
130 --        p_rec.sequence does not correspond to a spinal point sequence
131 --        on per_spinal_points (sequence).
132 --     15)The p_rec.value value is greater than the p_rec.maximum value.
133 --
134 -- Access Status:
135 --   Internal Development Use Only.
136 --
137 -- {End Of Comments}
138 -- ----------------------------------------------------------------------------
139 Procedure ins
140   (
141   p_rec		   in out nocopy pay_grr_shd.g_rec_type,
142   p_effective_date in     date,
143   p_validate	   in     boolean default false
144   );
145 --
146 -- ----------------------------------------------------------------------------
147 -- |---------------------------------< ins >----------------------------------|
148 -- ----------------------------------------------------------------------------
149 -- {Start Of Comments}
150 --
151 -- Description:
152 --   This procedure is the attribute interface for the insert business
153 --   process for the specified entity and is the outermost layer. The role
154 --   of this process is to insert a fully validated row into the HR schema
155 --   passing back to the calling process, any system generated values
156 --   (e.g. object version number attributes).The processing of this
157 --   procedure is as follows:
158 --   1) The attributes are converted into a local record structure by
159 --      calling the convert_args function.
160 --   2) After the conversion has taken place, the corresponding record ins
161 --      interface business process is executed.
162 --   3) OUT arguments are then set to their corresponding record arguments.
163 --
164 -- Pre Conditions:
165 --   Refer to the ins record interface for details.
166 --
167 -- In Arguments:
168 --   p_effective_date
169 --    Specifies the date of the datetrack insert operation.
170 --   p_validate
171 --     Determines if the business process is to be validated. Setting this
172 --     Boolean value to true will invoke the process to be validated.
173 --     The default is false.
174 --
175 -- Post Success:
176 --   A fully validated row will be inserted for the specified entity
177 --   without being committed (or rollbacked depending on the p_validate
178 --   status).
179 --   p_grade_rule_id
180 --     will be set to the primary key value of the inserted grade rule.
181 --   p_object_version_number
182 --     will be set to the object version number of the inserted grade rule
183 --   p_effective_start_date
184 --     will be set to the effective start date of the inserted grade rule
185 --   p_effective_end_date
186 --     will be set to the effective end date of the inserted grade rule
187 --
188 -- Post Failure:
189 --   If an error has occurred, an error message will be supplied with the work
190 --   rolled back. Refer to the ins record interface for details of possible
191 --   failures.
192 --
193 -- Developer Implementation Notes:
194 --   None.
195 --
196 -- Access Status:
197 --   Internal Development Use Only.
198 --
199 -- {End Of Comments}
200 -- ----------------------------------------------------------------------------
201 Procedure ins
202   (
203   p_grade_rule_id                out nocopy number,
204   p_effective_start_date         out nocopy date,
205   p_effective_end_date           out nocopy date,
206   p_business_group_id            in number,
207   p_rate_id                      in number,
208   p_grade_or_spinal_point_id     in number,
209   p_rate_type                    in varchar2,
210   p_maximum                      in varchar2         default null,
211   p_mid_value                    in varchar2         default null,
212   p_minimum                      in varchar2         default null,
213   p_sequence                     in number           default null,
214   p_value                        in varchar2         default null,
215   p_request_id                   in number           default null,
216   p_program_application_id       in number           default null,
217   p_program_id                   in number           default null,
218   p_program_update_date          in date             default null,
219   p_object_version_number        out nocopy number,
220   p_effective_date		 in date,
221   p_validate			 in boolean   default false,
222   p_currency_code                in varchar2  default null
223   );
224 --
225 end pay_grr_ins;