DBA Data[Home] [Help]

PACKAGE: APPS.PO_EXHIBITS_PVT

Source


1 PACKAGE PO_EXHIBITS_PVT AUTHID CURRENT_USER AS
2 /* $Header: PO_EXHIBITS_PVT.pls 120.2.12020000.4 2013/03/05 11:59:16 mabaig noship $ */
3 
4 
5 ELIN_NUMBERS_EXHAUSTED EXCEPTION;
6 --------------------------------------------------------------------------------
7 --Start of Comments
8 --Name: ELIN_TO_DECIMAL
9 -- CLM Phase 4 - Elins project
10 --Function:
11 --This function is a internal procedure used for getting the next exhbit line number
12 --IN:
13 -- linNum VARCHAR2
14 --IN OUT:
15 --OUT:
16 --Notes:
17 --End of Comments
18 --------------------------------------------------------------------------------
19 FUNCTION ELIN_TO_DECIMAL(linNum VARCHAR2) RETURN NUMBER;
20 
21 --------------------------------------------------------------------------------
22 --Start of Comments
23 --Name: DECIMAL_TO_ELIN
24 -- CLM Phase 4 - Elins project
25 --Function:
26 --This function is a internal procedure used for getting the next exhbit line number
27 --Parameters:
28 --IN:
29 -- elin_dec NUMBER
30 --IN OUT:
31 --OUT:
32 --Notes:
33 --End of Comments
34 --------------------------------------------------------------------------------
35 FUNCTION DECIMAL_TO_ELIN(elin_dec NUMBER) RETURN VARCHAR2;
36 
37 --------------------------------------------------------------------------------
38 --Start of Comments
39 --Name: NEXT_ELIN_NUM
40 -- CLM Phase 4 - Elins project
41 --Function:
42 --This fucntion will return the next eligible elin (exhibit line number) for the give exhibit of that document.
43 --Parameters:
44 --IN:
45 --    p_assigned_num_array  PO_TBL_VARCHAR100  Set of line numbers for the given exhibit
46 --    p_header_id  Document Identifier
47 --    p_exhibit_name  Exhibit name
48 
49 --IN OUT:
50 --OUT:
51 --Notes:
52 --End of Comments
53 --------------------------------------------------------------------------------
54 FUNCTION NEXT_ELIN_NUM (p_assigned_num_array  PO_TBL_VARCHAR100,  p_header_id NUMBER, p_exhibit_name IN VARCHAR2) return VARCHAR2;
55 
56 
57 --------------------------------------------------------------------------------
58 --Start of Comments
59 --Name: GET_NEXT_EXHIBIT
60 -- CLM Phase 4 - Elins project
61 --Function:
62 --This fucntion will return the next eligible exhibit for the given document id.
63 --Parameters:
64 --IN:
65 --    p_header_id  Document Identifier
66 --    p_draft_id  draft id
67 
68 --IN OUT:
69 --OUT:
70 --Notes:
71 --End of Comments
72 --------------------------------------------------------------------------------
73 FUNCTION GET_NEXT_EXHIBIT (p_header_id NUMBER, p_draft_id NUMBER )
74 RETURN VARCHAR2;
75 
76 
77 
78 -----------------------------------------------------------------------
79 --Start of Comments
80 --Name: lock_draft_record
81 --Function:
82 --  Obtain database lock for the record in draft table
83 --Parameters:
84 --IN:
85 --p_po_exhibit_details_id
86 --  id for po exhibit record
87 --p_draft_id
88 --  draft unique identifier
89 --RETURN:
90 --End of Comments
91 ------------------------------------------------------------------------
92 PROCEDURE lock_draft_record
93 ( p_po_exhibit_details_id IN NUMBER,
94   p_draft_id        IN NUMBER
95 );
96 
97 
98 -----------------------------------------------------------------------
99 --Start of Comments
100 --Name: lock_transaction_record
101 --Function:
102 --  Obtain database lock for the record in transaction table
103 --Parameters:
104 --IN:
105 --p_po_exhibit_details_id
106 --  id for po exibit record
107 --RETURN:
108 --End of Comments
109 ------------------------------------------------------------------------
110 PROCEDURE lock_transaction_record
111 ( p_po_exhibit_details_id IN NUMBER
112 );
113 
114 -----------------------------------------------------------------------
115 --Start of Comments
116 --Name: sync_draft_from_txn
117 --Pre-reqs: None
118 --Modifies:
119 --Locks:
120 --  None
121 --Function:
122 --  Same functionality as the bulk version of this procedure
123 --Parameters:
124 --IN:
125 --p_exhibit_details_id
126 --  exhibit unique identifier
127 --p_draft_id
128 --  the draft this sync up will be done for
129 --p_delete_flag
130 --  flag to indicate whether the draft record should be maked as "to be
131 --  deleted"
132 --IN OUT:
133 --OUT:
134 --x_record_already_exist
135 --  Returns whether the record was already in draft table or not
136 --Returns:
137 --Notes:
138 --Testing:
139 --End of Comments
140 ------------------------------------------------------------------------
141 PROCEDURE sync_draft_from_txn
142 ( p_po_exhibit_details_id_tbl   IN PO_TBL_NUMBER,
143   p_draft_id_tbl             IN PO_TBL_NUMBER,
144   p_delete_flag_tbl          IN PO_TBL_VARCHAR1,
145   x_record_already_exist_tbl OUT NOCOPY PO_TBL_VARCHAR1
146 );
147 
148 -----------------------------------------------------------------------
149 --Start of Comments
150 --Name: sync_draft_from_txn
151 --Pre-reqs: None
152 --Modifies:
153 --Locks:
154 --  None
155 --Function:
156 --  Same functionality as the bulk version of this procedure
157 --Parameters:
158 --IN:
159 --p_exhibit_details_id
160 --  exhibit unique identifier
161 --p_draft_id
162 --  the draft this sync up will be done for
163 --p_delete_flag
164 --  flag to indicate whether the draft record should be maked as "to be
165 --  deleted"
166 --IN OUT:
167 --OUT:
168 --x_record_already_exist
169 --  Returns whether the record was already in draft table or not
170 --Returns:
171 --Notes:
172 --Testing:
173 --End of Comments
174 ------------------------------------------------------------------------
175 PROCEDURE sync_draft_from_txn
176 ( p_po_exhibit_details_id IN NUMBER,
177   p_draft_id IN NUMBER,
178   p_delete_flag IN VARCHAR2,
179   x_record_already_exist OUT NOCOPY VARCHAR2
180 );
181 
182 
183 -----------------------------------------------------------------------
184 --Start of Comments
185 --Name: merge_changes
186 --Pre-reqs: None
187 --Modifies:
188 --Locks:
189 --  None
190 --Function:
191 --  Merge the records in draft table to transaction table
192 --  Either insert, update or delete will be performed on top of transaction
193 --  table, depending on the delete_flag on the draft record and whether the
194 --  record already exists in transaction table
195 --
196 --Parameters:
197 --IN:
198 --p_draft_id
199 --  draft unique identifier
200 --IN OUT:
201 --OUT:
202 --Returns:
203 --Notes:
204 --Testing:
205 --End of Comments
206 ------------------------------------------------------------------------
207 PROCEDURE merge_changes
208 ( p_draft_id IN NUMBER
209 );
210 
211 FUNCTION draft_changes_exist
212 ( p_draft_id_tbl IN PO_TBL_NUMBER,
213   p_po_exhibit_details_id_tbl IN PO_TBL_NUMBER
214 ) RETURN PO_TBL_VARCHAR1;
215 -----------------------------------------------------------------------
216 --Start of Comments
217 --Name: draft_changes_exist
218 --Pre-reqs: None
219 --Modifies:
220 --Locks:
221 --  None
222 --Function:
223 --   Same functionality as the bulk version of draft_changes_exist
224 --Parameters:
225 --IN:
226 --p_draft_id
227 --  draft unique identifier
228 --p_po_exhibit_details_id
229 --  exhibit unique identifier
230 --IN OUT:
231 --OUT:
232 --Returns:
233 --  FND_API.G_TRUE if there are draft changes
234 --  FND_API.G_FALSE if there aren't draft changes
235 --Notes:
236 --Testing:
237 --End of Comments
238 ------------------------------------------------------------------------
239 FUNCTION draft_changes_exist
240 ( p_draft_id IN NUMBER,
241   p_po_exhibit_details_id IN NUMBER
242 ) RETURN VARCHAR2;
243 
244 
245 -----------------------------------------------------------------------
246 --Start of Comments
247 --Name: apply_changes
248 --Pre-reqs: None
249 --Modifies:
250 --Locks:
251 --  None
252 --Function:
253 --  Process exhibit draft records and merge them to transaction table. It
254 --  also performs all additional work related specifically to the merge
255 --  action
256 --Parameters:
257 --IN:
258 --p_draft_info
259 --  data structure storing draft information
260 --IN OUT:
261 --OUT:
262 --Returns:
263 --Notes:
264 --Testing:
265 --End of Comments
266 ------------------------------------------------------------------------
267 PROCEDURE apply_changes
268 ( p_draft_info IN PO_DRAFTS_PVT.DRAFT_INFO_REC_TYPE
269 );
270 
271 -----------------------------------------------------------------------
272 --Start of Comments
273 --Name: delete_rows
274 --Pre-reqs: None
275 --Modifies:
276 --Locks:
277 --  None
278 --Function:
279 --  Deletes drafts for exhibits based on the information given
280 --  If only draft_id is provided, then all exhibits for the draft will be
281 --  deleted
282 --  If po_exhibit_details_id is also provided, then the one record that has such
283 --  primary key will be deleted
284 --Parameters:
285 --IN:
286 --p_draft_id
287 --  draft unique identifier
288 --p_po_line_id
289 --  po line unique identifier
290 --IN OUT:
291 --OUT:
292 --Returns:
293 --Notes:
294 --Testing:
295 --End of Comments
296 ------------------------------------------------------------------------
297 PROCEDURE delete_rows
298 ( p_draft_id IN NUMBER,
299   p_po_exhibit_details_id IN NUMBER
300 );
301 
302 
303 -----------------------------------------------------------------------
304 --Start of Comments
305 --Name: insert_exhibits
306 --Pre-reqs: None
307 --Modifies:
308 --Locks:
309 --  None
310 --Function:
311 --  Inserts the given exhibits for the given document if it does not exists for that document
312 --Parameters:
313 --IN:
314 --  p_document_type_tbl IN PO_TBL_VARCHAR30;
315 --  p_document_id_tbl   IN PO_TBL_NUMBER;
316 --  p_exhibit_name_tbl  IN PO_TBL_VARCHAR30;
317 --  p_exhibit_description_tbl IN PO_TBL_VARCHAR240;
318 --  p_is_cdrl_tbl       IN PO_TBL_VARCHAR1;
319 --IN OUT:
320 --OUT:
321 --Returns:
322 --Notes:
323 --Testing:
324 --End of Comments
325 ------------------------------------------------------------------------
326 PROCEDURE insert_exhibits
327 (
328   p_document_type_tbl IN PO_TBL_VARCHAR30,
329   p_document_id_tbl   IN PO_TBL_NUMBER,
330   p_exhibit_name_tbl  IN PO_TBL_VARCHAR30,
331   p_exhibit_description_tbl IN PO_TBL_VARCHAR240,
332   p_is_cdrl_tbl       IN PO_TBL_VARCHAR1,
333   p_revision_num_tbl  IN PO_TBL_NUMBER,
334   x_return_status OUT NOCOPY VARCHAR2,
335   x_return_msg   OUT NOCOPY VARCHAR2
336 
337 );
338 
339 
340 
341 -----------------------------------------------------------------------
342 --Start of Comments
343 --Name: delete_exhibits
344 --Pre-reqs: None
345 --Modifies:
346 --Locks:
347 --  None
348 --Function:
349 --  Deletes the given exhibits for the given document
350 --Parameters:
351 --IN:
352 --  p_document_type_tbl IN PO_TBL_VARCHAR30;
353 --  p_document_id_tbl   IN PO_TBL_NUMBER;
354 --  p_exhibit_name_tbl  IN PO_TBL_VARCHAR30;
355 --  p_is_cdrl_tbl       IN PO_TBL_VARCHAR1;
356 --IN OUT:
357 --OUT:
358 --Returns:
359 --Notes:
360 --Testing:
361 --End of Comments
362 ------------------------------------------------------------------------
363 PROCEDURE delete_exhibits
364 (
365   p_document_type_tbl IN PO_TBL_VARCHAR30,
366   p_document_id_tbl   IN PO_TBL_NUMBER,
367   p_exhibit_name_tbl  IN PO_TBL_VARCHAR30,
368   p_is_cdrl_tbl       IN PO_TBL_VARCHAR1,
369   x_return_status OUT NOCOPY VARCHAR2,
370   x_return_msg   OUT NOCOPY VARCHAR2
371 );
372 
373 
374 -----------------------------------------------------------------------
375 --Start of Comments
376 --Name: copy_crdl_exhibit
377 --Pre-reqs: None
378 --Modifies:
379 --Locks:
380 --  None
381 --Function:
382 --  Copy the deliverables and exhibit for the given CDRL exhibit
383 --Parameters:
384 --IN:
385 --  p_document_type_tbl IN PO_TBL_VARCHAR30;
386 --  p_document_id_tbl   IN PO_TBL_NUMBER;
387 --  p_exhibit_name_tbl  IN PO_TBL_VARCHAR30;
388 --  p_doc_sub_type IN VARCHAR2;
389 --  p_is_cdrl_tbl       IN PO_TBL_VARCHAR1;
390 --IN OUT:
391 --OUT:
392 --Returns:
393 --Notes:
394 --Testing:
395 --End of Comments
396 ------------------------------------------------------------------------
397 PROCEDURE copy_cdrl_exhibit
398 (
399   p_po_header_id IN NUMBER,
400   p_po_draft_id  IN NUMBER,
401   p_exhibit_name IN VARCHAR2,
402   p_doc_sub_type IN VARCHAR2,
403   x_return_status OUT NOCOPY VARCHAR2,
404   x_return_msg   OUT NOCOPY VARCHAR2
405 );
406 
407 
408 -----------------------------------------------------------------------
409 --Start of Comments
410 --Name: delete_cdrls_for_exhibit
411 --Pre-reqs: None
412 --Modifies:
413 --Locks:
414 --  None
415 --Function:
416 --  Delete the deliverables for the given CDRL exhibit
417 --Parameters:
418 --IN:
419 --  p_document_type_tbl IN PO_TBL_VARCHAR30;
420 --  p_document_id_tbl   IN PO_TBL_NUMBER;
421 --  p_exhibit_name_tbl  IN PO_TBL_VARCHAR30;
422 --  p_doc_sub_type IN VARCHAR2
423 --  p_is_cdrl_tbl       IN PO_TBL_VARCHAR1;
424 
425 --IN OUT:
426 --OUT:
427 --Returns:
428 --Notes:
429 --Testing:
430 --End of Comments
431 ------------------------------------------------------------------------
432 PROCEDURE delete_cdrls_for_exhibit
433 (
434   p_po_header_id IN NUMBER,
435   p_po_draft_id  IN NUMBER,
436   p_exhibit_name IN VARCHAR2,
437   p_doc_sub_type IN VARCHAR2,
438   x_return_status OUT NOCOPY VARCHAR2,
439   x_return_msg   OUT NOCOPY VARCHAR2
440 );
441 
442 
443 END PO_EXHIBITS_PVT;
444