DBA Data[Home] [Help]

PACKAGE: APPS.PER_PPC_BUS

Source


1 Package per_ppc_bus AUTHID CURRENT_USER as
2 /* $Header: peppcrhi.pkh 120.1 2006/03/14 18:16:34 scnair noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 -- The following two global variables are only to be
9 -- used by the return_legislation_code function.
10 --
11 g_legislation_code  varchar2(150) default null;
12 g_component_id      number        default null;
13 --
14 --
15 ----------------------------------------------------------------------
16 -- |---------------< chk_approved >-----------------------------------
17 ----------------------------------------------------------------------
18 --
19 --  Description:
20 --    - Validates that it cannot be set to 'Y' if the change amount
21 --      or change_percentage is null.
22 --
23 --  Pre-condition
24 --    A valid pay_proposal_id
25 --    The Change_amount and the Change_percentage have been validated
26 --    or derived as appropriate.
27 --
28 --  In arguments:
29 --    p_component_id
30 --    p_change_amount_n
31 --    p_change_percentage
32 --    p_component_reason
33 --    p_object_version_number
34 --
35 --  Post_success
36 --    Process continues if:
37 --    The change_amount_n and change_percentage are not null.
38 --
39 --  Post-Failure:
40 --    An application error is raised and processing is terminated
41 --    if any of the following cases are found :
42 --    - The change_amount_n or change_percentage are null.
43 --
44 --  Access Status
45 --    Internal Table Handler Use Only.
46 --
47 --
48 --
49 procedure chk_approved
50   (p_component_id
51   in 	per_pay_proposal_components.component_id%TYPE
52   ,p_approved
53   in  per_pay_proposal_components.approved%TYPE
54   ,p_component_reason
55   in  per_pay_proposal_components.component_reason%TYPE
56   ,p_change_amount_n
57   in  per_pay_proposal_components.change_amount_n%TYPE
58   ,p_change_percentage
59   in	per_pay_proposal_components.change_percentage%TYPE
60   ,p_object_version_number
61   in  per_pay_proposal_components.object_version_number%TYPE
62   );
63 --
64 -- ----------------------------------------------------------------------------
65 -- |---------------------------< insert_validate >----------------------------|
66 -- ----------------------------------------------------------------------------
67 -- {Start Of Comments}
68 --
69 -- Description:
70 --   This procedure controls the execution of all insert business rules
71 --   validation.
72 --
73 -- Pre Conditions:
74 --   This private procedure is called from ins procedure.
75 --
76 -- In Parameters:
77 --   A Pl/Sql record structre.
78 --
79 -- Post Success:
80 --   Processing continues.
81 --
82 -- Post Failure:
83 --   If a business rules fails the error will not be handled by this procedure
84 --   unless explicity coded.
85 --
86 -- Developer Implementation Notes:
87 --   For insert, your business rules should be executed from this procedure and
88 --   should ideally (unless really necessary) just be straight procedure or
89 --   function calls. Try and avoid using conditional branching logic.
90 --
91 -- Access Status:
92 --   Internal Table Handler Use Only.
93 --
94 -- {End Of Comments}
95 -- ----------------------------------------------------------------------------
96 Procedure insert_validate(p_rec in out nocopy per_ppc_shd.g_rec_type
97                          ,p_validation_strength in varchar2 default 'STRONG');
98 --
99 -- ----------------------------------------------------------------------------
100 -- |---------------------------< update_validate >----------------------------|
101 -- ----------------------------------------------------------------------------
102 -- {Start Of Comments}
103 --
104 -- Description:
105 --   This procedure controls the execution of all update business rules
106 --   validation.
107 --
108 -- Pre Conditions:
109 --   This private procedure is called from upd procedure.
110 --
111 -- In Parameters:
112 --   A Pl/Sql record structre.
113 --
114 -- Post Success:
115 --   Processing continues.
116 --
117 -- Post Failure:
118 --   If a business rules fails the error will not be handled by this procedure
119 --   unless explicity coded.
120 --
121 -- Developer Implementation Notes:
122 --   For update, your business rules should be executed from this procedure and
123 --   should ideally (unless really necessary) just be straight procedure or
124 --   function calls. Try and avoid using conditional branching logic.
125 --
126 -- Access Status:
127 --   Internal Table Handler Use Only.
128 --
129 -- {End Of Comments}
130 -- ----------------------------------------------------------------------------
131 Procedure update_validate(p_rec in out nocopy per_ppc_shd.g_rec_type
132                          ,p_validation_strength in varchar2 default 'STRONG');
133 --
134 -- ----------------------------------------------------------------------------
135 -- |---------------------------< delete_validate >----------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 --   This procedure controls the execution of all delete business rules
141 --   validation.
142 --   p_validation_strength can be set to determine if the components of an
143 --   approved proposal can be deleted. This is so that a whole approved
144 --   proposal can be deleted.
145 --
146 -- Pre Conditions:
147 --   This private procedure is called from del procedure.
148 --
149 -- In Parameters:
150 --   A Pl/Sql record structre.
151 --   p_validation_strength
152 --     Determines how strong the validation should be. Should always be set
153 --     to STRONG unless called from the delete proposal api which is trying
154 --     to delete a whole proposal and it's components. In this case it should
155 --     be set to WEAK and the condition that you cannot delete the components
156 --     of an approved proposal will be ignored.
157 --
158 -- Post Success:
159 --   Processing continues.
160 --
161 -- Post Failure:
162 --   If a business rules fails the error will not be handled by this procedure
163 --   unless explicity coded.
164 --
165 -- Developer Implementation Notes:
166 --   For delete, your business rules should be executed from this procedure and
167 --   should ideally (unless really necessary) just be straight procedure or
168 --   function calls. Try and avoid using conditional branching logic.
169 --
170 -- Access Status:
171 --   Internal Table Handler Use Only.
172 --
173 -- {End Of Comments}
174 -- ----------------------------------------------------------------------------
175 Procedure delete_validate(p_rec in per_ppc_shd.g_rec_type
176                          ,p_validation_strength in varchar2 default 'STRONG');
177 --
178 --
179 -- ---------------------------------------------------------------------------
180 -- |---------------------< return_legislation_code >-------------------------|
181 -- ---------------------------------------------------------------------------
182 --
183 function return_legislation_code
184   (p_component_id              in number
185   ) return varchar2;
186 --
187 end per_ppc_bus;