1 package AK_REGION2_PVT AUTHID CURRENT_USER as
2 /* $Header: akdvre2s.pls 120.3 2005/09/15 22:18:31 tshort ship $ */
3
4 -- Global constants holding the package and file names to be used by
5 -- messaging routines in the case of an unexpected error.
6
7 G_PKG_NAME CONSTANT VARCHAR2(30) := 'AK_REGION2_PVT';
8
9 -- PL/SQL table for holding records that need to be processed
10 -- the second time in UPLOAD
11 G_REGION_REDO_TBL AK_REGION_PUB.Region_Tbl_Type;
12 G_ITEM_REDO_TBL AK_REGION_PUB.Item_Tbl_Type;
13 G_LOV_RELATION_REDO_TBL AK_REGION_PUB.Lov_Relation_Tbl_Type;
14 --G_GRAPH_REDO_TBL AK_REGION_PUB.Graph_Tbl_Type;
15 --G_GRAPH_COLUMN_REDO_TBL AK_REGION_PUB.Graph_Column_Tbl_Type;
16 --
17 -- Pointer to redo tables
18 G_REGION_REDO_INDEX NUMBER := 0;
19 G_ITEM_REDO_INDEX NUMBER := 0;
20 G_LOV_RELATION_REDO_INDEX NUMBER := 0;
21 --G_GRAPH_REDO_INDEX NUMBER := 0;
22 --G_GRAPH_COLUMN_REDO_INDEX NUMBER := 0;
23
24 --=======================================================
25 -- Procedure UPLOAD_REGION
26 --
27 -- Usage Private API for loading regions from a
28 -- loader file to the database.
29 -- This API should only be called by other APIs
30 -- that are owned by the Core Modules Team (AK).
31 --
32 -- Desc This API reads the region data (including region
33 -- items) stored in the loader file currently being
34 -- processed, parses the data, and loads them to the
35 -- database. The tables are updated with the timestamp
36 -- passed. This API will process the file until the
37 -- EOF is reached, a parse error is encountered, or when
38 -- data for a different business object is read from the file.
39 --
40 -- Results The API returns the standard p_return_status parameter
41 -- indicating one of the standard return statuses :
42 -- * Unexpected error
43 -- * Error
44 -- * Success
45 -- Parameters p_index : IN OUT required
46 -- Index of PL/SQL file to be processed.
47 -- p_loader_timestamp : IN required
48 -- The timestamp to be used when creating or updating
49 -- records
50 -- p_line_num : IN optional
51 -- The first line number in the file to be processed.
52 -- It is used for keeping track of the line number
53 -- read so that this info can be included in the
54 -- error message when a parse error occurred.
55 -- p_buffer : IN required
56 -- The content of the first line to be processed.
57 -- The calling API has already read the first line
58 -- that needs to be parsed by this API, so this
59 -- line won't be read from the file again.
60 -- p_line_num_out : OUT
61 -- The number of the last line in the loader file
62 -- that is read by this API.
63 -- p_buffer_out : OUT
64 -- The content of the last line read by this API.
65 -- If an EOF has not reached, this line would
66 -- contain the beginning of another business object
67 -- that will need to be processed by another API.
68 --
69 -- Version Initial version number = 1.0
70 -- History Current version number = 1.0
71 --=======================================================
72 procedure UPLOAD_REGION (
73 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
74 p_api_version_number IN NUMBER,
75 p_return_status OUT NOCOPY VARCHAR2,
76 p_index IN OUT NOCOPY NUMBER,
77 p_loader_timestamp IN DATE,
78 p_line_num IN NUMBER := FND_API.G_MISS_NUM,
79 p_buffer IN AK_ON_OBJECTS_PUB.Buffer_Type,
80 p_line_num_out OUT NOCOPY NUMBER,
81 p_buffer_out OUT NOCOPY AK_ON_OBJECTS_PUB.Buffer_Type,
82 p_upl_loader_cur IN OUT NOCOPY AK_ON_OBJECTS_PUB.LoaderCurTyp,
83 p_pass IN NUMBER := 1
84 );
85
86 --=======================================================
87 -- Procedure UPLOAD_REGION_SECOND
88 --
89 -- Usage Private API for loading regions that were
90 -- failed during its first pass
91 -- This API should only be called by other APIs
92 -- that are owned by the Core Modules Team (AK).
93 --
94 -- Desc This API reads the region data from PL/SQL table
95 -- that was prepared during 1st pass, then processes
96 -- the data, and loads them to the database. The tables
97 -- are updated with the timestamp passed. This API
98 -- will process the file until the EOF is reached,
99 -- a parse error is encountered, or when data for
100 -- a different business object is read from the file.
101 --
102 -- Results The API returns the standard p_return_status parameter
103 -- indicating one of the standard return statuses :
104 -- * Unexpected error
105 -- * Error
106 -- * Success
107 -- Parameters p_validation_level : IN required
108 -- validation level
109 --
110 -- Version Initial version number = 1.0
111 -- History Current version number = 1.0
112 --=======================================================
113 procedure UPLOAD_REGION_SECOND (
114 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
115 p_return_status OUT NOCOPY VARCHAR2,
116 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
117 p_pass IN NUMBER := 2
118 );
119
120 --=======================================================
121 -- Procedure CHECK_DISPLAY_SEQUENCE
122 --
123 -- Usage Private API for making sure that the
124 -- display sequence is unique for a given region
125 -- code.
126 --
127 -- Desc This API updates a region item, if necessary
128 --
129 -- Results The API returns the standard p_return_status parameter
130 -- indicating one of the standard return statuses :
131 -- * Unexpected error
132 -- * Error
133 -- * Success
134 -- Parameters Region Item columns
135 --
136 -- Version Initial version number = 1.0
137 -- History Current version number = 1.0
138 --=======================================================
139 procedure CHECK_DISPLAY_SEQUENCE (
140 p_validation_level IN NUMBER,
141 p_region_code IN VARCHAR2,
142 p_region_application_id IN NUMBER,
143 p_attribute_code IN VARCHAR2,
144 p_attribute_application_id IN NUMBER,
145 p_display_sequence IN NUMBER,
146 p_return_status OUT NOCOPY VARCHAR2,
147 p_msg_count OUT NOCOPY NUMBER,
148 p_msg_data OUT NOCOPY VARCHAR2,
149 p_pass IN NUMBER,
150 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
151 );
152
153 /*
154 --=======================================================
155 -- Function GRAPH_COLUMN_EXISTS
156 --
157 -- Usage Private API for checking for the existence of
158 -- a region graph column with the given key values. This
159 -- API should only be called by other APIs that are
160 -- owned by the Core Modules Team (AK).
161 --
162 -- Desc This API check to see if a region graph column record
163 -- exists with the given key values.
164 --
165 -- Results The API returns the standard p_return_status parameter
166 -- indicating one of the standard return statuses :
167 -- * Unexpected error
168 -- * Error
169 -- * Success
170 -- This function will return TRUE if such an object
171 -- attribute exists, or FALSE otherwise.
172 -- Parameters Region Graph Column key columns
173 --
174 -- Version Initial version number = 1.0
175 -- History Current version number = 1.0
176 --=======================================================
177 FUNCTION GRAPH_COLUMN_EXISTS (
178 p_api_version_number IN NUMBER,
179 p_return_status OUT NOCOPY VARCHAR2,
180 p_region_application_id IN NUMBER,
181 p_region_code IN VARCHAR2,
182 p_attribute_application_id IN NUMBER,
183 p_attribute_code IN VARCHAR2,
184 p_graph_number IN NUMBER
185 ) return boolean;
186 */
187
188 --=======================================================
189 -- Function LOV_RELATION_EXISTS
190 --
191 -- Usage Private API for checking for the existence of
192 -- a region lov relation with the given key values. This
193 -- API should only be called by other APIs that are
194 -- owned by the Core Modules Team (AK).
195 --
196 -- Desc This API check to see if a region lov relation record
197 -- exists with the given key values.
198 --
199 -- Results The API returns the standard p_return_status parameter
200 -- indicating one of the standard return statuses :
201 -- * Unexpected error
202 -- * Error
203 -- * Success
204 -- This function will return TRUE if such an object
205 -- attribute exists, or FALSE otherwise.
206 -- Parameters Region Lov Relation key columns
207 --
208 -- Version Initial version number = 1.0
209 -- History Current version number = 1.0
210 --=======================================================
211 function LOV_RELATION_EXISTS (
212 p_api_version_number IN NUMBER,
213 p_return_status OUT NOCOPY VARCHAR2,
214 p_region_application_id IN NUMBER,
215 p_region_code IN VARCHAR2,
216 p_attribute_application_id IN NUMBER,
217 p_attribute_code IN VARCHAR2,
218 p_lov_region_appl_id IN NUMBER,
219 p_lov_region_code IN VARCHAR2,
220 p_lov_attribute_appl_id IN NUMBER,
221 p_lov_attribute_code IN VARCHAR2,
222 p_base_attribute_appl_id IN NUMBER,
223 p_base_attribute_code IN VARCHAR2,
224 p_direction_flag IN VARCHAR2,
225 p_base_region_appl_id IN NUMBER,
226 p_base_region_code IN VARCHAR2
227 ) return boolean;
228
229 /*
230 --=======================================================
231 -- Function VALIDATE_GRAPH_COLUMN
232 --
233 -- Usage Private API for validating a region graph column. This
234 -- API should only be called by other APIs that are
235 -- owned by the Core Modules Team (AK).
236 --
237 -- Desc Perform validation on a region graph column record.
238 --
239 -- Results The API returns the standard p_return_status parameter
240 -- indicating one of the standard return statuses :
241 -- * Unexpected error
242 -- * Error
243 -- * Success
244 -- In addition, this function returns TRUE if all
245 -- validation tests are passed, or FALSE otherwise.
246 -- Parameters Region graph column columns
247 -- p_caller : IN required
248 -- Must be one of the following values defined
249 -- in package AK_ON_OBJECTS_PVT:
250 -- - G_CREATE (if calling from the Create API)
251 -- - G_DOWNLOAD (if calling from the Download API)
252 -- - G_UPDATE (if calling from the Update API)
253 --
254 -- Note This API is intended for performing record-level
255 -- validation. It is not designed for item-level
256 -- validation.
257 --
258 -- Version Initial version number = 1.1
259 --=======================================================
260 FUNCTION VALIDATE_GRAPH_COLUMN (
261 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
262 p_api_version_number IN NUMBER,
263 p_return_status OUT NOCOPY VARCHAR2,
264 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
265 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
266 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
267 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
268 p_graph_number IN NUMBER := FND_API.G_MISS_NUM,
269 p_pass IN NUMBER := 2,
270 p_caller IN VARCHAR2
271 ) return boolean;
272 */
273
274 --=======================================================
275 -- Function VALIDATE_LOV_RELATION
276 --
277 -- Usage Private API for validating a region lov relation. This
278 -- API should only be called by other APIs that are
279 -- owned by the Core Modules Team (AK).
280 --
281 -- Desc Perform validation on a region lov relation record.
282 --
283 -- Results The API returns the standard p_return_status parameter
284 -- indicating one of the standard return statuses :
285 -- * Unexpected error
286 -- * Error
287 -- * Success
288 -- In addition, this function returns TRUE if all
289 -- validation tests are passed, or FALSE otherwise.
290 -- Parameters Region lov relation columns
291 -- p_caller : IN required
292 -- Must be one of the following values defined
293 -- in package AK_ON_OBJECTS_PVT:
294 -- - G_CREATE (if calling from the Create API)
295 -- - G_DOWNLOAD (if calling from the Download API)
296 -- - G_UPDATE (if calling from the Update API)
297 --
298 -- Note This API is intended for performing record-level
299 -- validation. It is not designed for item-level
300 -- validation.
301 --
302 -- Version Initial version number = 1.1
303 --=======================================================
304 FUNCTION VALIDATE_LOV_RELATION (
305 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
306 p_api_version_number IN NUMBER,
307 p_return_status OUT NOCOPY VARCHAR2,
308 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
309 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
310 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
311 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
312 p_lov_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
313 p_lov_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
314 p_lov_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
315 p_lov_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
316 p_base_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
317 p_base_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
318 p_direction_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
319 p_base_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
320 p_base_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
321 p_caller IN VARCHAR2,
322 p_pass IN NUMBER := 2
323 ) return boolean;
324
325 /*
326 --=======================================================
327 -- Procedure CREATE_GRAPH_COLUMN
328 --
329 -- Usage Private API for creating a region graph column. This
330 -- API should only be called by other APIs that are
331 -- owned by the Core Modules Team (AK).
332 --
333 -- Desc Creates a region graph column using the given info.
334 -- This API should only be called by other APIs that are
335 -- owned by the Core Modules Team (AK).
336 --
337 -- Results The API returns the standard p_return_status parameter
338 -- indicating one of the standard return statuses :
339 -- * Unexpected error
340 -- * Error
341 -- * Success
342 -- Parameters Region columns
343 -- p_loader_timestamp : IN optional
344 -- If a timestamp is passed, the API will create the
345 -- record using this timestamp. Only the upload API
346 -- should call with this parameter loaded.
347 --
351 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
348 -- Version Initial version number = 1.1
349 --=======================================================
350 PROCEDURE CREATE_GRAPH_COLUMN (
352 p_api_version_number IN NUMBER,
353 p_init_msg_tbl IN BOOLEAN := FALSE,
354 p_msg_count OUT NOCOPY NUMBER,
355 p_msg_data OUT NOCOPY VARCHAR2,
356 p_return_status OUT NOCOPY VARCHAR2,
357 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
358 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
359 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
360 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
361 p_graph_number IN NUMBER := FND_API.G_MISS_NUM,
362 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
363 p_creation_date IN DATE := FND_API.G_MISS_DATE,
364 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
365 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
366 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
367 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
368 p_pass IN NUMBER,
369 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
370 );
371 */
372
373 --=======================================================
374 -- Procedure CREATE_LOV_RELATION
375 --
376 -- Usage Private API for creating a region lov relation. This
377 -- API should only be called by other APIs that are
378 -- owned by the Core Modules Team (AK).
379 --
380 -- Desc Creates a region lov relation using the given info.
381 -- This API should only be called by other APIs that are
382 -- owned by the Core Modules Team (AK).
383 --
384 -- Results The API returns the standard p_return_status parameter
385 -- indicating one of the standard return statuses :
386 -- * Unexpected error
387 -- * Error
388 -- * Success
389 -- Parameters Region columns
390 -- p_loader_timestamp : IN optional
391 -- If a timestamp is passed, the API will create the
392 -- record using this timestamp. Only the upload API
393 -- should call with this parameter loaded.
394 --
395 -- Version Initial version number = 1.1
396 --=======================================================
397 PROCEDURE CREATE_LOV_RELATION (
398 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
399 p_api_version_number IN NUMBER,
400 p_init_msg_tbl IN BOOLEAN := FALSE,
401 p_msg_count OUT NOCOPY NUMBER,
402 p_msg_data OUT NOCOPY VARCHAR2,
403 p_return_status OUT NOCOPY VARCHAR2,
404 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
405 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
406 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
407 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
408 p_lov_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
409 p_lov_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
410 p_lov_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
411 p_lov_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
412 p_base_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
413 p_base_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
414 p_direction_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
415 p_base_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
416 p_base_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
417 p_required_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
418 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
419 p_creation_date IN DATE := FND_API.G_MISS_DATE,
420 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
421 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
422 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
423 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
424 p_pass IN NUMBER,
425 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
426 );
427
428 /*
429 --=======================================================
430 -- Procedure UPDATE_GRAPH_COLUMN
431 --
432 -- Usage Private API for updating a region graph column.
433 -- This API should only be called by other APIs
434 -- that are owned by the Core Modules Team (AK).
435 --
436 -- Desc This API updates a region graph column using the given info
437 --
438 -- Results The API returns the standard p_return_status parameter
439 -- indicating one of the standard return statuses :
440 -- * Unexpected error
441 -- * Error
442 -- * Success
443 -- Parameters Region graph column columns
444 -- p_loader_timestamp : IN optional
445 -- If a timestamp is passed, the API will update the
446 -- record using this timestamp. Only the upload API
447 -- should call with this parameter loaded.
448 --
449 -- Version Initial version number = 1.0
450 -- History Current version number = 1.0
451 --=======================================================
452 PROCEDURE UPDATE_GRAPH_COLUMN (
456 p_msg_count OUT NOCOPY NUMBER,
453 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
454 p_api_version_number IN NUMBER,
455 p_init_msg_tbl IN BOOLEAN := FALSE,
457 p_msg_data OUT NOCOPY VARCHAR2,
458 p_return_status OUT NOCOPY VARCHAR2,
459 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
460 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
461 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
462 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
463 p_graph_number IN NUMBER := FND_API.G_MISS_NUM,
464 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
465 p_creation_date IN DATE := FND_API.G_MISS_DATE,
466 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
467 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
468 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
469 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
470 p_pass IN NUMBER,
471 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
472 );
473 */
474
475 --=======================================================
476 -- Procedure UPDATE_LOV_RELATION
477 --
478 -- Usage Private API for updating a region lov relation.
479 -- This API should only be called by other APIs
480 -- that are owned by the Core Modules Team (AK).
481 --
482 -- Desc This API updates a region lov relation using the given info
483 --
484 -- Results The API returns the standard p_return_status parameter
485 -- indicating one of the standard return statuses :
486 -- * Unexpected error
487 -- * Error
488 -- * Success
489 -- Parameters Region lov relation columns
490 -- p_loader_timestamp : IN optional
491 -- If a timestamp is passed, the API will update the
492 -- record using this timestamp. Only the upload API
493 -- should call with this parameter loaded.
494 --
495 -- Version Initial version number = 1.0
496 -- History Current version number = 1.0
497 --=======================================================
498 PROCEDURE UPDATE_LOV_RELATION (
499 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
500 p_api_version_number IN NUMBER,
501 p_init_msg_tbl IN BOOLEAN := FALSE,
502 p_msg_count OUT NOCOPY NUMBER,
503 p_msg_data OUT NOCOPY VARCHAR2,
504 p_return_status OUT NOCOPY VARCHAR2,
505 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
506 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
507 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
508 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
509 p_lov_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
510 p_lov_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
511 p_lov_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
512 p_lov_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
513 p_base_attribute_appl_id IN NUMBER := FND_API.G_MISS_NUM,
514 p_base_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
515 p_direction_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
516 p_base_region_appl_id IN NUMBER := FND_API.G_MISS_NUM,
517 p_base_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
518 p_required_flag IN VARCHAR2 := FND_API.G_MISS_CHAR,
519 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
520 p_creation_date IN DATE := FND_API.G_MISS_DATE,
521 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
522 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
523 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
524 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
525 p_pass IN NUMBER,
526 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
527 );
528
529 --=======================================================
530 -- Function VALIDATE_CATEGORY_USAGE
531 --
532 -- Usage Private API for validating a region item category usage. This
533 -- API should only be called by other APIs that are
534 -- owned by the Core Modules Team (AK).
535 --
536 -- Desc Perform validation on a region lov relation record.
537 --
538 -- Results The API returns the standard p_return_status parameter
539 -- indicating one of the standard return statuses :
540 -- * Unexpected error
541 -- * Error
542 -- * Success
543 -- In addition, this function returns TRUE if all
544 -- validation tests are passed, or FALSE otherwise.
545 -- Parameters Region lov relation columns
546 -- p_caller : IN required
547 -- Must be one of the following values defined
548 -- in package AK_ON_OBJECTS_PVT:
549 -- - G_CREATE (if calling from the Create API)
550 -- - G_DOWNLOAD (if calling from the Download API)
551 -- - G_UPDATE (if calling from the Update API)
552 --
553 -- Note This API is intended for performing record-level
554 -- validation. It is not designed for item-level
555 -- validation.
556 --
557 -- Version Initial version number = 1.1
561 p_api_version_number IN NUMBER,
558 --=======================================================
559 FUNCTION VALIDATE_CATEGORY_USAGE (
560 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
562 p_return_status OUT NOCOPY VARCHAR2,
563 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
564 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
565 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
566 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
567 p_category_name IN VARCHAR2:= FND_API.G_MISS_CHAR,
568 p_category_id IN NUMBER := FND_API.G_MISS_NUM,
569 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
570 p_show_all IN VARCHAR2 := FND_API.G_MISS_CHAR,
571 p_caller IN VARCHAR2,
572 p_pass IN NUMBER := 2
573 ) return boolean;
574
575 --=======================================================
576 -- Function CATEGORY_USAGE_EXISTS
577 --
578 -- Usage Private API for checking for the existence of
579 -- a region item category usage with the given key values. This
580 -- API should only be called by other APIs that are
581 -- owned by the Core Modules Team (AK).
582 --
583 -- Desc This API check to see if a region item category usage record
584 -- exists with the given key values.
585 --
586 -- Results The API returns the standard p_return_status parameter
587 -- indicating one of the standard return statuses :
588 -- * Unexpected error
589 -- * Error
590 -- * Success
591 -- This function will return TRUE if such an object
592 -- attribute exists, or FALSE otherwise.
593 -- Parameters Region Lov Relation key columns
594 --
595 -- Version Initial version number = 1.0
596 -- History Current version number = 1.0
597 --=======================================================
598 FUNCTION CATEGORY_USAGE_EXISTS (
599 p_api_version_number IN NUMBER,
600 p_return_status OUT NOCOPY VARCHAR2,
601 p_region_application_id IN NUMBER,
602 p_region_code IN VARCHAR2,
603 p_attribute_application_id IN NUMBER,
604 p_attribute_code IN VARCHAR2,
605 p_category_name IN VARCHAR2
606 ) return boolean;
607
608
609 --=======================================================
610 -- Procedure CREATE_CATEGORY_USAGE
611 --
612 -- Usage Private API for creating a region item category usage. This
613 -- API should only be called by other APIs that are
614 -- owned by the Core Modules Team (AK).
615 --
616 -- Desc Creates a region item category usage using the given info.
617 -- This API should only be called by other APIs that are
618 -- owned by the Core Modules Team (AK).
619 --
620 -- Results The API returns the standard p_return_status parameter
621 -- indicating one of the standard return statuses :
622 -- * Unexpected error
623 -- * Error
624 -- * Success
625 -- Parameters Region columns
626 -- p_loader_timestamp : IN optional
627 -- If a timestamp is passed, the API will create the
628 -- record using this timestamp. Only the upload API
629 -- should call with this parameter loaded.
630 --
631 -- Version Initial version number = 1.1
632 --=======================================================
633 PROCEDURE CREATE_CATEGORY_USAGE (
634 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
635 p_api_version_number IN NUMBER,
636 p_init_msg_tbl IN BOOLEAN := FALSE,
637 p_msg_count OUT NOCOPY NUMBER,
638 p_msg_data OUT NOCOPY VARCHAR2,
639 p_return_status OUT NOCOPY VARCHAR2,
640 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
641 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
642 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
643 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
644 p_category_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
645 p_category_id IN NUMBER := FND_API.G_MISS_NUM,
646 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
647 p_show_all IN VARCHAR2 := FND_API.G_MISS_CHAR,
648 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
649 p_creation_date IN DATE := FND_API.G_MISS_DATE,
650 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
651 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
652 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
653 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
654 p_pass IN NUMBER,
655 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
656 );
657
658 --=======================================================
659 -- Procedure UPDATE_CATEGORY_USAGE
660 --
661 -- Usage Private API for updating category usage.
662 -- This API should only be called by other APIs
663 -- that are owned by the Core Modules Team (AK).
664 --
668 -- indicating one of the standard return statuses :
665 -- Desc This API updates a region lov relation using the given info
666 --
667 -- Results The API returns the standard p_return_status parameter
669 -- * Unexpected error
670 -- * Error
671 -- * Success
672 -- Parameters Category usage columns
673 -- p_loader_timestamp : IN optional
674 -- If a timestamp is passed, the API will update the
675 -- record using this timestamp. Only the upload API
676 -- should call with this parameter loaded.
677 --
678 -- Version Initial version number = 1.0
679 -- History Current version number = 1.0
680 --=======================================================
681 PROCEDURE UPDATE_CATEGORY_USAGE (
682 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
683 p_api_version_number IN NUMBER,
684 p_init_msg_tbl IN BOOLEAN := FALSE,
685 p_msg_count OUT NOCOPY NUMBER,
686 p_msg_data OUT NOCOPY VARCHAR2,
687 p_return_status OUT NOCOPY VARCHAR2,
688 p_region_application_id IN NUMBER := FND_API.G_MISS_NUM,
689 p_region_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
690 p_attribute_application_id IN NUMBER := FND_API.G_MISS_NUM,
691 p_attribute_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
692 p_category_name IN VARCHAR2 := FND_API.G_MISS_CHAR,
693 p_category_id IN NUMBER := FND_API.G_MISS_NUM,
694 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
695 p_show_all IN VARCHAR2 := FND_API.G_MISS_CHAR,
696 p_created_by IN NUMBER := FND_API.G_MISS_NUM,
697 p_creation_date IN DATE := FND_API.G_MISS_DATE,
698 p_last_updated_by IN NUMBER := FND_API.G_MISS_NUM,
699 p_last_update_date IN DATE := FND_API.G_MISS_DATE,
700 p_last_update_login IN NUMBER := FND_API.G_MISS_NUM,
701 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
702 p_pass IN NUMBER,
703 p_copy_redo_flag IN OUT NOCOPY BOOLEAN
704 );
705
706 end AK_REGION2_PVT;