1 PACKAGE OZF_Claim_Type_PVT AUTHID CURRENT_USER AS
2 /* $Header: ozfvclms.pls 120.1 2005/08/02 07:56:13 appldev ship $ */
3
4 TYPE claim_rec_type IS RECORD
5 (
6 claim_type_id NUMBER,
7 object_version_number NUMBER,
8 last_update_date DATE,
9 last_updated_by NUMBER,
10 creation_date DATE,
11 created_by NUMBER,
12 last_update_login NUMBER,
13 request_id NUMBER,
14 program_application_id NUMBER,
15 program_update_date DATE,
16 program_id NUMBER,
17 created_from VARCHAR2(30),
18 claim_class VARCHAR2(10),
19 set_of_books_id NUMBER,
20 post_to_gl_flag VARCHAR2(1),
21 start_date DATE,
22 end_date DATE,
23 creation_sign VARCHAR2(30),
24 gl_id_ded_adj NUMBER,
25 gl_id_ded_adj_clearing NUMBER,
26 gl_id_ded_clearing NUMBER,
27 gl_id_accr_promo_liab NUMBER,
28 transaction_type NUMBER,
29 cm_trx_type_id NUMBER,
30 dm_trx_type_id NUMBER,
31 cb_trx_type_id NUMBER,
32 wo_rec_trx_id NUMBER,
33 adj_rec_trx_id NUMBER,
34 attribute_category VARCHAR2(30),
35 attribute1 VARCHAR2(150),
36 attribute2 VARCHAR2(150),
37 attribute3 VARCHAR2(150),
38 attribute4 VARCHAR2(150),
39 attribute5 VARCHAR2(150),
40 attribute6 VARCHAR2(150),
41 attribute7 VARCHAR2(150),
42 attribute8 VARCHAR2(150),
43 attribute9 VARCHAR2(150),
44 attribute10 VARCHAR2(150),
45 attribute11 VARCHAR2(150),
46 attribute12 VARCHAR2(150),
47 attribute13 VARCHAR2(150),
48 attribute14 VARCHAR2(150),
49 attribute15 VARCHAR2(150),
50 org_id NUMBER,
51 name VARCHAR2(30),
52 description VARCHAR2(240),
53 language VARCHAR2(4),
54 source_lang VARCHAR2(4),
55 adjustment_type VARCHAR2(30),
56 order_type_id NUMBER,
57 neg_wo_rec_trx_id NUMBER,
58 gl_balancing_flex_value VARCHAR2(150)
59 );
60
61
62
63 ---------------------------------------------------------------------
64 -- PROCEDURE
65 -- Create_Claim_Type
66 --
67 -- PURPOSE
68 -- Create a new claim type.
69 --
70 -- PARAMETERS
71 -- p_claim_rec: the new record to be inserted
72 -- x_claim_type_id: return the claim_type_id of the new record.
73 --
74 -- NOTES
75 -- 1. object_version_number will be set to 1.
76 -- 2. If claim_type_id is passed in, the uniqueness will be checked.
77 -- Raise exception in case of duplicates.
78 -- 3. If claim_type_id is not passed in, generate a unique one from
79 -- the sequence.
80 -- 4. If a flag column is passed in, check if it is 'Y' or 'N'.
81 -- Raise exception for invalid flag.
82 -- 5. If a flag column is not passed in, default it to 'Y' or 'N'.
83 -- 6. Please don't pass in any FND_API.g_mess_char/num/date.
84 ---------------------------------------------------------------------
85 PROCEDURE Create_Claim_Type(
86 p_api_version IN NUMBER
87 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
88 ,p_commit IN VARCHAR2 := FND_API.g_false
89 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
90
91 ,x_return_status OUT NOCOPY VARCHAR2
92 ,x_msg_count OUT NOCOPY NUMBER
93 ,x_msg_data OUT NOCOPY VARCHAR2
94
95 ,p_claim_rec IN claim_rec_type
96 ,x_claim_type_id OUT NOCOPY NUMBER
97 );
98
99 --------------------------------------------------------------------
100 -- PROCEDURE
101 -- Delete_Claim_Type
102 --
103 -- PURPOSE
104 -- Delete a claim type.
105 --
106 -- PARAMETERS
107 -- p_claim_type_id: the claim_type_id
108 -- p_object_version: the object_version_number
109 --
110 -- NOTES
111 -- 1. Raise exception if the object_version_number doesn't match.
112 --------------------------------------------------------------------
113 PROCEDURE Delete_Claim_Type(
114 p_api_version IN NUMBER
115 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
116 ,p_commit IN VARCHAR2 := FND_API.g_false
117
118 ,x_return_status OUT NOCOPY VARCHAR2
119 ,x_msg_count OUT NOCOPY NUMBER
120 ,x_msg_data OUT NOCOPY VARCHAR2
121
122 ,p_claim_type_id IN NUMBER
123 ,p_claim_org_id IN NUMBER
124 ,p_object_version IN NUMBER
125 );
126
127
128 ---------------------------------------------------------------------
129 -- PROCEDURE
130 -- Update_Claim_Type
131 --
132 -- PURPOSE
133 -- Update a claim type.
134 --
135 -- PARAMETERS
136 -- p_claim_rec: the record with new items.
137 -- p_mode : determines what sort of validation is to be performed during update.
138 --
139 -- NOTES
140 -- 1. Raise exception if the object_version_number doesn't match.
141 -- 2. If an attribute is passed in as FND_API.g_miss_char/num/date,
142 -- that column won't be updated.
143 ----------------------------------------------------------------------
144 PROCEDURE Update_Claim_Type(
145 p_api_version IN NUMBER
146 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
147 ,p_commit IN VARCHAR2 := FND_API.g_false
148 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
149
150 ,x_return_status OUT NOCOPY VARCHAR2
151 ,x_msg_count OUT NOCOPY NUMBER
152 ,x_msg_data OUT NOCOPY VARCHAR2
153
154 ,p_claim_rec IN claim_rec_type
155 ,p_mode IN VARCHAR2 := 'UPDATE'
156 ,x_object_version OUT NOCOPY NUMBER
157 );
158
159
160 ---------------------------------------------------------------------
161 -- PROCEDURE
162 -- Validate_Claim_Type
163 --
164 -- PURPOSE
165 -- Validate a claim type record.
166 --
167 -- PARAMETERS
168 -- p_claim_rec: the claim_type record to be validated
169 --
170 -- NOTES
171 -- 1. p_claim_rec should be the complete fund record. There
172 -- should not be any FND_API.g_miss_char/num/date in it.
173 ----------------------------------------------------------------------
174 PROCEDURE Validate_Claim_Type(
175 p_api_version IN NUMBER
176 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
177 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
178
179 ,x_return_status OUT NOCOPY VARCHAR2
180 ,x_msg_count OUT NOCOPY NUMBER
181 ,x_msg_data OUT NOCOPY VARCHAR2
182
183 ,p_claim_rec IN claim_rec_type
184 );
185
186
187 ---------------------------------------------------------------------
188 -- PROCEDURE
189 -- Check_Claim_Type_Items
190 --
191 -- PURPOSE
192 -- Perform the item level checking including unique keys,
193 -- required columns, foreign keys, domain constraints.
194 --
195 -- PARAMETERS
196 -- p_claim_rec: the record to be validated
197 -- p_validation_mode: JTF_PLSQL_API.g_create/g_update
198 ---------------------------------------------------------------------
199 PROCEDURE Check_Claim_Type_Items(
200 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create
201 ,x_return_status OUT NOCOPY VARCHAR2
202 ,p_claim_rec IN claim_rec_type
203 );
204
205
206 ---------------------------------------------------------------------
207 -- PROCEDURE
208 -- Check_Claim_Type_Record
209 --
210 -- PURPOSE
211 -- Check the record level business rules.
212 --
213 -- PARAMETERS
214 -- p_claim_rec: the record to be validated; may contain attributes
215 -- as FND_API.g_miss_char/num/date
216 -- p_complete_rec: the complete record after all "g_miss" items
217 -- have been replaced by current database values
218 ---------------------------------------------------------------------
219 PROCEDURE Check_Claim_Type_Record(
220 p_claim_rec IN claim_rec_type
221 ,p_complete_rec IN claim_rec_type := NULL
222 ,x_return_status OUT NOCOPY VARCHAR2
223 );
224
225
226 ---------------------------------------------------------------------
227 -- PROCEDURE
228 -- Init_Claim_Type_Rec
229 --
230 -- PURPOSE
231 -- Initialize all attributes to be FND_API.g_miss_char/num/date.
232 ---------------------------------------------------------------------
233 PROCEDURE Init_Claim_Type_Rec(
234 x_claim_rec OUT NOCOPY claim_rec_type
235 );
236
237
238 ---------------------------------------------------------------------
239 -- PROCEDURE
240 -- Complete_Claim_Type_Rec
241 --
242 -- PURPOSE
243 -- For update_claim_type, some attributes may be passed in as
244 -- FND_API.g_miss_char/num/date if the user doesn't want to
245 -- update those attributes. This procedure will replace the
246 -- "g_miss" attributes with current database values.
247 --
248 -- PARAMETERS
249 -- p_claim_rec: the record which may contain attributes as
250 -- FND_API.g_miss_char/num/date
251 -- x_complete_rec: the complete record after all "g_miss" items
252 -- have been replaced by current database values
253 ---------------------------------------------------------------------
254 PROCEDURE Complete_Claim_Type_Rec(
255 p_claim_rec IN claim_rec_type
256 ,x_complete_rec OUT NOCOPY claim_rec_type
257 );
258
259
260 END OZF_Claim_Type_PVT;