DBA Data[Home] [Help]

PACKAGE: APPS.PAY_PPM_UPD

Source


1 Package pay_ppm_upd as
2 /* $Header: pyppmrhi.pkh 120.0 2005/05/29 07:42:59 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< upd >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure is the record interface for the update business
11 --   process for the specified entity. The role of this process is
12 --   to perform the datetrack update mode, fully validating the row
13 --   for the HR schema passing back to the calling process, any system
14 --   generated values (e.g. object version number attribute). This process
15 --   is the main backbone of the upd business process. The processing of
16 --   this procedure is as follows:
17 --   1) Ensure that the datetrack update mode is valid.
18 --   2) If the p_validate argument has been set to true then a savepoint
19 --      is issued.
20 --   3) The row to be updated is then locked and selected into the record
21 --      structure g_old_rec.
22 --   4) Because on update arguments which are not part of the update do not
23 --      have to be defaulted, we need to build up the updated row by
24 --      converting any system defaulted arguments to their corresponding
25 --      value.
26 --   5) The controlling validation process update_validate is then executed
27 --      which will execute all private and public validation business rule
28 --      processes.
29 --   6) The pre_update business process is then executed which enables any
30 --      logic to be processed before the update dml process is executed.
31 --   7) The update_dml process will physical perform the update dml into the
32 --      specified entity.
33 --   8) The post_update business process is then executed which enables any
34 --      logic to be processed after the update dml process.
35 --   9) If the p_validate argument has been set to true an exception is
36 --      raised which is handled and processed by performing a rollback to
37 --      the savepoint which was issued at the beginning of the upd process.
38 --
39 -- Pre Conditions:
40 --   The main arguments to the business process have to be in the record
41 --   format.
42 --
43 -- In Arguments:
44 --   p_effective_date
45 --     Specifies the date of the datetrack update operation.
46 --   p_datetrack_mode
47 --     Determines the datetrack update mode.
48 --   p_validate
49 --     Determines if the business process is to be validated. Setting this
50 --     boolean value to true will invoke the process to be validated. The
51 --     default is false. The validation is controlled by a savepoint and
52 --     rollback mechanism. The savepoint is issued at the beginning of the
53 --     business process and is rollbacked at the end of the business process
54 --     when all the processing has been completed. The rollback is controlled
55 --     by raising and handling the exception hr_api.validate_enabled. We use
56 --     the exception because, by raising the exception with the business
57 --     process, we can exit successfully without having any of the 'OUT'
58 --     arguments being set.
59 --   p_rec
60 --     Contains the attributes of the personal payment method record
61 --
62 -- Post Success:
63 --   The specified row will be fully validated and datetracked updated for
64 --   the specified entity without being committed for the datetrack mode. If
65 --   the p_validate argument has been set to true then all the work will be
66 --   rolled back.
67 --   p_rec.object_version_number will be set to the new object_version_number
68 --   for the personal payment method
69 --
70 -- Post Failure:
71 --   If an error has occurred, an error message will be supplied with the work
72 --   rolled back.
73 --   A failure will occur if any of the following conditions are found:
74 --   1) All of the mandatory arguments have not been set
75 --   2) An attempt is made to update one of the following attributes:
76 --      personal_payment_method_id, assignment_id, business_group_id or
77 --      org_payment_method_id
78 --   3) The balance type related to the value in
79 --      p_rec.personal_payment_method_id  is
80 --      non-remunerative and the value in p_rec.amount is not null
81 --   4) The balance type related to the value in
82 --      p_rec.personal_payment_method_id  is
83 --      non-remunerative and the value in p_rec.percentage is not 100
84 --   5) The value in p_rec.percentage is not null and the value in
85 --      p_rec.amount is not null
86 --   6) The value in p_rec.percentage is null and the value in
87 --      p_rec.amount is null
88 --   7) The value in p_rec.amount is less than 0
89 --   8) The value in p_rec.percentage is not between 0 and 100
90 --   9) The related payment type is magnetic tape and the value in
91 --      p_rec.external_account_id is null
92 --  10) The value in p_rec.external_account_id is not null and it does
93 --      not exist in PAY_EXTERNAL_ACCOUNTS
94 --  11) The value in p_rec.priority is null
95 --  12) The balance type related to the value in
96 --      p_rec.personal_payment_method_id is Remunerative and
97 --      the value in p_rec.priority is not an integer between 1 and 99
98 --  13) The balance type related to the value in
99 --      p_rec.personal_payment_method_id is Non_Remunerative and
100 --      the value in p_rec.priority is not 1
101 --  14) The balance type related to the value in
102 --      p_rec.personal_payment_method_id is Remunerative and
103 --      the value in p_rec.priority is not unique between
104 --      VALIDATION_START_DATE and VALIDATION_END_DATE
105 --
106 -- Developer Implementation Notes:
107 --   None.
108 --
109 -- Access Status:
110 --   Internal Development Use Only.
111 --
112 -- {End Of Comments}
113 -- ----------------------------------------------------------------------------
114 Procedure upd
115   (
116   p_rec			in out nocopy 	pay_ppm_shd.g_rec_type,
117   p_effective_date	in 	date,
118   p_datetrack_mode	in 	varchar2,
119   p_validate		in 	boolean default false
120   );
121 --
122 -- ----------------------------------------------------------------------------
123 -- |---------------------------------< upd >----------------------------------|
124 -- ----------------------------------------------------------------------------
125 -- {Start Of Comments}
126 --
127 -- Description:
128 --   This procedure is the attribute interface for the datetrack update
129 --   business process for the specified entity and is the outermost layer.
130 --   The role of this process is to update a fully validated row into the
131 --   HR schema passing back to the calling process, any system generated
132 --   values (e.g. object version number attributes).The processing of this
133 --   procedure is as follows:
134 --   1) The attributes are converted into a local record structure by
135 --      calling the convert_defs procedure.
136 --   2) After the conversion has taken place, the corresponding record upd
137 --      interface business process is executed.
138 --   3) OUT arguments are then set to their corresponding record arguments.
139 --
140 -- Pre Conditions:
141 --
142 -- In Arguments:
143 --   p_effective_date
144 --     Specifies the date of the datetrack update operation.
145 --   p_datetrack_mode
146 --     Determines the datetrack update mode.
147 --   p_validate
148 --     Determines if the business process is to be validated. Setting this
149 --     Boolean value to true will invoke the process to be validated.
150 --     The default is false.
151 --
152 -- Post Success:
153 --   A fully validated row will be updated for the specified entity
154 --   without being committed (or rollbacked depending on the p_validate
155 --   status).
156 --
157 -- Post Failure:
158 --   If an error has occurred, an error message will be supplied with the work
159 --   rolled back. Refer to the upd record interface for details of possible
160 --   failures.
161 --
162 -- Developer Implementation Notes:
163 --   None.
164 --
165 -- Access Status:
166 --   Internal Development Use Only.
167 --
168 -- {End Of Comments}
169 -- ----------------------------------------------------------------------------
170 Procedure upd
171   (
172   p_personal_payment_method_id   in number,
173   p_effective_start_date         out nocopy date,
174   p_effective_end_date           out nocopy date,
175   p_external_account_id          in number           default hr_api.g_number,
176   p_amount                       in number           default hr_api.g_number,
177   p_comment_id                   out nocopy number,
178   p_comments                     in varchar2         default hr_api.g_varchar2,
179   p_percentage                   in number           default hr_api.g_number,
180   p_priority                     in number           default hr_api.g_number,
181   p_attribute_category           in varchar2         default hr_api.g_varchar2,
182   p_attribute1                   in varchar2         default hr_api.g_varchar2,
183   p_attribute2                   in varchar2         default hr_api.g_varchar2,
184   p_attribute3                   in varchar2         default hr_api.g_varchar2,
185   p_attribute4                   in varchar2         default hr_api.g_varchar2,
186   p_attribute5                   in varchar2         default hr_api.g_varchar2,
187   p_attribute6                   in varchar2         default hr_api.g_varchar2,
188   p_attribute7                   in varchar2         default hr_api.g_varchar2,
189   p_attribute8                   in varchar2         default hr_api.g_varchar2,
190   p_attribute9                   in varchar2         default hr_api.g_varchar2,
191   p_attribute10                  in varchar2         default hr_api.g_varchar2,
192   p_attribute11                  in varchar2         default hr_api.g_varchar2,
193   p_attribute12                  in varchar2         default hr_api.g_varchar2,
194   p_attribute13                  in varchar2         default hr_api.g_varchar2,
195   p_attribute14                  in varchar2         default hr_api.g_varchar2,
196   p_attribute15                  in varchar2         default hr_api.g_varchar2,
197   p_attribute16                  in varchar2         default hr_api.g_varchar2,
198   p_attribute17                  in varchar2         default hr_api.g_varchar2,
199   p_attribute18                  in varchar2         default hr_api.g_varchar2,
200   p_attribute19                  in varchar2         default hr_api.g_varchar2,
201   p_attribute20                  in varchar2         default hr_api.g_varchar2,
202   p_object_version_number        in out nocopy number,
203   p_payee_type                   in varchar2         default hr_api.g_varchar2,
204   p_payee_id                     in number           default hr_api.g_number,
205   p_effective_date		 in date,
206   p_datetrack_mode		 in varchar2,
207   p_validate			 in boolean          default false,
208   p_ppm_information_category     in varchar2         default hr_api.g_varchar2,
209   p_ppm_information1             in varchar2         default hr_api.g_varchar2,
210   p_ppm_information2             in varchar2         default hr_api.g_varchar2,
211   p_ppm_information3             in varchar2         default hr_api.g_varchar2,
212   p_ppm_information4             in varchar2         default hr_api.g_varchar2,
213   p_ppm_information5             in varchar2         default hr_api.g_varchar2,
214   p_ppm_information6             in varchar2         default hr_api.g_varchar2,
215   p_ppm_information7             in varchar2         default hr_api.g_varchar2,
216   p_ppm_information8             in varchar2         default hr_api.g_varchar2,
217   p_ppm_information9             in varchar2         default hr_api.g_varchar2,
218   p_ppm_information10            in varchar2         default hr_api.g_varchar2,
219   p_ppm_information11            in varchar2         default hr_api.g_varchar2,
220   p_ppm_information12            in varchar2         default hr_api.g_varchar2,
221   p_ppm_information13            in varchar2         default hr_api.g_varchar2,
222   p_ppm_information14            in varchar2         default hr_api.g_varchar2,
223   p_ppm_information15            in varchar2         default hr_api.g_varchar2,
224   p_ppm_information16            in varchar2         default hr_api.g_varchar2,
225   p_ppm_information17            in varchar2         default hr_api.g_varchar2,
226   p_ppm_information18            in varchar2         default hr_api.g_varchar2,
227   p_ppm_information19            in varchar2         default hr_api.g_varchar2,
228   p_ppm_information20            in varchar2         default hr_api.g_varchar2,
229   p_ppm_information21            in varchar2         default hr_api.g_varchar2,
230   p_ppm_information22            in varchar2         default hr_api.g_varchar2,
231   p_ppm_information23            in varchar2         default hr_api.g_varchar2,
232   p_ppm_information24            in varchar2         default hr_api.g_varchar2,
233   p_ppm_information25            in varchar2         default hr_api.g_varchar2,
234   p_ppm_information26            in varchar2         default hr_api.g_varchar2,
235   p_ppm_information27            in varchar2         default hr_api.g_varchar2,
236   p_ppm_information28            in varchar2         default hr_api.g_varchar2,
237   p_ppm_information29            in varchar2         default hr_api.g_varchar2,
238   p_ppm_information30            in varchar2         default hr_api.g_varchar2
239   );
240 --
241 -- ----------------------------------------------------------------------------
242 -- |-----------------------------< convert_defs >-----------------------------|
243 -- ----------------------------------------------------------------------------
244 -- {Start Of Comments}
245 --
246 -- Description:
247 --   The Convert_Defs procedure has one very important function:
248 --   It must return the record structure for the row with all system defaulted
249 --   values converted into its corresponding argument value for update. When
250 --   we attempt to update a row through the Upd business process , certain
251 --   arguments can be defaulted which enables flexibility in the calling of
252 --   the upd process (e.g. only attributes which need to be updated need to be
253 --   specified). For the upd business process to determine which attributes
254 --   have NOT been specified we need to check if the argument has a reserved
255 --   system default value. Therefore, for all attributes which have a
256 --   corresponding reserved system default mechanism specified we need to
257 --   check if a system default is being used. If a system default is being
258 --   used then we convert the defaulted value into its corresponding attribute
259 --   value held in the g_old_rec data structure.
260 --
261 -- Pre Conditions:
262 --
263 --
264 -- In Arguments:
265 --   A Pl/Sql record structre.
266 --
267 -- Post Success:
268 --   The record structure will be returned with all system defaulted argument
269 --   values converted into its current row attribute value.
270 --
271 -- Post Failure:
272 --   No direct error handling is required within this procedure. Any possible
273 --   errors within this function will be a PL/SQL value error due to conversion
274 --   of datatypes or data lengths.
275 --
276 -- Developer Implementation Notes:
277 --   None.
278 --
279 -- Access Status:
280 --   Internal Development Use Only.
281 --
282 -- {End Of Comments}
283 -- ----------------------------------------------------------------------------
284 procedure convert_defs(p_rec in out nocopy pay_ppm_shd.g_rec_type);
285 end pay_ppm_upd;