DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_DOC_UPD

Source


1 Package Body pqh_doc_upd as
2 /* $Header: pqdocrhi.pkb 120.2 2005/09/19 14:55:19 rthiagar noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pqh_doc_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the execution of dml from the datetrack mode
17 --   of CORRECTION only. It is important to note that the object version
18 --   number is only increment by 1 because the datetrack correction is
19 --   soley for one datetracked row.
20 --   This procedure controls the actual dml update logic. The functions of
21 --   this procedure are as follows:
22 --   1) Get the next object_version_number.
23 --   2) To set and unset the g_api_dml status as required (as we are about to
24 --      perform dml).
25 --   3) To update the specified row in the schema using the primary key in
26 --      the predicates.
27 --   4) To trap any constraint violations that may have occurred.
28 --   5) To raise any other errors.
29 --
30 -- Prerequisites:
31 --   This is an internal private procedure which must be called from the
32 --   update_dml procedure.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structure.
36 --
37 -- Post Success:
38 --   The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 --   On the update dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   The update 'set' arguments list should be modified if any of your
50 --   attributes are not updateable.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58   (p_rec                   in out NOCOPY pqh_doc_shd.g_rec_type
59   ,p_effective_date        in date
60   ,p_datetrack_mode        in varchar2
61   ,p_validation_start_date in date
62   ,p_validation_end_date   in date
63   ) is
64 --
65   l_proc        varchar2(72) := g_package||'dt_update_dml';
66 --
67 Begin
68   hr_utility.set_location('Entering:'||l_proc, 5);
69   --
70   If (p_datetrack_mode = hr_api.g_correction) then
71     hr_utility.set_location(l_proc, 10);
72     --
73     -- Because we are updating a row we must get the next object
74     -- version number.
75     --
76     p_rec.object_version_number :=
77       dt_api.get_object_version_number
78         (p_base_table_name => 'pqh_documents_f'
79         ,p_base_key_column => 'document_id'
80         ,p_base_key_value  => p_rec.document_id
81         );
82     --
83     pqh_doc_shd.g_api_dml := true;  -- Set the api dml status
84     --
85     -- Update the pqh_documents_f Row
86     --
87     update  pqh_documents_f
88     set
89      document_id                          = p_rec.document_id
90     ,short_name                           = p_rec.short_name
91     ,document_name                        = p_rec.document_name
92     ,file_id                              = p_rec.file_id
93     ,enable_flag                          = p_rec.enable_flag
94     ,last_updated_by                       = p_rec.last_update_by
95     ,object_version_number                = p_rec.object_version_number
96     ,formula_id                           = p_rec.formula_id
97     ,document_category                    = p_rec.document_category
98     /* Added for XDO changes */
99     ,lob_code                             = p_rec.lob_code
100     ,language                             = p_rec.language
101     ,territory                            = p_rec.territory
102     where   document_id = p_rec.document_id
103     and     effective_start_date = p_validation_start_date
104     and     effective_end_date   = p_validation_end_date;
105     --
106     pqh_doc_shd.g_api_dml := false;   -- Unset the api dml status
107     --
108     -- Set the effective start and end dates
109     --
110     p_rec.effective_start_date := p_validation_start_date;
111     p_rec.effective_end_date   := p_validation_end_date;
112   End If;
113 --
114 hr_utility.set_location(' Leaving:'||l_proc, 15);
115 Exception
116   When hr_api.check_integrity_violated Then
117     -- A check constraint has been violated
118     pqh_doc_shd.g_api_dml := false;   -- Unset the api dml status
119     pqh_doc_shd.constraint_error
120       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121   When hr_api.unique_integrity_violated Then
122     -- Unique integrity has been violated
123     pqh_doc_shd.g_api_dml := false;   -- Unset the api dml status
124     pqh_doc_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When Others Then
127     pqh_doc_shd.g_api_dml := false;   -- Unset the api dml status
128     Raise;
129 End dt_update_dml;
130 --
131 -- ----------------------------------------------------------------------------
132 -- |------------------------------< update_dml >------------------------------|
133 -- ----------------------------------------------------------------------------
134 -- {Start Of Comments}
135 --
136 -- Description:
137 --   This procedure calls the dt_update_dml control logic which handles
138 --   the actual datetrack dml.
139 --
140 -- Prerequisites:
141 --   This is an internal private procedure which must be called from the upd
142 --   procedure.
143 --
144 -- In Parameters:
145 --   A Pl/Sql record structre.
146 --
147 -- Post Success:
148 --   Processing contines.
149 --
150 -- Post Failure:
151 --   No specific error handling is required within this procedure.
152 --
153 -- Developer Implementation Notes:
154 --   The update 'set' arguments list should be modified if any of your
155 --   attributes are not updateable.
156 --
157 -- Access Status:
158 --   Internal Row Handler Use Only.
159 --
160 -- {End Of Comments}
161 -- ----------------------------------------------------------------------------
162 Procedure update_dml
163   (p_rec                      in out NOCOPY pqh_doc_shd.g_rec_type
164   ,p_effective_date           in date
165   ,p_datetrack_mode           in varchar2
166   ,p_validation_start_date    in date
167   ,p_validation_end_date      in date
168   ) is
169 --
170   l_proc        varchar2(72) := g_package||'update_dml';
171 --
172 Begin
173   hr_utility.set_location('Entering:'||l_proc, 5);
174   --
175   pqh_doc_upd.dt_update_dml
176     (p_rec                   => p_rec
177     ,p_effective_date        => p_effective_date
178     ,p_datetrack_mode        => p_datetrack_mode
179     ,p_validation_start_date => p_validation_start_date
180     ,p_validation_end_date   => p_validation_end_date
181     );
182   --
183   hr_utility.set_location(' Leaving:'||l_proc, 10);
184 End update_dml;
185 --
186 -- ----------------------------------------------------------------------------
187 -- |----------------------------< dt_pre_update >-----------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 --   The dt_pre_update procedure controls the execution
193 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
194 --   and UPDATE_CHANGE_INSERT only. The execution required is as
195 --   follows:
196 --
197 --   1) Providing the datetrack update mode is not 'CORRECTION'
198 --      then set the effective end date of the current row (this
199 --      will be the validation_start_date - 1).
200 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
201 --      corresponding delete_dml process to delete any future rows
202 --      where the effective_start_date is greater than or equal to
203 --      the validation_start_date.
204 --   3) Call the insert_dml process to insert the new updated row
205 --      details.
206 --
207 -- Prerequisites:
208 --   This is an internal procedure which is called from the
209 --   pre_update procedure.
210 --
211 -- In Parameters:
212 --
213 -- Post Success:
214 --   Processing continues.
215 --
216 -- Post Failure:
217 --   If an error has occurred, an error message and exception will be raised
218 --   but not handled.
219 --
220 -- Developer Implementation Notes:
221 --   This is an internal procedure which is required by Datetrack. Don't
222 --   remove or modify.
223 --
224 -- Access Status:
225 --   Internal Row Handler Use Only.
226 --
227 -- {End Of Comments}
228 -- ----------------------------------------------------------------------------
229 Procedure dt_pre_update
230   (p_rec                     in out NOCOPY     pqh_doc_shd.g_rec_type
231   ,p_effective_date          in date
232   ,p_datetrack_mode          in varchar2
233   ,p_validation_start_date   in date
234   ,p_validation_end_date     in date
235   ) is
236 --
237   l_proc                 varchar2(72) := g_package||'dt_pre_update';
238   l_dummy_version_number number;
239 --
240 Begin
241   hr_utility.set_location('Entering:'||l_proc, 5);
242   If (p_datetrack_mode <> hr_api.g_correction) then
243     --
244     -- Update the current effective end date
245     --
246     pqh_doc_shd.upd_effective_end_date
247       (p_effective_date         => p_effective_date
248       ,p_base_key_value         => p_rec.document_id
249       ,p_new_effective_end_date => (p_validation_start_date - 1)
250       ,p_validation_start_date  => p_validation_start_date
251       ,p_validation_end_date    => p_validation_end_date
252       ,p_object_version_number  => l_dummy_version_number
253       );
254     --
255     If (p_datetrack_mode = hr_api.g_update_override) then
256       --
257       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
258       -- delete any future rows
259       --
260       pqh_doc_del.delete_dml
261         (p_rec                   => p_rec
262         ,p_effective_date        => p_effective_date
263         ,p_datetrack_mode        => p_datetrack_mode
264         ,p_validation_start_date => p_validation_start_date
265         ,p_validation_end_date   => p_validation_end_date
266         );
267     End If;
268     --
269     -- We must now insert the updated row
270     --
271     pqh_doc_ins.insert_dml
272       (p_rec                    => p_rec
273       ,p_effective_date         => p_effective_date
274       ,p_datetrack_mode         => p_datetrack_mode
275       ,p_validation_start_date  => p_validation_start_date
276       ,p_validation_end_date    => p_validation_end_date
277       );
278   End If;
279   hr_utility.set_location(' Leaving:'||l_proc, 20);
280 End dt_pre_update;
281 --
282 -- ----------------------------------------------------------------------------
283 -- |------------------------------< pre_update >------------------------------|
284 -- ----------------------------------------------------------------------------
285 -- {Start Of Comments}
286 --
287 -- Description:
288 --   This private procedure contains any processing which is required before
289 --   the update dml.
290 --
291 -- Prerequisites:
292 --   This is an internal procedure which is called from the upd procedure.
293 --
294 -- In Parameters:
295 --   A Pl/Sql record structure.
296 --
297 -- Post Success:
298 --   Processing continues.
299 --
300 -- Post Failure:
301 --   If an error has occurred, an error message and exception will be raised
302 --   but not handled.
303 -- Developer Implementation Notes:
304 --   Any pre-processing required before the update dml is issued should be
305 --   coded within this procedure. It is important to note that any 3rd party
306 --   maintenance should be reviewed before placing in this procedure. The call
307 --   to the dt_update_dml procedure should NOT be removed.
308 --
309 -- Access Status:
310 --   Internal Row Handler Use Only.
311 --
312 -- {End Of Comments}
313 -- ----------------------------------------------------------------------------
314 Procedure pre_update
315   (p_rec                   in out NOCOPY pqh_doc_shd.g_rec_type
316   ,p_effective_date        in date
317   ,p_datetrack_mode        in varchar2
318   ,p_validation_start_date in date
319   ,p_validation_end_date   in date
320   ) is
321 --
322   l_proc        varchar2(72) := g_package||'pre_update';
323 --
324 Begin
325   hr_utility.set_location('Entering:'||l_proc, 5);
326   --
327   --
328   --
329   dt_pre_update
330     (p_rec                   => p_rec
331     ,p_effective_date        => p_effective_date
332     ,p_datetrack_mode        => p_datetrack_mode
333     ,p_validation_start_date => p_validation_start_date
334     ,p_validation_end_date   => p_validation_end_date
335     );
336   --
337   hr_utility.set_location(' Leaving:'||l_proc, 10);
338 End pre_update;
339 --
340 -- ----------------------------------------------------------------------------
341 -- |----------------------------< post_update >-------------------------------|
342 -- ----------------------------------------------------------------------------
343 -- {Start Of Comments}
344 --
345 -- Description:
346 --   This private procedure contains any processing which is required after
347 --   the update dml.
348 --
349 -- Prerequisites:
350 --   This is an internal procedure which is called from the upd procedure.
351 --
352 -- In Parameters:
353 --   A Pl/Sql record structure.
354 --
355 -- Post Success:
356 --   Processing continues.
357 --
358 -- Post Failure:
359 --   If an error has occurred, an error message and exception will be raised
360 --   but not handled.
361 --
362 -- Developer Implementation Notes:
363 --   Any post-processing required after the update dml is issued should be
364 --   coded within this procedure. It is important to note that any 3rd party
365 --   maintenance should be reviewed before placing in this procedure.
366 --
367 -- Access Status:
368 --   Internal Row Handler Use Only.
369 --
370 -- {End Of Comments}
371 -- ----------------------------------------------------------------------------
372 Procedure post_update
373   (p_rec                   in pqh_doc_shd.g_rec_type
374   ,p_effective_date        in date
375   ,p_datetrack_mode        in varchar2
376   ,p_validation_start_date in date
377   ,p_validation_end_date   in date
378   ) is
379 --
380   l_proc        varchar2(72) := g_package||'post_update';
381 --
382 Begin
383   hr_utility.set_location('Entering:'||l_proc, 5);
384   begin
385     --
386     pqh_doc_rku.after_update
387       (p_effective_date
388       => p_effective_date
389       ,p_datetrack_mode
390       => p_datetrack_mode
391       ,p_validation_start_date
392       => p_validation_start_date
393       ,p_validation_end_date
394       => p_validation_end_date
395       ,p_document_id
396       => p_rec.document_id
397       ,p_effective_start_date
398       => p_rec.effective_start_date
399       ,p_effective_end_date
400       => p_rec.effective_end_date
401       ,p_short_name
402       => p_rec.short_name
403       ,p_document_name
404       => p_rec.document_name
405       ,p_file_id
406       => p_rec.file_id
407       ,p_document_category
408       => p_rec.document_category
409       ,p_enable_flag
410       => p_rec.enable_flag
411       ,p_last_update_by
412       => p_rec.last_update_by
413       ,p_object_version_number
414       => p_rec.object_version_number
415       ,p_formula_id
416       => p_rec.formula_id
417       /* Added for XDO Changes. */
418       ,p_lob_code
419       => p_rec.lob_code
420       ,p_language
421       => p_rec.language
422       ,p_territory
423       => p_rec.territory
424       ,p_effective_start_date_o
425       => pqh_doc_shd.g_old_rec.effective_start_date
426       ,p_effective_end_date_o
427       => pqh_doc_shd.g_old_rec.effective_end_date
428       ,p_short_name_o
429       => pqh_doc_shd.g_old_rec.short_name
430       ,p_document_name_o
431       => pqh_doc_shd.g_old_rec.document_name
432       ,p_file_id_o
433       => pqh_doc_shd.g_old_rec.file_id
434       ,p_enable_flag_o
435       => pqh_doc_shd.g_old_rec.enable_flag
436       ,p_last_update_by_o
437       => pqh_doc_shd.g_old_rec.last_update_by
438       ,p_object_version_number_o
439       => pqh_doc_shd.g_old_rec.object_version_number
440       ,p_formula_id_o
441       => pqh_doc_shd.g_old_rec.formula_id
442       ,p_document_category_o
443       => pqh_doc_shd.g_old_rec.document_category
444       /* Added for XDO Changes. */
445       ,p_lob_code_o
446       => pqh_doc_shd.g_old_rec.lob_code
447       ,p_language_o
448       => pqh_doc_shd.g_old_rec.language
449       ,p_territory_o
450       => pqh_doc_shd.g_old_rec.territory
451       );
452     --
453   exception
454     --
455     when hr_api.cannot_find_prog_unit then
456       --
457       hr_api.cannot_find_prog_unit_error
458         (p_module_name => 'PQH_DOCUMENTS_F'
459         ,p_hook_type   => 'AU');
460       --
461   end;
462   --
463   hr_utility.set_location(' Leaving:'||l_proc, 10);
464 End post_update;
465 --
466 -- ----------------------------------------------------------------------------
467 -- |-----------------------------< convert_defs >-----------------------------|
468 -- ----------------------------------------------------------------------------
469 -- {Start Of Comments}
470 --
471 -- Description:
472 --   The Convert_Defs procedure has one very important function:
473 --   It must return the record structure for the row with all system defaulted
474 --   values converted into its corresponding parameter value for update. When
475 --   we attempt to update a row through the Upd process , certain
476 --   parameters can be defaulted which enables flexibility in the calling of
477 --   the upd process (e.g. only attributes which need to be updated need to be
478 --   specified). For the upd process to determine which attributes
479 --   have NOT been specified we need to check if the parameter has a reserved
480 --   system default value. Therefore, for all parameters which have a
481 --   corresponding reserved system default mechanism specified we need to
482 --   check if a system default is being used. If a system default is being
483 --   used then we convert the defaulted value into its corresponding attribute
484 --   value held in the g_old_rec data structure.
485 --
486 -- Prerequisites:
487 --   This private function can only be called from the upd process.
488 --
489 -- In Parameters:
490 --   A Pl/Sql record structure.
491 --
492 -- Post Success:
493 --   The record structure will be returned with all system defaulted parameter
494 --   values converted into its current row attribute value.
495 --
496 -- Post Failure:
497 --   No direct error handling is required within this function. Any possible
498 --   errors within this procedure will be a PL/SQL value error due to
499 --   conversion of datatypes or data lengths.
500 --
501 -- Developer Implementation Notes:
502 --   None.
503 --
504 -- Access Status:
505 --   Internal Row Handler Use Only.
506 --
507 -- {End Of Comments}
508 -- ----------------------------------------------------------------------------
509 Procedure convert_defs
510   (p_rec in out NOCOPY pqh_doc_shd.g_rec_type
511   ) is
512 --
513 Begin
514   --
515   -- We must now examine each argument value in the
516   -- p_rec plsql record structure
517   -- to see if a system default is being used. If a system default
518   -- is being used then we must set to the 'current' argument value.
519   --
520   If (p_rec.short_name = hr_api.g_varchar2) then
521     p_rec.short_name :=
522     pqh_doc_shd.g_old_rec.short_name;
523   End If;
524   If (p_rec.document_name = hr_api.g_varchar2) then
525     p_rec.document_name :=
526     pqh_doc_shd.g_old_rec.document_name;
527   End If;
528   If (p_rec.file_id = hr_api.g_number) then
529     p_rec.file_id :=
530     pqh_doc_shd.g_old_rec.file_id;
531   End If;
532   If (p_rec.enable_flag = hr_api.g_varchar2) then
533     p_rec.enable_flag :=
534     pqh_doc_shd.g_old_rec.enable_flag;
535   End If;
536   If (p_rec.last_update_by = hr_api.g_number) then
537     p_rec.last_update_by :=
538     pqh_doc_shd.g_old_rec.last_update_by;
539   End If;
540   If (p_rec.formula_id = hr_api.g_number) then
541     p_rec.formula_id :=
542     pqh_doc_shd.g_old_rec.formula_id;
543   End If;
544   If (p_rec.document_category  = hr_api.g_varchar2) then
545       p_rec.document_category  :=
546       pqh_doc_shd.g_old_rec.document_category;
547   End If;
548   /* Added for XDO changes */
549   If (p_rec.lob_code = hr_api.g_varchar2) then
550       p_rec.lob_code :=
551       pqh_doc_shd.g_old_rec.lob_code;
552   End If;
553   If (p_rec.language = hr_api.g_varchar2) then
554       p_rec.language :=
555       pqh_doc_shd.g_old_rec.language;
556   End If;
557   If (p_rec.territory = hr_api.g_varchar2) then
558       p_rec.territory :=
559       pqh_doc_shd.g_old_rec.territory;
560   End If;
561   --
562 End convert_defs;
563 --
564 -- ----------------------------------------------------------------------------
565 -- |---------------------------------< upd >----------------------------------|
566 -- ----------------------------------------------------------------------------
567 Procedure upd
568   (p_effective_date in     date
569   ,p_datetrack_mode in     varchar2
570   ,p_rec            in out NOCOPY pqh_doc_shd.g_rec_type
571   ) is
572 --
573   l_proc                        varchar2(72) := g_package||'upd';
574   l_validation_start_date       date;
575   l_validation_end_date         date;
576 --
577 Begin
578   hr_utility.set_location('Entering:'||l_proc, 5);
579   --
580   -- Ensure that the DateTrack update mode is valid
581   --
582   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
583   --
584   -- We must lock the row which we need to update.
585   --
586   pqh_doc_shd.lck
587     (p_effective_date                   => p_effective_date
588     ,p_datetrack_mode                   => p_datetrack_mode
589     ,p_document_id                      => p_rec.document_id
590     ,p_object_version_number            => p_rec.object_version_number
591     ,p_validation_start_date            => l_validation_start_date
592     ,p_validation_end_date              => l_validation_end_date
593     );
594   --
595   -- 1. During an update system defaults are used to determine if
596   --    arguments have been defaulted or not. We must therefore
597   --    derive the full record structure values to be updated.
598   --
599   -- 2. Call the supporting update validate operations.
600   --
601   pqh_doc_upd.convert_defs(p_rec);
602   --
603   pqh_doc_bus.update_validate
604     (p_rec                              => p_rec
605     ,p_effective_date                   => p_effective_date
606     ,p_datetrack_mode                   => p_datetrack_mode
607     ,p_validation_start_date            => l_validation_start_date
608     ,p_validation_end_date              => l_validation_end_date
609     );
610   --
611   -- Call to raise any errors on multi-message list
612   hr_multi_message.end_validation_set;
613   --
614   -- Call the supporting pre-update operation
615   --
616   pre_update
617     (p_rec                              => p_rec
618     ,p_effective_date                   => p_effective_date
619     ,p_datetrack_mode                   => p_datetrack_mode
620     ,p_validation_start_date            => l_validation_start_date
621     ,p_validation_end_date              => l_validation_end_date
622     );
623   --
624   -- Update the row.
625   --
626   update_dml
627     (p_rec                              => p_rec
628     ,p_effective_date                   => p_effective_date
629     ,p_datetrack_mode                   => p_datetrack_mode
630     ,p_validation_start_date            => l_validation_start_date
631     ,p_validation_end_date                  => l_validation_end_date
632     );
633   --
634   -- Call the supporting post-update operation
635   --
636   post_update
637     (p_rec                              => p_rec
638     ,p_effective_date                   => p_effective_date
639     ,p_datetrack_mode                   => p_datetrack_mode
640     ,p_validation_start_date            => l_validation_start_date
641     ,p_validation_end_date              => l_validation_end_date
642     );
643   --
644   -- Call to raise any errors on multi-message list
645   hr_multi_message.end_validation_set;
646 End upd;
647 --
648 -- ----------------------------------------------------------------------------
649 -- |------------------------------< upd >-------------------------------------|
650 -- ----------------------------------------------------------------------------
651 Procedure upd
652   (p_effective_date               in     date
653   ,p_datetrack_mode               in     varchar2
654   ,p_document_id                  in     number
655   ,p_object_version_number        in out NOCOPY number
656   ,p_short_name                   in     varchar2  default hr_api.g_varchar2
657   ,p_document_name                in     varchar2  default hr_api.g_varchar2
658   ,p_file_id                      in     number    default hr_api.g_number
659   ,p_enable_flag                  in     varchar2  default hr_api.g_varchar2
660   ,p_formula_id                   in     number    default hr_api.g_number
661   ,p_last_update_by               in     number    default hr_api.g_number
662   ,p_document_category            in     varchar2  default hr_api.g_varchar2
663   ,p_effective_start_date            out NOCOPY date
664   ,p_effective_end_date              out NOCOPY date
665   /* Added for XDO changes */
666   ,p_lob_code                     in     varchar2  default hr_api.g_varchar2
667   ,p_language                     in     varchar2  default hr_api.g_varchar2
668   ,p_territory                    in     varchar2  default hr_api.g_varchar2
669   ) is
670 --
671   l_rec         pqh_doc_shd.g_rec_type;
672   l_proc        varchar2(72) := g_package||'upd';
673 --
674 Begin
675   hr_utility.set_location('Entering:'||l_proc, 5);
676   --
677   -- Call conversion function to turn arguments into the
678   -- l_rec structure.
679   --
680   l_rec :=
681   pqh_doc_shd.convert_args
682     (p_document_id
683     ,null
684     ,null
685     ,p_short_name
686     ,p_document_name
687     ,p_file_id
688     ,p_enable_flag
689     ,p_last_update_by
690     ,p_object_version_number
691     ,p_formula_id
692     ,p_document_category
693     /* Added for XDO changes */
694     ,p_lob_code
695     ,p_language
696     ,p_territory
697     );
698   --
699   -- Having converted the arguments into the
700   -- plsql record structure we call the corresponding record
701   -- business process.
702   --
703   pqh_doc_upd.upd
704     (p_effective_date
705     ,p_datetrack_mode
706     ,l_rec
707     );
708   --
709   -- Set the out parameters
710   --
711   p_object_version_number            := l_rec.object_version_number;
712   p_effective_start_date             := l_rec.effective_start_date;
713   p_effective_end_date               := l_rec.effective_end_date;
714   --
715   --
716   hr_utility.set_location(' Leaving:'||l_proc, 10);
717 End upd;
718 --
719 end pqh_doc_upd;