DBA Data[Home] [Help]

PACKAGE: APPS.OTA_TFH_API_SHD

Source


1 Package ota_tfh_api_shd as
2 /* $Header: ottfh01t.pkh 120.0 2005/05/29 07:40:27 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   finance_header_id                 number(9),
11   superceding_header_id             number(9),
12   authorizer_person_id              ota_finance_headers.authorizer_person_id%TYPE,
13   organization_id                   number(9),
14   administrator                     number,
15   cancelled_flag                    varchar2(30),
16   currency_code                     varchar2(30),
17   date_raised                       date,
18   object_version_number             number(9),
19   payment_status_flag               varchar2(30),
20   transfer_status                   varchar2(30),
21   type                              varchar2(30),
22   receivable_type                   varchar2(30),
23   comments                          varchar2(2000),
24   external_reference                varchar2(30),
25   invoice_address                   varchar2(2000),
26   invoice_contact                   varchar2(240),
27   payment_method                    varchar2(30),
28   pym_attribute1                    varchar2(150),
29   pym_attribute10                   varchar2(150),
30   pym_attribute11                   varchar2(150),
31   pym_attribute12                   varchar2(150),
32   pym_attribute13                   varchar2(150),
33   pym_attribute14                   varchar2(150),
34   pym_attribute15                   varchar2(150),
35   pym_attribute16                   varchar2(150),
36   pym_attribute17                   varchar2(150),
37   pym_attribute18                   varchar2(150),
38   pym_attribute19                   varchar2(150),
39   pym_attribute2                    varchar2(150),
40   pym_attribute20                   varchar2(150),
41   pym_attribute3                    varchar2(150),
42   pym_attribute4                    varchar2(150),
43   pym_attribute5                    varchar2(150),
44   pym_attribute6                    varchar2(150),
45   pym_attribute7                    varchar2(150),
46   pym_attribute8                    varchar2(150),
47   pym_attribute9                    varchar2(150),
48   pym_information_category          varchar2(30),
49   transfer_date                     date,
50   transfer_message                  varchar2(240),
51   vendor_id                         number(15),
52   contact_id                        number(15),
53   address_id                        number,
54   customer_id                       number(15),
55   tfh_information_category          varchar2(30),
56   tfh_information1                  varchar2(150),
57   tfh_information2                  varchar2(150),
58   tfh_information3                  varchar2(150),
59   tfh_information4                  varchar2(150),
60   tfh_information5                  varchar2(150),
61   tfh_information6                  varchar2(150),
62   tfh_information7                  varchar2(150),
63   tfh_information8                  varchar2(150),
64   tfh_information9                  varchar2(150),
65   tfh_information10                 varchar2(150),
66   tfh_information11                 varchar2(150),
67   tfh_information12                 varchar2(150),
68   tfh_information13                 varchar2(150),
69   tfh_information14                 varchar2(150),
70   tfh_information15                 varchar2(150),
71   tfh_information16                 varchar2(150),
72   tfh_information17                 varchar2(150),
73   tfh_information18                 varchar2(150),
74   tfh_information19                 varchar2(150),
75   tfh_information20                 varchar2(150),
76   paying_cost_center                varchar2(800),
77   receiving_cost_center             varchar2(800),
78   transfer_from_set_of_book_id      number(15),
79   transfer_to_set_of_book_id        number(15),
80   from_segment1                     varchar2(25),
81   from_segment2                 varchar2(25),
82   from_segment3                 varchar2(25),
83   from_segment4                 varchar2(25),
84   from_segment5                 varchar2(25),
85   from_segment6                 varchar2(25),
86   from_segment7                 varchar2(25),
87   from_segment8                 varchar2(25),
88   from_segment9                 varchar2(25),
89   from_segment10                varchar2(25),
90   from_segment11                 varchar2(25),
91   from_segment12                 varchar2(25),
92   from_segment13                 varchar2(25),
93   from_segment14                 varchar2(25),
94   from_segment15                 varchar2(25),
95   from_segment16                 varchar2(25),
96   from_segment17                 varchar2(25),
97   from_segment18                 varchar2(25),
98   from_segment19                 varchar2(25),
99   from_segment20                varchar2(25),
100   from_segment21                 varchar2(25),
101   from_segment22                 varchar2(25),
102   from_segment23                 varchar2(25),
103   from_segment24                 varchar2(25),
104   from_segment25                 varchar2(25),
105   from_segment26                 varchar2(25),
106   from_segment27                 varchar2(25),
107   from_segment28                 varchar2(25),
108   from_segment29                 varchar2(25),
109   from_segment30                varchar2(25),
110   to_segment1                 varchar2(25),
111   to_segment2                 varchar2(25),
112   to_segment3                 varchar2(25),
113   to_segment4                 varchar2(25),
114   to_segment5                 varchar2(25),
115   to_segment6                 varchar2(25),
116   to_segment7                 varchar2(25),
117   to_segment8                 varchar2(25),
118   to_segment9                 varchar2(25),
119   to_segment10                varchar2(25),
120   to_segment11                 varchar2(25),
121   to_segment12                 varchar2(25),
122   to_segment13                 varchar2(25),
123   to_segment14                 varchar2(25),
124   to_segment15                 varchar2(25),
125   to_segment16                 varchar2(25),
126   to_segment17                 varchar2(25),
127   to_segment18                 varchar2(25),
128   to_segment19                 varchar2(25),
129   to_segment20                varchar2(25),
130   to_segment21                 varchar2(25),
131   to_segment22                 varchar2(25),
132   to_segment23                 varchar2(25),
133   to_segment24                 varchar2(25),
134   to_segment25                 varchar2(25),
135   to_segment26                 varchar2(25),
136   to_segment27                 varchar2(25),
137   to_segment28                 varchar2(25),
138   to_segment29                 varchar2(25),
139   to_segment30                varchar2(25),
140   transfer_from_cc_id         number(15),
141   transfer_to_cc_id           number(15)
142   );
143 --
144 -- ----------------------------------------------------------------------------
145 -- |           Global Definitions - Internal Development Use Only             |
146 -- ----------------------------------------------------------------------------
147 --
148 g_old_rec  g_rec_type;                            -- Global record definition
149 g_api_dml  boolean;                               -- Global api dml status
150 --
151 -- ----------------------------------------------------------------------------
152 -- |------------------------< return_api_dml_status >-------------------------|
153 -- ----------------------------------------------------------------------------
154 -- {Start Of Comments}
155 --
156 -- Description:
157 --   This function will return the current g_api_dml private global
158 --   boolean status.
159 --   The g_api_dml status determines if at the time of the function
160 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
161 --   is being issued from within an api.
162 --   If the status is TRUE then a dml statement is being issued from
163 --   within this entity api.
164 --   This function is primarily to support database triggers which
165 --   need to maintain the object_version_number for non-supported
166 --   dml statements (i.e. dml statement issued outside of the api layer).
167 --
168 -- Pre Conditions:
169 --   None.
170 --
171 -- In Arguments:
172 --   None.
173 --
174 -- Post Success:
175 --   Processing continues.
176 --   If the function returns a TRUE value then, dml is being executed from
177 --   within this api.
178 --
179 -- Post Failure:
180 --   None.
181 --
182 -- Access Status:
183 --   Public.
184 --
185 -- {End Of Comments}
186 -- ----------------------------------------------------------------------------
187 Function return_api_dml_status Return Boolean;
188 --
189 -- ----------------------------------------------------------------------------
190 -- |---------------------------< constraint_error >---------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start Of Comments}
193 --
194 -- Description:
195 --   This procedure is called when a constraint has been violated (i.e.
196 --   The exception hr_api.check_integrity_violated,
197 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
198 --   hr_api.unique_integrity_violated has been raised).
199 --   The exceptions can only be raised as follows:
200 --   1) A check constraint can only be violated during an INSERT or UPDATE
201 --      dml operation.
202 --   2) A parent integrity constraint can only be violated during an
203 --      INSERT or UPDATE dml operation.
204 --   3) A child integrity constraint can only be violated during an
205 --      DELETE dml operation.
206 --   4) A unique integrity constraint can only be violated during INSERT or
207 --      UPDATE dml operation.
208 --
209 -- Pre Conditions:
210 --   1) Either hr_api.check_integrity_violated,
211 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
212 --      hr_api.unique_integrity_violated has been raised with the subsequent
213 --      stripping of the constraint name from the generated error message
214 --      text.
215 --   2) Standalone validation test which correspond with a constraint error.
216 --
217 -- In Arguments:
218 --   p_constraint_name is in upper format and is just the constraint name
219 --   (e.g. not prefixed by brackets, schema owner etc).
220 --
221 -- Post Success:
222 --   Development dependant.
223 --
224 -- Post Failure:
225 --   Developement dependant.
226 --
227 -- Developer Implementation Notes:
228 --   For each constraint being checked the hr system package failure message
229 --   has been generated as a template only. These system error messages should
230 --   be modified as required (i.e. change the system failure message to a user
231 --   friendly defined error message).
232 --
233 -- Access Status:
234 --   Public.
235 --
236 -- {End Of Comments}
237 -- ----------------------------------------------------------------------------
238 Procedure constraint_error
239             (p_constraint_name in varchar2);
240 --
241 -- ----------------------------------------------------------------------------
242 -- |-----------------------------< api_updating >-----------------------------|
243 -- ----------------------------------------------------------------------------
244 -- {Start Of Comments}
245 --
246 -- Description:
247 --   This function is used to populate the g_old_rec record with the
248 --   current row from the database for the specified primary key
249 --   provided that the primary key exists and is valid and does not
250 --   already match the current g_old_rec. The function will always return
251 --   a TRUE value if the g_old_rec is populated with the current row.
252 --   A FALSE value will be returned if all of the primary key arguments
253 --   are null.
254 --
255 -- Pre Conditions:
256 --   None.
257 --
258 -- In Arguments:
259 --
260 -- Post Success:
261 --   A value of TRUE will be returned indiciating that the g_old_rec
262 --   is current.
263 --   A value of FALSE will be returned if all of the primary key arguments
264 --   have a null value (this indicates that the row has not be inserted into
265 --   the Schema), and therefore could never have a corresponding row.
266 --
267 -- Post Failure:
268 --   A failure can only occur under two circumstances:
269 --   1) The primary key is invalid (i.e. a row does not exist for the
270 --      specified primary key values).
271 --   2) If an object_version_number exists but is NOT the same as the current
272 --      g_old_rec value.
273 --
274 -- Developer Implementation Notes:
275 --   None.
276 --
277 -- Access Status:
278 --   Internal Development Use Only.
279 --
280 -- {End Of Comments}
281 -- ----------------------------------------------------------------------------
282 Function api_updating
283   (
284   p_finance_header_id                  in number,
285   p_object_version_number              in number
286   )      Return Boolean;
287 --
288 -- ----------------------------------------------------------------------------
289 -- |---------------------------------< lck >----------------------------------|
290 -- ----------------------------------------------------------------------------
291 -- {Start Of Comments}
292 --
293 -- Description:
294 --   The Lck process has two main functions to perform. Firstly, the row to be
295 --   updated or deleted must be locked. The locking of the row will only be
296 --   successful if the row is not currently locked by another user.
297 --   Secondly, during the locking of the row, the row is selected into
298 --   the g_old_rec data structure which enables the current row values from the
299 --   server to be available to the api.
300 --
301 -- Pre Conditions:
302 --   When attempting to call the lock the object version number (if defined)
303 --   is mandatory.
304 --
305 -- In Arguments:
306 --   The arguments to the Lck process are the primary key(s) which uniquely
307 --   identify the row and the object version number of row.
308 --
309 -- Post Success:
310 --   On successful completion of the Lck process the row to be updated or
311 --   deleted will be locked and selected into the global data structure
312 --   g_old_rec.
313 --
314 -- Post Failure:
315 --   The Lck process can fail for three reasons:
316 --   1) When attempting to lock the row the row could already be locked by
317 --      another user. This will raise the HR_Api.Object_Locked exception.
318 --   2) The row which is required to be locked doesn't exist in the HR Schema.
319 --      This error is trapped and reported using the message name
320 --      'HR_7220_INVALID_PRIMARY_KEY'.
321 --   3) The row although existing in the HR Schema has a different object
322 --      version number than the object version number specified.
323 --      This error is trapped and reported using the message name
324 --      'HR_7155_OBJECT_INVALID'.
325 --
326 -- Developer Implementation Notes:
327 --   For each primary key and the object version number arguments add a
328 --   call to hr_api.mandatory_arg_error procedure to ensure that these
329 --   argument values are not null.
330 --
331 -- Access Status:
332 --   Public.
333 --
334 -- {End Of Comments}
335 -- ----------------------------------------------------------------------------
336 Procedure lck
337   (
338   p_finance_header_id                  in number,
339   p_object_version_number              in number
340   );
341 --
342 -- ----------------------------------------------------------------------------
343 -- |-----------------------------< convert_args >-----------------------------|
344 -- ----------------------------------------------------------------------------
345 -- {Start Of Comments}
346 --
347 -- Description:
348 --   This function is used to turn attribute arguments into the record
349 --   structure g_rec_type.
350 --
351 -- Pre Conditions:
352 --   This is a private function and can only be called from the ins or upd
353 --   attribute processes.
354 --
355 -- In Arguments:
356 --
357 -- Post Success:
358 --   A returning record structure will be returned.
359 --
360 -- Post Failure:
361 --   No direct error handling is required within this function. Any possible
362 --   errors within this function will be a PL/SQL value error due to conversion
363 --   of datatypes or data lengths.
364 --
365 -- Developer Implementation Notes:
366 --   None.
367 --
368 -- Access Status:
369 --   Internal Development Use Only.
370 --
371 -- {End Of Comments}
372 -- ----------------------------------------------------------------------------
373 Function convert_args
374 	(
375 	p_finance_header_id             in number,
376 	p_superceding_header_id         in number,
377 	p_authorizer_person_id          in number,
378 	p_organization_id               in number,
379 	p_administrator                 in number,
380 	p_cancelled_flag                in varchar2,
381 	p_currency_code                 in varchar2,
382 	p_date_raised                   in date,
383 	p_object_version_number         in number,
384 	p_payment_status_flag           in varchar2,
385 	p_transfer_status               in varchar2,
386 	p_type                          in varchar2,
387 	p_receivable_type               in varchar2,
388 	p_comments                      in varchar2,
389 	p_external_reference            in varchar2,
390 	p_invoice_address               in varchar2,
391 	p_invoice_contact               in varchar2,
392 	p_payment_method                in varchar2,
393 	p_pym_attribute1                in varchar2,
394 	p_pym_attribute10               in varchar2,
395 	p_pym_attribute11               in varchar2,
396 	p_pym_attribute12               in varchar2,
397 	p_pym_attribute13               in varchar2,
401 	p_pym_attribute17               in varchar2,
398 	p_pym_attribute14               in varchar2,
399 	p_pym_attribute15               in varchar2,
400 	p_pym_attribute16               in varchar2,
402 	p_pym_attribute18               in varchar2,
403 	p_pym_attribute19               in varchar2,
404 	p_pym_attribute2                in varchar2,
405 	p_pym_attribute20               in varchar2,
406 	p_pym_attribute3                in varchar2,
407 	p_pym_attribute4                in varchar2,
408 	p_pym_attribute5                in varchar2,
409 	p_pym_attribute6                in varchar2,
410 	p_pym_attribute7                in varchar2,
411 	p_pym_attribute8                in varchar2,
412 	p_pym_attribute9                in varchar2,
413 	p_pym_information_category      in varchar2,
414 	p_transfer_date                 in date,
415 	p_transfer_message              in varchar2,
416 	p_vendor_id                     in number,
417 	p_contact_id                    in number,
418 	p_address_id                    in number,
419 	p_customer_id                   in number,
420 	p_tfh_information_category      in varchar2,
421 	p_tfh_information1              in varchar2,
422 	p_tfh_information2              in varchar2,
423 	p_tfh_information3              in varchar2,
424 	p_tfh_information4              in varchar2,
425 	p_tfh_information5              in varchar2,
426 	p_tfh_information6              in varchar2,
427 	p_tfh_information7              in varchar2,
428 	p_tfh_information8              in varchar2,
429 	p_tfh_information9              in varchar2,
430 	p_tfh_information10             in varchar2,
431 	p_tfh_information11             in varchar2,
432 	p_tfh_information12             in varchar2,
433 	p_tfh_information13             in varchar2,
434 	p_tfh_information14             in varchar2,
435 	p_tfh_information15             in varchar2,
436 	p_tfh_information16             in varchar2,
437 	p_tfh_information17             in varchar2,
438 	p_tfh_information18             in varchar2,
439 	p_tfh_information19             in varchar2,
440 	p_tfh_information20             in varchar2,
441       p_paying_cost_center            in varchar2,
442       p_receiving_cost_center         in varchar2 ,
443       p_transfer_from_set_of_book_id in number,
444       p_transfer_to_set_of_book_id   in number,
445       p_from_segment1                 in varchar2,
446       p_from_segment2                 in varchar2,
447       p_from_segment3                 in varchar2,
448       p_from_segment4                 in varchar2,
449       p_from_segment5                 in varchar2,
450       p_from_segment6                 in varchar2,
451       p_from_segment7                 in varchar2,
452       p_from_segment8                 in varchar2,
453       p_from_segment9                 in varchar2,
454       p_from_segment10                in varchar2,
455 	p_from_segment11                 in varchar2,
456       p_from_segment12                 in varchar2,
457       p_from_segment13                 in varchar2,
458       p_from_segment14                 in varchar2,
459       p_from_segment15                 in varchar2,
460       p_from_segment16                 in varchar2,
461       p_from_segment17                 in varchar2,
462       p_from_segment18                 in varchar2,
463       p_from_segment19                 in varchar2,
464       p_from_segment20                in varchar2,
465 	p_from_segment21                 in varchar2,
466       p_from_segment22                 in varchar2,
467       p_from_segment23                 in varchar2,
468       p_from_segment24                 in varchar2,
469       p_from_segment25                 in varchar2,
470       p_from_segment26                 in varchar2,
471       p_from_segment27                 in varchar2,
472       p_from_segment28                 in varchar2,
473       p_from_segment29                 in varchar2,
474       p_from_segment30                in varchar2,
475       p_to_segment1                 in varchar2,
476       p_to_segment2                 in varchar2,
477       p_to_segment3                 in varchar2,
478       p_to_segment4                 in varchar2,
479       p_to_segment5                 in varchar2,
480       p_to_segment6                 in varchar2,
481       p_to_segment7                 in varchar2,
482       p_to_segment8                 in varchar2,
483       p_to_segment9                 in varchar2,
484       p_to_segment10                in varchar2,
485 	p_to_segment11                 in varchar2,
486       p_to_segment12                 in varchar2,
487       p_to_segment13                 in varchar2,
488       p_to_segment14                 in varchar2,
489       p_to_segment15                 in varchar2,
490       p_to_segment16                 in varchar2,
491       p_to_segment17                 in varchar2,
492       p_to_segment18                 in varchar2,
493       p_to_segment19                 in varchar2,
494       p_to_segment20                in varchar2,
495 	p_to_segment21                 in varchar2,
496       p_to_segment22                 in varchar2,
497       p_to_segment23                 in varchar2,
498       p_to_segment24                 in varchar2,
499       p_to_segment25                 in varchar2,
500       p_to_segment26                 in varchar2,
501       p_to_segment27                 in varchar2,
502       p_to_segment28                 in varchar2,
503       p_to_segment29                 in varchar2,
504       p_to_segment30                in varchar2,
505       p_transfer_from_cc_id          in number,
506       p_transfer_to_cc_id            in number
507 	)
508 	Return g_rec_type;
509 --
510 end ota_tfh_api_shd;