36: and ppf.effective_end_date;
37: --
38: --
39: begin
40: hr_utility.set_location('Entering:'|| l_proc, 1);
41: --
42: -- Check mandatory parameters have been set
43: --
44: hr_api.mandatory_arg_error
46: ,p_argument => 'person_id'
47: ,p_argument_value => p_person_id
48: );
49: --
50: hr_utility.set_location(l_proc, 2);
51: --
52: -- Check that person business group is the same as
53: -- the transaction business group
54: --
55: open csr_get_bus_grp;
56: fetch csr_get_bus_grp into l_business_group_id;
57: if l_business_group_id <> p_business_group_id then
58: close csr_get_bus_grp;
59: hr_utility.set_message(801, 'PAY_289127_TRANS_BG_NOT_PER_BG');
60: hr_utility.raise_error;
61: end if;
62: close csr_get_bus_grp;
63: --
56: fetch csr_get_bus_grp into l_business_group_id;
57: if l_business_group_id <> p_business_group_id then
58: close csr_get_bus_grp;
59: hr_utility.set_message(801, 'PAY_289127_TRANS_BG_NOT_PER_BG');
60: hr_utility.raise_error;
61: end if;
62: close csr_get_bus_grp;
63: --
64: hr_utility.set_location(' Leaving:'|| l_proc, 3);
60: hr_utility.raise_error;
61: end if;
62: close csr_get_bus_grp;
63: --
64: hr_utility.set_location(' Leaving:'|| l_proc, 3);
65: end chk_person_id;
66: -- ----------------------------------------------------------------------------
67: -- |------< chk_assignment_id >------|
68: -- ----------------------------------------------------------------------------
109: and asg.effective_end_date;
110: --
111: Begin
112: --
113: hr_utility.set_location('Entering:'||l_proc,5);
114: --
115: --
116: hr_api.mandatory_arg_error
117: (p_api_name => l_proc
130: --
131: -- raise error as assignment_id not found in per_assignments_f
132: -- table.
133: --
134: hr_utility.set_message(801, 'HR_51746_ASG_INV_ASG_ID');
135: hr_utility.raise_error;
136: --
137: else
138: --
131: -- raise error as assignment_id not found in per_assignments_f
132: -- table.
133: --
134: hr_utility.set_message(801, 'HR_51746_ASG_INV_ASG_ID');
135: hr_utility.raise_error;
136: --
137: else
138: --
139: if p_business_group_id <> l_business_group_id then
139: if p_business_group_id <> l_business_group_id then
140: --
141: close csr_bg_id;
142: --
143: hr_utility.set_message(801, 'PAY_289128_TRANS_BG_NOT_ASG_BG');
144: hr_utility.raise_error;
145: --
146: end if;
147: --
140: --
141: close csr_bg_id;
142: --
143: hr_utility.set_message(801, 'PAY_289128_TRANS_BG_NOT_ASG_BG');
144: hr_utility.raise_error;
145: --
146: end if;
147: --
148: close csr_bg_id;
150: end if;
151: --
152: end if;
153: --
154: hr_utility.set_location('Leaving:'||l_proc,10);
155: --
156: End chk_assignment_id;
157: -- ---------------------------------------------------------------------------
158: -- |--------------------------< chk_source >------------------------------|
168: l_proc varchar2(72) := g_package||'chk_source';
169: --
170: --
171: begin
172: hr_utility.set_location('Entering:'|| l_proc, 1);
173: --
174: -- Check mandatory parameters have been set
175: --
176: hr_api.mandatory_arg_error
178: ,p_argument => 'p_effective_date'
179: ,p_argument_value => p_effective_date
180: );
181: --
182: hr_utility.set_location(l_proc, 2);
183: --
184: -- make sure that the source type is valid
185: if p_source_type is not null then
186: if hr_api.not_exists_in_hr_lookups
187: (p_effective_date => p_effective_date
188: ,p_lookup_type => 'PAY_TRANSACTION_SOURCE_TYPE'
189: ,p_lookup_code => p_source_type
190: ) then
191: hr_utility.set_message(801, 'PAY_289131_AUD_SRC_TYPE_INVAL');
192: hr_utility.raise_error;
193: end if;
194: end if;
195:
188: ,p_lookup_type => 'PAY_TRANSACTION_SOURCE_TYPE'
189: ,p_lookup_code => p_source_type
190: ) then
191: hr_utility.set_message(801, 'PAY_289131_AUD_SRC_TYPE_INVAL');
192: hr_utility.raise_error;
193: end if;
194: end if;
195:
196: -- make sure if p_source is specified then p_source_type is specified
194: end if;
195:
196: -- make sure if p_source is specified then p_source_type is specified
197: if (p_source is not null) and (p_source_type is null) then
198: hr_utility.set_message(801, 'PAY_289132_AUD_SRC_NO_SRC_TYPE');
199: end if;
200:
201: hr_utility.set_location(' Leaving:'|| l_proc, 3);
202: end chk_source;
197: if (p_source is not null) and (p_source_type is null) then
198: hr_utility.set_message(801, 'PAY_289132_AUD_SRC_NO_SRC_TYPE');
199: end if;
200:
201: hr_utility.set_location(' Leaving:'|| l_proc, 3);
202: end chk_source;
203: -- ---------------------------------------------------------------------------
204: -- |--------------------------< chk_transaction_type>------------------------|
205: -- ---------------------------------------------------------------------------
214: l_proc varchar2(72) := g_package||'chk_transaction_type';
215: --
216: --
217: begin
218: hr_utility.set_location('Entering:'|| l_proc, 1);
219: --
220: -- Check mandatory parameters have been set
221: --
222: hr_api.mandatory_arg_error
229: (p_api_name => l_proc
230: ,p_argument => 'p_transaction_type'
231: ,p_argument_value => p_transaction_type
232: );
233: hr_utility.set_location(l_proc, 2);
234: --
235: -- make sure that the transaction type is valid
236: if hr_api.not_exists_in_hr_lookups
237: (p_effective_date => p_effective_date
237: (p_effective_date => p_effective_date
238: ,p_lookup_type => 'PAY_TRANSACTION_TYPE'
239: ,p_lookup_code => p_transaction_type
240: ) then
241: hr_utility.set_message(801, 'PAY_289129_AUD_TRANS_TYPE_INVL');
242: hr_utility.raise_error;
243: end if;
244:
245: -- make sure that if a subtype is specified, it is valid
238: ,p_lookup_type => 'PAY_TRANSACTION_TYPE'
239: ,p_lookup_code => p_transaction_type
240: ) then
241: hr_utility.set_message(801, 'PAY_289129_AUD_TRANS_TYPE_INVL');
242: hr_utility.raise_error;
243: end if;
244:
245: -- make sure that if a subtype is specified, it is valid
246: if p_transaction_subtype is not null and
248: (p_effective_date => p_effective_date
249: ,p_lookup_type => p_transaction_type
250: ,p_lookup_code => p_transaction_subtype
251: ) then
252: hr_utility.set_message(801, 'PAY_289130_AUD_SUB_TYPE_INVAL');
253: hr_utility.raise_error;
254: end if;
255:
256: hr_utility.set_location(' Leaving:'|| l_proc, 3);
249: ,p_lookup_type => p_transaction_type
250: ,p_lookup_code => p_transaction_subtype
251: ) then
252: hr_utility.set_message(801, 'PAY_289130_AUD_SUB_TYPE_INVAL');
253: hr_utility.raise_error;
254: end if;
255:
256: hr_utility.set_location(' Leaving:'|| l_proc, 3);
257: end chk_transaction_type;
252: hr_utility.set_message(801, 'PAY_289130_AUD_SUB_TYPE_INVAL');
253: hr_utility.raise_error;
254: end if;
255:
256: hr_utility.set_location(' Leaving:'|| l_proc, 3);
257: end chk_transaction_type;
258: -- ---------------------------------------------------------------------------
259: -- |---------------------< return_legislation_code >-------------------------|
260: -- ---------------------------------------------------------------------------
279: l_proc varchar2(72) := g_package||'return_legislation_code';
280: --
281: Begin
282: --
283: hr_utility.set_location('Entering:'|| l_proc, 10);
284: --
285: -- Ensure that all the mandatory parameter are not null
286: --
287: hr_api.mandatory_arg_error
297: -- call to this function. Just return the value in the global
298: -- variable.
299: --
300: l_legislation_code := pay_aud_bus.g_legislation_code;
301: hr_utility.set_location(l_proc, 20);
302: else
303: --
304: -- The ID is different to the last call to this function
305: -- or this is the first call to this function.
314: close csr_leg_code;
315: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
316: fnd_message.raise_error;
317: end if;
318: hr_utility.set_location(l_proc,30);
319: --
320: -- Set the global variables so the values are
321: -- available for the next call to this function.
322: --
323: close csr_leg_code;
324: pay_aud_bus.g_stat_trans_audit_id := p_stat_trans_audit_id;
325: pay_aud_bus.g_legislation_code := l_legislation_code;
326: end if;
327: hr_utility.set_location(' Leaving:'|| l_proc, 40);
328: return l_legislation_code;
329: end return_legislation_code;
330: --
331: -- ----------------------------------------------------------------------------
362: --
363: l_proc varchar2(72) := g_package || 'chk_ddf';
364: --
365: begin
366: hr_utility.set_location('Entering:'||l_proc,10);
367: --
368: hr_dflex_utility.ins_or_upd_descflex_attribs
369: (p_appl_short_name => 'PAY'
370: ,p_descflex_name => 'PAY_STAT_TRANS_AUDIT_DDF'
430: ,p_attribute30_name => 'AUDIT_INFORMATION30'
431: ,p_attribute30_value => p_rec.audit_information30
432: );
433: --
434: hr_utility.set_location(' Leaving:'||l_proc,20);
435: end chk_ddf;
436: -- ----------------------------------------------------------------------------
437: -- |---------------------------< insert_validate >----------------------------|
438: -- ----------------------------------------------------------------------------
443: --
444: l_proc varchar2(72) := g_package||'insert_validate';
445: --
446: Begin
447: hr_utility.set_location('Entering:'||l_proc, 5);
448: --
449: -- Call all supporting business operations
450: --
451: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
491: --
492: --
493: pay_aud_bus.chk_ddf(p_rec);
494: --
495: hr_utility.set_location(' Leaving:'||l_proc, 10);
496: End insert_validate;
497: --
498: -- ----------------------------------------------------------------------------
499: -- |---------------------------< delete_validate >----------------------------|
504: --
505: l_proc varchar2(72) := g_package||'delete_validate';
506: --
507: Begin
508: hr_utility.set_location('Entering:'||l_proc, 5);
509: --
510: -- Call all supporting business operations
511: --
512: hr_utility.set_location(' Leaving:'||l_proc, 10);
508: hr_utility.set_location('Entering:'||l_proc, 5);
509: --
510: -- Call all supporting business operations
511: --
512: hr_utility.set_location(' Leaving:'||l_proc, 10);
513: End delete_validate;
514: --
515: end pay_aud_bus;