1 package AK_CUSTOM2_PVT AUTHID CURRENT_USER as
2 /* $Header: akdvcr2s.pls 120.2 2005/09/15 22:26:47 tshort noship $ */
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_CUSTOM2_PVT';
8
9 -- PL/SQL table for holding records that need to be processed
10 -- the second time in UPLOAD
11 G_CUSTOM_REDO_TBL AK_CUSTOM_PUB.Custom_Tbl_Type;
12 G_CUST_REGION_REDO_TBL AK_CUSTOM_PUB.Cust_Region_Tbl_Type;
13 G_CUST_REG_ITEM_REDO_TBL AK_CUSTOM_PUB.Cust_Reg_Item_Tbl_Type;
14 G_CRITERIA_REDO_TBL AK_CUSTOM_PUB.Criteria_Tbl_Type;
15 --
16 -- Pointer to redo tables
17 G_CUSTOM_REDO_INDEX NUMBER := 0;
18 G_CUST_REGION_REDO_INDEX NUMBER := 0;
19 G_CUST_REG_ITEM_REDO_INDEX NUMBER := 0;
20 G_CRITERIA_REDO_INDEX NUMBER := 0;
21
22 --=======================================================
23 -- Procedure UPLOAD_CUSTOM
24 --
25 -- Usage Private API for loading customizations from a
26 -- loader file to the database.
27 -- This API should only be called by other APIs
28 -- that are owned by the Core Modules Team (AK).
29 --
30 -- Desc This API reads the customization data (including region
31 -- items) stored in the loader file currently being
32 -- processed, parses the data, and loads them to the
33 -- database. The tables are updated with the timestamp
34 -- passed. This API will process the file until the
35 -- EOF is reached, a parse error is encountered, or when
36 -- data for a different business object is read from the file.
37 --
38 -- Results The API returns the standard p_return_status parameter
39 -- indicating one of the standard return statuses :
40 -- * Unexpected error
41 -- * Error
42 -- * Success
43 -- Parameters p_index : IN OUT required
44 -- Index of PL/SQL file to be processed.
45 -- p_loader_timestamp : IN required
46 -- The timestamp to be used when creating or updating
47 -- records
48 -- p_line_num : IN optional
49 -- The first line number in the file to be processed.
50 -- It is used for keeping track of the line number
51 -- read so that this info can be included in the
52 -- error message when a parse error occurred.
53 -- p_buffer : IN required
54 -- The content of the first line to be processed.
55 -- The calling API has already read the first line
56 -- that needs to be parsed by this API, so this
57 -- line won't be read from the file again.
58 -- p_line_num_out : OUT
59 -- The number of the last line in the loader file
60 -- that is read by this API.
61 -- p_buffer_out : OUT
62 -- The content of the last line read by this API.
63 -- If an EOF has not reached, this line would
64 -- contain the beginning of another business object
65 -- that will need to be processed by another API.
66 --
67 -- Version Initial version number = 1.0
68 -- History Current version number = 1.0
69 --=======================================================
70 procedure UPLOAD_CUSTOM (
71 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
72 p_api_version_number IN NUMBER,
73 p_return_status OUT NOCOPY VARCHAR2,
74 p_index IN OUT NOCOPY NUMBER,
75 p_loader_timestamp IN DATE,
76 p_line_num IN NUMBER := FND_API.G_MISS_NUM,
77 p_buffer IN AK_ON_OBJECTS_PUB.Buffer_Type,
78 p_line_num_out OUT NOCOPY NUMBER,
79 p_buffer_out OUT NOCOPY AK_ON_OBJECTS_PUB.Buffer_Type,
80 p_upl_loader_cur IN OUT NOCOPY AK_ON_OBJECTS_PUB.LoaderCurTyp,
81 p_pass IN NUMBER := 1
82 );
83
84 --=======================================================
85 -- Procedure UPLOAD_CUSTOM_SECOND
86 --
87 -- Usage Private API for loading customizations that were
88 -- failed during its first pass
89 -- This API should only be called by other APIs
90 -- that are owned by the Core Modules Team (AK).
91 --
92 -- Desc This API reads the customization data from PL/SQL table
93 -- that was prepared during 1st pass, then processes
94 -- the data, and loads them to the database. The tables
95 -- are updated with the timestamp passed. This API
96 -- will process the file until the EOF is reached,
97 -- a parse error is encountered, or when data for
98 -- a different business object is read from the file.
99 --
100 -- Results The API returns the standard p_return_status parameter
101 -- indicating one of the standard return statuses :
102 -- * Unexpected error
103 -- * Error
104 -- * Success
105 -- Parameters p_validation_level : IN required
106 -- validation level
107 --
108 -- Version Initial version number = 1.0
109 -- History Current version number = 1.0
110 --=======================================================
111 procedure UPLOAD_CUSTOM_SECOND (
112 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
113 p_return_status OUT NOCOPY VARCHAR2,
114 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
115 p_pass IN NUMBER := 2
116 );
117
118 end AK_CUSTOM2_PVT;