[Home] [Help]
PACKAGE BODY: APPS.HR_ABM_BUS
Source
1 Package Body hr_abm_bus as
2 /* $Header: hrabmrhi.pkb 115.4 99/10/12 07:03:51 porting ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_abm_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< chk_batch_run_number >--------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This process validates the batch_run_number on insert.
17 -- Checks are:
18 -- 1: ensure the batch_run_number exists (I)
19 --
20 -- Pre Conditions:
21 -- None.
22 --
23 -- In Parameters:
24 -- p_batch_run_number
25 --
26 -- Post Success:
27 -- Processing continues.
28 --
29 -- Post Failure:
30 -- An application error will be raised for the following faliure conditions:
31 -- 1: p_batch_run_number is null
32 --
33 -- Access Status:
34 -- Internal Table Handler Use Only.
35 --
36 -- {End Of Comments}
37 -- ----------------------------------------------------------------------------
38 Procedure chk_batch_run_number(p_batch_run_number in number) is
39 --
40 l_proc varchar2(72) := g_package||'chk_batch_run_number';
41 --
42 begin
43 hr_utility.set_location('Entering:'||l_proc, 5);
44 --
45 hr_api.mandatory_arg_error
46 (p_api_name => l_proc,
47 p_argument => 'batch_run_number',
48 p_argument_value => p_batch_run_number);
49 --
50 hr_utility.set_location(' Leaving:'||l_proc, 10);
51 end chk_batch_run_number;
52 --
53 -- ----------------------------------------------------------------------------
54 -- |---------------------------< chk_api_name >-------------------------------|
55 -- ----------------------------------------------------------------------------
56 -- {Start Of Comments}
57 --
58 -- Description:
59 -- This process validates the api_name on insert.
60 -- Checks are:
61 -- 1: ensure the api_name exists (I)
62 --
63 -- Pre Conditions:
64 -- None.
65 --
66 -- In Parameters:
67 -- p_api_name
68 --
69 -- Post Success:
70 -- Processing continues.
71 --
72 -- Post Failure:
73 -- An application error will be raised for the following faliure conditions:
74 -- 1: p_api_name is null
75 --
76 -- Access Status:
77 -- Internal Table Handler Use Only.
78 --
79 -- {End Of Comments}
80 -- ----------------------------------------------------------------------------
81 Procedure chk_api_name(p_api_name in varchar2) is
82 --
83 l_proc varchar2(72) := g_package||'chk_api_name';
84 --
85 begin
86 hr_utility.set_location('Entering:'||l_proc, 5);
87 --
88 hr_api.mandatory_arg_error
89 (p_api_name => l_proc,
90 p_argument => 'api_name',
91 p_argument_value => p_api_name);
92 --
93 hr_utility.set_location(' Leaving:'||l_proc, 10);
94 end chk_api_name;
95 --
96 -- ----------------------------------------------------------------------------
97 -- |-----------------------------< chk_status >-------------------------------|
98 -- ----------------------------------------------------------------------------
99 -- {Start Of Comments}
100 --
101 -- Description:
102 -- This process validates the status on insert.
103 -- We don't need to check that the status is either 'F' or 'S' because the
104 -- process constraint_error will handle this.
105 -- Checks are:
106 -- 1: ensure the status exists (I)
107 --
108 -- Pre Conditions:
109 -- None.
110 --
111 -- In Parameters:
112 -- p_status
113 --
114 -- Post Success:
115 -- Processing continues.
116 --
117 -- Post Failure:
118 -- An application error will be raised for the following faliure conditions:
119 -- 1: p_status is null
120 --
121 -- Access Status:
122 -- Internal Table Handler Use Only.
123 --
124 -- {End Of Comments}
125 -- ----------------------------------------------------------------------------
126 Procedure chk_status(p_status in varchar2) is
127 --
128 l_proc varchar2(72) := g_package||'chk_status';
129 --
130 begin
131 hr_utility.set_location('Entering:'||l_proc, 5);
132 --
133 hr_api.mandatory_arg_error
134 (p_api_name => l_proc,
135 p_argument => 'status',
136 p_argument_value => p_status);
137 --
138 hr_utility.set_location(' Leaving:'||l_proc, 10);
139 end chk_status;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |---------------------------< insert_validate >----------------------------|
143 -- ----------------------------------------------------------------------------
144 Procedure insert_validate(p_rec in hr_abm_shd.g_rec_type) is
145 --
146 l_proc varchar2(72) := g_package||'insert_validate';
147 --
148 Begin
149 hr_utility.set_location('Entering:'||l_proc, 5);
150 --
151 -- As the date is not within the context of a business group
152 -- the set_security_group_id has zero passed to it
153 -- as the default security_group_id
154 --
155 hr_api.set_security_group_id(p_security_group_id => 0);
156 --
157 hr_utility.set_location(' Leaving:'||l_proc, 10);
158 --
159 -- Call all supporting business operations
160 --
161 chk_batch_run_number(p_batch_run_number => p_rec.batch_run_number);
162 chk_api_name(p_api_name => p_rec.api_name);
163 chk_status(p_status => p_rec.status);
164 --
165 hr_utility.set_location(' Leaving:'||l_proc, 15);
166 --
167 End insert_validate;
168 --
169 end hr_abm_bus;