1 PACKAGE BODY HR_AU_PER_PAY_METHOD_LEG_HOOK AS
2 /* $Header: peaulhpp.pkb 120.0.12000000.1 2007/08/17 10:48:39 vamittal noship $ */
3 /*
4 ******************************************************************
5 * *
6 * Copyright (C) 1999 Oracle Corporation Australia Ltd., *
7 * Brisbane, Australia. *
8 * *
9 * All rights reserved. *
10 * *
11 * This material has been provided pursuant to an agreement *
12 * containing restrictions on its use. the material is also *
13 * protected by copyright law. no part of this material may *
14 * be copied or distributed, transmitted or transcribed, in *
15 * any form or by any means, electronic, mechanical, magnetic, *
16 * manual, or otherwise, or disclosed to third parties without *
17 * the express written permission of Oracle Corporation *
18 * Australia Ltd,. *
19 * *
20 ******************************************************************/
21
22 /*
23 Filename: hraulhpp.pkb (BODY)
24 Author: Varun Mittal
25 Description: Creates the user hook seed data for the AU legislation
26 validation in HR_PERSONAL_PAYMENT_METHOD_API.
27
28 Change List
29 -----------
30
31 Version Date Author ER/CR No. Description of Change
32 -------+---------+-----------+---------+--------------------------
33 115.0 6-Aug-07 vamittal 6315194 Initial Version
34
35 ================================================================= */
36 --
37 -- Package Variables
38 --
39 g_package VARCHAR2(33) := 'HR_AU_PER_PAY_METHOD_LEG_HOOK.';
40 g_debug boolean;
41
42 PROCEDURE VALIDATE_BANK_ACCT (p_segment2 IN VARCHAR2) IS
43
44 l_proc VARCHAR2(72) := g_package||'VALIDATE_BANK_ACCT';
45 l_validate VARCHAR2(5);
46
47 BEGIN
48
49 g_debug := hr_utility.debug_enabled;
50
51 IF g_debug THEN
52 hr_utility.set_location('Entering:'|| l_proc, 10);
53 END if;
54
55
56 IF ((p_segment2 IS NULL) OR (p_segment2 = hr_api.g_varchar2))
57 THEN
58 IF g_debug THEN
59 hr_utility.trace('Invalid value passed for the segments. No validation');
60 END if;
61
62 ELSE
63 l_validate := HR_AU_BANK_ACCT_VALIDATION.VALIDATE_ACC_NUM(p_segment2);
64 IF (l_validate <> 'TRUE')
65 THEN
66 -- Bank/Acct Number is not valid
67 hr_utility.set_message(801, 'HR_AU_INVALID_BANK_DETAILS');
68 hr_utility.raise_error;
69 END IF;
70 END IF;
71
72 IF g_debug THEN
73 hr_utility.set_location('Leaving:'|| l_proc, 10);
74 END if;
75
76 END VALIDATE_BANK_ACCT;
77 END HR_AU_PER_PAY_METHOD_LEG_HOOK;