DBA Data[Home] [Help]

PACKAGE: APPS.HR_TRANS_HISTORY_API

Source


1 PACKAGE HR_TRANS_HISTORY_API AUTHID CURRENT_USER as
2 /* $Header: hrtrhapi.pkh 120.2.12000000.2 2007/05/04 18:38:44 srajakum ship $ */
3 -- Global variables
4    g_date_format varchar2(10) := 'RRRR/MM/DD';
5 --
6 -- ----------------------------------------------------------------------------
7 -- |------------------------------< archive_submit >--------------------------|
8 -- ----------------------------------------------------------------------------
9 --
10 -- {Start Of Comments}
11 --
12 -- Description:
13 --    This API archives a submitted transaction.
14 --
15 -- Prerequisites:
16 --    The transaction and a corresponding notification must exist as of effective date.
17 --
18 -- In Parameters:
19 --   Name                             Reqd Type          	Description
20 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is submitted.
21 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
22 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
23 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
24 --
25 -- Post Success:
26 --   The submitted transaction is successfully archived.
27 --
28 -- Post Failure:
29 --   The submitted transaction is not archived and an error is raised.
30 --
31 -- Access Status:
32 --   Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 --
36 Procedure ARCHIVE_SUBMIT
37 (
38   P_TRANSACTION_ID                  IN       NUMBER
39  ,P_NOTIFICATION_ID                  IN       NUMBER
40  ,P_USER_NAME                            IN       VARCHAR2
41  ,P_USER_COMMENT                    IN       VARCHAR2
42 );
43 --
44 -- ----------------------------------------------------------------------------
45 -- |-----------------------------< archive_resubmit >-------------------------|
46 -- ----------------------------------------------------------------------------
47 --
48 -- {Start Of Comments}
49 --
50 -- Description:
51 --   This API archives a resubmitted transaction.
52 --
53 -- Prerequisites:
54 --    The transaction and a corresponding notification must exist as of effective date.
55 --
56 -- In Parameters:
57 --   Name                             Reqd Type          	Description
58 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is resubmitted.
59 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
60 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
61 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
62 --
63 -- Post Success:
64 --   The resubmitted transaction is successfully archived.
65 --
66 -- Post Failure:
67 --   The resubmitted transaction is not archived and an error is raised.
68 --
69 -- Access Status:
70 --   Internal Development Use Only.
71 --
72 -- {End Of Comments}
73 --
74 Procedure ARCHIVE_RESUBMIT
75 (
76   P_TRANSACTION_ID                  IN       NUMBER
77  ,P_NOTIFICATION_ID                 IN       NUMBER
78  ,P_USER_NAME                       IN       VARCHAR2
79  ,P_USER_COMMENT                    IN       VARCHAR2
80 );
81 --
82 -- ----------------------------------------------------------------------------
83 -- |-------------------------------< archive_sfl >----------------------------|
84 -- ----------------------------------------------------------------------------
85 --
86 -- {Start Of Comments}
87 --
88 -- Description:
89 --    This API archives the transaction which has been saved for later.
90 --
91 -- Prerequisites:
92 --    The transaction and a corresponding notification must exist as of effective date.
93 --
94 -- In Parameters:
95 --   Name                             Reqd Type          	Description
96 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is saved for later.
97 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
98 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
99 --
100 -- Post Success:
101 --   The saved for later transaction is successfully archived.
102 --
103 -- Post Failure:
104 --  The saved for later transaction is not archived and an error is raised.
105 --
106 -- Access Status:
107 --   Internal Development Use Only.
108 --
109 -- {End Of Comments}
110 --
111 Procedure ARCHIVE_SFL
112 (
113   P_TRANSACTION_ID                  IN       NUMBER
114  ,P_NOTIFICATION_ID                 IN       NUMBER
115  ,P_USER_NAME                       IN       VARCHAR2
116 );
117 --
118 -- ----------------------------------------------------------------------------
119 -- |-----------------------------< archive_approve >--------------saved for later------------|
120 -- ----------------------------------------------------------------------------
121 --
122 -- {Start Of Comments}
123 --
124 -- Description:
125 --    This API archives the approved transaction.
126 --
127 -- Prerequisites:
128 --    The transaction and a corresponding notification must exist as of effective date.
129 --
130 -- In Parameters:
131 --   Name                             Reqd Type          	Description
132 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is approved.
133 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
134 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
135 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
136 --
137 -- Post Success:
138 --   The approved transaction is successfully archived.
139 --
140 -- Post Failure:
141 --  The approved transaction is not archived and an error is raised.
142 --
143 -- Access Status:
144 --   Internal Development Use Only.
145 --
146 -- {End Of Comments}
147 --
148 Procedure ARCHIVE_APPROVE
149 (
150   P_TRANSACTION_ID                  IN       NUMBER
151  ,P_NOTIFICATION_ID                 IN       NUMBER
152  ,P_USER_NAME                       IN       VARCHAR2
153  ,P_USER_COMMENT                    IN       VARCHAR2
154 );
155 --
156 -- ----------------------------------------------------------------------------
157 -- |------------------------------< archive_delete >--------------------------|
158 -- ----------------------------------------------------------------------------
159 --
160 -- {Start Of Comments}
161 --
162 -- Description:
163 --    This API archives a deleted transaction.
164 --
165 -- Prerequisites:
166 --    The transaction and a corresponding notification must exist as of effective date.
167 --
168 -- In Parameters:
169 --   Name                             Reqd Type          	Description
170 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is deleted.
171 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
172 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
173 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
174 --
175 -- Post Success:
176 --   The deleted transaction is successfully archived.
177 --
178 -- Post Failure:
179 --  The deleted transaction is not archived and an error is raised.
180 --
181 -- Access Status:
182 --   Internal Development Use Only.
183 --
184 -- {End Of Comments}
185 --
186 Procedure ARCHIVE_DELETE
187 (
188   P_TRANSACTION_ID                  IN       NUMBER
189  ,P_NOTIFICATION_ID                 IN       NUMBER
190  ,P_USER_NAME                       IN       VARCHAR2
191  ,P_USER_COMMENT                    IN       VARCHAR2
192 );
193 --
194 -- ----------------------------------------------------------------------------
195 -- |------------------------------< archive_reject >--------------------------|
196 -- ----------------------------------------------------------------------------
197 --
198 -- {Start Of Comments}
199 --
200 -- Description:
201 --    This API archives a rejected transaction.
202 --
203 -- Prerequisites:
204 --    The transaction and a corresponding notification must exist as of effective date.
205 --
206 -- In Parameters:
207 --   Name                             Reqd Type          	Description
208 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is rejected.
209 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
210 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
211 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
212 --
213 -- Post Success:
214 --   The rejected transaction is successfully archived.
215 --
216 -- Post Failure:
217 --   The rejected transaction is not archived and an error is raised.
218 --
219 -- Access Status:
220 --   Internal Development Use Only.
221 --
222 -- {End Of Comments}
223 --
224 Procedure ARCHIVE_REJECT
225 (
226   P_TRANSACTION_ID                  IN       NUMBER
227  ,P_NOTIFICATION_ID                 IN       NUMBER
228  ,P_USER_NAME                       IN       VARCHAR2
229  ,P_USER_COMMENT                    IN       VARCHAR2
230 );
231 --
232 -- ----------------------------------------------------------------------------
233 -- |-------------------------------< archive_rfc >----------------------------|
234 -- ----------------------------------------------------------------------------
235 --
236 -- {Start Of Comments}
237 --
238 -- Description:
239 --     This API archives a transaction which has been returned for correction.
240 --
241 -- Prerequisites:
242 --    The transaction and a corresponding notification must exist as of effective date.
243 --
244 -- In Parameters:
245 --   Name                             Reqd Type          	Description
246 --   p_transaction_id             yes  NUMBER      Identifies the transaction which has been returned for correction.
247 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
248 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
249 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
250 --
251 -- Post Success:
252 --   The returned for correction transaction is successfully archived.
253 --
254 -- Post Failure:
255 --   The returned for correction transaction is not archived and an error is raised.
256 --
257 -- Access Status:
258 --   Internal Development Use Only.
259 --
260 -- {End Of Comments}
261 --
262 Procedure ARCHIVE_RFC
263 (
264   P_TRANSACTION_ID                  IN       NUMBER
265  ,P_NOTIFICATION_ID                 IN       NUMBER
266  ,P_USER_NAME                       IN       VARCHAR2
267  ,P_USER_COMMENT                    IN       VARCHAR2
268 );
269 --
270 -- ----------------------------------------------------------------------------
271 -- |-----------------------------< archive_transfer >-------------------------|
272 -- ----------------------------------------------------------------------------
273 --
274 -- {Start Of Comments}
275 --
276 -- Description:
277 --    This API archives a transfered transaction.
278 --
279 -- Prerequisites:
280 --    The transaction and a corresponding notification must exist as of effective date.
281 --
282 -- In Parameters:
283 --   Name                             Reqd Type          	Description
284 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is transfered.
285 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
286 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
287 --   p_user_comment             yes  VARCHAR2 Identifies the user comments for the transaction.
288 --
289 -- Post Success:
290 --   The transfered transaction is successfully archived.
291 --
292 -- Post Failure:
293 --  The transfered transaction is not archived and an error is raised.
294 --
295 -- Access Status:
296 --   Internal Development Use Only.
297 --
298 -- {End Of Comments}
299 --
300 Procedure ARCHIVE_TRANSFER
301 (
302   P_TRANSACTION_ID                  IN       NUMBER
303  ,P_NOTIFICATION_ID                 IN       NUMBER
304  ,P_USER_NAME                       IN       VARCHAR2
305  ,P_USER_COMMENT                    IN       VARCHAR2
306 );
307 --
308 -- ----------------------------------------------------------------------------
309 -- |-----------------------------< getTransStateSequence >-------------------------|
310 -- ----------------------------------------------------------------------------
311 --
312 -- {Start Of Comments}
313 --
314 -- Description:
315 --    This function checks if the transaction is an old one or a new one.
316 --     For an old transaction it populates the PQH_SS_TRANS_STATE_HISTORY table from
317 --     PQH_SS_APPROVAL_HISTORY and HR_API_TRANSACTIONS and returns the maximum
318 --     sequence of approval for the input transaction id.
319 --     For a new transaction it returns a NULL value.
320 --
321 -- Prerequisites:
322 --    The transaction and a corresponding notification must exist as of effective date.
323 --
324 -- In Parameters:
325 --   Name                             Reqd Type          	Description
326 --   p_transaction_id             yes  NUMBER      Identifies the transaction which is submitted.
327 --
328 -- Post Success:
329 --   The function will return a transaction sequence number or a null value to indicate level of success.
330 --
331 -- Post Failure:
332 --   The transaction sequence is not returned and an error is raised.
333 --
334 -- Access Status:
335 --   Internal Development Use Only.
336 --
337 -- {End Of Comments}
338 --
339 FUNCTION getTransStateSequence
340 (
341    P_TRANSACTION_ID          IN              NUMBER
342 ) RETURN NUMBER;
343 --
344 -- ----------------------------------------------------------------------------
345 -- |-----------------------------< archive_forward >--------------------------|
346 -- ----------------------------------------------------------------------------
347 --
348 -- {Start Of Comments}
349 --
350 -- Description:
351 --    This API archives a forwarded transaction.
352 --
353 -- Prerequisites:
354 --    The transaction and a corresponding notification must exist as of effective date.
355 --
356 -- In Parameters:
357 --   Name                             Reqd Type          	Description
358 --   p_transaction_id             yes  NUMBER      Identifies the transaction which has been forwarded.
359 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
360 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
361 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
362 --
363 -- Post Success:
364 --   The forwarded transaction is successfully archived.
365 --
366 -- Post Failure:
367 --   The forwarded transaction is not archived and an error is raised.
368 --
369 -- Access Status:
370 --   Internal Development Use Only.
371 --
372 -- {End Of Comments}
373 --
374 Procedure ARCHIVE_FORWARD
375 (
376   P_TRANSACTION_ID                  IN       NUMBER
377  ,P_NOTIFICATION_ID                 IN       NUMBER
378  ,P_USER_NAME                       IN       VARCHAR2
379  ,P_USER_COMMENT                    IN       VARCHAR2
380 );
381 --
382 -- ----------------------------------------------------------------------------
383 -- |------------------------------< cancel_action >---------------------------|
387 --
384 -- ----------------------------------------------------------------------------
385 --
386 -- {Start Of Comments}
388 -- Description:
389 --    This API cancels a transaction.
390 --
391 -- Prerequisites:
392 --    The transaction must exist as of effective date.
393 --
394 -- In Parameters:
395 --   Name                             Reqd Type          	Description
396 --   p_transaction_id             yes  NUMBER      Identifies the transaction which has been cancelled.
397 --
398 -- Post Success:
399 --   The current transaction is successfully cancelled.
400 --
401 -- Post Failure:
402 --   The current transaction is not cancelled and an error is raised.
403 --
404 -- Access Status:
405 --   Internal Development Use Only.
406 --
407 -- {End Of Comments}
408 --
409 Procedure CANCEL_ACTION
410 (
411   P_TRANSACTION_ID                  IN       NUMBER
412 );
413 --
414 -- ----------------------------------------------------------------------------
415 -- |-------------------------< archive_answer_moreinfo >----------------------|
416 -- ----------------------------------------------------------------------------
417 --
418 -- {Start Of Comments}
419 --
420 -- Description:
421 --    This API archives the transaction answering more information.
422 --
423 -- Prerequisites:
424 --    The transaction and a corresponding notification must exist as of effective date.
425 --
426 -- In Parameters:
427 --   Name                             Reqd Type          	Description
428 --   p_transaction_id             yes  NUMBER      Identifies the transaction which answers more information.
432 --
429 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
430 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
431 --   p_user_comment            yes  VARCHAR2 Identifies the user comments for the transaction.
433 -- Post Success:
434 --   The transaction for answering more information is successfully archived.
435 --
436 -- Post Failure:
437 --   The transaction for answering more information is not archived and an error is raised.
438 --
439 -- Access Status:
440 --   Internal Development Use Only.
441 --
442 -- {End Of Comments}
443 --
444 Procedure ARCHIVE_ANSWER_MOREINFO
445 (
446   P_TRANSACTION_ID                  IN       NUMBER
447  ,P_NOTIFICATION_ID                 IN       NUMBER
448  ,P_USER_NAME                       IN       VARCHAR2
449  ,P_USER_COMMENT                    IN       VARCHAR2
450 );
451 --
452 -- ----------------------------------------------------------------------------
453 -- |---------------------------< archive_req_moreinfo >-----------------------|
454 -- ----------------------------------------------------------------------------
455 --
456 -- {Start Of Comments}
457 --
458 -- Description:
459 --    This API archives the transaction requesting more information.
460 --
461 -- Prerequisites:
462 --    The transaction and a corresponding notification must exist as of effective date.
463 --
464 -- In Parameters:
465 --   Name                             Reqd Type          	Description
466 --   p_transaction_id             yes  NUMBER      Identifies the transaction which requests for more information.
467 --   p_notification_id              yes  NUMBER      Identifies the respective notification for the transaction.
468 --   p_user_name                  yes  VARCHAR2 Identifies the user acting on the transaction.
469 --   p_user_comment             yes  VARCHAR2 Identifies the user comments for the transaction.
470 --
471 -- Post Success:
472 --   The transaction requesting for more information is successfully archived.
473 --
474 -- Post Failure:
475 --   The transaction requesting more information is not archived and an error is raised.
476 --
477 -- Access Status:
478 --   Internal Development Use Only.
479 --
480 -- {End Of Comments}
481 --
482 Procedure ARCHIVE_REQ_MOREINFO
483 (
484   P_TRANSACTION_ID                  IN       NUMBER
485  ,P_NOTIFICATION_ID                 IN       NUMBER
486  ,P_USER_NAME                       IN       VARCHAR2
487  ,P_USER_COMMENT                    IN       VARCHAR2
488 );
489 Procedure ARCHIVE_TIMEOUT
490 (
491   P_TRANSACTION_ID                  IN       NUMBER
492  ,P_NOTIFICATION_ID                 IN       NUMBER
493  ,P_USER_NAME                       IN       VARCHAR2
494  ,P_USER_COMMENT                    IN       VARCHAR2
495 );
496 END HR_TRANS_HISTORY_API;