DBA Data[Home] [Help]

PACKAGE: APPS.PER_ADD_INS

Source


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