1 PACKAGE BODY per_ad_zd_seed_wrapper
2 /* $Header: peadwpkg.pkb 120.3 2011/05/13 07:40:45 vvijayku noship $ */
3 /*
4 ******************************************************************
5 * *
6 * Copyright (C) 2011 Oracle Corporation. *
7 * All rights reserved. *
8 * *
9 * This material has been provided pursuant to an agreement *
10 * containing restrictions on its use. The material is also *
11 * protected by copyright law. No part of this material may *
12 * be copied or distributed, transmitted or transcribed, in *
13 * any form or by any means, electronic, mechanical, magnetic, *
14 * manual, or otherwise, or disclosed to third parties without *
15 * the express written permission of Oracle Corporation, *
16 * 500 Oracle Parkway, Redwood City, CA, 94065. *
17 * *
18 ******************************************************************
19
20 Name : per_ad_zd_seed_wrapper
21
22 Description : Package contains wrapper function to call procedure
23 ad_zd_seed.prepare. This package will be maintained
24 differently for R12.2 Codeline and (11i,R12.0 and R12.1)
25
26 Uses :
27
28 Change List
29 -----------
30 Date Name Version Bug No Description
31 ---- ---- ------- ------ ------------------------
32 28-Mar-2011 emunsiek 120.0 11849633 Initial Version
33 04-May-2011 emunisek 120.1 11870772 Added Procedure check_patch_edition
34 and Function is_patch_edition
35 04-May-2011 emunisek 120.2 11870772 Added Exception section in
36 is_patch_edition function
37 13-May-2011 vvijayku 120.3 12426054 Changed the function is_patch_edition
38 to return an Integer value.
39 ****************************************************************************/
40 AS
41
42 PROCEDURE prepare(
43 p_table varchar2
44 )
45 IS
46
47 BEGIN
48
49 hr_utility.trace('Entering per_ad_zd_seed_wrapper.prepare');
50
51 ad_zd_seed.prepare(p_table);
52
53
54 END prepare;
55
56 /*This procedure is a wrapper on ad_zd.get_edition procedure.This procedure
57 will have code only for R12.2 and later releases. Pre-R12.2 will have nothing
58 to do. Procedure added to retain the Dual Maintenance of Forms which use this
59 procedure. */
60
61 FUNCTION is_patch_edition
62 RETURN INTEGER
63
64 IS
65
66 BEGIN
67
68 hr_utility.trace('Entering per_ad_zd_seed_wrapper.is_patch_edition');
69
70 IF ad_zd.get_edition('PATCH') IS NOT NULL THEN
71
72 return 1;
73
74 END IF;
75
76 return 0;
77
78 EXCEPTION
79
80 WHEN OTHERS THEN
81 hr_utility.trace('Error ORA-'||TO_CHAR(SQLCODE));
82 hr_utility.raise_error;
83
84 END is_patch_edition;
85
86 PROCEDURE check_patch_edition
87
88 IS
89
90 BEGIN
91
92 hr_utility.trace('Entering per_ad_zd_seed_wrapper.check_patch_edition');
93
94 IF is_patch_edition = 1 THEN
95
96 hr_utility.trace('An Online Patch is in Progress, Return Error');
97
98 fnd_message.set_name('FND', 'AD_ZD_DISABLED_FEATURE');
99 raise_application_error ('-20000', fnd_message.get);
100
101 END IF;
102
103 END check_patch_edition;
104
105 END per_ad_zd_seed_wrapper;