DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_EXA_FLEX

Source


4 -- ----------------------------------------------------------------------------
1 package body pay_exa_flex as
2 /* $Header: pyexafli.pkb 115.2 99/07/17 06:02:19 porting ship  $ */
3 --
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pay_exa_flex.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-----------------------< chk_gb_segment1 >--------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   Validates the segment1 attribute for GB legislation.
17 --
18 -- Pre-conditions:
19 --   None
20 --
21 -- In Arguments:
22 --   p_segment1  -> Bank Name
23 --
24 -- Post Success:
25 --   If the p_segment1 is valid then processing continues.
26 --
27 -- Post Failure:
31 --   b) p_segment1 cannot exceed 30 in length.
28 --   If any of the following cases are true then an application error will
29 --   be raised:
30 --   a) p_segment1 cannot be NULL.
32 --   c) p_segment1 must be valid and exist within the GB_BANKS lookup_type.
33 --
34 -- Access Status:
35 --   Internal Development Use Only.
36 --
37 -- {End Of Comments}
38 -- ----------------------------------------------------------------------------
39 procedure chk_gb_segment1
40             (p_segment1 in pay_external_accounts.segment1%type) is
41 --
42   cursor hlsel is
43     select null
44     from   hr_lookups
45     where  lookup_type = 'GB_BANKS'
46     and    lookup_code = p_segment1;
47 --
48   l_proc        varchar2(72) := g_package||'chk_gb_segment1';
49   l_dummy	number;
50 --
51 begin
52   hr_utility.set_location('Entering:'||l_proc, 5);
53   --
54   -- Ensure that segment1 is mandatory
55   --
56   hr_api.mandatory_arg_error
57     (p_api_name       => l_proc,
58      p_argument       => 'segment1',
59      p_argument_value => p_segment1);
60   --
61   -- Ensure that the length does not exceed 30
62   --
63   if (length(p_segment1) > 30) then
64     hr_utility.set_message(801, 'HR_51416_EXA_BANK_NAME_LONG');
65     hr_utility.set_message_token('ARG_NAME', 'p_segment1');
66     hr_utility.set_message_token('ARG_VALUE', p_segment1);
67     hr_utility.raise_error;
68   end if;
69   --
70   -- Ensure that the p_segment1 is valid and exists
71   --
72   open hlsel;
73   fetch hlsel into l_dummy;
74   if hlsel%notfound then
75     close hlsel;
76     hr_utility.set_message(801, 'HR_51417_EXA_BANK_NAME_UNKNOWN');
77     hr_utility.set_message_token('ARG_NAME', 'p_segment1');
78     hr_utility.set_message_token('ARG_VALUE', p_segment1);
79     hr_utility.raise_error;
80   end if;
81   close hlsel;
82   --
83   hr_utility.set_location(' Leaving:'||l_proc, 10);
84 --
85 end chk_gb_segment1;
86 --
87 -- ----------------------------------------------------------------------------
88 -- |-----------------------< chk_gb_segment2 >--------------------------------|
89 -- ----------------------------------------------------------------------------
90 -- {Start Of Comments}
91 --
92 -- Description:
93 --   Validates the segment2 attribute for GB legislation.
94 --
95 -- Pre-conditions:
96 --   None
97 --
98 -- In Arguments:
99 --   p_segment2  -> Bank Branch
100 --
101 -- Post Success:
102 --   If the p_segment2 is valid then processing continues.
103 --
104 -- Post Failure:
105 --   If any of the following cases are true then an application error will
106 --   be raised:
107 --   a) p_segment2 cannot exceed 35 in length.
108 --   b) p_segment2 must be valid and exist within the
109 --      'US_ACCOUNT_TYPE lookup_type.
110 --
111 -- Access Status:
112 --   Internal Development Use Only.
113 --
114 -- {End Of Comments}
115 -- ----------------------------------------------------------------------------
116 procedure chk_gb_segment2
117             (p_segment2 in pay_external_accounts.segment2%type) is
118 --
119   l_proc        varchar2(72) := g_package||'chk_gb_segment2';
120 --
121 begin
122   hr_utility.set_location('Entering:'||l_proc, 5);
123   --
124   -- Ensure that the length does not exceed 35
125   --
126   if (length(p_segment2) > 35) then
127     hr_utility.set_message(801, 'HR_51418_EXA_BANK_BRANCH_LONG');
128     hr_utility.set_message_token('ARG_NAME', 'p_segment2');
129     hr_utility.set_message_token('ARG_VALUE', p_segment2);
130     hr_utility.raise_error;
131   end if;
132   --
133   hr_utility.set_location(' Leaving:'||l_proc, 10);
134 --
135 end chk_gb_segment2;
136 --
137 -- ----------------------------------------------------------------------------
138 -- |-----------------------< chk_gb_segment3 >--------------------------------|
139 -- ----------------------------------------------------------------------------
140 -- {Start Of Comments}
141 --
142 -- Description:
143 --   Validates the segment3 attribute for GB legislation.
144 --
145 -- Pre-conditions:
146 --   None
147 --
148 -- In Arguments:
149 --   p_segment3  -> Sort Code
150 --
151 -- Post Success:
152 --   If the p_segment3 is valid then processing continues.
153 --
154 -- Post Failure:
155 --   If any of the following cases are true then an application error will
156 --   be raised:
157 --   a) p_segment3 cannot be NULL.
158 --   b) p_segment3 is not 6 in length.
159 --   c) p_segment3 must be in a numeric format.
160 --   d) p_segment3 is -ve
161 --
162 -- Access Status:
163 --   Internal Development Use Only.
164 --
165 -- {End Of Comments}
166 -- ----------------------------------------------------------------------------
167 procedure chk_gb_segment3
168             (p_segment3 in pay_external_accounts.segment3%type) is
169 --
170   l_proc        varchar2(72) := g_package||'chk_gb_segment3';
171   l_segment3    pay_external_accounts.segment3%type;
172 --
173 begin
174   hr_utility.set_location('Entering:'||l_proc, 5);
175   --
176   -- Ensure that segment3 is mandatory
177   --
178   hr_api.mandatory_arg_error
179     (p_api_name       => l_proc,
180      p_argument       => 'segment3',
181      p_argument_value => p_segment3);
185   if (length(p_segment3) <> 6) then
182   --
183   -- Ensure that the length is 6
184   --
186     hr_utility.set_message(801, 'HR_51419_EXA_SORT_CODE_LENGTH');
187     hr_utility.set_message_token('ARG_NAME', 'p_segment3');
188     hr_utility.set_message_token('ARG_VALUE', p_segment3);
189     hr_utility.raise_error;
190   end if;
191   --
192   -- Ensure that the p_segment3 is in a number format
193   --
194   hr_utility.set_location(l_proc,7);
195   l_segment3 := p_segment3;
196   --
197   hr_dbchkfmt.is_db_format
198     (p_value    => l_segment3,
199      p_arg_name => 'segment3',
200      p_format   => 'I');
201   --
202   hr_utility.set_location(l_proc,8);
203   --
204   -- Ensure that p_segment3 is +ve
205   --
206   if (fnd_number.canonical_to_number(p_segment3) < 0) then
207     hr_utility.set_message(801, 'HR_51420_EXA_SORT_CODE_POSITVE');
208     hr_utility.set_message_token('ARG_NAME', 'p_segment3');
209     hr_utility.set_message_token('ARG_VALUE', p_segment3);
210     hr_utility.raise_error;
211   end if;
212   --
213   hr_utility.set_location(' Leaving:'||l_proc, 10);
214 --
215 end chk_gb_segment3;
216 --
217 -- ----------------------------------------------------------------------------
218 -- |-----------------------< chk_gb_segment4 >--------------------------------|
219 -- ----------------------------------------------------------------------------
220 -- {Start Of Comments}
221 --
222 -- Description:
223 --   Validates the segment4 attribute for GB legislation.
224 --
225 -- Pre-conditions:
226 --   None
227 --
228 -- In Arguments:
229 --   p_segment4  -> Account Number
230 --
231 -- Post Success:
232 --   If the p_segment4 is valid then processing continues.
233 --
234 -- Post Failure:
235 --   If any of the following cases are true then an application error will
236 --   be raised:
237 --   a) p_segment4 cannot be NULL.
238 --   b) p_segment4 is not 8 in length.
239 --   c) p_segment4 must be in a numeric format.
240 --   d) p_segment4 is -ve
241 --
242 -- Access Status:
243 --   Internal Development Use Only.
244 --
245 -- {End Of Comments}
246 -- ----------------------------------------------------------------------------
247 procedure chk_gb_segment4
248             (p_segment4 in pay_external_accounts.segment4%type) is
249 --
250   l_proc        varchar2(72) := g_package||'chk_gb_segment4';
251   l_segment4    pay_external_accounts.segment4%type;
252 --
253 begin
254   hr_utility.set_location('Entering:'||l_proc, 5);
255   --
256   -- Ensure that segment4 is mandatory
257   --
258   hr_api.mandatory_arg_error
259     (p_api_name       => l_proc,
260      p_argument       => 'segment4',
261      p_argument_value => p_segment4);
262   --
263   -- Ensure that the length is 8
264   --
265   if (length(p_segment4) <> 8) then
266     hr_utility.set_message(801, 'HR_51421_EXA_ACCOUNT_NO_LONG');
267     hr_utility.set_message_token('ARG_NAME', 'p_segment4');
268     hr_utility.set_message_token('ARG_VALUE', p_segment4);
269     hr_utility.raise_error;
270   end if;
271   --
272   -- Ensure that the p_segment4 is in a number format
273   --
274   l_segment4 := p_segment4;
275   hr_dbchkfmt.is_db_format
276     (p_value    => l_segment4,
277      p_arg_name => 'segment4',
278      p_format   => 'I');
279   --
280   -- Ensure that p_segment4 is +ve
281   --
282   if (fnd_number.canonical_to_number(p_segment4) < 0) then
283     hr_utility.set_message(801, 'HR_51422_EXA_ACCT_NO_POSITIVE');
284     hr_utility.set_message_token('ARG_NAME', 'p_segment4');
285     hr_utility.set_message_token('ARG_VALUE', p_segment4);
286     hr_utility.raise_error;
287   end if;
288   --
289   hr_utility.set_location(' Leaving:'||l_proc, 10);
290 --
291 end chk_gb_segment4;
292 --
293 -- ----------------------------------------------------------------------------
294 -- |-----------------------< chk_gb_segment5 >--------------------------------|
295 -- ----------------------------------------------------------------------------
296 -- {Start Of Comments}
297 --
298 -- Description:
299 --   Validates the segment5 attribute for GB legislation.
300 --
301 -- Pre-conditions:
302 --   None
303 --
304 -- In Arguments:
305 --   p_segment5  -> Account Name
306 --
307 -- Post Success:
308 --   If the p_segment5 is valid then processing continues.
309 --
310 -- Post Failure:
311 --   If any of the following cases are true then an application error will
312 --   be raised:
313 --   a) p_segment5 cannot be NULL.
314 --   b) p_segment5 cannot exceed 18 in length.
315 --   c) p_segment5 must be in an uppercase format.
316 --
317 -- Access Status:
318 --   Internal Development Use Only.
319 --
320 -- {End Of Comments}
321 -- ----------------------------------------------------------------------------
322 procedure chk_gb_segment5
323             (p_segment5 in pay_external_accounts.segment5%type) is
324 --
325   l_proc        varchar2(72) := g_package||'chk_gb_segment5';
326 --
327 begin
328   hr_utility.set_location('Entering:'||l_proc, 5);
329   --
330   -- Ensure that segment5 is mandatory
331   --
332   hr_api.mandatory_arg_error
333     (p_api_name       => l_proc,
334      p_argument       => 'segment5',
335      p_argument_value => p_segment5);
336   --
337   -- Ensure that the length does not exceed 18
338   --
339   if (length(p_segment5) > 18) then
343     hr_utility.raise_error;
340     hr_utility.set_message(801, 'HR_51423_EXA_ACCOUNT_NAME_LONG');
341     hr_utility.set_message_token('ARG_NAME', 'p_segment5');
342     hr_utility.set_message_token('ARG_VALUE', p_segment5);
344   end if;
345   --
346   -- Ensure that the p_segment5 is in an upperformat format
347   --
348   if (p_segment5 <> upper(p_segment5)) then
349     hr_utility.set_message(801, 'HR_51424_EXA_ACCOUNT_NAME_CASE');
350     hr_utility.set_message_token('ARG_NAME', 'p_segment5');
351     hr_utility.set_message_token('ARG_VALUE', p_segment5);
352     hr_utility.raise_error;
353   end if;
354   --
355   hr_utility.set_location(' Leaving:'||l_proc, 10);
356 --
357 end chk_gb_segment5;
358 --
359 -- ----------------------------------------------------------------------------
360 -- |-----------------------< chk_gb_segment6 >--------------------------------|
361 -- ----------------------------------------------------------------------------
362 -- {Start Of Comments}
363 --
364 -- Description:
365 --   Validates the segment6 attribute for GB legislation.
366 --
367 -- Pre-conditions:
368 --   None
369 --
370 -- In Arguments:
371 --   p_segment6  -> Account Type
372 --
373 -- Post Success:
374 --   If the p_segment6 is valid then processing continues.
375 --
376 -- Post Failure:
377 --   If any of the following cases are true then an application error will
378 --   be raised:
379 --   a) p_segment6 cannot exceed 1 in length.
380 --   b) p_segment6 must be in a numeric format.
381 --   c) p_segment6 Min value: 0, Max value: 5
382 --
383 -- Access Status:
384 --   Internal Development Use Only.
385 --
386 -- {End Of Comments}
387 -- ----------------------------------------------------------------------------
388 procedure chk_gb_segment6
389             (p_segment6 in pay_external_accounts.segment6%type) is
390 --
391   l_proc        varchar2(72) := g_package||'chk_gb_segment6';
392   l_segment6	pay_external_accounts.segment6%type;
393 --
394 begin
395   hr_utility.set_location('Entering:'||l_proc, 5);
396   if p_segment6 is not null then
397     --
398     -- Ensure that the length does not exceed 1
399     --
400     if (length(p_segment6) > 1) then
401       hr_utility.set_message(801, 'HR_51425_EXA_ACCOUNT_TYPE_LONG');
402       hr_utility.set_message_token('ARG_NAME', 'p_segment6');
403       hr_utility.set_message_token('ARG_VALUE', p_segment6);
404       hr_utility.raise_error;
405     end if;
406     --
407     -- Ensure that the p_segment6 is in a number format
408     --
409     l_segment6 := p_segment6;
410     hr_dbchkfmt.is_db_format
411       (p_value    => l_segment6,
412        p_arg_name => 'segment6',
413        p_format   => 'I');
414     --
415     -- Ensure that p_segment4 is in the range of:0 to 5
416     --
417     if (fnd_number.canonical_to_number(p_segment6) < 0 or fnd_number.canonical_to_number(p_segment6) > 5) then
418       hr_utility.set_message(801, 'HR_51426_EXA_ACCT_TYPE_RANGE');
419       hr_utility.set_message_token('ARG_NAME', 'p_segment6');
420       hr_utility.set_message_token('ARG_VALUE', p_segment6);
421       hr_utility.raise_error;
422     end if;
423   end if;
424   hr_utility.set_location(' Leaving:'||l_proc, 10);
425 --
426 end chk_gb_segment6;
427 --
428 -- ----------------------------------------------------------------------------
429 -- |-----------------------< chk_gb_segment7 >--------------------------------|
430 -- ----------------------------------------------------------------------------
431 -- {Start Of Comments}
432 --
433 -- Description:
434 --   Validates the segment7 attribute for GB legislation.
435 --
436 -- Pre-conditions:
437 --   None
438 --
439 -- In Arguments:
440 --   p_segment7  -> Building Society Account Number
441 --
442 -- Post Success:
443 --   If the p_segment7 is valid then processing continues.
444 --
445 -- Post Failure:
446 --   If any of the following cases are true then an application error will
447 --   be raised:
448 --   a) p_segment7 cannot exceed 18 in length.
449 --   b) p_segment7 must be in uppercase format.
450 --
451 -- Access Status:
452 --   Internal Development Use Only.
453 --
454 -- {End Of Comments}
455 -- ----------------------------------------------------------------------------
456 procedure chk_gb_segment7
457             (p_segment7 in pay_external_accounts.segment7%type) is
458 --
459   l_proc        varchar2(72) := g_package||'chk_gb_segment7';
460 --
461 begin
462   hr_utility.set_location('Entering:'||l_proc, 5);
463   if p_segment7 is not null then
464     --
465     -- Ensure that the length does not exceed 18
466     --
467     if (length(p_segment7) > 18) then
468       hr_utility.set_message(801, 'HR_51427_EXA_BS_ACCT_NO_LONG');
469       hr_utility.set_message_token('ARG_NAME', 'p_segment7');
470       hr_utility.set_message_token('ARG_VALUE', p_segment7);
471       hr_utility.raise_error;
472     end if;
473     --
474     -- Ensure that the p_segment7 is in an uppercase format
475     --
476     if (p_segment7 <> upper(p_segment7)) then
477       hr_utility.set_message(801, 'HR_51428_EXA_BS_ACCT_NO_CASE');
478       hr_utility.set_message_token('ARG_NAME', 'p_segment7');
479       hr_utility.set_message_token('ARG_VALUE', p_segment7);
480       hr_utility.raise_error;
481     end if;
482   end if;
483   hr_utility.set_location(' Leaving:'||l_proc, 10);
484 --
485 end chk_gb_segment7;
486 --
490 -- {Start Of Comments}
487 -- ----------------------------------------------------------------------------
488 -- |-----------------------< chk_gb_segment8 >--------------------------------|
489 -- ----------------------------------------------------------------------------
491 --
492 -- Description:
493 --   Validates the segment8 attribute for GB legislation.
494 --
495 -- Pre-conditions:
496 --   None
497 --
498 -- In Arguments:
499 --   p_segment8  -> Bank Branch Location
500 --
501 -- Post Success:
502 --   If the p_segment8 is valid then processing continues.
503 --
504 -- Post Failure:
505 --   If any of the following cases are true then an application error will
506 --   be raised:
507 --   a) p_segment8 cannot exceed 20 in length.
508 --   b) p_segment8 must exist in hr_lookups where lookup_type =
509 --      'GB_COUNTRY'.
510 --
511 -- Access Status:
512 --   Internal Development Use Only.
513 --
514 -- {End Of Comments}
515 -- ----------------------------------------------------------------------------
516 procedure chk_gb_segment8
517             (p_segment8 in pay_external_accounts.segment8%type) is
518 --
519   l_proc        varchar2(72) := g_package||'chk_gb_segment8';
520   l_exists      varchar2(80);
521 --
522   cursor csr_chk_hr_lookups is
523   select null
524   from hr_lookups
525   where LOOKUP_TYPE = 'GB_COUNTRY'
526   and   lookup_code = p_segment8;
527 --
528 begin
529   hr_utility.set_location('Entering:'||l_proc, 5);
530   if p_segment8 is not null then
531     --
532     -- Ensure that the length does not exceed 20
533     --
534     if (length(p_segment8) > 20) then
535       hr_utility.set_message(801, 'HR_51429_EXA_BANK_LOC_LONG');
536       hr_utility.set_message_token('ARG_NAME', 'p_segment8');
537       hr_utility.set_message_token('ARG_VALUE', p_segment8);
538       hr_utility.raise_error;
539     end if;
540     --
541     -- Ensure that the p_segment8 exists in hr_lookups where lookup_type =
542     -- 'GB_COUNTRY'
543     --
544     open csr_chk_hr_lookups;
545     fetch csr_chk_hr_lookups into l_exists;
546     if csr_chk_hr_lookups%notfound then
547       close csr_chk_hr_lookups;
548       hr_utility.set_message(801, 'HR_51430_EXA_BANK_LOC_UNKNOWN');
549       hr_utility.set_message_token('ARG_NAME', 'p_segment8');
550       hr_utility.set_message_token('ARG_VALUE', p_segment8);
551       hr_utility.raise_error;
552     end if;
553     close csr_chk_hr_lookups;
554   end if;
555   hr_utility.set_location(' Leaving:'||l_proc, 10);
556 --
557 end chk_gb_segment8;
558 --
559 -- ----------------------------------------------------------------------------
560 -- |---------------------< chk_gb_segment9_30 >-------------------------------|
561 -- ----------------------------------------------------------------------------
562 -- {Start Of Comments}
563 --
564 -- Description:
565 --   Validates the segments 9..30 for GB legislation.
566 --
567 -- Pre-conditions:
568 --   None
569 --
570 -- In Arguments:
571 --   p_segment9..30
572 --
573 -- Post Success:
574 --   If the p_segment9..30 are NULL then processing continues.
575 --
576 -- Post Failure:
577 --   If any of segments9..30 are NOT NULL then an aplication error will be
578 --   raised.
579 --
580 -- Access Status:
581 --   Internal Development Use Only.
582 --
583 -- {End Of Comments}
584 -- ----------------------------------------------------------------------------
585 procedure chk_gb_segment9_30
586             (p_segment9  in pay_external_accounts.segment9%type,
587              p_segment10 in pay_external_accounts.segment10%type,
588              p_segment11 in pay_external_accounts.segment11%type,
589              p_segment12 in pay_external_accounts.segment12%type,
590              p_segment13 in pay_external_accounts.segment13%type,
591              p_segment14 in pay_external_accounts.segment14%type,
592              p_segment15 in pay_external_accounts.segment15%type,
593              p_segment16 in pay_external_accounts.segment16%type,
594              p_segment17 in pay_external_accounts.segment17%type,
595              p_segment18 in pay_external_accounts.segment18%type,
596              p_segment19 in pay_external_accounts.segment19%type,
597              p_segment20 in pay_external_accounts.segment20%type,
598              p_segment21 in pay_external_accounts.segment21%type,
599              p_segment22 in pay_external_accounts.segment22%type,
600              p_segment23 in pay_external_accounts.segment23%type,
601              p_segment24 in pay_external_accounts.segment24%type,
602              p_segment25 in pay_external_accounts.segment25%type,
603              p_segment26 in pay_external_accounts.segment26%type,
604              p_segment27 in pay_external_accounts.segment27%type,
605              p_segment28 in pay_external_accounts.segment28%type,
606              p_segment29 in pay_external_accounts.segment29%type,
607              p_segment30 in pay_external_accounts.segment30%type) is
608 --
609   l_proc  varchar2(72) := g_package||'chk_gb_segment9_30';
610   l_err   exception;                           -- local error exception
611   l_n     number;                              -- arg in error number (9..30)
612   l_v     pay_external_accounts.segment8%type; -- arg in error value (9..30)
613 --
614 begin
615   hr_utility.set_location('Entering:'||l_proc, 5);
616   --
617   if p_segment9  is not null then l_n:=9; l_v:=p_segment9 ;raise l_err;end if;
618   if p_segment10 is not null then l_n:=10;l_v:=p_segment10;raise l_err;end if;
622   if p_segment14 is not null then l_n:=14;l_v:=p_segment14;raise l_err;end if;
619   if p_segment11 is not null then l_n:=11;l_v:=p_segment11;raise l_err;end if;
620   if p_segment12 is not null then l_n:=12;l_v:=p_segment12;raise l_err;end if;
621   if p_segment13 is not null then l_n:=13;l_v:=p_segment13;raise l_err;end if;
623   if p_segment15 is not null then l_n:=15;l_v:=p_segment15;raise l_err;end if;
624   if p_segment16 is not null then l_n:=16;l_v:=p_segment16;raise l_err;end if;
625   if p_segment17 is not null then l_n:=17;l_v:=p_segment17;raise l_err;end if;
626   if p_segment18 is not null then l_n:=18;l_v:=p_segment18;raise l_err;end if;
627   if p_segment19 is not null then l_n:=19;l_v:=p_segment19;raise l_err;end if;
628   if p_segment20 is not null then l_n:=20;l_v:=p_segment20;raise l_err;end if;
629   if p_segment21 is not null then l_n:=21;l_v:=p_segment21;raise l_err;end if;
630   if p_segment22 is not null then l_n:=22;l_v:=p_segment22;raise l_err;end if;
631   if p_segment23 is not null then l_n:=23;l_v:=p_segment23;raise l_err;end if;
632   if p_segment24 is not null then l_n:=24;l_v:=p_segment24;raise l_err;end if;
633   if p_segment25 is not null then l_n:=25;l_v:=p_segment25;raise l_err;end if;
634   if p_segment26 is not null then l_n:=26;l_v:=p_segment26;raise l_err;end if;
635   if p_segment27 is not null then l_n:=27;l_v:=p_segment27;raise l_err;end if;
636   if p_segment28 is not null then l_n:=28;l_v:=p_segment28;raise l_err;end if;
637   if p_segment29 is not null then l_n:=29;l_v:=p_segment29;raise l_err;end if;
638   if p_segment30 is not null then l_n:=30;l_v:=p_segment30;raise l_err;end if;
639   --
640   hr_utility.set_location(' Leaving:'||l_proc, 10);
641 --
642 exception
643   when l_err then
644     hr_utility.set_message(801, 'HR_7296_API_ARG_NOT_SUP');
645     hr_utility.set_message_token('ARG_NAME', 'p_segment'||to_char(l_n));
646     hr_utility.set_message_token('ARG_VALUE', l_v);
647     hr_utility.raise_error;
648 end chk_gb_segment9_30;
649 --
650 -- ----------------------------------------------------------------------------
651 -- |-----------------------< chk_us_segment1 >--------------------------------|
652 -- ----------------------------------------------------------------------------
653 -- {Start Of Comments}
654 --
655 -- Description:
656 --   Validates the segment1 attribute for US legislation.
657 --
658 -- Pre-conditions:
659 --   None
660 --
661 -- In Arguments:
662 --   p_segment1  -> Account Name
663 --
664 -- Post Success:
665 --   If the p_segment1 is valid then processing continues.
666 --
667 -- Post Failure:
668 --   If any of the following cases are true then an application error will
669 --   be raised:
670 --   a) p_segment1 cannot be NULL.
671 --   b) p_segment1 cannot exceed 60 in length.
672 --
673 -- Access Status:
674 --   Internal Development Use Only.
675 --
676 -- {End Of Comments}
677 -- ----------------------------------------------------------------------------
678 procedure chk_us_segment1
679             (p_segment1 in pay_external_accounts.segment1%type) is
680 --
681   l_proc        varchar2(72) := g_package||'chk_us_segment1';
682   l_dummy	number;
683 --
684 begin
685   hr_utility.set_location('Entering:'||l_proc, 5);
686   --
687   -- Ensure that segment1 is mandatory
688   --
689   hr_api.mandatory_arg_error
690     (p_api_name       => l_proc,
691      p_argument       => 'segment1',
692      p_argument_value => p_segment1);
693   --
694   -- Ensure that the length does not exceed 60
695   --
696   hr_utility.set_location(l_proc,7);
697   if (length(p_segment1) > 60) then
698     hr_utility.set_message(801, 'HR_51458_EXA_US_ACCT_NAME_LONG');
699     hr_utility.set_message_token('ARG_NAME', 'p_segment1');
700     hr_utility.set_message_token('ARG_VALUE', p_segment1);
701     hr_utility.raise_error;
702   end if;
703   --
704   hr_utility.set_location(' Leaving:'||l_proc, 10);
705 --
706 end chk_us_segment1;
707 --
708 -- ----------------------------------------------------------------------------
709 -- |-----------------------< chk_us_segment2 >--------------------------------|
710 -- ----------------------------------------------------------------------------
711 -- {Start Of Comments}
712 --
713 -- Description:
714 --   Validates the segment2 attribute for US legislation.
715 --
716 -- Pre-conditions:
717 --   None
718 --
719 -- In Arguments:
720 --   p_segment2  -> Account Type
721 --
722 -- Post Success:
723 --   If the p_segment2 is valid then processing continues.
724 --
725 -- Post Failure:
726 --   If any of the following cases are true then an application error will
727 --   be raised:
728 --   a) p_segment2 cannot be NULL.
729 --   b) p_segment2 cannot exceed 80 in length.
730 --   c) p_segment2 must be valid and exist within the
731 --      'US_ACCOUNT_TYPE' lookup_type.
732 --
733 -- Access Status:
734 --   Internal Development Use Only.
735 --
736 -- {End Of Comments}
737 -- ----------------------------------------------------------------------------
738 procedure chk_us_segment2
739             (p_segment2 in pay_external_accounts.segment2%type) is
740 --
741   cursor fnd_com_look is
742     select null
743     from   fnd_common_lookups
744     where  lookup_type = 'US_ACCOUNT_TYPE'
745     and    application_id = 800
746     and    lookup_code = p_segment2;
747 --
748   l_proc        varchar2(72) := g_package||'chk_us_segment2';
749   l_dummy	number;
750 --
751 begin
752   hr_utility.set_location('Entering:'||l_proc, 5);
753   --
754   -- Ensure that segment2 is mandatory
758      p_argument       => 'segment2',
755   --
756   hr_api.mandatory_arg_error
757     (p_api_name       => l_proc,
759      p_argument_value => p_segment2);
760   --
761   -- Ensure that the length does not exceed 80
762   --
763   hr_utility.set_location(l_proc,6);
764   if (length(p_segment2) > 80) then
765     hr_utility.set_message(801, 'HR_51459_EXA_US_ACCT_TYPE_LONG');
766     hr_utility.set_message_token('ARG_NAME', 'p_segment2');
767     hr_utility.set_message_token('ARG_VALUE', p_segment2);
768     hr_utility.raise_error;
769   end if;
770   --
771   -- Ensure that the p_segment2 is valid and exists
772   --
773   hr_utility.set_location(l_proc,7);
774   open fnd_com_look;
775   fetch fnd_com_look into l_dummy;
776   if fnd_com_look%notfound then
777     close fnd_com_look;
778     hr_utility.set_message(801, 'HR_51460_EXA_US_ACC_TYP_UNKNOW');
779     hr_utility.set_message_token('ARG_NAME', 'p_segment2');
780     hr_utility.set_message_token('ARG_VALUE', p_segment2);
781     hr_utility.raise_error;
782   end if;
783   close fnd_com_look;
784   --
785   hr_utility.set_location(' Leaving:'||l_proc, 10);
786 --
787 end chk_us_segment2;
788 --
789 -- ----------------------------------------------------------------------------
790 -- |-----------------------< chk_us_segment3 >--------------------------------|
791 -- ----------------------------------------------------------------------------
792 -- {Start Of Comments}
793 --
794 -- Description:
795 --   Validates the segment3 attribute for US legislation.
796 --
797 -- Pre-conditions:
798 --   None
799 --
800 -- In Arguments:
801 --   p_segment3  -> Account Number
802 --
803 -- Post Success:
804 --   If the p_segment3 is valid then processing continues.
805 --
806 -- Post Failure:
807 --   If any of the following cases are true then an application error will
808 --   be raised:
809 --   a) p_segment3 cannot be NULL.
810 --   b) p_segment3 cannot exceed 60 in length.
811 --
812 -- Access Status:
813 --   Internal Development Use Only.
814 --
815 -- {End Of Comments}
816 -- ----------------------------------------------------------------------------
817 procedure chk_us_segment3
818             (p_segment3 in pay_external_accounts.segment3%type) is
819 --
820   l_proc        varchar2(72) := g_package||'chk_us_segment3';
821   l_dummy	number;
822 --
823 begin
824   hr_utility.set_location('Entering:'||l_proc, 5);
825   --
826   -- Ensure that segment3 is mandatory
827   --
828   hr_api.mandatory_arg_error
829     (p_api_name       => l_proc,
830      p_argument       => 'segment3',
831      p_argument_value => p_segment3);
832   --
833   -- Ensure that the length does not exceed 60
834   --
835   hr_utility.set_location(l_proc,7);
836   if (length(p_segment3) > 60) then
837     hr_utility.set_message(801, 'HR_51461_EXA_US_ACCT_NO_LONG');
838     hr_utility.set_message_token('ARG_NAME', 'p_segment3');
839     hr_utility.set_message_token('ARG_VALUE', p_segment3);
840     hr_utility.raise_error;
841   end if;
842   --
843   hr_utility.set_location(' Leaving:'||l_proc, 10);
844 --
845 end chk_us_segment3;
846 --
847 -- ----------------------------------------------------------------------------
848 -- |-----------------------< chk_us_segment4 >--------------------------------|
849 -- ----------------------------------------------------------------------------
850 -- {Start Of Comments}
851 --
852 -- Description:
853 --   Validates the segment4 attribute for US legislation.
854 --
855 -- Pre-conditions:
856 --   None
857 --
858 -- In Arguments:
859 --   p_segment4  -> Transit Code
860 --
861 -- Post Success:
862 --   If the p_segment4 is valid then processing continues.
863 --
864 -- Post Failure:
865 --   If any of the following cases are true then an application error will
866 --   be raised:
867 --   a) p_segment4 cannot be NULL.
868 --   b) p_segment4 cannot exceed 9 in length.
869 --   c) p_segment4 must be a number.
870 --
871 -- Access Status:
872 --   Internal Development Use Only.
873 --
874 -- {End Of Comments}
875 -- ----------------------------------------------------------------------------
876 procedure chk_us_segment4
877             (p_segment4 in pay_external_accounts.segment4%type) is
878 --
879   l_segment4    pay_external_accounts.segment4%type;
880   l_proc        varchar2(72) := g_package||'chk_us_segment4';
881   l_dummy	number;
882 --
883 begin
884   hr_utility.set_location('Entering:'||l_proc, 5);
885   --
886   -- Ensure that segment4 is mandatory
887   --
888   hr_api.mandatory_arg_error
889     (p_api_name       => l_proc,
890      p_argument       => 'segment4',
891      p_argument_value => p_segment4);
892   --
893   -- Ensure that the length does not exceed 9
894   --
895   hr_utility.set_location(l_proc,6);
896   if (length(p_segment4) > 9) then
897     hr_utility.set_message(801, 'HR_51462_EXA_US_TRAN_CODE_LONG');
898     hr_utility.set_message_token('ARG_NAME', 'p_segment4');
899     hr_utility.set_message_token('ARG_VALUE', p_segment4);
900     hr_utility.raise_error;
901   end if;
902   --
903   -- Ensure there is a number format
904   --
905   hr_utility.set_location(l_proc,7);
906   l_segment4 := p_segment4;
907   --
908   hr_dbchkfmt.is_db_format
909     (p_value    => l_segment4,
910      p_arg_name => 'segment4',
911      p_format   => 'I');
915 end chk_us_segment4;
912   --
913   hr_utility.set_location(' Leaving:'||l_proc, 10);
914 --
916 --
917 -- ----------------------------------------------------------------------------
918 -- |-----------------------< chk_us_segment5 >--------------------------------|
919 -- ----------------------------------------------------------------------------
920 -- {Start Of Comments}
921 --
922 -- Description:
923 --   Validates the segment5 attribute for US legislation.
924 --
925 -- Pre-conditions:
926 --   None
927 --
928 -- In Arguments:
929 --   p_segment5  -> Bank Name
930 --
931 -- Post Success:
932 --   If the p_segment5 is valid then processing continues.
933 --
934 -- Post Failure:
935 --   If any of the following cases are true then an application error will
936 --   be raised:
937 --   a) p_segment5 cannot be NULL.
938 --   b) p_segment5 cannot exceed 60 in length.
939 --
940 -- Access Status:
941 --   Internal Development Use Only.
942 --
943 -- {End Of Comments}
944 -- ----------------------------------------------------------------------------
945 procedure chk_us_segment5
946             (p_segment5 in pay_external_accounts.segment5%type) is
947 --
948   l_proc        varchar2(72) := g_package||'chk_us_segment5';
949   l_dummy	number;
950 --
951 begin
952   hr_utility.set_location('Entering:'||l_proc, 5);
953   --
954   -- Ensure that segment5 is mandatory
955   --
956   hr_api.mandatory_arg_error
957     (p_api_name       => l_proc,
958      p_argument       => 'segment5',
959      p_argument_value => p_segment5);
960   --
961   -- Ensure that the length does not exceed 60
962   --
963   hr_utility.set_location(l_proc,7);
964   if (length(p_segment5) > 60) then
965     hr_utility.set_message(801, 'HR_51463_EXA_US_BANK_NAME_LONG');
966     hr_utility.set_message_token('ARG_NAME', 'p_segment5');
967     hr_utility.set_message_token('ARG_VALUE', p_segment5);
968     hr_utility.raise_error;
969   end if;
970   --
971   hr_utility.set_location(' Leaving:'||l_proc, 10);
972 --
973 end chk_us_segment5;
974 --
975 -- ----------------------------------------------------------------------------
976 -- |-----------------------< chk_us_segment6 >--------------------------------|
977 -- ----------------------------------------------------------------------------
978 -- {Start Of Comments}
979 --
980 -- Description:
981 --   Validates the segment6 attribute for US legislation.
982 --
983 -- Pre-conditions:
984 --   None
985 --
986 -- In Arguments:
987 --   p_segment6  -> Bank Branch
988 --
989 -- Post Success:
990 --   If the p_segment6 is valid then processing continues.
991 --
992 -- Post Failure:
993 --   If any of the following cases are true then an application error will
994 --   be raised:
995 --   a) p_segment6 cannot be NULL.
996 --   b) p_segment6 cannot exceed 60 in length.
997 --
998 -- Access Status:
999 --   Internal Development Use Only.
1000 --
1001 -- {End Of Comments}
1002 -- ----------------------------------------------------------------------------
1003 procedure chk_us_segment6
1004             (p_segment6 in pay_external_accounts.segment6%type) is
1005 --
1006   l_proc        varchar2(72) := g_package||'chk_us_segment6';
1007   l_dummy	number;
1008 --
1009 begin
1010   hr_utility.set_location('Entering:'||l_proc, 5);
1011   --
1012   -- Ensure that segment6 is mandatory
1013   --
1014   hr_api.mandatory_arg_error
1015     (p_api_name       => l_proc,
1016      p_argument       => 'segment6',
1017      p_argument_value => p_segment6);
1018   --
1019   -- Ensure that the length does not exceed 60
1020   --
1021   hr_utility.set_location(l_proc,7);
1022   if (length(p_segment6) > 60) then
1023     hr_utility.set_message(801, 'HR_51464_EXA_US_BANK_BRAN_LONG');
1024     hr_utility.set_message_token('ARG_NAME', 'p_segment6');
1025     hr_utility.set_message_token('ARG_VALUE', p_segment6);
1026     hr_utility.raise_error;
1027   end if;
1028   --
1029   hr_utility.set_location(' Leaving:'||l_proc, 10);
1030 --
1031 end chk_us_segment6;
1032 --
1033 -- ----------------------------------------------------------------------------
1034 -- |---------------------< chk_us_segment7_30 >-------------------------------|
1035 -- ----------------------------------------------------------------------------
1036 -- {Start Of Comments}
1037 --
1038 -- Description:
1039 --   Validates the segments 7..30 for US legislation.
1040 --
1041 -- Pre-conditions:
1042 --   None
1043 --
1044 -- In Arguments:
1045 --   p_segment7..30
1046 --
1047 -- Post Success:
1048 --   If the p_segment7..30 are NULL then processing continues.
1049 --
1050 -- Post Failure:
1051 --   If any of segments7..30 are NOT NULL then an aplication error will be
1052 --   raised.
1053 --
1054 -- Access Status:
1055 --   Internal Development Use Only.
1056 --
1057 -- {End Of Comments}
1058 -- ----------------------------------------------------------------------------
1059 procedure chk_us_segment7_30
1060             (p_segment7  in pay_external_accounts.segment7%type,
1061              p_segment8  in pay_external_accounts.segment8%type,
1062              p_segment9  in pay_external_accounts.segment9%type,
1063              p_segment10 in pay_external_accounts.segment10%type,
1064              p_segment11 in pay_external_accounts.segment11%type,
1065              p_segment12 in pay_external_accounts.segment12%type,
1066              p_segment13 in pay_external_accounts.segment13%type,
1070              p_segment17 in pay_external_accounts.segment17%type,
1067              p_segment14 in pay_external_accounts.segment14%type,
1068              p_segment15 in pay_external_accounts.segment15%type,
1069              p_segment16 in pay_external_accounts.segment16%type,
1071              p_segment18 in pay_external_accounts.segment18%type,
1072              p_segment19 in pay_external_accounts.segment19%type,
1073              p_segment20 in pay_external_accounts.segment20%type,
1074              p_segment21 in pay_external_accounts.segment21%type,
1075              p_segment22 in pay_external_accounts.segment22%type,
1076              p_segment23 in pay_external_accounts.segment23%type,
1077              p_segment24 in pay_external_accounts.segment24%type,
1078              p_segment25 in pay_external_accounts.segment25%type,
1079              p_segment26 in pay_external_accounts.segment26%type,
1080              p_segment27 in pay_external_accounts.segment27%type,
1081              p_segment28 in pay_external_accounts.segment28%type,
1082              p_segment29 in pay_external_accounts.segment29%type,
1083              p_segment30 in pay_external_accounts.segment30%type) is
1084 --
1085   l_proc  varchar2(72) := g_package||'chk_us_segment7_30';
1086   l_err   exception;                           -- local error exception
1087   l_n     number;                              -- arg in error number (9..30)
1088   l_v     pay_external_accounts.segment8%type; -- arg in error value (9..30)
1089 --
1090 begin
1091   hr_utility.set_location('Entering:'||l_proc, 5);
1092   --
1093   if p_segment7  is not null then l_n:=7; l_v:=p_segment7 ;raise l_err;end if;
1094   if p_segment8  is not null then l_n:=8; l_v:=p_segment8 ;raise l_err;end if;
1095   if p_segment9  is not null then l_n:=9; l_v:=p_segment9 ;raise l_err;end if;
1096   if p_segment10 is not null then l_n:=10;l_v:=p_segment10;raise l_err;end if;
1097   if p_segment11 is not null then l_n:=11;l_v:=p_segment11;raise l_err;end if;
1098   if p_segment12 is not null then l_n:=12;l_v:=p_segment12;raise l_err;end if;
1099   if p_segment13 is not null then l_n:=13;l_v:=p_segment13;raise l_err;end if;
1100   if p_segment14 is not null then l_n:=14;l_v:=p_segment14;raise l_err;end if;
1101   if p_segment15 is not null then l_n:=15;l_v:=p_segment15;raise l_err;end if;
1102   if p_segment16 is not null then l_n:=16;l_v:=p_segment16;raise l_err;end if;
1103   if p_segment17 is not null then l_n:=17;l_v:=p_segment17;raise l_err;end if;
1104   if p_segment18 is not null then l_n:=18;l_v:=p_segment18;raise l_err;end if;
1105   if p_segment19 is not null then l_n:=19;l_v:=p_segment19;raise l_err;end if;
1106   if p_segment20 is not null then l_n:=20;l_v:=p_segment20;raise l_err;end if;
1107   if p_segment21 is not null then l_n:=21;l_v:=p_segment21;raise l_err;end if;
1108   if p_segment22 is not null then l_n:=22;l_v:=p_segment22;raise l_err;end if;
1109   if p_segment23 is not null then l_n:=23;l_v:=p_segment23;raise l_err;end if;
1110   if p_segment24 is not null then l_n:=24;l_v:=p_segment24;raise l_err;end if;
1111   if p_segment25 is not null then l_n:=25;l_v:=p_segment25;raise l_err;end if;
1112   if p_segment26 is not null then l_n:=26;l_v:=p_segment26;raise l_err;end if;
1113   if p_segment27 is not null then l_n:=27;l_v:=p_segment27;raise l_err;end if;
1114   if p_segment28 is not null then l_n:=28;l_v:=p_segment28;raise l_err;end if;
1115   if p_segment29 is not null then l_n:=29;l_v:=p_segment29;raise l_err;end if;
1116   if p_segment30 is not null then l_n:=30;l_v:=p_segment30;raise l_err;end if;
1117   --
1118   hr_utility.set_location(' Leaving:'||l_proc, 10);
1119 --
1120 exception
1121   when l_err then
1122     hr_utility.set_message(801, 'HR_7296_API_ARG_NOT_SUP');
1123     hr_utility.set_message_token('ARG_NAME', 'p_segment'||to_char(l_n));
1124     hr_utility.set_message_token('ARG_VALUE', l_v);
1125     hr_utility.raise_error;
1126 end chk_us_segment7_30;
1127 --
1128 -- ----------------------------------------------------------------------------
1129 -- |-------------------------------< kf >-------------------------------------|
1130 -- ----------------------------------------------------------------------------
1131 procedure kf
1132         (p_rec               in pay_exa_shd.g_rec_type,
1133          p_business_group_id in number) is
1134 --
1135   l_proc             varchar2(72) := g_package||'kf';
1136   l_legislation_code per_business_groups.legislation_code%type;
1137 --
1138   --
1139   -- This cursor selects the legislation_code for the business group which
1140   -- will be used to switch the segment validation.
1141   -- We are using the legislation_code in preference to the id_flex_num as
1142   -- the legislation_code should be static whereas we cannot guarantee that
1143   -- the id_flex_num is static.
1144   --
1145   cursor lcsel is
1146     select  pbg.legislation_code
1147     from    pay_legislation_rules plr,
1148             per_business_groups   pbg
1149     where   plr.rule_type         = 'E'
1150     and     plr.legislation_code  = pbg.legislation_code
1151     and     pbg.business_group_id = p_business_group_id
1152     and     plr.rule_mode         = to_char(p_rec.id_flex_num);
1153 --
1154 begin
1155   hr_utility.set_location('Entering:'||l_proc, 5);
1156   --
1157   -- Ensure that p_rec.id_flex_num and p_business_group_id are mandatory
1158   --
1159   hr_api.mandatory_arg_error
1160     (p_api_name       => l_proc,
1161      p_argument       => 'id_flex_num',
1162      p_argument_value => p_rec.id_flex_num);
1163   --
1164   hr_api.mandatory_arg_error
1165     (p_api_name       => l_proc,
1166      p_argument       => 'business_group_id',
1167      p_argument_value => p_business_group_id);
1168   --
1169   open lcsel;
1170   fetch lcsel into l_legislation_code;
1171   if lcsel%notfound then
1172     close lcsel;
1173     -- *** TEMP error message ***
1174     hr_utility.set_message(801, 'HR_7296_API_ARG_NOT_SUP');
1175     hr_utility.set_message_token('ARG_NAME', 'id_flex_num');
1176     hr_utility.set_message_token('ARG_VALUE', to_char(p_rec.id_flex_num));
1177     hr_utility.raise_error;
1178   end if;
1179   close lcsel;
1180   --
1181   if (l_legislation_code = 'GB') then
1182     --
1183     -- GB Bank Details
1184     --
1185     chk_gb_segment1(p_segment1 => p_rec.segment1);
1186     chk_gb_segment2(p_segment2 => p_rec.segment2);
1187     chk_gb_segment3(p_segment3 => p_rec.segment3);
1188     chk_gb_segment4(p_segment4 => p_rec.segment4);
1189     chk_gb_segment5(p_segment5 => p_rec.segment5);
1190     chk_gb_segment6(p_segment6 => p_rec.segment6);
1191     chk_gb_segment7(p_segment7 => p_rec.segment7);
1192     chk_gb_segment8(p_segment8 => p_rec.segment8);
1193     chk_gb_segment9_30(p_segment9  => p_rec.segment9,
1194                        p_segment10 => p_rec.segment10,
1195                        p_segment11 => p_rec.segment11,
1196                        p_segment12 => p_rec.segment12,
1197                        p_segment13 => p_rec.segment13,
1198                        p_segment14 => p_rec.segment14,
1199                        p_segment15 => p_rec.segment15,
1200                        p_segment16 => p_rec.segment16,
1201                        p_segment17 => p_rec.segment17,
1202                        p_segment18 => p_rec.segment18,
1203                        p_segment19 => p_rec.segment19,
1204                        p_segment20 => p_rec.segment20,
1205                        p_segment21 => p_rec.segment21,
1206                        p_segment22 => p_rec.segment22,
1207                        p_segment23 => p_rec.segment23,
1208                        p_segment24 => p_rec.segment24,
1209                        p_segment25 => p_rec.segment25,
1210                        p_segment26 => p_rec.segment26,
1211                        p_segment27 => p_rec.segment27,
1212                        p_segment28 => p_rec.segment28,
1213                        p_segment29 => p_rec.segment29,
1214                        p_segment30 => p_rec.segment30);
1215   --
1216   elsif (l_legislation_code = 'US') then
1217     --
1218     -- US Bank Details
1219     --
1220     chk_us_segment1(p_segment1 => p_rec.segment1);
1221     chk_us_segment2(p_segment2 => p_rec.segment2);
1222     chk_us_segment3(p_segment3 => p_rec.segment3);
1223     chk_us_segment4(p_segment4 => p_rec.segment4);
1224     chk_us_segment5(p_segment5 => p_rec.segment5);
1225     chk_us_segment6(p_segment6 => p_rec.segment6);
1226     chk_us_segment7_30(p_segment7  => p_rec.segment7,
1227                        p_segment8  => p_rec.segment8,
1228                        p_segment9  => p_rec.segment9,
1229                        p_segment10 => p_rec.segment10,
1230                        p_segment11 => p_rec.segment11,
1231                        p_segment12 => p_rec.segment12,
1232                        p_segment13 => p_rec.segment13,
1233                        p_segment14 => p_rec.segment14,
1234                        p_segment15 => p_rec.segment15,
1235                        p_segment16 => p_rec.segment16,
1236                        p_segment17 => p_rec.segment17,
1237                        p_segment18 => p_rec.segment18,
1238                        p_segment19 => p_rec.segment19,
1239                        p_segment20 => p_rec.segment20,
1240                        p_segment21 => p_rec.segment21,
1241                        p_segment22 => p_rec.segment22,
1242                        p_segment23 => p_rec.segment23,
1243                        p_segment24 => p_rec.segment24,
1244                        p_segment25 => p_rec.segment25,
1245                        p_segment26 => p_rec.segment26,
1246                        p_segment27 => p_rec.segment27,
1247                        p_segment28 => p_rec.segment28,
1248                        p_segment29 => p_rec.segment29,
1249                        p_segment30 => p_rec.segment30);
1250 
1251   else
1252     -- *** TEMP error message ***
1253     hr_utility.set_message(801, 'HR_7296_API_ARG_NOT_SUP');
1254     hr_utility.set_message_token('ARG_NAME', 'id_flex_num');
1255     hr_utility.set_message_token('ARG_VALUE', to_char(p_rec.id_flex_num));
1256     hr_utility.raise_error;
1257   end if;
1258   --
1259   hr_utility.set_location(' Leaving:'||l_proc, 10);
1260 --
1261 end kf;
1262 --
1263 end pay_exa_flex;