DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_QP_REPORTS

Source


1 PACKAGE BODY PER_QP_REPORTS as
2 /* $Header: ffqpr01t.pkb 115.0 99/07/16 02:03:19 porting ship $ */
3 /*===========================================================================+
4  |               Copyright (c) 1993 Oracle Corporation                       |
5  |                  Redwood Shores, California, USA                          |
6  |                       All rights reserved.                                |
7  +===========================================================================+
8 
9 Description
10 -----------
11 Package Header for procedures supporting FFXWSBQR - Define QP Report
12 
13 History
14 -------
15 Date      Version  Description
16 ----      -------  -----------
17 13-Apr-94 4.0      Created Initial Version
18 ----------------------------------------------------------------------------*/
19 --
20 function get_formula_type return NUMBER is
21 l_formula_type_id number;
22 cursor c is
23 select formula_type_id
24 from   ff_formula_types
25 where   upper(formula_type_name) = 'QUICKPAINT';
26 --
27 begin
28 hr_utility.set_location('per_qp_reports.get_formula_type',1);
29   open c;
30   fetch c into l_formula_type_id;
31   if c%notfound then
32      close c;
33      hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
34      hr_utility.set_message_token('PROCEDURE','GET_FORMULA_TYPE');
35      hr_utility.set_message_token('STEP','1');
36      hr_utility.raise_error;
37   end if;
38   close c;
39   return(l_formula_type_id);
40 end get_formula_type;
41 --
42 function get_sequence_id return NUMBER is
43 l_sequence number;
44 cursor c is
45 select ff_qp_reports_s.nextval
46 from   sys.dual;
47 --
48 begin
49 hr_utility.set_location('per_qp_reports.get_sequence_id',1);
50   open c;
51   fetch c into l_sequence;
52   close c;
53   return(l_sequence);
54 end get_sequence_id;
55 --
56 procedure check_unique_name(p_qp_report_name varchar2
57                            ,p_formula_type_id number
58                            ,p_business_group_id number
59                            ,p_legislation_code varchar2) is
60 l_exists varchar2(1);
61 cursor c is
62  select  'x'
63  from    ff_qp_reports
64  where   formula_type_id       = p_formula_type_id
65  and     upper(qp_report_name) = upper(p_qp_report_name)
66  and     nvl(business_group_id, nvl(p_business_group_id, 0)) =
67                 nvl(p_business_group_id, 0)
68  and     nvl(legislation_code, nvl(p_legislation_code, ' ')) =
69                 nvl(p_legislation_code, ' ');
70 begin
71 hr_utility.set_location('per_qp_reports.check_unique_name',1);
72   open c;
73   fetch c into l_exists;
74   if c%found then
75      close c;
76      hr_utility.set_message(801,'FF00151_QP_REP_NAME_EXISTS');
77      hr_utility.raise_error;
78   end if;
79   close c;
80 end check_unique_name;
81 --
82 END PER_QP_REPORTS;