14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return(nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return(nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: end return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
31: --
32: l_proc varchar2(72) := g_package||'constraint_error';
33: --
34: begin
35: hr_utility.set_location('Entering:'||l_proc, 5);
36: --
37: If (p_constraint_name = 'PAY_EXTERNAL_ACCOUNTS_PK') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
34: begin
35: hr_utility.set_location('Entering:'||l_proc, 5);
36: --
37: If (p_constraint_name = 'PAY_EXTERNAL_ACCOUNTS_PK') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: Else
35: hr_utility.set_location('Entering:'||l_proc, 5);
36: --
37: If (p_constraint_name = 'PAY_EXTERNAL_ACCOUNTS_PK') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: Else
43: -- [start of change: 40.5, Dave Harris]
36: --
37: If (p_constraint_name = 'PAY_EXTERNAL_ACCOUNTS_PK') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: Else
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: If (p_constraint_name = 'PAY_EXTERNAL_ACCOUNTS_PK') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: Else
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: Else
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
47: hr_utility.raise_error;
48: -- [ end of change: 40.5, Dave Harris]
41: hr_utility.raise_error;
42: Else
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
47: hr_utility.raise_error;
48: -- [ end of change: 40.5, Dave Harris]
49: End If;
42: Else
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
47: hr_utility.raise_error;
48: -- [ end of change: 40.5, Dave Harris]
49: End If;
50: --
43: -- [start of change: 40.5, Dave Harris]
44: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
47: hr_utility.raise_error;
48: -- [ end of change: 40.5, Dave Harris]
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
47: hr_utility.raise_error;
48: -- [ end of change: 40.5, Dave Harris]
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: end constraint_error;
53: --
54: -- ----------------------------------------------------------------------------
55: -- |-----------------------------< api_updating >-----------------------------|
109: l_proc varchar2(72) := g_package||'api_updating';
110: l_fct_ret boolean;
111: --
112: Begin
113: hr_utility.set_location('Entering:'||l_proc, 5);
114: --
115: -- external account id null, must be I'ing, return false
116: --
117: If (p_external_account_id is null and
122: --
123: Else
124: If (p_external_account_id = g_old_rec.external_account_id and
125: p_object_version_number = g_old_rec.object_version_number) Then
126: hr_utility.set_location(l_proc, 10);
127: --
128: -- g_old_rec is current
129: --
130: l_fct_ret := true;
139: Close C_Sel1;
140: --
141: -- the primary key is invalid therefore we must error
142: --
143: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
144: hr_utility.raise_error;
145: End If;
146:
147: Close C_Sel1;
140: --
141: -- the primary key is invalid therefore we must error
142: --
143: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
144: hr_utility.raise_error;
145: End If;
146:
147: Close C_Sel1;
148:
151: -- not match the object version number passed in,
152: -- raise error
153: --
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158:
159: hr_utility.set_location(l_proc, 15);
152: -- raise error
153: --
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158:
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158:
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
161: End If;
162: End If;
163:
160: l_fct_ret := true;
161: End If;
162: End If;
163:
164: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: Return (l_fct_ret);
166: End api_updating;
167: --
168: -- ----------------------------------------------------------------------------
222: --
223: l_proc varchar2(72) := g_package||'lck';
224: --
225: begin
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Add any mandatory argument checking here:
229: -- Example:
230: -- hr_api.mandatory_arg_error
238: Close C_Sel1;
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
253: -- We need to trap the ORA LOCK exception
254: --
255: Exception
257: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'pay_external_accounts');
263: hr_utility.raise_error;
264: end lck;
265: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'pay_external_accounts');
263: hr_utility.raise_error;
264: end lck;
265: --
266: -- ----------------------------------------------------------------------------
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'pay_external_accounts');
263: hr_utility.raise_error;
264: end lck;
265: --
266: -- ----------------------------------------------------------------------------
267: -- |-----------------------------< convert_args >-----------------------------|
312: l_rec g_rec_type;
313: l_proc varchar2(72) := g_package||'convert_args';
314: --
315: begin
316: hr_utility.set_location('Entering:'||l_proc, 5);
317: --
318: -- convert arguments into local l_rec structure
319: --
320: l_rec.external_account_id := p_external_account_id;
358: l_rec.object_version_number := p_object_version_number;
359: --
360: -- return the plsql record structure
361: --
362: hr_utility.set_location(' Leaving:'||l_proc, 10);
363: Return(l_rec);
364: --
365: end convert_args;
366: --
432:
433: --
434: begin
435: --
436: hr_utility.set_location('Entering:'||l_proc, 5);
437: --
438: hr_utility.set_location(l_proc, 10);
439: open csr_id_flex_num;
440: fetch csr_id_flex_num into l_id_flex_num;
434: begin
435: --
436: hr_utility.set_location('Entering:'||l_proc, 5);
437: --
438: hr_utility.set_location(l_proc, 10);
439: open csr_id_flex_num;
440: fetch csr_id_flex_num into l_id_flex_num;
441: --
442: if csr_id_flex_num%notfound then
443: close csr_id_flex_num;
444: --
445: -- the flex structure has not been found therefore we must error
446: --
447: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
448: hr_utility.raise_error;
449: end if;
450: close csr_id_flex_num;
451: hr_utility.set_location(l_proc, 20);
444: --
445: -- the flex structure has not been found therefore we must error
446: --
447: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
448: hr_utility.raise_error;
449: end if;
450: close csr_id_flex_num;
451: hr_utility.set_location(l_proc, 20);
452: --
447: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
448: hr_utility.raise_error;
449: end if;
450: close csr_id_flex_num;
451: hr_utility.set_location(l_proc, 20);
452: --
453: hr_utility.trace('| l_id_flex_num>' || l_id_flex_num || '<');
454: --
455: -- do not want trigger to maintain object version number,
449: end if;
450: close csr_id_flex_num;
451: hr_utility.set_location(l_proc, 20);
452: --
453: hr_utility.trace('| l_id_flex_num>' || l_id_flex_num || '<');
454: --
455: -- do not want trigger to maintain object version number,
456: -- will be done explicitly later by api
457: --
458: pay_exa_shd.g_api_dml := true; -- set the api dml status
459: --
460: begin
461: if p_dml_mode = 'INSERT' then
462: hr_utility.trace('| doing insert interface processing');
463: --
464: -- ins_or_sel_keyflex_comb() does either an I or U, therefore
465: -- l_external_account_id always has a value,
466: -- nb. p_concat_segments, if specified, will take precedence over
508: p_concat_segments_out => p_concat_segments_out
509: );
510: --
511: elsif p_dml_mode = 'UPDATE' then
512: hr_utility.trace('| doing update interface processing');
513: --
514: -- U of kff details for a given entity,
515: -- ccid is used to build up a plsql table of segment values,
516: -- this table is compared against IN parameters: segments 1 ... 30,
568: end if;
569: exception
570: when app_exception.application_exception then
571: hr_message.provide_error;
572: hr_utility.trace('*****' || p_territory_code);
573: hr_utility.trace('*****' || hr_message.last_message_name);
574: hr_utility.trace('*****' || hr_message.get_token_value('COLUMN'));
575:
576: --
569: exception
570: when app_exception.application_exception then
571: hr_message.provide_error;
572: hr_utility.trace('*****' || p_territory_code);
573: hr_utility.trace('*****' || hr_message.last_message_name);
574: hr_utility.trace('*****' || hr_message.get_token_value('COLUMN'));
575:
576: --
577: -- if any validation fails on a segment, the exception
570: when app_exception.application_exception then
571: hr_message.provide_error;
572: hr_utility.trace('*****' || p_territory_code);
573: hr_utility.trace('*****' || hr_message.last_message_name);
574: hr_utility.trace('*****' || hr_message.get_token_value('COLUMN'));
575:
576: --
577: -- if any validation fails on a segment, the exception
578: -- HR_FLEX_VALUE_INVALID is thrown,
587: if p_territory_code = 'US' then
588: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
589: if hr_message.get_token_value('COLUMN') = 'SEGMENT1' then
590: if (length(p_segment1) > 60) then
591: hr_utility.set_message(801, 'HR_51458_EXA_US_ACCT_NAME_LONG');
592: hr_utility.raise_error;
593: end if;
594: end if;
595: end if;
588: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
589: if hr_message.get_token_value('COLUMN') = 'SEGMENT1' then
590: if (length(p_segment1) > 60) then
591: hr_utility.set_message(801, 'HR_51458_EXA_US_ACCT_NAME_LONG');
592: hr_utility.raise_error;
593: end if;
594: end if;
595: end if;
596: end if;
601: if p_territory_code = 'US' then
602: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
603: if hr_message.get_token_value('COLUMN') = 'SEGMENT2' then
604: if (length(p_segment1) > 80) then
605: hr_utility.set_message(801, 'HR_51459_EXA_US_ACCT_TYPE_LONG');
606: hr_utility.raise_error;
607: else
608: declare
609: cursor fnd_com_look is
602: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
603: if hr_message.get_token_value('COLUMN') = 'SEGMENT2' then
604: if (length(p_segment1) > 80) then
605: hr_utility.set_message(801, 'HR_51459_EXA_US_ACCT_TYPE_LONG');
606: hr_utility.raise_error;
607: else
608: declare
609: cursor fnd_com_look is
610: select null
620: open fnd_com_look;
621: fetch fnd_com_look into l_dummy;
622: if fnd_com_look%notfound then
623: close fnd_com_look;
624: hr_utility.set_message(801,
625: 'HR_51460_EXA_US_ACC_TYP_UNKNOW');
626: hr_utility.raise_error;
627: end if;
628: close fnd_com_look;
622: if fnd_com_look%notfound then
623: close fnd_com_look;
624: hr_utility.set_message(801,
625: 'HR_51460_EXA_US_ACC_TYP_UNKNOW');
626: hr_utility.raise_error;
627: end if;
628: close fnd_com_look;
629: end; -- end of anonymous block
630: end if;
638: if p_territory_code = 'US' then
639: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
640: if hr_message.get_token_value('COLUMN') = 'SEGMENT3' then
641: if (length(p_segment1) > 60) then
642: hr_utility.set_message(801, 'HR_51461_EXA_US_ACCT_NO_LONG');
643: hr_utility.raise_error;
644: end if;
645: end if;
646: end if;
639: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
640: if hr_message.get_token_value('COLUMN') = 'SEGMENT3' then
641: if (length(p_segment1) > 60) then
642: hr_utility.set_message(801, 'HR_51461_EXA_US_ACCT_NO_LONG');
643: hr_utility.raise_error;
644: end if;
645: end if;
646: end if;
647: end if;
652: if p_territory_code = 'US' then
653: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
654: if hr_message.get_token_value('COLUMN') = 'SEGMENT4' then
655: if (length(p_segment4) > 9) then
656: hr_utility.set_message(801, 'HR_51462_EXA_US_TRAN_CODE_LONG');
657: hr_utility.raise_error;
658: end if;
659: end if;
660: end if;
653: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
654: if hr_message.get_token_value('COLUMN') = 'SEGMENT4' then
655: if (length(p_segment4) > 9) then
656: hr_utility.set_message(801, 'HR_51462_EXA_US_TRAN_CODE_LONG');
657: hr_utility.raise_error;
658: end if;
659: end if;
660: end if;
661: end if;
666: if p_territory_code = 'US' then
667: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
668: if hr_message.get_token_value('COLUMN') = 'SEGMENT5' then
669: if (length(p_segment5) > 60) then
670: hr_utility.set_message(801, 'HR_51463_EXA_US_BANK_NAME_LONG');
671: hr_utility.raise_error;
672: end if;
673: end if;
674: end if;
667: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
668: if hr_message.get_token_value('COLUMN') = 'SEGMENT5' then
669: if (length(p_segment5) > 60) then
670: hr_utility.set_message(801, 'HR_51463_EXA_US_BANK_NAME_LONG');
671: hr_utility.raise_error;
672: end if;
673: end if;
674: end if;
675: end if;
680: if p_territory_code = 'US' then
681: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
682: if hr_message.get_token_value('COLUMN') = 'SEGMENT6' then
683: if (length(p_segment6) > 60) then
684: hr_utility.set_message(801, 'HR_51464_EXA_US_BANK_BRAN_LONG');
685: hr_utility.raise_error;
686: end if;
687: end if;
688: end if;
681: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
682: if hr_message.get_token_value('COLUMN') = 'SEGMENT6' then
683: if (length(p_segment6) > 60) then
684: hr_utility.set_message(801, 'HR_51464_EXA_US_BANK_BRAN_LONG');
685: hr_utility.raise_error;
686: end if;
687: end if;
688: end if;
689: end if;
701: if p_territory_code = 'GB' then
702: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
703: if hr_message.get_token_value('COLUMN') = 'SEGMENT1' then
704: if (length(p_segment1) > 30) then
705: hr_utility.set_message(801, 'HR_51416_EXA_BANK_NAME_LONG');
706: hr_utility.raise_error;
707: else
708: declare
709: cursor hlsel is
702: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
703: if hr_message.get_token_value('COLUMN') = 'SEGMENT1' then
704: if (length(p_segment1) > 30) then
705: hr_utility.set_message(801, 'HR_51416_EXA_BANK_NAME_LONG');
706: hr_utility.raise_error;
707: else
708: declare
709: cursor hlsel is
710: select null
719: open hlsel;
720: fetch hlsel into l_dummy;
721: if hlsel%notfound then
722: close hlsel;
723: hr_utility.set_message(801,
724: 'HR_51417_EXA_BANK_NAME_UNKNOWN');
725: hr_utility.raise_error;
726: end if;
727: close hlsel;
721: if hlsel%notfound then
722: close hlsel;
723: hr_utility.set_message(801,
724: 'HR_51417_EXA_BANK_NAME_UNKNOWN');
725: hr_utility.raise_error;
726: end if;
727: close hlsel;
728: end; -- end of anonymous block
729: end if;
737: if p_territory_code = 'GB' then
738: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
739: if hr_message.get_token_value('COLUMN') = 'SEGMENT2' then
740: if (length(p_segment1) > 35) then
741: hr_utility.set_message(801, 'HR_51418_EXA_BANK_BRANCH_LONG');
742: hr_utility.raise_error;
743: end if;
744: end if;
745: end if;
738: if hr_message.last_message_name = 'HR_FLEX_VALUE_INVALID' then
739: if hr_message.get_token_value('COLUMN') = 'SEGMENT2' then
740: if (length(p_segment1) > 35) then
741: hr_utility.set_message(801, 'HR_51418_EXA_BANK_BRANCH_LONG');
742: hr_utility.raise_error;
743: end if;
744: end if;
745: end if;
746: end if;
754: --
755: -- ensure that the length is 6
756: --
757: if (length(p_segment3) <> 6) then
758: hr_utility.set_message(801, 'HR_51419_EXA_SORT_CODE_LENGTH');
759: hr_utility.raise_error;
760: --
761: -- ensure that p_segment3 is +ve
762: --
755: -- ensure that the length is 6
756: --
757: if (length(p_segment3) <> 6) then
758: hr_utility.set_message(801, 'HR_51419_EXA_SORT_CODE_LENGTH');
759: hr_utility.raise_error;
760: --
761: -- ensure that p_segment3 is +ve
762: --
763: elsif (to_number(p_segment3) < 0) then
760: --
761: -- ensure that p_segment3 is +ve
762: --
763: elsif (to_number(p_segment3) < 0) then
764: hr_utility.set_message(801, 'HR_51420_EXA_SORT_CODE_POSITVE');
765: hr_utility.raise_error;
766: end if;
767: end if;
768: end if;
761: -- ensure that p_segment3 is +ve
762: --
763: elsif (to_number(p_segment3) < 0) then
764: hr_utility.set_message(801, 'HR_51420_EXA_SORT_CODE_POSITVE');
765: hr_utility.raise_error;
766: end if;
767: end if;
768: end if;
769: end if;
777: --
778: -- ensure that the length is 8
779: --
780: if (length(p_segment4) <> 8) then
781: hr_utility.set_message(801, 'HR_51421_EXA_ACCOUNT_NO_LONG');
782: hr_utility.raise_error;
783: --
784: -- ensure that p_segment4 is +ve
785: --
778: -- ensure that the length is 8
779: --
780: if (length(p_segment4) <> 8) then
781: hr_utility.set_message(801, 'HR_51421_EXA_ACCOUNT_NO_LONG');
782: hr_utility.raise_error;
783: --
784: -- ensure that p_segment4 is +ve
785: --
786: elsif (to_number(p_segment4) < 0) then
783: --
784: -- ensure that p_segment4 is +ve
785: --
786: elsif (to_number(p_segment4) < 0) then
787: hr_utility.set_message(801, 'HR_51422_EXA_ACCT_NO_POSITIVE');
788: hr_utility.raise_error;
789: end if;
790: end if;
791: end if;
784: -- ensure that p_segment4 is +ve
785: --
786: elsif (to_number(p_segment4) < 0) then
787: hr_utility.set_message(801, 'HR_51422_EXA_ACCT_NO_POSITIVE');
788: hr_utility.raise_error;
789: end if;
790: end if;
791: end if;
792: end if;
800: --
801: -- ensure that the length does not exceed 18
802: --
803: if (length(p_segment5) > 18) then
804: hr_utility.set_message(801, 'HR_51423_EXA_ACCOUNT_NAME_LONG');
805: hr_utility.raise_error;
806: --
807: -- ensure that the p_segment5 is in an upperformat format
808: --
801: -- ensure that the length does not exceed 18
802: --
803: if (length(p_segment5) > 18) then
804: hr_utility.set_message(801, 'HR_51423_EXA_ACCOUNT_NAME_LONG');
805: hr_utility.raise_error;
806: --
807: -- ensure that the p_segment5 is in an upperformat format
808: --
809: elsif (p_segment5 <> upper(p_segment5)) then
806: --
807: -- ensure that the p_segment5 is in an upperformat format
808: --
809: elsif (p_segment5 <> upper(p_segment5)) then
810: hr_utility.set_message(801, 'HR_51424_EXA_ACCOUNT_NAME_CASE');
811: hr_utility.raise_error;
812: end if;
813: end if;
814: end if;
807: -- ensure that the p_segment5 is in an upperformat format
808: --
809: elsif (p_segment5 <> upper(p_segment5)) then
810: hr_utility.set_message(801, 'HR_51424_EXA_ACCOUNT_NAME_CASE');
811: hr_utility.raise_error;
812: end if;
813: end if;
814: end if;
815: end if;
823: --
824: -- ensure that the length does not exceed 1
825: --
826: if (length(p_segment6) > 1) then
827: hr_utility.set_message(801, 'HR_51425_EXA_ACCOUNT_TYPE_LONG');
828: hr_utility.raise_error;
829: --
830: -- ensure that p_segment4 is in the range of: 0 -> 5
831: --
824: -- ensure that the length does not exceed 1
825: --
826: if (length(p_segment6) > 1) then
827: hr_utility.set_message(801, 'HR_51425_EXA_ACCOUNT_TYPE_LONG');
828: hr_utility.raise_error;
829: --
830: -- ensure that p_segment4 is in the range of: 0 -> 5
831: --
832: elsif (to_number(p_segment6) < 0 or
830: -- ensure that p_segment4 is in the range of: 0 -> 5
831: --
832: elsif (to_number(p_segment6) < 0 or
833: to_number(p_segment6) > 5) then
834: hr_utility.set_message(801, 'HR_51426_EXA_ACCT_TYPE_RANGE');
835: hr_utility.raise_error;
836: end if;
837: end if;
838: end if;
831: --
832: elsif (to_number(p_segment6) < 0 or
833: to_number(p_segment6) > 5) then
834: hr_utility.set_message(801, 'HR_51426_EXA_ACCT_TYPE_RANGE');
835: hr_utility.raise_error;
836: end if;
837: end if;
838: end if;
839: end if;
847: --
848: -- ensure that the length does not exceed 18
849: --
850: if (length(p_segment7) > 18) then
851: hr_utility.set_message(801, 'HR_51427_EXA_BS_ACCT_NO_LONG');
852: hr_utility.raise_error;
853: --
854: -- ensure that the p_segment7 is in an uppercase format
855: --
848: -- ensure that the length does not exceed 18
849: --
850: if (length(p_segment7) > 18) then
851: hr_utility.set_message(801, 'HR_51427_EXA_BS_ACCT_NO_LONG');
852: hr_utility.raise_error;
853: --
854: -- ensure that the p_segment7 is in an uppercase format
855: --
856: elsif (p_segment7 <> upper(p_segment7)) then
853: --
854: -- ensure that the p_segment7 is in an uppercase format
855: --
856: elsif (p_segment7 <> upper(p_segment7)) then
857: hr_utility.set_message(801, 'HR_51428_EXA_BS_ACCT_NO_CASE');
858: hr_utility.raise_error;
859: end if;
860: end if;
861: end if;
854: -- ensure that the p_segment7 is in an uppercase format
855: --
856: elsif (p_segment7 <> upper(p_segment7)) then
857: hr_utility.set_message(801, 'HR_51428_EXA_BS_ACCT_NO_CASE');
858: hr_utility.raise_error;
859: end if;
860: end if;
861: end if;
862: end if;
870: --
871: -- ensure that the length does not exceed 20
872: --
873: if (length(p_segment8) > 20) then
874: hr_utility.set_message(801, 'HR_51429_EXA_BANK_LOC_LONG');
875: hr_utility.raise_error;
876: else
877: declare
878: l_exists varchar2(80);
871: -- ensure that the length does not exceed 20
872: --
873: if (length(p_segment8) > 20) then
874: hr_utility.set_message(801, 'HR_51429_EXA_BANK_LOC_LONG');
875: hr_utility.raise_error;
876: else
877: declare
878: l_exists varchar2(80);
879: cursor csr_chk_hr_lookups is
889: open csr_chk_hr_lookups;
890: fetch csr_chk_hr_lookups into l_exists;
891: if csr_chk_hr_lookups%notfound then
892: close csr_chk_hr_lookups;
893: hr_utility.set_message(801,
894: 'HR_51430_EXA_BANK_LOC_UNKNOWN');
895: hr_utility.raise_error;
896: end if;
897: close csr_chk_hr_lookups;
891: if csr_chk_hr_lookups%notfound then
892: close csr_chk_hr_lookups;
893: hr_utility.set_message(801,
894: 'HR_51430_EXA_BANK_LOC_UNKNOWN');
895: hr_utility.raise_error;
896: end if;
897: close csr_chk_hr_lookups;
898: end; -- end of anonymous block
899: end if;
913: end; -- end of anonymous block
914: --
915: pay_exa_shd.g_api_dml := false; -- set the api dml status
916: --
917: hr_utility.set_location(' Leaving:'||l_proc, 100);
918: --
919: end keyflex_comb;
920: END pay_exa_shd;