55:
56: BEGIN
57:
58: l_procedure := g_package || 'check_record_exists';
59: g_debug := hr_utility.debug_enabled;
60: g_debug := TRUE;
61:
62: hr_utility.set_location('Entering ' || l_procedure,10);
63:
58: l_procedure := g_package || 'check_record_exists';
59: g_debug := hr_utility.debug_enabled;
60: g_debug := TRUE;
61:
62: hr_utility.set_location('Entering ' || l_procedure,10);
63:
64: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
65:
66: IF g_debug THEN
63:
64: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
65:
66: IF g_debug THEN
67: hr_utility.trace('Checking CSN has been entered in SG Legal Entity');
68: END IF;
69:
70: OPEN csr_check_csn;
71: FETCH csr_check_csn INTO l_csn_count;
73:
74: IF l_csn_count > 0 THEN
75:
76: IF g_debug THEN
77: hr_utility.trace('CSN has been entered in SG Legal Entity');
78: END IF;
79:
80: hr_utility.set_message(801,'HR_78428_SG_CSN_ENT_LE');
81: hr_utility.raise_error;
76: IF g_debug THEN
77: hr_utility.trace('CSN has been entered in SG Legal Entity');
78: END IF;
79:
80: hr_utility.set_message(801,'HR_78428_SG_CSN_ENT_LE');
81: hr_utility.raise_error;
82:
83: END IF;
84:
77: hr_utility.trace('CSN has been entered in SG Legal Entity');
78: END IF;
79:
80: hr_utility.set_message(801,'HR_78428_SG_CSN_ENT_LE');
81: hr_utility.raise_error;
82:
83: END IF;
84:
85:
83: END IF;
84:
85:
86: IF g_debug THEN
87: hr_utility.trace('Ended Checking CSN has been entered in SG Legal Entity');
88: END IF;
89:
90: l_csn_count := 0;
91: IF g_debug THEN
88: END IF;
89:
90: l_csn_count := 0;
91: IF g_debug THEN
92: hr_utility.trace('Checking CSN has been entered duplicate');
93: END IF;
94:
95: OPEN csr_check_csn_multi;
96: FETCH csr_check_csn_multi INTO l_csn_count;
98:
99: IF l_csn_count > 0 THEN
100:
101: IF g_debug THEN
102: hr_utility.trace('CSN has been entered duplicate');
103: END IF;
104:
105: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
106: hr_utility.raise_error;
101: IF g_debug THEN
102: hr_utility.trace('CSN has been entered duplicate');
103: END IF;
104:
105: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
106: hr_utility.raise_error;
107:
108: END IF;
109:
102: hr_utility.trace('CSN has been entered duplicate');
103: END IF;
104:
105: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
106: hr_utility.raise_error;
107:
108: END IF;
109:
110:
108: END IF;
109:
110:
111: IF g_debug THEN
112: hr_utility.trace('Ended Checking CSN has been entered duplicate');
113: END IF;
114:
115:
116: END IF;
114:
115:
116: END IF;
117:
118: hr_utility.set_location('Leaving ' || l_procedure,30);
119:
120: END check_record_exists;
121:
122: --------------------------------------------------------------------------
149:
150: BEGIN
151:
152: l_procedure := g_package || 'check_valid_csn';
153: g_debug := hr_utility.debug_enabled;
154: g_debug := TRUE;
155:
156: hr_utility.set_location('Entering ' || l_procedure,10);
157:
152: l_procedure := g_package || 'check_valid_csn';
153: g_debug := hr_utility.debug_enabled;
154: g_debug := TRUE;
155:
156: hr_utility.set_location('Entering ' || l_procedure,10);
157:
158: IF p_org_info_type_code = 'SG_LEGAL_ENTITY' THEN
159:
160: IF g_debug THEN
157:
158: IF p_org_info_type_code = 'SG_LEGAL_ENTITY' THEN
159:
160: IF g_debug THEN
161: hr_utility.trace('Checking correct CSN format of Legal Entity');
162: END IF;
163:
164: l_return := pay_sg_cpfline.check_cpf_number(p_org_information10
165: ,p_org_information3
166: ,p_org_information15);
167: IF l_return = 'N' THEN
168:
169: IF g_debug THEN
170: hr_utility.trace('CSN format of Legal Entity is incorrect');
171: END IF;
172:
173: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
174: hr_utility.raise_error;
169: IF g_debug THEN
170: hr_utility.trace('CSN format of Legal Entity is incorrect');
171: END IF;
172:
173: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
174: hr_utility.raise_error;
175:
176: END IF;
177: END IF;
170: hr_utility.trace('CSN format of Legal Entity is incorrect');
171: END IF;
172:
173: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
174: hr_utility.raise_error;
175:
176: END IF;
177: END IF;
178:
175:
176: END IF;
177: END IF;
178:
179: hr_utility.set_location('Leaving ' || l_procedure,30);
180:
181: END check_valid_csn;
182:
183: --------------------------------------------------------------------------
217:
218: BEGIN
219:
220: l_procedure := g_package || 'check_valid_csn_multi';
221: g_debug := hr_utility.debug_enabled;
222: g_debug := TRUE;
223:
224: hr_utility.set_location('Entering ' || l_procedure,10);
225:
220: l_procedure := g_package || 'check_valid_csn_multi';
221: g_debug := hr_utility.debug_enabled;
222: g_debug := TRUE;
223:
224: hr_utility.set_location('Entering ' || l_procedure,10);
225:
226: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
227:
228: IF g_debug THEN
225:
226: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
227:
228: IF g_debug THEN
229: hr_utility.trace('Checking if CSN format of Multi CSN is correct');
230: END IF;
231:
232: OPEN csr_get_payer_id_category;
233: FETCH csr_get_payer_id_category INTO l_cpf_category,l_payer_id;
238: ,l_payer_id);
239: IF l_return = 'N' THEN
240:
241: IF g_debug THEN
242: hr_utility.trace('CSN format of Multi CSN is incorrect');
243: END IF;
244:
245: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
246: hr_utility.raise_error;
241: IF g_debug THEN
242: hr_utility.trace('CSN format of Multi CSN is incorrect');
243: END IF;
244:
245: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
246: hr_utility.raise_error;
247:
248: END IF;
249:
242: hr_utility.trace('CSN format of Multi CSN is incorrect');
243: END IF;
244:
245: hr_utility.set_message(801,'HR_78427_SG_INVALID_CSN');
246: hr_utility.raise_error;
247:
248: END IF;
249:
250: END IF;
248: END IF;
249:
250: END IF;
251:
252: hr_utility.set_location('Leaving ' || l_procedure,30);
253:
254: END check_valid_csn_multi;
255:
256:
302:
303: BEGIN
304:
305: l_procedure := g_package || 'check_sg_org_internal';
306: g_debug := hr_utility.debug_enabled;
307:
308: hr_utility.set_location('Entering ' || l_procedure,10);
309:
310: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
304:
305: l_procedure := g_package || 'check_sg_org_internal';
306: g_debug := hr_utility.debug_enabled;
307:
308: hr_utility.set_location('Entering ' || l_procedure,10);
309:
310: IF p_org_info_type_code = 'SG_MULTI_CSN' THEN
311:
312: check_record_exists(p_org_information_id => p_org_information_id
335: );
336:
337: END IF;
338:
339: hr_utility.set_location('Leaving ' || l_procedure,10);
340:
341: END check_sg_org_internal;
342:
343: --------------------------------------------------------------------------
380: l_procedure VARCHAR2(100);
381:
382: BEGIN
383: l_procedure := g_package || 'check_sg_org_info_type_create';
384: g_debug := hr_utility.debug_enabled;
385:
386: hr_utility.set_location('Entering ' || l_procedure,10);
387:
388: -- Call check_sg_org_internal
382: BEGIN
383: l_procedure := g_package || 'check_sg_org_info_type_create';
384: g_debug := hr_utility.debug_enabled;
385:
386: hr_utility.set_location('Entering ' || l_procedure,10);
387:
388: -- Call check_sg_org_internal
389: check_sg_org_internal
390: (p_org_info_type_code => p_org_info_type_code
414: ,p_token_name => g_token_name
415: ,p_token_value => g_token_value
416: );
417:
418: hr_utility.set_location(l_procedure,20);
419:
420: IF g_debug THEN
421: hr_utility.trace('Message => ' || g_message_name);
422: END IF;
417:
418: hr_utility.set_location(l_procedure,20);
419:
420: IF g_debug THEN
421: hr_utility.trace('Message => ' || g_message_name);
422: END IF;
423:
424: raise_message(800
425: ,g_message_name
425: ,g_message_name
426: ,g_token_name
427: ,g_token_value);
428:
429: hr_utility.set_location('Leaving ' || l_procedure,20);
430:
431: END CHECK_SG_ORG_INFO_TYPE_CREATE;
432:
433: --------------------------------------------------------------------------
517:
518: BEGIN
519:
520: l_procedure := g_package || 'check_sg_org_info_type_update';
521: g_debug := hr_utility.debug_enabled;
522:
523: hr_utility.set_location('Entering ' || l_procedure,10);
524:
525: OPEN csr_org_info;
519:
520: l_procedure := g_package || 'check_sg_org_info_type_update';
521: g_debug := hr_utility.debug_enabled;
522:
523: hr_utility.set_location('Entering ' || l_procedure,10);
524:
525: OPEN csr_org_info;
526: FETCH csr_org_info
527: INTO l_organization_id
637: ,p_token_name => g_token_name
638: ,p_token_value => g_token_value
639: );
640:
641: hr_utility.set_location(l_procedure,20);
642:
643: raise_message(800
644: ,g_message_name
645: ,g_token_name
644: ,g_message_name
645: ,g_token_name
646: ,g_token_value);
647:
648: hr_utility.set_location('Leaving ' || l_procedure,30);
649:
650: END CHECK_SG_ORG_INFO_TYPE_UPDATE;
651:
652: --------------------------------------------------------------------------
672: BEGIN
673:
674: IF p_message_name IS NOT NULL AND p_message_name <> 'SUCCESS' THEN
675: cnt:= p_token_name.count;
676: hr_utility.set_message(p_application_id, p_message_name);
677: FOR i IN 1..cnt
678: LOOP
679: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
680: END LOOP;
675: cnt:= p_token_name.count;
676: hr_utility.set_message(p_application_id, p_message_name);
677: FOR i IN 1..cnt
678: LOOP
679: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
680: END LOOP;
681: hr_utility.raise_error;
682: END IF;
683:
677: FOR i IN 1..cnt
678: LOOP
679: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
680: END LOOP;
681: hr_utility.raise_error;
682: END IF;
683:
684: END raise_message;
685: