DBA Data[Home] [Help]

PACKAGE: APPS.PER_KAD_INS

Source


1 Package per_kad_ins AUTHID CURRENT_USER as
2 /* $Header: pekadrhi.pkh 120.1 2011/11/17 09:45:28 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< ins >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure is the record interface for the insert business process
11 --   for the specified entity. The role of this process is to insert a fully
12 --   validated row, into the HR schema passing back to  the calling process,
13 --   any system generated values (e.g. primary and object version number
14 --   attributes). This process is the main backbone of the ins business
15 --   process. The processing of this procedure is as follows:
16 --   1) If the p_validate argument has been set to true then a savepoint is
17 --      issued.
18 --   2) The controlling validation process insert_validate is then executed
19 --      which will execute all private and public validation business rule
20 --      processes.
21 --   3) The pre_insert business process is then executed which enables any
22 --      logic to be processed before the insert dml process is executed.
23 --   4) The insert_dml process will physical perform the insert dml into the
24 --      specified entity.
25 --   5) The post_insert business process is then executed which enables any
26 --      logic to be processed after the insert dml process.
27 --   6) If the p_validate argument has been set to true an exception is raised
28 --      which is handled and processed by performing a rollback to the
29 --      savepoint which was issued at the beginning of the Ins process.
30 --
31 -- Pre Conditions:
32 --   The main arguments to the business process have to be in the record
33 --   format.
34 --   The following attributes in p_rec are mandatory: address_id,
35 --   business_group_id, date_from, person_id, primary_flag and style.
36 --
37 -- In Arguments:
38 --   p_validate
39 --     Determines if the business process is to be validated. Setting this
40 --     boolean value to true will invoke the process to be validated. The
41 --     default is false. The validation is controlled by a savepoint and
42 --     rollback mechanism. The savepoint is issued at the beginning of the
43 --     business process and is rollbacked at the end of the business process
44 --     when all the processing has been completed. The rollback is controlled
45 --     by raising and handling the exception hr_api.validate_enabled. We use
46 --     the exception because, by raising the exception with the business
47 --     process, we can exit successfully without having any of the 'OUT'
48 --     arguments being set.
49 --   p_rec
50 --     Contains the attributes of the address record.
51 --
52 -- Post Success:
53 --   A fully validated row will be inserted into the specified entity
54 --   without being committed. If the p_validate argument has been set to true
55 --   then all the work will be rolled back.
56 --   p_rec
57 --     The primary key and object version number details for the inserted
58 --     address record will be returned in p_rec.
59 --
60 -- Post Failure:
61 --   If an error has occurred, an error message will be supplied with the work
62 --   rolled back. A failure will occur if any of the following conditions are
63 --   found :
64 --     1) All of the mandatory arguments have not been set.
65 --     2) The p_rec.business_group_id business group does not exist.
66 --     3) The p_rec.date_from value is greater than the p_rec.date_to
67 --     4) The p_rec.person_id person does not exist.
68 --     5) The p_rec.primary_flag not in 'Y' or 'N'.
69 --     6) A primary address already exists for the p_rec.person_id within
70 --        the date range.
71 --     7) The p_rec.style value defined is not in the correct address
72 --        format for the UK.
73 --     8) The p_rec.address_type value does not exist on hr_lookups.
74 --     9) The p_rec.country value does not exist on fnd_territories.
75 --     10)The p_rec.date_to value is less than the p_rec.date_from
76 --        value.
77 --     11)The p_rec.postal_code value is more than 8 characters long.
78 --     12)The p_rec.region_1 value does not exist on fnd_common_lookups
79 --        or has been disabled or is linked to a non GB address style.
80 --
81 -- Access Status:
82 --   Internal Development Use Only.
83 --
84 -- {End Of Comments}
85 -- ----------------------------------------------------------------------------
86 Procedure ins
87   (p_rec              in out nocopy per_kad_shd.g_rec_type
88   ,p_validate         in     boolean default false
89   ,p_effective_date   in     date
90   );
91 --
92 -- ----------------------------------------------------------------------------
93 -- |---------------------------------< ins >----------------------------------|
94 -- ----------------------------------------------------------------------------
95 -- {Start Of Comments}
96 --
97 -- Description:
98 --   This procedure is the attribute interface for the insert business
99 --   process for the specified entity and is the outermost layer. The role
100 --   of this process is to insert a fully validated row into the HR schema
101 --   passing back to the calling process, any system generated values
102 --   (e.g. object version number attributes).The processing of this
103 --   procedure is as follows:
104 --   1) The attributes are converted into a local record structure by
105 --      calling the convert_args function.
106 --   2) After the conversion has taken place, the corresponding record ins
107 --      interface business process is executed.
108 --   3) OUT arguments are then set to their corresponding record arguments.
109 --
110 -- Pre Conditions:
111 --   Refer to the record interface for details.
112 --
113 -- In Arguments:
114 --   p_validate
115 --     Determines if the business process is to be validated. Setting this
116 --     Boolean value to true will invoke the process to be validated.
117 --     The default is false.
118 --
119 -- Post Success:
120 --   A fully validated row will be inserted for the specified entity
121 --   without being committed (or rollbacked depending on the p_validate
122 --   status).
123 --   p_address_id
124 --     will be set to the primary key value of the inserted address
125 --   p_object_version_number
126 --     will be set to the object version number of the inserted address.
127 --
128 -- Post Failure:
129 --   If an error has occurred, an error message will be supplied with the work
130 --   rolled back. Refer to the ins record interface for details of possible
131 --   failures.
132 --
133 -- Access Status:
134 --   Internal Development Use Only.
135 --
136 -- {End Of Comments}
137 -- ----------------------------------------------------------------------------
138 Procedure ins
139   (p_address_id                       out nocopy number
140   ,p_business_group_id            in      number
141   ,p_person_id                    in      number
142   ,p_date_from                    in      date
143   ,p_primary_flag                 in      varchar2
144   ,p_style                        in      varchar2
145   ,p_address_line1                in      varchar2         default null
146   ,p_address_line2                in      varchar2         default null
147   ,p_address_line3                in      varchar2         default null
148   ,p_address_type                 in      varchar2         default null
149   ,p_comments                     in      clob             default null
150   ,p_country                      in      varchar2         default null
151   ,p_date_to                      in      date             default null
152   ,p_postal_code                  in      varchar2         default null
153   ,p_region_1                     in      varchar2         default null
154   ,p_region_2                     in      varchar2         default null
155   ,p_region_3                     in      varchar2         default null
156   ,p_telephone_number_1           in      varchar2         default null
157   ,p_telephone_number_2           in      varchar2         default null
158   ,p_telephone_number_3           in      varchar2         default null
159   ,p_town_or_city                 in      varchar2         default null
160   ,p_request_id                   in      number           default null
161   ,p_program_application_id       in      number           default null
162   ,p_program_id                   in      number           default null
163   ,p_program_update_date          in      date             default null
164   ,p_addr_attribute_category      in      varchar2         default null
165   ,p_addr_attribute1              in      varchar2         default null
166   ,p_addr_attribute2              in      varchar2         default null
167   ,p_addr_attribute3              in      varchar2         default null
168   ,p_addr_attribute4              in      varchar2         default null
169   ,p_addr_attribute5              in      varchar2         default null
170   ,p_addr_attribute6              in      varchar2         default null
171   ,p_addr_attribute7              in      varchar2         default null
172   ,p_addr_attribute8              in      varchar2         default null
173   ,p_addr_attribute9              in      varchar2         default null
174   ,p_addr_attribute10             in      varchar2         default null
175   ,p_addr_attribute11             in      varchar2         default null
176   ,p_addr_attribute12             in      varchar2         default null
177   ,p_addr_attribute13             in      varchar2         default null
178   ,p_addr_attribute14             in      varchar2         default null
179   ,p_addr_attribute15             in      varchar2         default null
180   ,p_addr_attribute16             in      varchar2         default null
181   ,p_addr_attribute17             in      varchar2         default null
182   ,p_addr_attribute18             in      varchar2         default null
183   ,p_addr_attribute19             in      varchar2         default null
184   ,p_addr_attribute20             in      varchar2         default null
185   ,p_object_version_number           out nocopy  number
186   ,p_validate                     in      boolean         default false
187   ,p_effective_date               in      date
188   );
189 --
190 end per_kad_ins;