42: -- Complete_Claim_History_Rec
43: --
44: -- PURPOSE
45: -- For Update_Claim_history, some attributes may be passed in as
46: -- FND_API.g_miss_char/num/date if the user doesn't want to
47: -- update those attributes. This procedure will replace the
48: -- "g_miss" attributes with current database values.
49: --
50: -- PARAMETERS
48: -- "g_miss" attributes with current database values.
49: --
50: -- PARAMETERS
51: -- p_claim_history_rec : the record which may contain attributes as
52: -- FND_API.g_miss_char/num/date
53: -- x_complete_rec: the complete record after all "g_miss" items
54: -- have been replaced by current database values
55: ---------------------------------------------------------------------
56: PROCEDURE Complete_Claim_History_Rec (
65:
66: l_claim_history_rec c_claim_history_csr%ROWTYPE;
67: l_api_name varchar2(30) := 'Complete_Claim_History_Rec';
68: BEGIN
69: -- letter_id NUMBER := FND_API.G_MISS_NUM,
70: -- letter_date DATE := FND_API.G_MISS_DATE,
71:
72: -- Initialize API return status to sucess
73: x_return_status := FND_API.G_RET_STS_SUCCESS;
66: l_claim_history_rec c_claim_history_csr%ROWTYPE;
67: l_api_name varchar2(30) := 'Complete_Claim_History_Rec';
68: BEGIN
69: -- letter_id NUMBER := FND_API.G_MISS_NUM,
70: -- letter_date DATE := FND_API.G_MISS_DATE,
71:
72: -- Initialize API return status to sucess
73: x_return_status := FND_API.G_RET_STS_SUCCESS;
74:
69: -- letter_id NUMBER := FND_API.G_MISS_NUM,
70: -- letter_date DATE := FND_API.G_MISS_DATE,
71:
72: -- Initialize API return status to sucess
73: x_return_status := FND_API.G_RET_STS_SUCCESS;
74:
75: -- Api body
76: --
77: -- Debug Message
90: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
91: FND_MESSAGE.set_name('OZF','OZF_API_RECORD_NOT_FOUND');
92: FND_MSG_PUB.add;
93: END IF;
94: RAISE FND_API.g_exc_error;
95: END IF;
96: CLOSE c_claim_history_csr;
97:
98: IF p_claim_history_rec.claim_history_id = FND_API.G_MISS_NUM THEN
94: RAISE FND_API.g_exc_error;
95: END IF;
96: CLOSE c_claim_history_csr;
97:
98: IF p_claim_history_rec.claim_history_id = FND_API.G_MISS_NUM THEN
99: x_complete_rec.claim_history_id := NULL;
100: END IF;
101: IF p_claim_history_rec.claim_history_id IS NULL THEN
102: x_complete_rec.claim_history_id := l_claim_history_rec.claim_history_id;
100: END IF;
101: IF p_claim_history_rec.claim_history_id IS NULL THEN
102: x_complete_rec.claim_history_id := l_claim_history_rec.claim_history_id;
103: END IF;
104: IF p_claim_history_rec.object_version_number = FND_API.G_MISS_NUM THEN
105: x_complete_rec.object_version_number := NULL;
106: END IF;
107: IF p_claim_history_rec.object_version_number IS NULL THEN
108: x_complete_rec.object_version_number := l_claim_history_rec.object_version_number;
106: END IF;
107: IF p_claim_history_rec.object_version_number IS NULL THEN
108: x_complete_rec.object_version_number := l_claim_history_rec.object_version_number;
109: END IF;
110: IF p_claim_history_rec.claim_id = FND_API.G_MISS_NUM THEN
111: x_complete_rec.claim_id := NULL;
112: END IF;
113: IF p_claim_history_rec.claim_id IS NULL THEN
114: x_complete_rec.claim_id := l_claim_history_rec.claim_id;
112: END IF;
113: IF p_claim_history_rec.claim_id IS NULL THEN
114: x_complete_rec.claim_id := l_claim_history_rec.claim_id;
115: END IF;
116: IF p_claim_history_rec.batch_id = FND_API.G_MISS_NUM THEN
117: x_complete_rec.batch_id := NULL;
118: END IF;
119: IF p_claim_history_rec.batch_id IS NULL THEN
120: x_complete_rec.batch_id := l_claim_history_rec.batch_id;
118: END IF;
119: IF p_claim_history_rec.batch_id IS NULL THEN
120: x_complete_rec.batch_id := l_claim_history_rec.batch_id;
121: END IF;
122: IF p_claim_history_rec.claim_number = FND_API.G_MISS_CHAR THEN
123: x_complete_rec.claim_number := NULL;
124: END IF;
125: IF p_claim_history_rec.claim_number IS NULL THEN
126: x_complete_rec.claim_number := l_claim_history_rec.claim_number;
124: END IF;
125: IF p_claim_history_rec.claim_number IS NULL THEN
126: x_complete_rec.claim_number := l_claim_history_rec.claim_number;
127: END IF;
128: IF p_claim_history_rec.claim_type_id = FND_API.G_MISS_NUM THEN
129: x_complete_rec.claim_type_id := NULL;
130: END IF;
131: IF p_claim_history_rec.claim_type_id IS NULL THEN
132: x_complete_rec.claim_type_id := l_claim_history_rec.claim_type_id;
130: END IF;
131: IF p_claim_history_rec.claim_type_id IS NULL THEN
132: x_complete_rec.claim_type_id := l_claim_history_rec.claim_type_id;
133: END IF;
134: IF p_claim_history_rec.claim_class = FND_API.G_MISS_CHAR THEN
135: x_complete_rec.claim_class := NULL;
136: END IF;
137: IF p_claim_history_rec.claim_class IS NULL THEN
138: x_complete_rec.claim_class := l_claim_history_rec.claim_class;
136: END IF;
137: IF p_claim_history_rec.claim_class IS NULL THEN
138: x_complete_rec.claim_class := l_claim_history_rec.claim_class;
139: END IF;
140: IF p_claim_history_rec.claim_date = FND_API.G_MISS_DATE THEN
141: x_complete_rec.claim_date := NULL;
142: END IF;
143: IF p_claim_history_rec.claim_date IS NULL THEN
144: x_complete_rec.claim_date := l_claim_history_rec.claim_date;
142: END IF;
143: IF p_claim_history_rec.claim_date IS NULL THEN
144: x_complete_rec.claim_date := l_claim_history_rec.claim_date;
145: END IF;
146: IF p_claim_history_rec.due_date = FND_API.G_MISS_DATE THEN
147: x_complete_rec.due_date := NULL;
148: END IF;
149: IF p_claim_history_rec.due_date IS NULL THEN
150: x_complete_rec.due_date := l_claim_history_rec.due_date;
148: END IF;
149: IF p_claim_history_rec.due_date IS NULL THEN
150: x_complete_rec.due_date := l_claim_history_rec.due_date;
151: END IF;
152: IF p_claim_history_rec.owner_id = FND_API.G_MISS_NUM THEN
153: x_complete_rec.owner_id := NULL;
154: END IF;
155: IF p_claim_history_rec.owner_id IS NULL THEN
156: x_complete_rec.owner_id := l_claim_history_rec.owner_id;
154: END IF;
155: IF p_claim_history_rec.owner_id IS NULL THEN
156: x_complete_rec.owner_id := l_claim_history_rec.owner_id;
157: END IF;
158: IF p_claim_history_rec.history_event = FND_API.G_MISS_CHAR THEN
159: x_complete_rec.history_event := NULL;
160: END IF;
161: IF p_claim_history_rec.history_event IS NULL THEN
162: x_complete_rec.history_event := l_claim_history_rec.history_event;
160: END IF;
161: IF p_claim_history_rec.history_event IS NULL THEN
162: x_complete_rec.history_event := l_claim_history_rec.history_event;
163: END IF;
164: IF p_claim_history_rec.history_event_date = FND_API.G_MISS_DATE THEN
165: x_complete_rec.history_event_date := NULL;
166: END IF;
167: IF p_claim_history_rec.history_event_date IS NULL THEN
168: x_complete_rec.history_event_date := l_claim_history_rec.history_event_date;
166: END IF;
167: IF p_claim_history_rec.history_event_date IS NULL THEN
168: x_complete_rec.history_event_date := l_claim_history_rec.history_event_date;
169: END IF;
170: IF p_claim_history_rec.history_event_description = FND_API.G_MISS_CHAR THEN
171: x_complete_rec.history_event_description := NULL;
172: END IF;
173: IF p_claim_history_rec.history_event_description IS NULL THEN
174: x_complete_rec.history_event_description := l_claim_history_rec.history_event_description;
172: END IF;
173: IF p_claim_history_rec.history_event_description IS NULL THEN
174: x_complete_rec.history_event_description := l_claim_history_rec.history_event_description;
175: END IF;
176: IF p_claim_history_rec.split_from_claim_id = FND_API.G_MISS_NUM THEN
177: x_complete_rec.split_from_claim_id := NULL;
178: END IF;
179: IF p_claim_history_rec.split_from_claim_id IS NULL THEN
180: x_complete_rec.split_from_claim_id := l_claim_history_rec.split_from_claim_id;
178: END IF;
179: IF p_claim_history_rec.split_from_claim_id IS NULL THEN
180: x_complete_rec.split_from_claim_id := l_claim_history_rec.split_from_claim_id;
181: END IF;
182: IF p_claim_history_rec.duplicate_claim_id = FND_API.G_MISS_NUM THEN
183: x_complete_rec.duplicate_claim_id := NULL;
184: END IF;
185: IF p_claim_history_rec.duplicate_claim_id IS NULL THEN
186: x_complete_rec.duplicate_claim_id := l_claim_history_rec.duplicate_claim_id;
184: END IF;
185: IF p_claim_history_rec.duplicate_claim_id IS NULL THEN
186: x_complete_rec.duplicate_claim_id := l_claim_history_rec.duplicate_claim_id;
187: END IF;
188: IF p_claim_history_rec.split_date = FND_API.G_MISS_DATE THEN
189: x_complete_rec.split_date := NULL;
190: END IF;
191: IF p_claim_history_rec.split_date IS NULL THEN
192: x_complete_rec.split_date := l_claim_history_rec.split_date;
190: END IF;
191: IF p_claim_history_rec.split_date IS NULL THEN
192: x_complete_rec.split_date := l_claim_history_rec.split_date;
193: END IF;
194: IF p_claim_history_rec.root_claim_id = FND_API.G_MISS_NUM THEN
195: x_complete_rec.root_claim_id := NULL;
196: END IF;
197: IF p_claim_history_rec.root_claim_id IS NULL THEN
198: x_complete_rec.root_claim_id := l_claim_history_rec.root_claim_id;
196: END IF;
197: IF p_claim_history_rec.root_claim_id IS NULL THEN
198: x_complete_rec.root_claim_id := l_claim_history_rec.root_claim_id;
199: END IF;
200: IF p_claim_history_rec.amount = FND_API.G_MISS_NUM THEN
201: x_complete_rec.amount := NULL;
202: END IF;
203: IF p_claim_history_rec.amount IS NULL THEN
204: x_complete_rec.amount := l_claim_history_rec.amount;
202: END IF;
203: IF p_claim_history_rec.amount IS NULL THEN
204: x_complete_rec.amount := l_claim_history_rec.amount;
205: END IF;
206: IF p_claim_history_rec.amount_adjusted = FND_API.G_MISS_NUM THEN
207: x_complete_rec.amount_adjusted := NULL;
208: END IF;
209: IF p_claim_history_rec.amount_adjusted IS NULL THEN
210: x_complete_rec.amount_adjusted := l_claim_history_rec.amount_adjusted;
208: END IF;
209: IF p_claim_history_rec.amount_adjusted IS NULL THEN
210: x_complete_rec.amount_adjusted := l_claim_history_rec.amount_adjusted;
211: END IF;
212: IF p_claim_history_rec.amount_remaining = FND_API.G_MISS_NUM THEN
213: x_complete_rec.amount_remaining := NULL;
214: END IF;
215: IF p_claim_history_rec.amount_remaining IS NULL THEN
216: x_complete_rec.amount_remaining := l_claim_history_rec.amount_remaining;
214: END IF;
215: IF p_claim_history_rec.amount_remaining IS NULL THEN
216: x_complete_rec.amount_remaining := l_claim_history_rec.amount_remaining;
217: END IF;
218: IF p_claim_history_rec.amount_settled = FND_API.G_MISS_NUM THEN
219: x_complete_rec.amount_settled := NULL;
220: END IF;
221: IF p_claim_history_rec.amount_settled IS NULL THEN
222: x_complete_rec.amount_settled := l_claim_history_rec.amount_settled;
220: END IF;
221: IF p_claim_history_rec.amount_settled IS NULL THEN
222: x_complete_rec.amount_settled := l_claim_history_rec.amount_settled;
223: END IF;
224: IF p_claim_history_rec.acctd_amount = FND_API.G_MISS_NUM THEN
225: x_complete_rec.acctd_amount := NULL;
226: END IF;
227: IF p_claim_history_rec.acctd_amount IS NULL THEN
228: x_complete_rec.acctd_amount := l_claim_history_rec.acctd_amount;
226: END IF;
227: IF p_claim_history_rec.acctd_amount IS NULL THEN
228: x_complete_rec.acctd_amount := l_claim_history_rec.acctd_amount;
229: END IF;
230: IF p_claim_history_rec.acctd_amount_remaining = FND_API.G_MISS_NUM THEN
231: x_complete_rec.acctd_amount_remaining := NULL;
232: END IF;
233: IF p_claim_history_rec.acctd_amount_remaining IS NULL THEN
234: x_complete_rec.acctd_amount_remaining := l_claim_history_rec.acctd_amount_remaining ;
232: END IF;
233: IF p_claim_history_rec.acctd_amount_remaining IS NULL THEN
234: x_complete_rec.acctd_amount_remaining := l_claim_history_rec.acctd_amount_remaining ;
235: END IF;
236: IF p_claim_history_rec.acctd_amount_adjusted = FND_API.G_MISS_NUM THEN
237: x_complete_rec.acctd_amount_adjusted := NULL;
238: END IF;
239: IF p_claim_history_rec.acctd_amount_adjusted IS NULL THEN
240: x_complete_rec.acctd_amount_adjusted := l_claim_history_rec.acctd_amount_adjusted;
238: END IF;
239: IF p_claim_history_rec.acctd_amount_adjusted IS NULL THEN
240: x_complete_rec.acctd_amount_adjusted := l_claim_history_rec.acctd_amount_adjusted;
241: END IF;
242: IF p_claim_history_rec.acctd_amount_settled = FND_API.G_MISS_NUM THEN
243: x_complete_rec.acctd_amount_settled := NULL;
244: END IF;
245: IF p_claim_history_rec.acctd_amount_settled IS NULL THEN
246: x_complete_rec.acctd_amount_settled := l_claim_history_rec.acctd_amount_settled;
244: END IF;
245: IF p_claim_history_rec.acctd_amount_settled IS NULL THEN
246: x_complete_rec.acctd_amount_settled := l_claim_history_rec.acctd_amount_settled;
247: END IF;
248: IF p_claim_history_rec.tax_amount = FND_API.G_MISS_NUM THEN
249: x_complete_rec.tax_amount := NULL;
250: END IF;
251: IF p_claim_history_rec.tax_amount IS NULL THEN
252: x_complete_rec.tax_amount := l_claim_history_rec.tax_amount ;
250: END IF;
251: IF p_claim_history_rec.tax_amount IS NULL THEN
252: x_complete_rec.tax_amount := l_claim_history_rec.tax_amount ;
253: END IF;
254: IF p_claim_history_rec.tax_code = FND_API.G_MISS_CHAR THEN
255: x_complete_rec.tax_code := NULL;
256: END IF;
257: IF p_claim_history_rec.tax_code IS NULL THEN
258: x_complete_rec.tax_code := l_claim_history_rec.tax_code ;
256: END IF;
257: IF p_claim_history_rec.tax_code IS NULL THEN
258: x_complete_rec.tax_code := l_claim_history_rec.tax_code ;
259: END IF;
260: IF p_claim_history_rec.tax_calculation_flag = FND_API.G_MISS_CHAR THEN
261: x_complete_rec.tax_calculation_flag := NULL;
262: END IF;
263: IF p_claim_history_rec.tax_calculation_flag IS NULL THEN
264: x_complete_rec.tax_calculation_flag := l_claim_history_rec.tax_calculation_flag ;
262: END IF;
263: IF p_claim_history_rec.tax_calculation_flag IS NULL THEN
264: x_complete_rec.tax_calculation_flag := l_claim_history_rec.tax_calculation_flag ;
265: END IF;
266: IF p_claim_history_rec.currency_code = FND_API.G_MISS_CHAR THEN
267: x_complete_rec.currency_code := NULL;
268: END IF;
269: IF p_claim_history_rec.currency_code IS NULL THEN
270: x_complete_rec.currency_code := l_claim_history_rec.currency_code;
268: END IF;
269: IF p_claim_history_rec.currency_code IS NULL THEN
270: x_complete_rec.currency_code := l_claim_history_rec.currency_code;
271: END IF;
272: IF p_claim_history_rec.exchange_rate_type = FND_API.G_MISS_CHAR THEN
273: x_complete_rec.exchange_rate_type := NULL;
274: END IF;
275: IF p_claim_history_rec.exchange_rate_type IS NULL THEN
276: x_complete_rec.exchange_rate_type := l_claim_history_rec.exchange_rate_type;
274: END IF;
275: IF p_claim_history_rec.exchange_rate_type IS NULL THEN
276: x_complete_rec.exchange_rate_type := l_claim_history_rec.exchange_rate_type;
277: END IF;
278: IF p_claim_history_rec.exchange_rate_date = FND_API.G_MISS_DATE THEN
279: x_complete_rec.exchange_rate_date := NULL;
280: END IF;
281: IF p_claim_history_rec.exchange_rate_date IS NULL THEN
282: x_complete_rec.exchange_rate_date := l_claim_history_rec.exchange_rate_date;
280: END IF;
281: IF p_claim_history_rec.exchange_rate_date IS NULL THEN
282: x_complete_rec.exchange_rate_date := l_claim_history_rec.exchange_rate_date;
283: END IF;
284: IF p_claim_history_rec.exchange_rate = FND_API.G_MISS_NUM THEN
285: x_complete_rec.exchange_rate := NULL;
286: END IF;
287: IF p_claim_history_rec.exchange_rate IS NULL THEN
288: x_complete_rec.exchange_rate := l_claim_history_rec.exchange_rate;
286: END IF;
287: IF p_claim_history_rec.exchange_rate IS NULL THEN
288: x_complete_rec.exchange_rate := l_claim_history_rec.exchange_rate;
289: END IF;
290: IF p_claim_history_rec.set_of_books_id = FND_API.G_MISS_NUM THEN
291: x_complete_rec.set_of_books_id := NULL;
292: END IF;
293: IF p_claim_history_rec.set_of_books_id IS NULL THEN
294: x_complete_rec.set_of_books_id := l_claim_history_rec.set_of_books_id;
292: END IF;
293: IF p_claim_history_rec.set_of_books_id IS NULL THEN
294: x_complete_rec.set_of_books_id := l_claim_history_rec.set_of_books_id;
295: END IF;
296: IF p_claim_history_rec.original_claim_date = FND_API.G_MISS_DATE THEN
297: x_complete_rec.original_claim_date := NULL;
298: END IF;
299: IF p_claim_history_rec.original_claim_date IS NULL THEN
300: x_complete_rec.original_claim_date := l_claim_history_rec.original_claim_date;
298: END IF;
299: IF p_claim_history_rec.original_claim_date IS NULL THEN
300: x_complete_rec.original_claim_date := l_claim_history_rec.original_claim_date;
301: END IF;
302: IF p_claim_history_rec.source_object_id = FND_API.G_MISS_NUM THEN
303: x_complete_rec.source_object_id := NULL;
304: END IF;
305: IF p_claim_history_rec.source_object_id IS NULL THEN
306: x_complete_rec.source_object_id := l_claim_history_rec.source_object_id;
304: END IF;
305: IF p_claim_history_rec.source_object_id IS NULL THEN
306: x_complete_rec.source_object_id := l_claim_history_rec.source_object_id;
307: END IF;
308: IF p_claim_history_rec.source_object_class = FND_API.G_MISS_CHAR THEN
309: x_complete_rec.source_object_class := NULL;
310: END IF;
311: IF p_claim_history_rec.source_object_class IS NULL THEN
312: x_complete_rec.source_object_class := l_claim_history_rec.source_object_class;
310: END IF;
311: IF p_claim_history_rec.source_object_class IS NULL THEN
312: x_complete_rec.source_object_class := l_claim_history_rec.source_object_class;
313: END IF;
314: IF p_claim_history_rec.source_object_type_id = FND_API.G_MISS_NUM THEN
315: x_complete_rec.source_object_type_id := NULL;
316: END IF;
317: IF p_claim_history_rec.source_object_type_id IS NULL THEN
318: x_complete_rec.source_object_type_id := l_claim_history_rec.source_object_type_id;
316: END IF;
317: IF p_claim_history_rec.source_object_type_id IS NULL THEN
318: x_complete_rec.source_object_type_id := l_claim_history_rec.source_object_type_id;
319: END IF;
320: IF p_claim_history_rec.source_object_number = FND_API.G_MISS_CHAR THEN
321: x_complete_rec.source_object_number := NULL;
322: END IF;
323: IF p_claim_history_rec.source_object_number IS NULL THEN
324: x_complete_rec.source_object_number := l_claim_history_rec.source_object_number;
322: END IF;
323: IF p_claim_history_rec.source_object_number IS NULL THEN
324: x_complete_rec.source_object_number := l_claim_history_rec.source_object_number;
325: END IF;
326: IF p_claim_history_rec.cust_account_id = FND_API.G_MISS_NUM THEN
327: x_complete_rec.cust_account_id := NULL;
328: END IF;
329: IF p_claim_history_rec.cust_account_id IS NULL THEN
330: x_complete_rec.cust_account_id := l_claim_history_rec.cust_account_id;
328: END IF;
329: IF p_claim_history_rec.cust_account_id IS NULL THEN
330: x_complete_rec.cust_account_id := l_claim_history_rec.cust_account_id;
331: END IF;
332: IF p_claim_history_rec.cust_billto_acct_site_id = FND_API.G_MISS_NUM THEN
333: x_complete_rec.cust_billto_acct_site_id := NULL;
334: END IF;
335: IF p_claim_history_rec.cust_billto_acct_site_id IS NULL THEN
336: x_complete_rec.cust_billto_acct_site_id := l_claim_history_rec.cust_billto_acct_site_id;
334: END IF;
335: IF p_claim_history_rec.cust_billto_acct_site_id IS NULL THEN
336: x_complete_rec.cust_billto_acct_site_id := l_claim_history_rec.cust_billto_acct_site_id;
337: END IF;
338: IF p_claim_history_rec.cust_shipto_acct_site_id = FND_API.G_MISS_NUM THEN
339: x_complete_rec.cust_shipto_acct_site_id := NULL;
340: END IF;
341: IF p_claim_history_rec.cust_shipto_acct_site_id IS NULL THEN
342: x_complete_rec.cust_shipto_acct_site_id := l_claim_history_rec.cust_shipto_acct_site_id;
340: END IF;
341: IF p_claim_history_rec.cust_shipto_acct_site_id IS NULL THEN
342: x_complete_rec.cust_shipto_acct_site_id := l_claim_history_rec.cust_shipto_acct_site_id;
343: END IF;
344: IF p_claim_history_rec.location_id = FND_API.G_MISS_NUM THEN
345: x_complete_rec.location_id := NULL;
346: END IF;
347: IF p_claim_history_rec.location_id IS NULL THEN
348: x_complete_rec.location_id := l_claim_history_rec.location_id;
346: END IF;
347: IF p_claim_history_rec.location_id IS NULL THEN
348: x_complete_rec.location_id := l_claim_history_rec.location_id;
349: END IF;
350: IF p_claim_history_rec.pay_related_account_flag = FND_API.G_MISS_CHAR THEN
351: x_complete_rec.pay_related_account_flag := NULL;
352: END IF;
353: IF p_claim_history_rec.pay_related_account_flag IS NULL THEN
354: x_complete_rec.pay_related_account_flag := l_claim_history_rec.pay_related_account_flag;
352: END IF;
353: IF p_claim_history_rec.pay_related_account_flag IS NULL THEN
354: x_complete_rec.pay_related_account_flag := l_claim_history_rec.pay_related_account_flag;
355: END IF;
356: IF p_claim_history_rec.related_cust_account_id = FND_API.G_MISS_NUM THEN
357: x_complete_rec.related_cust_account_id := NULL;
358: END IF;
359: IF p_claim_history_rec.related_cust_account_id IS NULL THEN
360: x_complete_rec.related_cust_account_id := l_claim_history_rec.related_cust_account_id;
358: END IF;
359: IF p_claim_history_rec.related_cust_account_id IS NULL THEN
360: x_complete_rec.related_cust_account_id := l_claim_history_rec.related_cust_account_id;
361: END IF;
362: IF p_claim_history_rec.related_site_use_id = FND_API.G_MISS_NUM THEN
363: x_complete_rec.related_site_use_id := NULL;
364: END IF;
365: IF p_claim_history_rec.related_site_use_id IS NULL THEN
366: x_complete_rec.related_site_use_id := l_claim_history_rec.related_site_use_id;
364: END IF;
365: IF p_claim_history_rec.related_site_use_id IS NULL THEN
366: x_complete_rec.related_site_use_id := l_claim_history_rec.related_site_use_id;
367: END IF;
368: IF p_claim_history_rec.relationship_type = FND_API.G_MISS_CHAR THEN
369: x_complete_rec.relationship_type := NULL;
370: END IF;
371: IF p_claim_history_rec.relationship_type IS NULL THEN
372: x_complete_rec.relationship_type := l_claim_history_rec.relationship_type;
370: END IF;
371: IF p_claim_history_rec.relationship_type IS NULL THEN
372: x_complete_rec.relationship_type := l_claim_history_rec.relationship_type;
373: END IF;
374: IF p_claim_history_rec.vendor_id = FND_API.G_MISS_NUM THEN
375: x_complete_rec.vendor_id := NULL;
376: END IF;
377: IF p_claim_history_rec.vendor_id IS NULL THEN
378: x_complete_rec.vendor_id := l_claim_history_rec.vendor_id;
376: END IF;
377: IF p_claim_history_rec.vendor_id IS NULL THEN
378: x_complete_rec.vendor_id := l_claim_history_rec.vendor_id;
379: END IF;
380: IF p_claim_history_rec.vendor_site_id = FND_API.G_MISS_NUM THEN
381: x_complete_rec.vendor_site_id := NULL;
382: END IF;
383: IF p_claim_history_rec.vendor_site_id IS NULL THEN
384: x_complete_rec.vendor_site_id := l_claim_history_rec.vendor_site_id;
382: END IF;
383: IF p_claim_history_rec.vendor_site_id IS NULL THEN
384: x_complete_rec.vendor_site_id := l_claim_history_rec.vendor_site_id;
385: END IF;
386: IF p_claim_history_rec.reason_type = FND_API.G_MISS_CHAR THEN
387: x_complete_rec.reason_type := NULL;
388: END IF;
389: IF p_claim_history_rec.reason_type IS NULL THEN
390: x_complete_rec.reason_type := l_claim_history_rec.reason_type;
388: END IF;
389: IF p_claim_history_rec.reason_type IS NULL THEN
390: x_complete_rec.reason_type := l_claim_history_rec.reason_type;
391: END IF;
392: IF p_claim_history_rec.reason_code_id = FND_API.G_MISS_NUM THEN
393: x_complete_rec.reason_code_id := NULL;
394: END IF;
395: IF p_claim_history_rec.reason_code_id IS NULL THEN
396: x_complete_rec.reason_code_id := l_claim_history_rec.reason_code_id;
394: END IF;
395: IF p_claim_history_rec.reason_code_id IS NULL THEN
396: x_complete_rec.reason_code_id := l_claim_history_rec.reason_code_id;
397: END IF;
398: IF p_claim_history_rec.task_template_group_id = FND_API.G_MISS_NUM THEN
399: x_complete_rec.task_template_group_id := NULL;
400: END IF;
401: IF p_claim_history_rec.task_template_group_id IS NULL THEN
402: x_complete_rec.task_template_group_id := l_claim_history_rec.task_template_group_id;
400: END IF;
401: IF p_claim_history_rec.task_template_group_id IS NULL THEN
402: x_complete_rec.task_template_group_id := l_claim_history_rec.task_template_group_id;
403: END IF;
404: IF p_claim_history_rec.status_code = FND_API.G_MISS_CHAR THEN
405: x_complete_rec.status_code := NULL;
406: END IF;
407: IF p_claim_history_rec.status_code IS NULL THEN
408: x_complete_rec.status_code := l_claim_history_rec.status_code;
406: END IF;
407: IF p_claim_history_rec.status_code IS NULL THEN
408: x_complete_rec.status_code := l_claim_history_rec.status_code;
409: END IF;
410: IF p_claim_history_rec.user_status_id = FND_API.G_MISS_NUM THEN
411: x_complete_rec.user_status_id := NULL;
412: END IF;
413: IF p_claim_history_rec.user_status_id IS NULL THEN
414: x_complete_rec.user_status_id := l_claim_history_rec.user_status_id;
412: END IF;
413: IF p_claim_history_rec.user_status_id IS NULL THEN
414: x_complete_rec.user_status_id := l_claim_history_rec.user_status_id;
415: END IF;
416: IF p_claim_history_rec.sales_rep_id = FND_API.G_MISS_NUM THEN
417: x_complete_rec.sales_rep_id := NULL;
418: END IF;
419: IF p_claim_history_rec.sales_rep_id IS NULL THEN
420: x_complete_rec.sales_rep_id := l_claim_history_rec.sales_rep_id;
418: END IF;
419: IF p_claim_history_rec.sales_rep_id IS NULL THEN
420: x_complete_rec.sales_rep_id := l_claim_history_rec.sales_rep_id;
421: END IF;
422: IF p_claim_history_rec.collector_id = FND_API.G_MISS_NUM THEN
423: x_complete_rec.collector_id := NULL;
424: END IF;
425: IF p_claim_history_rec.collector_id IS NULL THEN
426: x_complete_rec.collector_id := l_claim_history_rec.collector_id;
424: END IF;
425: IF p_claim_history_rec.collector_id IS NULL THEN
426: x_complete_rec.collector_id := l_claim_history_rec.collector_id;
427: END IF;
428: IF p_claim_history_rec.contact_id = FND_API.G_MISS_NUM THEN
429: x_complete_rec.contact_id := NULL;
430: END IF;
431: IF p_claim_history_rec.contact_id IS NULL THEN
432: x_complete_rec.contact_id := l_claim_history_rec.contact_id;
430: END IF;
431: IF p_claim_history_rec.contact_id IS NULL THEN
432: x_complete_rec.contact_id := l_claim_history_rec.contact_id;
433: END IF;
434: IF p_claim_history_rec.broker_id = FND_API.G_MISS_NUM THEN
435: x_complete_rec.broker_id := NULL;
436: END IF;
437: IF p_claim_history_rec.broker_id IS NULL THEN
438: x_complete_rec.broker_id := l_claim_history_rec.broker_id;
436: END IF;
437: IF p_claim_history_rec.broker_id IS NULL THEN
438: x_complete_rec.broker_id := l_claim_history_rec.broker_id;
439: END IF;
440: IF p_claim_history_rec.territory_id = FND_API.G_MISS_NUM THEN
441: x_complete_rec.territory_id := NULL;
442: END IF;
443: IF p_claim_history_rec.territory_id IS NULL THEN
444: x_complete_rec.territory_id := l_claim_history_rec.territory_id;
442: END IF;
443: IF p_claim_history_rec.territory_id IS NULL THEN
444: x_complete_rec.territory_id := l_claim_history_rec.territory_id;
445: END IF;
446: IF p_claim_history_rec.customer_ref_date = FND_API.G_MISS_DATE THEN
447: x_complete_rec.customer_ref_date := NULL;
448: END IF;
449: IF p_claim_history_rec.customer_ref_date IS NULL THEN
450: x_complete_rec.customer_ref_date := l_claim_history_rec.customer_ref_date;
448: END IF;
449: IF p_claim_history_rec.customer_ref_date IS NULL THEN
450: x_complete_rec.customer_ref_date := l_claim_history_rec.customer_ref_date;
451: END IF;
452: IF p_claim_history_rec.customer_ref_number = FND_API.G_MISS_CHAR THEN
453: x_complete_rec.customer_ref_number := NULL;
454: END IF;
455: IF p_claim_history_rec.customer_ref_number IS NULL THEN
456: x_complete_rec.customer_ref_number := l_claim_history_rec.customer_ref_number;
454: END IF;
455: IF p_claim_history_rec.customer_ref_number IS NULL THEN
456: x_complete_rec.customer_ref_number := l_claim_history_rec.customer_ref_number;
457: END IF;
458: IF p_claim_history_rec.receipt_id = FND_API.G_MISS_NUM THEN
459: x_complete_rec.receipt_id := NULL;
460: END IF;
461: IF p_claim_history_rec.receipt_id IS NULL THEN
462: x_complete_rec.receipt_id := l_claim_history_rec.receipt_id;
460: END IF;
461: IF p_claim_history_rec.receipt_id IS NULL THEN
462: x_complete_rec.receipt_id := l_claim_history_rec.receipt_id;
463: END IF;
464: IF p_claim_history_rec.receipt_number = FND_API.G_MISS_CHAR THEN
465: x_complete_rec.receipt_number := NULL;
466: END IF;
467: IF p_claim_history_rec.receipt_number IS NULL THEN
468: x_complete_rec.receipt_number := l_claim_history_rec.receipt_number;
466: END IF;
467: IF p_claim_history_rec.receipt_number IS NULL THEN
468: x_complete_rec.receipt_number := l_claim_history_rec.receipt_number;
469: END IF;
470: IF p_claim_history_rec.doc_sequence_id = FND_API.G_MISS_NUM THEN
471: x_complete_rec.doc_sequence_id := NULL;
472: END IF;
473: IF p_claim_history_rec.doc_sequence_id IS NULL THEN
474: x_complete_rec.doc_sequence_id := l_claim_history_rec.doc_sequence_id;
472: END IF;
473: IF p_claim_history_rec.doc_sequence_id IS NULL THEN
474: x_complete_rec.doc_sequence_id := l_claim_history_rec.doc_sequence_id;
475: END IF;
476: IF p_claim_history_rec.doc_sequence_value = FND_API.G_MISS_NUM THEN
477: x_complete_rec.doc_sequence_value := NULL;
478: END IF;
479: IF p_claim_history_rec.doc_sequence_value IS NULL THEN
480: x_complete_rec.doc_sequence_value := l_claim_history_rec.doc_sequence_value;
478: END IF;
479: IF p_claim_history_rec.doc_sequence_value IS NULL THEN
480: x_complete_rec.doc_sequence_value := l_claim_history_rec.doc_sequence_value;
481: END IF;
482: IF p_claim_history_rec.gl_date = FND_API.G_MISS_DATE THEN
483: x_complete_rec.gl_date := NULL;
484: END IF;
485: IF p_claim_history_rec.gl_date IS NULL THEN
486: x_complete_rec.gl_date := l_claim_history_rec.gl_date;
484: END IF;
485: IF p_claim_history_rec.gl_date IS NULL THEN
486: x_complete_rec.gl_date := l_claim_history_rec.gl_date;
487: END IF;
488: IF p_claim_history_rec.payment_method = FND_API.G_MISS_CHAR THEN
489: x_complete_rec.payment_method := NULL;
490: END IF;
491: IF p_claim_history_rec.payment_method IS NULL THEN
492: x_complete_rec.payment_method := l_claim_history_rec.payment_method;
490: END IF;
491: IF p_claim_history_rec.payment_method IS NULL THEN
492: x_complete_rec.payment_method := l_claim_history_rec.payment_method;
493: END IF;
494: IF p_claim_history_rec.voucher_id = FND_API.G_MISS_NUM THEN
495: x_complete_rec.voucher_id := NULL;
496: END IF;
497: IF p_claim_history_rec.voucher_id IS NULL THEN
498: x_complete_rec.voucher_id := l_claim_history_rec.voucher_id;
496: END IF;
497: IF p_claim_history_rec.voucher_id IS NULL THEN
498: x_complete_rec.voucher_id := l_claim_history_rec.voucher_id;
499: END IF;
500: IF p_claim_history_rec.voucher_number = FND_API.G_MISS_CHAR THEN
501: x_complete_rec.voucher_number := NULL;
502: END IF;
503: IF p_claim_history_rec.voucher_number IS NULL THEN
504: x_complete_rec.voucher_number := l_claim_history_rec.voucher_number;
502: END IF;
503: IF p_claim_history_rec.voucher_number IS NULL THEN
504: x_complete_rec.voucher_number := l_claim_history_rec.voucher_number;
505: END IF;
506: IF p_claim_history_rec.payment_reference_id = FND_API.G_MISS_NUM THEN
507: x_complete_rec.payment_reference_id := NULL;
508: END IF;
509: IF p_claim_history_rec.payment_reference_id IS NULL THEN
510: x_complete_rec.payment_reference_id := l_claim_history_rec.payment_reference_id;
508: END IF;
509: IF p_claim_history_rec.payment_reference_id IS NULL THEN
510: x_complete_rec.payment_reference_id := l_claim_history_rec.payment_reference_id;
511: END IF;
512: IF p_claim_history_rec.payment_reference_number = FND_API.G_MISS_CHAR THEN
513: x_complete_rec.payment_reference_number := NULL;
514: END IF;
515: IF p_claim_history_rec.payment_reference_number IS NULL THEN
516: x_complete_rec.payment_reference_number := l_claim_history_rec.payment_reference_number;
514: END IF;
515: IF p_claim_history_rec.payment_reference_number IS NULL THEN
516: x_complete_rec.payment_reference_number := l_claim_history_rec.payment_reference_number;
517: END IF;
518: IF p_claim_history_rec.payment_reference_date = FND_API.G_MISS_DATE THEN
519: x_complete_rec.payment_reference_date := NULL;
520: END IF;
521: IF p_claim_history_rec.payment_reference_date IS NULL THEN
522: x_complete_rec.payment_reference_date := l_claim_history_rec.payment_reference_date;
520: END IF;
521: IF p_claim_history_rec.payment_reference_date IS NULL THEN
522: x_complete_rec.payment_reference_date := l_claim_history_rec.payment_reference_date;
523: END IF;
524: IF p_claim_history_rec.payment_status = FND_API.G_MISS_CHAR THEN
525: x_complete_rec.payment_status := NULL;
526: END IF;
527: IF p_claim_history_rec.payment_status IS NULL THEN
528: x_complete_rec.payment_status := l_claim_history_rec.payment_status;
526: END IF;
527: IF p_claim_history_rec.payment_status IS NULL THEN
528: x_complete_rec.payment_status := l_claim_history_rec.payment_status;
529: END IF;
530: IF p_claim_history_rec.approved_flag = FND_API.G_MISS_CHAR THEN
531: x_complete_rec.approved_flag := NULL;
532: END IF;
533: IF p_claim_history_rec.approved_flag IS NULL THEN
534: x_complete_rec.approved_flag := l_claim_history_rec.approved_flag;
532: END IF;
533: IF p_claim_history_rec.approved_flag IS NULL THEN
534: x_complete_rec.approved_flag := l_claim_history_rec.approved_flag;
535: END IF;
536: IF p_claim_history_rec.approved_date = FND_API.G_MISS_DATE THEN
537: x_complete_rec.approved_date := NULL;
538: END IF;
539: IF p_claim_history_rec.approved_date IS NULL THEN
540: x_complete_rec.approved_date := l_claim_history_rec.approved_date;
538: END IF;
539: IF p_claim_history_rec.approved_date IS NULL THEN
540: x_complete_rec.approved_date := l_claim_history_rec.approved_date;
541: END IF;
542: IF p_claim_history_rec.approved_by = FND_API.G_MISS_NUM THEN
543: x_complete_rec.approved_by := NULL;
544: END IF;
545: IF p_claim_history_rec.approved_by IS NULL THEN
546: x_complete_rec.approved_by := l_claim_history_rec.approved_by;
544: END IF;
545: IF p_claim_history_rec.approved_by IS NULL THEN
546: x_complete_rec.approved_by := l_claim_history_rec.approved_by;
547: END IF;
548: IF p_claim_history_rec.settled_date = FND_API.G_MISS_DATE THEN
549: x_complete_rec.settled_date := NULL;
550: END IF;
551: IF p_claim_history_rec.settled_date IS NULL THEN
552: x_complete_rec.settled_date := l_claim_history_rec.settled_date;
550: END IF;
551: IF p_claim_history_rec.settled_date IS NULL THEN
552: x_complete_rec.settled_date := l_claim_history_rec.settled_date;
553: END IF;
554: IF p_claim_history_rec.settled_by = FND_API.G_MISS_NUM THEN
555: x_complete_rec.settled_by := NULL;
556: END IF;
557: IF p_claim_history_rec.settled_by IS NULL THEN
558: x_complete_rec.settled_by := l_claim_history_rec.settled_by;
556: END IF;
557: IF p_claim_history_rec.settled_by IS NULL THEN
558: x_complete_rec.settled_by := l_claim_history_rec.settled_by;
559: END IF;
560: IF p_claim_history_rec.effective_date = FND_API.G_MISS_DATE THEN
561: x_complete_rec.effective_date := NULL;
562: END IF;
563: IF p_claim_history_rec.effective_date IS NULL THEN
564: x_complete_rec.effective_date := l_claim_history_rec.effective_date;
562: END IF;
563: IF p_claim_history_rec.effective_date IS NULL THEN
564: x_complete_rec.effective_date := l_claim_history_rec.effective_date;
565: END IF;
566: IF p_claim_history_rec.custom_setup_id = FND_API.G_MISS_NUM THEN
567: x_complete_rec.custom_setup_id := NULL;
568: END IF;
569: IF p_claim_history_rec.custom_setup_id IS NULL THEN
570: x_complete_rec.custom_setup_id := l_claim_history_rec.custom_setup_id;
568: END IF;
569: IF p_claim_history_rec.custom_setup_id IS NULL THEN
570: x_complete_rec.custom_setup_id := l_claim_history_rec.custom_setup_id;
571: END IF;
572: IF p_claim_history_rec.task_id = FND_API.G_MISS_NUM THEN
573: x_complete_rec.task_id := NULL;
574: END IF;
575: IF p_claim_history_rec.task_id IS NULL THEN
576: x_complete_rec.task_id := l_claim_history_rec.task_id;
574: END IF;
575: IF p_claim_history_rec.task_id IS NULL THEN
576: x_complete_rec.task_id := l_claim_history_rec.task_id;
577: END IF;
578: IF p_claim_history_rec.country_id = FND_API.G_MISS_NUM THEN
579: x_complete_rec.country_id := NULL;
580: END IF;
581: IF p_claim_history_rec.country_id IS NULL THEN
582: x_complete_rec.country_id := l_claim_history_rec.country_id;
580: END IF;
581: IF p_claim_history_rec.country_id IS NULL THEN
582: x_complete_rec.country_id := l_claim_history_rec.country_id;
583: END IF;
584: IF p_claim_history_rec.order_type_id = FND_API.G_MISS_NUM THEN
585: x_complete_rec.order_type_id := NULL;
586: END IF;
587: IF p_claim_history_rec.order_type_id IS NULL THEN
588: x_complete_rec.order_type_id := l_claim_history_rec.order_type_id;
586: END IF;
587: IF p_claim_history_rec.order_type_id IS NULL THEN
588: x_complete_rec.order_type_id := l_claim_history_rec.order_type_id;
589: END IF;
590: IF p_claim_history_rec.comments = FND_API.G_MISS_CHAR THEN
591: x_complete_rec.comments := NULL;
592: END IF;
593: IF p_claim_history_rec.comments IS NULL THEN
594: x_complete_rec.comments := l_claim_history_rec.comments;
592: END IF;
593: IF p_claim_history_rec.comments IS NULL THEN
594: x_complete_rec.comments := l_claim_history_rec.comments;
595: END IF;
596: IF p_claim_history_rec.task_source_object_id = FND_API.G_MISS_NUM THEN
597: x_complete_rec.task_source_object_id := NULL;
598: END IF;
599: IF p_claim_history_rec.task_source_object_id IS NULL THEN
600: x_complete_rec.task_source_object_id := l_claim_history_rec.task_source_object_id;
598: END IF;
599: IF p_claim_history_rec.task_source_object_id IS NULL THEN
600: x_complete_rec.task_source_object_id := l_claim_history_rec.task_source_object_id;
601: END IF;
602: IF p_claim_history_rec.task_source_object_type_code = FND_API.G_MISS_CHAR THEN
603: x_complete_rec.task_source_object_type_code := NULL;
604: END IF;
605: IF p_claim_history_rec.task_source_object_type_code IS NULL THEN
606: x_complete_rec.task_source_object_type_code := l_claim_history_rec.task_source_object_type_code;
604: END IF;
605: IF p_claim_history_rec.task_source_object_type_code IS NULL THEN
606: x_complete_rec.task_source_object_type_code := l_claim_history_rec.task_source_object_type_code;
607: END IF;
608: IF p_claim_history_rec.attribute_category = FND_API.G_MISS_CHAR THEN
609: x_complete_rec.attribute_category := NULL;
610: END IF;
611: IF p_claim_history_rec.attribute_category IS NULL THEN
612: x_complete_rec.attribute_category := l_claim_history_rec.attribute_category;
610: END IF;
611: IF p_claim_history_rec.attribute_category IS NULL THEN
612: x_complete_rec.attribute_category := l_claim_history_rec.attribute_category;
613: END IF;
614: IF p_claim_history_rec.attribute1 = FND_API.G_MISS_CHAR THEN
615: x_complete_rec.attribute1 := NULL;
616: END IF;
617: IF p_claim_history_rec.attribute1 IS NULL THEN
618: x_complete_rec.attribute1 := l_claim_history_rec.attribute1;
616: END IF;
617: IF p_claim_history_rec.attribute1 IS NULL THEN
618: x_complete_rec.attribute1 := l_claim_history_rec.attribute1;
619: END IF;
620: IF p_claim_history_rec.attribute2 = FND_API.G_MISS_CHAR THEN
621: x_complete_rec.attribute2 := NULL;
622: END IF;
623: IF p_claim_history_rec.attribute2 IS NULL THEN
624: x_complete_rec.attribute2 := l_claim_history_rec.attribute2;
622: END IF;
623: IF p_claim_history_rec.attribute2 IS NULL THEN
624: x_complete_rec.attribute2 := l_claim_history_rec.attribute2;
625: END IF;
626: IF p_claim_history_rec.attribute3 = FND_API.G_MISS_CHAR THEN
627: x_complete_rec.attribute3 := NULL;
628: END IF;
629: IF p_claim_history_rec.attribute3 IS NULL THEN
630: x_complete_rec.attribute3 := l_claim_history_rec.attribute3;
628: END IF;
629: IF p_claim_history_rec.attribute3 IS NULL THEN
630: x_complete_rec.attribute3 := l_claim_history_rec.attribute3;
631: END IF;
632: IF p_claim_history_rec.attribute4 = FND_API.G_MISS_CHAR THEN
633: x_complete_rec.attribute4 := NULL;
634: END IF;
635: IF p_claim_history_rec.attribute4 IS NULL THEN
636: x_complete_rec.attribute4 := l_claim_history_rec.attribute4;
634: END IF;
635: IF p_claim_history_rec.attribute4 IS NULL THEN
636: x_complete_rec.attribute4 := l_claim_history_rec.attribute4;
637: END IF;
638: IF p_claim_history_rec.attribute5 = FND_API.G_MISS_CHAR THEN
639: x_complete_rec.attribute5 := NULL;
640: END IF;
641: IF p_claim_history_rec.attribute5 IS NULL THEN
642: x_complete_rec.attribute5 := l_claim_history_rec.attribute5;
640: END IF;
641: IF p_claim_history_rec.attribute5 IS NULL THEN
642: x_complete_rec.attribute5 := l_claim_history_rec.attribute5;
643: END IF;
644: IF p_claim_history_rec.attribute6 = FND_API.G_MISS_CHAR THEN
645: x_complete_rec.attribute6 := NULL;
646: END IF;
647: IF p_claim_history_rec.attribute6 IS NULL THEN
648: x_complete_rec.attribute6 := l_claim_history_rec.attribute6;
646: END IF;
647: IF p_claim_history_rec.attribute6 IS NULL THEN
648: x_complete_rec.attribute6 := l_claim_history_rec.attribute6;
649: END IF;
650: IF p_claim_history_rec.attribute7 = FND_API.G_MISS_CHAR THEN
651: x_complete_rec.attribute7 := NULL;
652: END IF;
653: IF p_claim_history_rec.attribute7 IS NULL THEN
654: x_complete_rec.attribute7 := l_claim_history_rec.attribute7;
652: END IF;
653: IF p_claim_history_rec.attribute7 IS NULL THEN
654: x_complete_rec.attribute7 := l_claim_history_rec.attribute7;
655: END IF;
656: IF p_claim_history_rec.attribute8 = FND_API.G_MISS_CHAR THEN
657: x_complete_rec.attribute8 := NULL;
658: END IF;
659: IF p_claim_history_rec.attribute8 IS NULL THEN
660: x_complete_rec.attribute8 := l_claim_history_rec.attribute8;
658: END IF;
659: IF p_claim_history_rec.attribute8 IS NULL THEN
660: x_complete_rec.attribute8 := l_claim_history_rec.attribute8;
661: END IF;
662: IF p_claim_history_rec.attribute9 = FND_API.G_MISS_CHAR THEN
663: x_complete_rec.attribute9 := NULL;
664: END IF;
665: IF p_claim_history_rec.attribute9 IS NULL THEN
666: x_complete_rec.attribute9 := l_claim_history_rec.attribute9;
664: END IF;
665: IF p_claim_history_rec.attribute9 IS NULL THEN
666: x_complete_rec.attribute9 := l_claim_history_rec.attribute9;
667: END IF;
668: IF p_claim_history_rec.attribute10 = FND_API.G_MISS_CHAR THEN
669: x_complete_rec.attribute10 := NULL;
670: END IF;
671: IF p_claim_history_rec.attribute10 IS NULL THEN
672: x_complete_rec.attribute10 := l_claim_history_rec.attribute10;
670: END IF;
671: IF p_claim_history_rec.attribute10 IS NULL THEN
672: x_complete_rec.attribute10 := l_claim_history_rec.attribute10;
673: END IF;
674: IF p_claim_history_rec.attribute11 = FND_API.G_MISS_CHAR THEN
675: x_complete_rec.attribute11 := NULL;
676: END IF;
677: IF p_claim_history_rec.attribute11 IS NULL THEN
678: x_complete_rec.attribute11 := l_claim_history_rec.attribute11;
676: END IF;
677: IF p_claim_history_rec.attribute11 IS NULL THEN
678: x_complete_rec.attribute11 := l_claim_history_rec.attribute11;
679: END IF;
680: IF p_claim_history_rec.attribute12 = FND_API.G_MISS_CHAR THEN
681: x_complete_rec.attribute12 := NULL;
682: END IF;
683: IF p_claim_history_rec.attribute12 IS NULL THEN
684: x_complete_rec.attribute12 := l_claim_history_rec.attribute12;
682: END IF;
683: IF p_claim_history_rec.attribute12 IS NULL THEN
684: x_complete_rec.attribute12 := l_claim_history_rec.attribute12;
685: END IF;
686: IF p_claim_history_rec.attribute13 = FND_API.G_MISS_CHAR THEN
687: x_complete_rec.attribute13 := NULL;
688: END IF;
689: IF p_claim_history_rec.attribute13 IS NULL THEN
690: x_complete_rec.attribute13 := l_claim_history_rec.attribute13;
688: END IF;
689: IF p_claim_history_rec.attribute13 IS NULL THEN
690: x_complete_rec.attribute13 := l_claim_history_rec.attribute13;
691: END IF;
692: IF p_claim_history_rec.attribute14 = FND_API.G_MISS_CHAR THEN
693: x_complete_rec.attribute14 := NULL;
694: END IF;
695: IF p_claim_history_rec.attribute14 IS NULL THEN
696: x_complete_rec.attribute14 := l_claim_history_rec.attribute14;
694: END IF;
695: IF p_claim_history_rec.attribute14 IS NULL THEN
696: x_complete_rec.attribute14 := l_claim_history_rec.attribute14;
697: END IF;
698: IF p_claim_history_rec.attribute15 = FND_API.G_MISS_CHAR THEN
699: x_complete_rec.attribute15 := NULL;
700: END IF;
701: IF p_claim_history_rec.attribute15 IS NULL THEN
702: x_complete_rec.attribute15 := l_claim_history_rec.attribute15;
700: END IF;
701: IF p_claim_history_rec.attribute15 IS NULL THEN
702: x_complete_rec.attribute15 := l_claim_history_rec.attribute15;
703: END IF;
704: IF p_claim_history_rec.deduction_attribute_category = FND_API.G_MISS_CHAR THEN
705: x_complete_rec.deduction_attribute_category := NULL;
706: END IF;
707: IF p_claim_history_rec.deduction_attribute_category IS NULL THEN
708: x_complete_rec.deduction_attribute_category := l_claim_history_rec.deduction_attribute_category;
706: END IF;
707: IF p_claim_history_rec.deduction_attribute_category IS NULL THEN
708: x_complete_rec.deduction_attribute_category := l_claim_history_rec.deduction_attribute_category;
709: END IF;
710: IF p_claim_history_rec.deduction_attribute1 = FND_API.G_MISS_CHAR THEN
711: x_complete_rec.deduction_attribute1 := NULL;
712: END IF;
713: IF p_claim_history_rec.deduction_attribute1 IS NULL THEN
714: x_complete_rec.deduction_attribute1 := l_claim_history_rec.deduction_attribute1;
712: END IF;
713: IF p_claim_history_rec.deduction_attribute1 IS NULL THEN
714: x_complete_rec.deduction_attribute1 := l_claim_history_rec.deduction_attribute1;
715: END IF;
716: IF p_claim_history_rec.deduction_attribute2 = FND_API.G_MISS_CHAR THEN
717: x_complete_rec.deduction_attribute2 := NULL;
718: END IF;
719: IF p_claim_history_rec.deduction_attribute2 IS NULL THEN
720: x_complete_rec.deduction_attribute2 := l_claim_history_rec.deduction_attribute2;
718: END IF;
719: IF p_claim_history_rec.deduction_attribute2 IS NULL THEN
720: x_complete_rec.deduction_attribute2 := l_claim_history_rec.deduction_attribute2;
721: END IF;
722: IF p_claim_history_rec.deduction_attribute3 = FND_API.G_MISS_CHAR THEN
723: x_complete_rec.deduction_attribute3 := NULL;
724: END IF;
725: IF p_claim_history_rec.deduction_attribute3 IS NULL THEN
726: x_complete_rec.deduction_attribute3 := l_claim_history_rec.deduction_attribute3;
724: END IF;
725: IF p_claim_history_rec.deduction_attribute3 IS NULL THEN
726: x_complete_rec.deduction_attribute3 := l_claim_history_rec.deduction_attribute3;
727: END IF;
728: IF p_claim_history_rec.deduction_attribute4 = FND_API.G_MISS_CHAR THEN
729: x_complete_rec.deduction_attribute4 := NULL;
730: END IF;
731: IF p_claim_history_rec.deduction_attribute4 IS NULL THEN
732: x_complete_rec.deduction_attribute4 := l_claim_history_rec.deduction_attribute4;
730: END IF;
731: IF p_claim_history_rec.deduction_attribute4 IS NULL THEN
732: x_complete_rec.deduction_attribute4 := l_claim_history_rec.deduction_attribute4;
733: END IF;
734: IF p_claim_history_rec.deduction_attribute5 = FND_API.G_MISS_CHAR THEN
735: x_complete_rec.deduction_attribute5 := NULL;
736: END IF;
737: IF p_claim_history_rec.deduction_attribute5 IS NULL THEN
738: x_complete_rec.deduction_attribute5 := l_claim_history_rec.deduction_attribute5;
736: END IF;
737: IF p_claim_history_rec.deduction_attribute5 IS NULL THEN
738: x_complete_rec.deduction_attribute5 := l_claim_history_rec.deduction_attribute5;
739: END IF;
740: IF p_claim_history_rec.attribute6 = FND_API.G_MISS_CHAR THEN
741: x_complete_rec.deduction_attribute6 := NULL;
742: END IF;
743: IF p_claim_history_rec.attribute6 IS NULL THEN
744: x_complete_rec.deduction_attribute6 := l_claim_history_rec.deduction_attribute6;
742: END IF;
743: IF p_claim_history_rec.attribute6 IS NULL THEN
744: x_complete_rec.deduction_attribute6 := l_claim_history_rec.deduction_attribute6;
745: END IF;
746: IF p_claim_history_rec.deduction_attribute7 = FND_API.G_MISS_CHAR THEN
747: x_complete_rec.deduction_attribute7 := NULL;
748: END IF;
749: IF p_claim_history_rec.deduction_attribute7 IS NULL THEN
750: x_complete_rec.deduction_attribute7 := l_claim_history_rec.deduction_attribute7;
748: END IF;
749: IF p_claim_history_rec.deduction_attribute7 IS NULL THEN
750: x_complete_rec.deduction_attribute7 := l_claim_history_rec.deduction_attribute7;
751: END IF;
752: IF p_claim_history_rec.deduction_attribute8 = FND_API.G_MISS_CHAR THEN
753: x_complete_rec.deduction_attribute8 := NULL;
754: END IF;
755: IF p_claim_history_rec.deduction_attribute8 IS NULL THEN
756: x_complete_rec.deduction_attribute8 := l_claim_history_rec.deduction_attribute8;
754: END IF;
755: IF p_claim_history_rec.deduction_attribute8 IS NULL THEN
756: x_complete_rec.deduction_attribute8 := l_claim_history_rec.deduction_attribute8;
757: END IF;
758: IF p_claim_history_rec.deduction_attribute9 = FND_API.G_MISS_CHAR THEN
759: x_complete_rec.deduction_attribute9 := NULL;
760: END IF;
761: IF p_claim_history_rec.deduction_attribute9 IS NULL THEN
762: x_complete_rec.deduction_attribute9 := l_claim_history_rec.deduction_attribute9;
760: END IF;
761: IF p_claim_history_rec.deduction_attribute9 IS NULL THEN
762: x_complete_rec.deduction_attribute9 := l_claim_history_rec.deduction_attribute9;
763: END IF;
764: IF p_claim_history_rec.deduction_attribute10 = FND_API.G_MISS_CHAR THEN
765: x_complete_rec.deduction_attribute10 := NULL;
766: END IF;
767: IF p_claim_history_rec.deduction_attribute10 IS NULL THEN
768: x_complete_rec.deduction_attribute10 := l_claim_history_rec.deduction_attribute10;
766: END IF;
767: IF p_claim_history_rec.deduction_attribute10 IS NULL THEN
768: x_complete_rec.deduction_attribute10 := l_claim_history_rec.deduction_attribute10;
769: END IF;
770: IF p_claim_history_rec.deduction_attribute11 = FND_API.G_MISS_CHAR THEN
771: x_complete_rec.deduction_attribute11 := NULL;
772: END IF;
773: IF p_claim_history_rec.deduction_attribute11 IS NULL THEN
774: x_complete_rec.deduction_attribute11 := l_claim_history_rec.deduction_attribute11;
772: END IF;
773: IF p_claim_history_rec.deduction_attribute11 IS NULL THEN
774: x_complete_rec.deduction_attribute11 := l_claim_history_rec.deduction_attribute11;
775: END IF;
776: IF p_claim_history_rec.deduction_attribute12 = FND_API.G_MISS_CHAR THEN
777: x_complete_rec.deduction_attribute12 := NULL;
778: END IF;
779: IF p_claim_history_rec.deduction_attribute12 IS NULL THEN
780: x_complete_rec.deduction_attribute12 := l_claim_history_rec.deduction_attribute12;
778: END IF;
779: IF p_claim_history_rec.deduction_attribute12 IS NULL THEN
780: x_complete_rec.deduction_attribute12 := l_claim_history_rec.deduction_attribute12;
781: END IF;
782: IF p_claim_history_rec.deduction_attribute13 = FND_API.G_MISS_CHAR THEN
783: x_complete_rec.deduction_attribute13 := NULL;
784: END IF;
785: IF p_claim_history_rec.deduction_attribute13 IS NULL THEN
786: x_complete_rec.deduction_attribute13 := l_claim_history_rec.deduction_attribute13;
784: END IF;
785: IF p_claim_history_rec.deduction_attribute13 IS NULL THEN
786: x_complete_rec.deduction_attribute13 := l_claim_history_rec.deduction_attribute13;
787: END IF;
788: IF p_claim_history_rec.deduction_attribute14 = FND_API.G_MISS_CHAR THEN
789: x_complete_rec.deduction_attribute14 := NULL;
790: END IF;
791: IF p_claim_history_rec.deduction_attribute14 IS NULL THEN
792: x_complete_rec.deduction_attribute14 := l_claim_history_rec.deduction_attribute14;
790: END IF;
791: IF p_claim_history_rec.deduction_attribute14 IS NULL THEN
792: x_complete_rec.deduction_attribute14 := l_claim_history_rec.deduction_attribute14;
793: END IF;
794: IF p_claim_history_rec.deduction_attribute15 = FND_API.G_MISS_CHAR THEN
795: x_complete_rec.deduction_attribute15 := NULL;
796: END IF;
797: IF p_claim_history_rec.deduction_attribute15 IS NULL THEN
798: x_complete_rec.deduction_attribute15 := l_claim_history_rec.deduction_attribute15;
796: END IF;
797: IF p_claim_history_rec.deduction_attribute15 IS NULL THEN
798: x_complete_rec.deduction_attribute15 := l_claim_history_rec.deduction_attribute15;
799: END IF;
800: IF p_claim_history_rec.org_id = FND_API.G_MISS_NUM THEN
801: x_complete_rec.org_id := NULL;
802: END IF;
803: IF p_claim_history_rec.org_id IS NULL THEN
804: x_complete_rec.org_id := l_claim_history_rec.org_id;
803: IF p_claim_history_rec.org_id IS NULL THEN
804: x_complete_rec.org_id := l_claim_history_rec.org_id;
805: END IF;
806:
807: IF p_claim_history_rec.write_off_flag = FND_API.G_MISS_CHAR THEN
808: x_complete_rec.write_off_flag := NULL;
809: END IF;
810: IF p_claim_history_rec.write_off_flag IS NULL THEN
811: x_complete_rec.write_off_flag := l_claim_history_rec.write_off_flag;
810: IF p_claim_history_rec.write_off_flag IS NULL THEN
811: x_complete_rec.write_off_flag := l_claim_history_rec.write_off_flag;
812: END IF;
813:
814: IF p_claim_history_rec.write_off_threshold_amount = FND_API.G_MISS_NUM THEN
815: x_complete_rec.write_off_threshold_amount := NULL;
816: END IF;
817: IF p_claim_history_rec.write_off_threshold_amount IS NULL THEN
818: x_complete_rec.write_off_threshold_amount := l_claim_history_rec.write_off_threshold_amount;
817: IF p_claim_history_rec.write_off_threshold_amount IS NULL THEN
818: x_complete_rec.write_off_threshold_amount := l_claim_history_rec.write_off_threshold_amount;
819: END IF;
820:
821: IF p_claim_history_rec.under_write_off_threshold = FND_API.G_MISS_CHAR THEN
822: x_complete_rec.under_write_off_threshold := NULL;
823: END IF;
824: IF p_claim_history_rec.under_write_off_threshold IS NULL THEN
825: x_complete_rec.under_write_off_threshold := l_claim_history_rec.under_write_off_threshold;
824: IF p_claim_history_rec.under_write_off_threshold IS NULL THEN
825: x_complete_rec.under_write_off_threshold := l_claim_history_rec.under_write_off_threshold;
826: END IF;
827:
828: IF p_claim_history_rec.customer_reason = FND_API.G_MISS_CHAR THEN
829: x_complete_rec.customer_reason := NULL;
830: END IF;
831: IF p_claim_history_rec.customer_reason IS NULL THEN
832: x_complete_rec.customer_reason := l_claim_history_rec.customer_reason;
831: IF p_claim_history_rec.customer_reason IS NULL THEN
832: x_complete_rec.customer_reason := l_claim_history_rec.customer_reason;
833: END IF;
834:
835: IF p_claim_history_rec.ship_to_cust_account_id = FND_API.G_MISS_NUM THEN
836: x_complete_rec.ship_to_cust_account_id := NULL;
837: END IF;
838: IF p_claim_history_rec.ship_to_cust_account_id IS NULL THEN
839: x_complete_rec.ship_to_cust_account_id := l_claim_history_rec.ship_to_cust_account_id;
839: x_complete_rec.ship_to_cust_account_id := l_claim_history_rec.ship_to_cust_account_id;
840: END IF;
841:
842: -- Start Bug:2781186
843: IF p_claim_history_rec.amount_applied = FND_API.G_MISS_NUM THEN
844: x_complete_rec.amount_applied := NULL;
845: END IF;
846: IF p_claim_history_rec.amount_applied IS NULL THEN
847: x_complete_rec.amount_applied := l_claim_history_rec.amount_applied;
846: IF p_claim_history_rec.amount_applied IS NULL THEN
847: x_complete_rec.amount_applied := l_claim_history_rec.amount_applied;
848: END IF;
849:
850: IF p_claim_history_rec.applied_receipt_id = FND_API.G_MISS_NUM THEN
851: x_complete_rec.applied_receipt_id := NULL;
852: END IF;
853: IF p_claim_history_rec.applied_receipt_id IS NULL THEN
854: x_complete_rec.applied_receipt_id := l_claim_history_rec.applied_receipt_id;
853: IF p_claim_history_rec.applied_receipt_id IS NULL THEN
854: x_complete_rec.applied_receipt_id := l_claim_history_rec.applied_receipt_id;
855: END IF;
856:
857: IF p_claim_history_rec.applied_receipt_number = FND_API.G_MISS_CHAR THEN
858: x_complete_rec.applied_receipt_number := NULL;
859: END IF;
860: IF p_claim_history_rec.applied_receipt_number IS NULL THEN
861: x_complete_rec.applied_receipt_number := l_claim_history_rec.applied_receipt_number;
860: IF p_claim_history_rec.applied_receipt_number IS NULL THEN
861: x_complete_rec.applied_receipt_number := l_claim_history_rec.applied_receipt_number;
862: END IF;
863:
864: IF p_claim_history_rec.wo_rec_trx_id = FND_API.G_MISS_NUM THEN
865: x_complete_rec.wo_rec_trx_id := NULL;
866: END IF;
867: IF p_claim_history_rec.wo_rec_trx_id IS NULL THEN
868: x_complete_rec.wo_rec_trx_id := l_claim_history_rec.wo_rec_trx_id;
868: x_complete_rec.wo_rec_trx_id := l_claim_history_rec.wo_rec_trx_id;
869: END IF;
870: -- End Bug:2781186
871:
872: IF p_claim_history_rec.group_claim_id = FND_API.G_MISS_NUM THEN
873: x_complete_rec.group_claim_id := NULL;
874: END IF;
875: IF p_claim_history_rec.group_claim_id IS NULL THEN
876: x_complete_rec.group_claim_id := l_claim_history_rec.group_claim_id;
874: END IF;
875: IF p_claim_history_rec.group_claim_id IS NULL THEN
876: x_complete_rec.group_claim_id := l_claim_history_rec.group_claim_id;
877: END IF;
878: IF p_claim_history_rec.appr_wf_item_key = FND_API.G_MISS_CHAR THEN
879: x_complete_rec.appr_wf_item_key := NULL;
880: END IF;
881: IF p_claim_history_rec.appr_wf_item_key IS NULL THEN
882: x_complete_rec.appr_wf_item_key := l_claim_history_rec.appr_wf_item_key;
880: END IF;
881: IF p_claim_history_rec.appr_wf_item_key IS NULL THEN
882: x_complete_rec.appr_wf_item_key := l_claim_history_rec.appr_wf_item_key;
883: END IF;
884: IF p_claim_history_rec.cstl_wf_item_key = FND_API.G_MISS_CHAR THEN
885: x_complete_rec.cstl_wf_item_key := NULL;
886: END IF;
887: IF p_claim_history_rec.cstl_wf_item_key IS NULL THEN
888: x_complete_rec.cstl_wf_item_key := l_claim_history_rec.cstl_wf_item_key;
886: END IF;
887: IF p_claim_history_rec.cstl_wf_item_key IS NULL THEN
888: x_complete_rec.cstl_wf_item_key := l_claim_history_rec.cstl_wf_item_key;
889: END IF;
890: IF p_claim_history_rec.batch_type = FND_API.G_MISS_CHAR THEN
891: x_complete_rec.batch_type := NULL;
892: END IF;
893: IF p_claim_history_rec.batch_type IS NULL THEN
894: x_complete_rec.batch_type := l_claim_history_rec.batch_type;
900: FND_MESSAGE.Set_Token('TEXT',l_api_name||': End');
901: FND_MSG_PUB.Add;
902: END IF;
903: EXCEPTION
904: WHEN FND_API.G_EXC_ERROR THEN
905: x_return_status := FND_API.G_RET_STS_ERROR;
906: WHEN OTHERS THEN
907: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
908: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_HIST_COMPLETE_ERR');
901: FND_MSG_PUB.Add;
902: END IF;
903: EXCEPTION
904: WHEN FND_API.G_EXC_ERROR THEN
905: x_return_status := FND_API.G_RET_STS_ERROR;
906: WHEN OTHERS THEN
907: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
908: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_HIST_COMPLETE_ERR');
909: FND_MSG_PUB.add;
907: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
908: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_HIST_COMPLETE_ERR');
909: FND_MSG_PUB.add;
910: END IF;
911: x_return_status := FND_API.g_ret_sts_unexp_error;
912: END Complete_Claim_History_Rec;
913:
914: ---------------------------------------------------------------------
915: -- PROCEDURE
928: ---------------------------------------------------------------------
929:
930: PROCEDURE Create_Claims_History(
931: p_Api_Version_Number IN NUMBER,
932: p_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
933: p_Commit IN VARCHAR2 := FND_API.G_FALSE,
934: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
935:
936: x_Return_Status OUT NOCOPY VARCHAR2,
929:
930: PROCEDURE Create_Claims_History(
931: p_Api_Version_Number IN NUMBER,
932: p_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
933: p_Commit IN VARCHAR2 := FND_API.G_FALSE,
934: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
935:
936: x_Return_Status OUT NOCOPY VARCHAR2,
937: x_Msg_Count OUT NOCOPY NUMBER,
930: PROCEDURE Create_Claims_History(
931: p_Api_Version_Number IN NUMBER,
932: p_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
933: p_Commit IN VARCHAR2 := FND_API.G_FALSE,
934: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
935:
936: x_Return_Status OUT NOCOPY VARCHAR2,
937: x_Msg_Count OUT NOCOPY NUMBER,
938: x_Msg_Data OUT NOCOPY VARCHAR2,
955: BEGIN
956: -- Standard Start of API savepoint
957: SAVEPOINT CREATE_CLAIMS_HISTORY_PVT;
958: -- Standard call to check for call compatibility.
959: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
960: p_api_version_number,
961: l_api_name,
962: G_PKG_NAME)
963: THEN
960: p_api_version_number,
961: l_api_name,
962: G_PKG_NAME)
963: THEN
964: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
965: END IF;
966:
967: -- Initialize message list if p_init_msg_list is set to TRUE.
968: IF FND_API.to_Boolean( p_init_msg_list )
964: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
965: END IF;
966:
967: -- Initialize message list if p_init_msg_list is set to TRUE.
968: IF FND_API.to_Boolean( p_init_msg_list )
969: THEN
970: FND_MSG_PUB.initialize;
971: END IF;
972:
976: FND_MSG_PUB.Add;
977: END IF;
978:
979: -- Initialize API return status to SUCCESS
980: x_return_status := FND_API.G_RET_STS_SUCCESS;
981:
982: -- ******************************************************************
983: -- Validate Environment
984: -- ******************************************************************
986: IF (FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)) THEN
987: FND_MESSAGE.Set_Name('OZF', 'USER_PROFILE_MISSING');
988: FND_MSG_PUB.ADD;
989: END IF;
990: RAISE FND_API.G_EXC_ERROR;
991: END IF;
992:
993: IF (P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
994:
989: END IF;
990: RAISE FND_API.G_EXC_ERROR;
991: END IF;
992:
993: IF (P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
994:
995: -- Invoke validation procedures
996: Validate_claims_history(
997: p_api_version_number => 1.0,
994:
995: -- Invoke validation procedures
996: Validate_claims_history(
997: p_api_version_number => 1.0,
998: p_init_msg_list => FND_API.G_FALSE,
999: p_validation_level => p_validation_level,
1000: P_CLAIMS_HISTORY_Rec => p_CLAIMS_HISTORY_Rec,
1001: x_return_status => l_return_status,
1002: x_msg_count => l_msg_count,
1002: x_msg_count => l_msg_count,
1003: x_msg_data => l_msg_data
1004: );
1005: END IF;
1006: IF l_return_status = FND_API.g_ret_sts_error THEN
1007: RAISE FND_API.g_exc_error;
1008: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1009: RAISE FND_API.g_exc_unexpected_error;
1010: END IF;
1003: x_msg_data => l_msg_data
1004: );
1005: END IF;
1006: IF l_return_status = FND_API.g_ret_sts_error THEN
1007: RAISE FND_API.g_exc_error;
1008: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1009: RAISE FND_API.g_exc_unexpected_error;
1010: END IF;
1011:
1004: );
1005: END IF;
1006: IF l_return_status = FND_API.g_ret_sts_error THEN
1007: RAISE FND_API.g_exc_error;
1008: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1009: RAISE FND_API.g_exc_unexpected_error;
1010: END IF;
1011:
1012: -- Check whether claim_history_id exists
1005: END IF;
1006: IF l_return_status = FND_API.g_ret_sts_error THEN
1007: RAISE FND_API.g_exc_error;
1008: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1009: RAISE FND_API.g_exc_unexpected_error;
1010: END IF;
1011:
1012: -- Check whether claim_history_id exists
1013: IF (p_claims_history_rec.claim_history_id is NOT NULL AND
1010: END IF;
1011:
1012: -- Check whether claim_history_id exists
1013: IF (p_claims_history_rec.claim_history_id is NOT NULL AND
1014: p_claims_history_rec.claim_history_id <> FND_API.G_MISS_NUM) THEN
1015: l_claim_history_id := p_claims_history_rec.claim_history_id;
1016: END IF;
1017:
1018: l_org_id := p_claims_history_rec.org_id;
1171: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1172: FND_MESSAGE.set_name('OZF', 'OZF_TABLE_HANDLER_ERROR');
1173: FND_MSG_PUB.add;
1174: END IF;
1175: RAISE FND_API.g_exc_error;
1176: END;
1177:
1178: x_claim_history_id := l_claim_history_id;
1179:
1177:
1178: x_claim_history_id := l_claim_history_id;
1179:
1180: -- Standard check for p_commit
1181: IF FND_API.to_Boolean( p_commit ) THEN
1182: COMMIT WORK;
1183: END IF;
1184:
1185: IF OZF_DEBUG_LOW_ON THEN
1194: p_data => x_msg_data
1195: );
1196: EXCEPTION
1197: WHEN OZF_Utility_PVT.resource_locked THEN
1198: x_return_status := FND_API.g_ret_sts_error;
1199: OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
1200: WHEN FND_API.G_EXC_ERROR THEN
1201: ROLLBACK TO CREATE_Claims_History_PVT;
1202: x_return_status := FND_API.G_RET_STS_ERROR;
1196: EXCEPTION
1197: WHEN OZF_Utility_PVT.resource_locked THEN
1198: x_return_status := FND_API.g_ret_sts_error;
1199: OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
1200: WHEN FND_API.G_EXC_ERROR THEN
1201: ROLLBACK TO CREATE_Claims_History_PVT;
1202: x_return_status := FND_API.G_RET_STS_ERROR;
1203: -- Standard call to get message count and if count=1, get the message
1204: FND_MSG_PUB.Count_And_Get (
1198: x_return_status := FND_API.g_ret_sts_error;
1199: OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
1200: WHEN FND_API.G_EXC_ERROR THEN
1201: ROLLBACK TO CREATE_Claims_History_PVT;
1202: x_return_status := FND_API.G_RET_STS_ERROR;
1203: -- Standard call to get message count and if count=1, get the message
1204: FND_MSG_PUB.Count_And_Get (
1205: p_encoded => FND_API.G_FALSE,
1206: p_count => x_msg_count,
1201: ROLLBACK TO CREATE_Claims_History_PVT;
1202: x_return_status := FND_API.G_RET_STS_ERROR;
1203: -- Standard call to get message count and if count=1, get the message
1204: FND_MSG_PUB.Count_And_Get (
1205: p_encoded => FND_API.G_FALSE,
1206: p_count => x_msg_count,
1207: p_data => x_msg_data
1208: );
1209: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1205: p_encoded => FND_API.G_FALSE,
1206: p_count => x_msg_count,
1207: p_data => x_msg_data
1208: );
1209: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1210: ROLLBACK TO CREATE_Claims_History_PVT;
1211: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1212: -- Standard call to get message count and if count=1, get the message
1213: FND_MSG_PUB.Count_And_Get (
1207: p_data => x_msg_data
1208: );
1209: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1210: ROLLBACK TO CREATE_Claims_History_PVT;
1211: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1212: -- Standard call to get message count and if count=1, get the message
1213: FND_MSG_PUB.Count_And_Get (
1214: p_encoded => FND_API.G_FALSE,
1215: p_count => x_msg_count,
1210: ROLLBACK TO CREATE_Claims_History_PVT;
1211: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1212: -- Standard call to get message count and if count=1, get the message
1213: FND_MSG_PUB.Count_And_Get (
1214: p_encoded => FND_API.G_FALSE,
1215: p_count => x_msg_count,
1216: p_data => x_msg_data
1217: );
1218: WHEN OTHERS THEN
1216: p_data => x_msg_data
1217: );
1218: WHEN OTHERS THEN
1219: ROLLBACK TO CREATE_Claims_History_PVT;
1220: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1221: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1222: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1223: END IF;
1224: -- Standard call to get message count and if count=1, get the message
1222: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1223: END IF;
1224: -- Standard call to get message count and if count=1, get the message
1225: FND_MSG_PUB.Count_And_Get (
1226: p_encoded => FND_API.G_FALSE,
1227: p_count => x_msg_count,
1228: p_data => x_msg_data
1229: );
1230: End Create_Claims_History;
1331: x_description => l_event_description
1332: );
1333:
1334: EXCEPTION
1335: WHEN FND_API.G_EXC_ERROR THEN
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: WHEN OTHERS THEN
1332: );
1333:
1334: EXCEPTION
1335: WHEN FND_API.G_EXC_ERROR THEN
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: WHEN OTHERS THEN
1340: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1333:
1334: EXCEPTION
1335: WHEN FND_API.G_EXC_ERROR THEN
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: WHEN OTHERS THEN
1340: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1341: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CRT_HIST_ERR');
1334: EXCEPTION
1335: WHEN FND_API.G_EXC_ERROR THEN
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: WHEN OTHERS THEN
1340: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1341: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CRT_HIST_ERR');
1342: FND_MSG_PUB.add;
1340: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1341: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CRT_HIST_ERR');
1342: FND_MSG_PUB.add;
1343: END IF;
1344: x_return_status := FND_API.g_ret_sts_unexp_error;
1345: END check_create_history;
1346: */
1347:
1348: ---------------------------------------------------------------------
1438: l_api_name varchar2(30):='Check_Create_history';
1439: l_status_changed boolean := false;
1440: BEGIN
1441: -- Initialize API return status to sucess
1442: x_return_status := FND_API.G_RET_STS_SUCCESS;
1443:
1444: IF OZF_DEBUG_LOW_ON THEN
1445: FND_MESSAGE.Set_Name('OZF','OZF_API_DEBUG_MESSAGE');
1446: FND_MESSAGE.Set_Token('TEXT',l_api_name||': Start');
1609: p_column_desc => l_column_info.ak_attribute_code
1610: );
1611: l_return := TRUE;
1612: /* ELSIF l_column_info.db_column_name = 'STATUS_CODE' AND
1613: (p_claim.status_code <> FND_API.G_MISS_CHAR AND p_claim.status_code <> l_claim_rec.status_code)THEN
1614: l_history_event := G_CHANGE_EVENT;
1615: change_description (
1616: px_description => l_event_description,
1617: p_column_desc => l_column_info.ak_attribute_code
1617: p_column_desc => l_column_info.ak_attribute_code
1618: );
1619: l_return := TRUE;
1620: ELSIF l_column_info.db_column_name = 'USER_STATUS_ID' AND
1621: ((p_claim.user_status_id <> FND_API.G_MISS_NUM AND p_claim.user_status_id is not null)
1622: AND p_claim.user_status_id <> l_claim_rec.user_status_id) AND
1623: l_status_changed = false THEN
1624: l_history_event := G_CHANGE_EVENT;
1625: change_description (
1628: );
1629: l_status_changed := true;
1630: l_return := TRUE;*/
1631: ELSIF l_column_info.db_column_name = 'CUST_ACCOUNT_ID' AND
1632: ((p_claim.cust_account_id <> FND_API.G_MISS_NUM AND p_claim.cust_account_id is not null)
1633: AND p_claim.cust_account_id <> l_claim_rec.cust_account_id) THEN
1634: l_history_event := G_CHANGE_EVENT;
1635: change_description (
1636: px_description => l_event_description,
1692: p_column_desc => l_column_info.ak_attribute_code
1693: );
1694: l_return := TRUE;
1695: ELSIF l_column_info.db_column_name = 'AMOUNT' AND
1696: ((p_claim.amount <>FND_API.G_MISS_NUM AND p_claim.amount is not null)
1697: AND p_claim.amount <> l_claim_rec.amount)
1698: AND l_amount_rule = false
1699: THEN
1700: l_history_event := G_CHANGE_EVENT;
1704: );
1705: l_amount_rule := TRUE;
1706: l_return := TRUE;
1707: ELSIF l_column_info.db_column_name = 'CURRENCY_CODE' AND l_currency_code_rule = false
1708: AND ((p_claim.currency_code <> FND_API.G_MISS_CHAR AND p_claim.currency_code is not null )
1709: AND p_claim.currency_code <> l_claim_rec.currency_code) THEN
1710: l_history_event := G_CHANGE_EVENT;
1711: change_description (
1712: px_description => l_event_description,
1917: FND_MSG_PUB.Add;
1918: END IF;
1919:
1920: EXCEPTION
1921: WHEN FND_API.G_EXC_ERROR THEN
1922: x_return_status := FND_API.G_RET_STS_ERROR;
1923: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1925: WHEN OTHERS THEN
1918: END IF;
1919:
1920: EXCEPTION
1921: WHEN FND_API.G_EXC_ERROR THEN
1922: x_return_status := FND_API.G_RET_STS_ERROR;
1923: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1925: WHEN OTHERS THEN
1926: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1919:
1920: EXCEPTION
1921: WHEN FND_API.G_EXC_ERROR THEN
1922: x_return_status := FND_API.G_RET_STS_ERROR;
1923: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1925: WHEN OTHERS THEN
1926: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1927: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CREATE_HIST_ERR');
1920: EXCEPTION
1921: WHEN FND_API.G_EXC_ERROR THEN
1922: x_return_status := FND_API.G_RET_STS_ERROR;
1923: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1925: WHEN OTHERS THEN
1926: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1927: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CREATE_HIST_ERR');
1928: FND_MSG_PUB.add;
1926: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1927: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CHK_CREATE_HIST_ERR');
1928: FND_MSG_PUB.add;
1929: END IF;
1930: x_return_status := FND_API.g_ret_sts_unexp_error;
1931: END check_create_history;
1932:
1933: ---------------------------------------------------------------------
1934: -- PROCEDURE
2014: l_history_event_desc varchar2(60);
2015:
2016: BEGIN
2017: -- Initialize API return status to sucess
2018: x_return_status := FND_API.G_RET_STS_SUCCESS;
2019:
2020: IF OZF_DEBUG_LOW_ON THEN
2021: FND_MESSAGE.Set_Name('OZF','OZF_API_DEBUG_MESSAGE');
2022: FND_MESSAGE.Set_Token('TEXT',l_api_name||': Start');
2187:
2188:
2189: OZF_claims_history_PVT.Create_claims_history(
2190: P_Api_Version_Number => 1.0,
2191: P_Init_Msg_List => FND_API.G_FALSE,
2192: P_Commit => FND_API.G_FALSE,
2193: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2194: X_Return_Status => l_return_status,
2195: X_Msg_Count => l_msg_count,
2188:
2189: OZF_claims_history_PVT.Create_claims_history(
2190: P_Api_Version_Number => 1.0,
2191: P_Init_Msg_List => FND_API.G_FALSE,
2192: P_Commit => FND_API.G_FALSE,
2193: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2194: X_Return_Status => l_return_status,
2195: X_Msg_Count => l_msg_count,
2196: X_Msg_Data => l_msg_data,
2189: OZF_claims_history_PVT.Create_claims_history(
2190: P_Api_Version_Number => 1.0,
2191: P_Init_Msg_List => FND_API.G_FALSE,
2192: P_Commit => FND_API.G_FALSE,
2193: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2194: X_Return_Status => l_return_status,
2195: X_Msg_Count => l_msg_count,
2196: X_Msg_Data => l_msg_data,
2197: P_CLAIMS_HISTORY_Rec => l_CLAIMS_HISTORY_Rec,
2197: P_CLAIMS_HISTORY_Rec => l_CLAIMS_HISTORY_Rec,
2198: X_CLAIM_HISTORY_ID => l_CLAIM_HISTORY_ID
2199: );
2200:
2201: IF l_return_status = FND_API.g_ret_sts_error THEN
2202: RAISE FND_API.g_exc_error;
2203: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2204: RAISE FND_API.g_exc_unexpected_error;
2205: END IF;
2198: X_CLAIM_HISTORY_ID => l_CLAIM_HISTORY_ID
2199: );
2200:
2201: IF l_return_status = FND_API.g_ret_sts_error THEN
2202: RAISE FND_API.g_exc_error;
2203: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2204: RAISE FND_API.g_exc_unexpected_error;
2205: END IF;
2206:
2199: );
2200:
2201: IF l_return_status = FND_API.g_ret_sts_error THEN
2202: RAISE FND_API.g_exc_error;
2203: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2204: RAISE FND_API.g_exc_unexpected_error;
2205: END IF;
2206:
2207: -- update the history related columns for the claim
2200:
2201: IF l_return_status = FND_API.g_ret_sts_error THEN
2202: RAISE FND_API.g_exc_error;
2203: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2204: RAISE FND_API.g_exc_unexpected_error;
2205: END IF;
2206:
2207: -- update the history related columns for the claim
2208: UPDATE ozf_claims_all
2297:
2298:
2299: OZF_claim_line_hist_PVT.Create_claim_line_hist(
2300: P_Api_Version_Number => 1.0,
2301: P_Init_Msg_List => FND_API.G_FALSE,
2302: P_Commit => FND_API.G_FALSE,
2303: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2304: X_Return_Status => l_return_status,
2305: X_Msg_Count => l_msg_count,
2298:
2299: OZF_claim_line_hist_PVT.Create_claim_line_hist(
2300: P_Api_Version_Number => 1.0,
2301: P_Init_Msg_List => FND_API.G_FALSE,
2302: P_Commit => FND_API.G_FALSE,
2303: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2304: X_Return_Status => l_return_status,
2305: X_Msg_Count => l_msg_count,
2306: X_Msg_Data => l_msg_data,
2299: OZF_claim_line_hist_PVT.Create_claim_line_hist(
2300: P_Api_Version_Number => 1.0,
2301: P_Init_Msg_List => FND_API.G_FALSE,
2302: P_Commit => FND_API.G_FALSE,
2303: P_Validation_Level => FND_API.G_VALID_LEVEL_FULL,
2304: X_Return_Status => l_return_status,
2305: X_Msg_Count => l_msg_count,
2306: X_Msg_Data => l_msg_data,
2307: P_CLAIM_LINE_HIST_Rec => l_CLAIM_LINES_HIST_Rec,
2306: X_Msg_Data => l_msg_data,
2307: P_CLAIM_LINE_HIST_Rec => l_CLAIM_LINES_HIST_Rec,
2308: X_CLAIM_LINE_HISTORY_ID => l_CLAIM_LINE_HISTORY_ID
2309: );
2310: IF l_return_status = FND_API.g_ret_sts_error THEN
2311: RAISE FND_API.g_exc_error;
2312: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2313: RAISE FND_API.g_exc_unexpected_error;
2314: END IF;
2307: P_CLAIM_LINE_HIST_Rec => l_CLAIM_LINES_HIST_Rec,
2308: X_CLAIM_LINE_HISTORY_ID => l_CLAIM_LINE_HISTORY_ID
2309: );
2310: IF l_return_status = FND_API.g_ret_sts_error THEN
2311: RAISE FND_API.g_exc_error;
2312: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2313: RAISE FND_API.g_exc_unexpected_error;
2314: END IF;
2315:
2308: X_CLAIM_LINE_HISTORY_ID => l_CLAIM_LINE_HISTORY_ID
2309: );
2310: IF l_return_status = FND_API.g_ret_sts_error THEN
2311: RAISE FND_API.g_exc_error;
2312: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2313: RAISE FND_API.g_exc_unexpected_error;
2314: END IF;
2315:
2316: END LOOP;
2309: );
2310: IF l_return_status = FND_API.g_ret_sts_error THEN
2311: RAISE FND_API.g_exc_error;
2312: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2313: RAISE FND_API.g_exc_unexpected_error;
2314: END IF;
2315:
2316: END LOOP;
2317: x_claim_history_id := l_claim_history_id;
2321: FND_MESSAGE.Set_Token('TEXT',l_api_name||': End');
2322: FND_MSG_PUB.Add;
2323: END IF;
2324: EXCEPTION
2325: WHEN FND_API.G_EXC_ERROR THEN
2326: x_return_status := FND_API.G_RET_STS_ERROR;
2327: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2328: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2329: WHEN OTHERS THEN
2322: FND_MSG_PUB.Add;
2323: END IF;
2324: EXCEPTION
2325: WHEN FND_API.G_EXC_ERROR THEN
2326: x_return_status := FND_API.G_RET_STS_ERROR;
2327: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2328: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2329: WHEN OTHERS THEN
2330: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2323: END IF;
2324: EXCEPTION
2325: WHEN FND_API.G_EXC_ERROR THEN
2326: x_return_status := FND_API.G_RET_STS_ERROR;
2327: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2328: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2329: WHEN OTHERS THEN
2330: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2331: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CREATE_HIST_ERR');
2324: EXCEPTION
2325: WHEN FND_API.G_EXC_ERROR THEN
2326: x_return_status := FND_API.G_RET_STS_ERROR;
2327: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2328: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2329: WHEN OTHERS THEN
2330: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2331: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CREATE_HIST_ERR');
2332: FND_MSG_PUB.add;
2330: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2331: FND_MESSAGE.set_name('OZF', 'OZF_CLAIM_CREATE_HIST_ERR');
2332: FND_MSG_PUB.add;
2333: END IF;
2334: x_return_status := FND_API.g_ret_sts_unexp_error;
2335: END create_history;
2336:
2337: ---------------------------------------------------------------------
2338: -- PROCEDURE
2349: --
2350: ---------------------------------------------------------------------
2351: PROCEDURE Delete_claims_history(
2352: P_Api_Version_Number IN NUMBER,
2353: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2354: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2355: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2356: X_Return_Status OUT NOCOPY VARCHAR2,
2357: X_Msg_Count OUT NOCOPY NUMBER,
2350: ---------------------------------------------------------------------
2351: PROCEDURE Delete_claims_history(
2352: P_Api_Version_Number IN NUMBER,
2353: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2354: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2355: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2356: X_Return_Status OUT NOCOPY VARCHAR2,
2357: X_Msg_Count OUT NOCOPY NUMBER,
2358: X_Msg_Data OUT NOCOPY VARCHAR2,
2351: PROCEDURE Delete_claims_history(
2352: P_Api_Version_Number IN NUMBER,
2353: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2354: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2355: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2356: X_Return_Status OUT NOCOPY VARCHAR2,
2357: X_Msg_Count OUT NOCOPY NUMBER,
2358: X_Msg_Data OUT NOCOPY VARCHAR2,
2359: P_CLAIM_HISTORY_ID IN NUMBER,
2374: -- Standard Start of API savepoint
2375: SAVEPOINT DELETE_CLAIMS_HISTORY_PVT;
2376:
2377: -- Standard call to check for call compatibility.
2378: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2379: p_api_version_number,
2380: l_api_name,
2381: G_PKG_NAME)
2382: THEN
2379: p_api_version_number,
2380: l_api_name,
2381: G_PKG_NAME)
2382: THEN
2383: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2384: END IF;
2385:
2386: -- Initialize message list if p_init_msg_list is set to TRUE.
2387: IF FND_API.to_Boolean( p_init_msg_list )
2383: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2384: END IF;
2385:
2386: -- Initialize message list if p_init_msg_list is set to TRUE.
2387: IF FND_API.to_Boolean( p_init_msg_list )
2388: THEN
2389: FND_MSG_PUB.initialize;
2390: END IF;
2391:
2389: FND_MSG_PUB.initialize;
2390: END IF;
2391:
2392: -- Initialize API return status to SUCCESS
2393: x_return_status := FND_API.G_RET_STS_SUCCESS;
2394:
2395: --
2396: -- Api body
2397: --
2416: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2417: FND_MESSAGE.set_name('OZF', 'OZF_API_RECORD_NOT_FOUND');
2418: FND_MSG_PUB.add;
2419: END IF;
2420: RAISE FND_API.g_exc_error;
2421: END;
2422: ELSE
2423: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
2424: FND_MESSAGE.set_name('OZF', 'OZF_API_RESOURCE_LOCKED');
2423: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
2424: FND_MESSAGE.set_name('OZF', 'OZF_API_RESOURCE_LOCKED');
2425: FND_MSG_PUB.add;
2426: END IF;
2427: RAISE FND_API.g_exc_error;
2428: END IF;
2429:
2430: --
2431: -- End of API body
2431: -- End of API body
2432: --
2433:
2434: -- Standard check for p_commit
2435: IF FND_API.to_Boolean( p_commit )
2436: THEN
2437: COMMIT WORK;
2438: END IF;
2439:
2449: (p_count => x_msg_count,
2450: p_data => x_msg_data
2451: );
2452: EXCEPTION
2453: WHEN FND_API.G_EXC_ERROR THEN
2454: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2455: x_return_status := FND_API.G_RET_STS_ERROR;
2456: -- Standard call to get message count and if count=1, get the message
2457: FND_MSG_PUB.Count_And_Get (
2451: );
2452: EXCEPTION
2453: WHEN FND_API.G_EXC_ERROR THEN
2454: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2455: x_return_status := FND_API.G_RET_STS_ERROR;
2456: -- Standard call to get message count and if count=1, get the message
2457: FND_MSG_PUB.Count_And_Get (
2458: p_encoded => FND_API.G_FALSE,
2459: p_count => x_msg_count,
2454: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2455: x_return_status := FND_API.G_RET_STS_ERROR;
2456: -- Standard call to get message count and if count=1, get the message
2457: FND_MSG_PUB.Count_And_Get (
2458: p_encoded => FND_API.G_FALSE,
2459: p_count => x_msg_count,
2460: p_data => x_msg_data
2461: );
2462: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2458: p_encoded => FND_API.G_FALSE,
2459: p_count => x_msg_count,
2460: p_data => x_msg_data
2461: );
2462: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2463: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2465: -- Standard call to get message count and if count=1, get the message
2466: FND_MSG_PUB.Count_And_Get (
2460: p_data => x_msg_data
2461: );
2462: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2463: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2465: -- Standard call to get message count and if count=1, get the message
2466: FND_MSG_PUB.Count_And_Get (
2467: p_encoded => FND_API.G_FALSE,
2468: p_count => x_msg_count,
2463: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2464: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2465: -- Standard call to get message count and if count=1, get the message
2466: FND_MSG_PUB.Count_And_Get (
2467: p_encoded => FND_API.G_FALSE,
2468: p_count => x_msg_count,
2469: p_data => x_msg_data
2470: );
2471: WHEN OTHERS THEN
2469: p_data => x_msg_data
2470: );
2471: WHEN OTHERS THEN
2472: ROLLBACK TO DELETE_CLAIMS_HISTORY_PVT;
2473: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2474: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2475: THEN
2476: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2477: END IF;
2476: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2477: END IF;
2478: -- Standard call to get message count and if count=1, get the message
2479: FND_MSG_PUB.Count_And_Get (
2480: p_encoded => FND_API.G_FALSE,
2481: p_count => x_msg_count,
2482: p_data => x_msg_data
2483: );
2484: End Delete_claims_history;
2498: --
2499: ---------------------------------------------------------------------
2500: PROCEDURE Update_Claims_History(
2501: P_Api_Version_Number IN NUMBER,
2502: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2503: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2504: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2505:
2506: X_Return_Status OUT NOCOPY VARCHAR2,
2499: ---------------------------------------------------------------------
2500: PROCEDURE Update_Claims_History(
2501: P_Api_Version_Number IN NUMBER,
2502: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2503: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2504: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2505:
2506: X_Return_Status OUT NOCOPY VARCHAR2,
2507: X_Msg_Count OUT NOCOPY NUMBER,
2500: PROCEDURE Update_Claims_History(
2501: P_Api_Version_Number IN NUMBER,
2502: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2503: P_Commit IN VARCHAR2 := FND_API.G_FALSE,
2504: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2505:
2506: X_Return_Status OUT NOCOPY VARCHAR2,
2507: X_Msg_Count OUT NOCOPY NUMBER,
2508: X_Msg_Data OUT NOCOPY VARCHAR2,
2529: -- Standard Start of API savepoint
2530: SAVEPOINT UPDATE_CLAIMS_HISTORY_PVT;
2531:
2532: -- Standard call to check for call compatibility.
2533: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2534: p_api_version_number,
2535: l_api_name,
2536: G_PKG_NAME)
2537: THEN
2534: p_api_version_number,
2535: l_api_name,
2536: G_PKG_NAME)
2537: THEN
2538: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2539: END IF;
2540:
2541: -- Initialize message list if p_init_msg_list is set to TRUE.
2542: IF FND_API.to_Boolean( p_init_msg_list )
2538: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2539: END IF;
2540:
2541: -- Initialize message list if p_init_msg_list is set to TRUE.
2542: IF FND_API.to_Boolean( p_init_msg_list )
2543: THEN
2544: FND_MSG_PUB.initialize;
2545: END IF;
2546:
2551: FND_MSG_PUB.Add;
2552: END IF;
2553:
2554: -- Initialize API return status to SUCCESS
2555: x_return_status := FND_API.G_RET_STS_SUCCESS;
2556:
2557: If (P_CLAIMS_HISTORY_Rec.object_version_number is NULL or
2558: P_CLAIMS_HISTORY_Rec.object_version_number = FND_API.G_MISS_NUM ) Then
2559: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
2554: -- Initialize API return status to SUCCESS
2555: x_return_status := FND_API.G_RET_STS_SUCCESS;
2556:
2557: If (P_CLAIMS_HISTORY_Rec.object_version_number is NULL or
2558: P_CLAIMS_HISTORY_Rec.object_version_number = FND_API.G_MISS_NUM ) Then
2559: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
2560: FND_MESSAGE.Set_Name('OZF', 'OZF_API_NO_OBJ_VER_NUM');
2561: FND_MSG_PUB.ADD;
2562: END IF;
2559: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
2560: FND_MESSAGE.Set_Name('OZF', 'OZF_API_NO_OBJ_VER_NUM');
2561: FND_MSG_PUB.ADD;
2562: END IF;
2563: raise FND_API.G_EXC_ERROR;
2564: End if;
2565:
2566: -- Check Whether record has been changed by someone else
2567: OPEN object_version_number_csr(P_CLAIMS_HISTORY_Rec.claim_history_id);
2572: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
2573: FND_MESSAGE.Set_Name('OZF', 'OZF_API_RESOURCE_LOCKED');
2574: FND_MSG_PUB.ADD;
2575: END IF;
2576: RAISE FND_API.G_EXC_ERROR;
2577: END IF;
2578:
2579: Complete_Claim_History_Rec (
2580: p_claim_history_rec => p_claims_history_rec
2581: ,x_complete_rec => l_claims_history_rec
2582: ,x_return_status => l_return_status
2583: );
2584:
2585: IF l_return_status = FND_API.g_ret_sts_error THEN
2586: RAISE FND_API.g_exc_error;
2587: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2588: RAISE FND_API.g_exc_unexpected_error;
2589: END IF;
2582: ,x_return_status => l_return_status
2583: );
2584:
2585: IF l_return_status = FND_API.g_ret_sts_error THEN
2586: RAISE FND_API.g_exc_error;
2587: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2588: RAISE FND_API.g_exc_unexpected_error;
2589: END IF;
2590:
2583: );
2584:
2585: IF l_return_status = FND_API.g_ret_sts_error THEN
2586: RAISE FND_API.g_exc_error;
2587: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2588: RAISE FND_API.g_exc_unexpected_error;
2589: END IF;
2590:
2591: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
2584:
2585: IF l_return_status = FND_API.g_ret_sts_error THEN
2586: RAISE FND_API.g_exc_error;
2587: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2588: RAISE FND_API.g_exc_unexpected_error;
2589: END IF;
2590:
2591: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
2592:
2587: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
2588: RAISE FND_API.g_exc_unexpected_error;
2589: END IF;
2590:
2591: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
2592:
2593: -- Invoke validation procedures
2594: Validate_claims_history(
2595: p_api_version_number => 1.0,
2592:
2593: -- Invoke validation procedures
2594: Validate_claims_history(
2595: p_api_version_number => 1.0,
2596: p_init_msg_list => FND_API.G_FALSE,
2597: p_validation_level => p_validation_level,
2598: P_CLAIMS_HISTORY_Rec => l_CLAIMS_HISTORY_Rec,
2599: x_return_status => x_return_status,
2600: x_msg_count => x_msg_count,
2598: P_CLAIMS_HISTORY_Rec => l_CLAIMS_HISTORY_Rec,
2599: x_return_status => x_return_status,
2600: x_msg_count => x_msg_count,
2601: x_msg_data => x_msg_data);
2602: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
2603: RAISE FND_API.G_EXC_ERROR;
2604: END IF;
2605: END IF;
2606:
2599: x_return_status => x_return_status,
2600: x_msg_count => x_msg_count,
2601: x_msg_data => x_msg_data);
2602: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
2603: RAISE FND_API.G_EXC_ERROR;
2604: END IF;
2605: END IF;
2606:
2607:
2756: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2757: FND_MESSAGE.set_name('OZF', 'OZF_TABLE_HANDLER_ERROR');
2758: FND_MSG_PUB.add;
2759: END IF;
2760: RAISE FND_API.g_exc_error;
2761: END;
2762:
2763: -- Standard check for p_commit
2764: IF FND_API.to_Boolean( p_commit )
2760: RAISE FND_API.g_exc_error;
2761: END;
2762:
2763: -- Standard check for p_commit
2764: IF FND_API.to_Boolean( p_commit )
2765: THEN
2766: COMMIT WORK;
2767: END IF;
2768:
2779: (p_count => x_msg_count,
2780: p_data => x_msg_data
2781: );
2782: EXCEPTION
2783: WHEN FND_API.G_EXC_ERROR THEN
2784: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2785: x_return_status := FND_API.G_RET_STS_ERROR;
2786: -- Standard call to get message count and if count=1, get the message
2787: FND_MSG_PUB.Count_And_Get (
2781: );
2782: EXCEPTION
2783: WHEN FND_API.G_EXC_ERROR THEN
2784: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2785: x_return_status := FND_API.G_RET_STS_ERROR;
2786: -- Standard call to get message count and if count=1, get the message
2787: FND_MSG_PUB.Count_And_Get (
2788: p_encoded => FND_API.G_FALSE,
2789: p_count => x_msg_count,
2784: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2785: x_return_status := FND_API.G_RET_STS_ERROR;
2786: -- Standard call to get message count and if count=1, get the message
2787: FND_MSG_PUB.Count_And_Get (
2788: p_encoded => FND_API.G_FALSE,
2789: p_count => x_msg_count,
2790: p_data => x_msg_data
2791: );
2792: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2788: p_encoded => FND_API.G_FALSE,
2789: p_count => x_msg_count,
2790: p_data => x_msg_data
2791: );
2792: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2793: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2794: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2795: -- Standard call to get message count and if count=1, get the message
2796: FND_MSG_PUB.Count_And_Get (
2790: p_data => x_msg_data
2791: );
2792: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2793: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2794: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2795: -- Standard call to get message count and if count=1, get the message
2796: FND_MSG_PUB.Count_And_Get (
2797: p_encoded => FND_API.G_FALSE,
2798: p_count => x_msg_count,
2793: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2794: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2795: -- Standard call to get message count and if count=1, get the message
2796: FND_MSG_PUB.Count_And_Get (
2797: p_encoded => FND_API.G_FALSE,
2798: p_count => x_msg_count,
2799: p_data => x_msg_data
2800: );
2801: WHEN OTHERS THEN
2799: p_data => x_msg_data
2800: );
2801: WHEN OTHERS THEN
2802: ROLLBACK TO UPDATE_CLAIMS_HISTORY_PVT;
2803: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2804: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2805: THEN
2806: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2807: END IF;
2806: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2807: END IF;
2808: -- Standard call to get message count and if count=1, get the message
2809: FND_MSG_PUB.Count_And_Get (
2810: p_encoded => FND_API.G_FALSE,
2811: p_count => x_msg_count,
2812: p_data => x_msg_data
2813: );
2814: End Update_claims_history;
2828: --
2829: ---------------------------------------------------------------------
2830: PROCEDURE Validate_claims_history(
2831: P_Api_Version_Number IN NUMBER,
2832: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2833: P_Validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2834: P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type,
2835: X_Return_Status OUT NOCOPY VARCHAR2,
2836: X_Msg_Count OUT NOCOPY NUMBER,
2829: ---------------------------------------------------------------------
2830: PROCEDURE Validate_claims_history(
2831: P_Api_Version_Number IN NUMBER,
2832: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2833: P_Validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2834: P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type,
2835: X_Return_Status OUT NOCOPY VARCHAR2,
2836: X_Msg_Count OUT NOCOPY NUMBER,
2837: X_Msg_Data OUT NOCOPY VARCHAR2
2845: -- Standard Start of API savepoint
2846: SAVEPOINT VALIDATE_CLAIMS_HISTORY_PVT;
2847:
2848: -- Standard call to check for call compatibility.
2849: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2850: p_api_version_number,
2851: l_api_name,
2852: G_PKG_NAME)
2853: THEN
2850: p_api_version_number,
2851: l_api_name,
2852: G_PKG_NAME)
2853: THEN
2854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2855: END IF;
2856:
2857: -- Initialize message list if p_init_msg_list is set to TRUE.
2858: IF FND_API.to_Boolean( p_init_msg_list )
2854: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2855: END IF;
2856:
2857: -- Initialize message list if p_init_msg_list is set to TRUE.
2858: IF FND_API.to_Boolean( p_init_msg_list )
2859: THEN
2860: FND_MSG_PUB.initialize;
2861: END IF;
2862:
2869: FND_MSG_PUB.Add;
2870: END IF;
2871:
2872: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
2873: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2874: RAISE FND_API.G_EXC_ERROR;
2875: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2876: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2877: END IF;
2870: END IF;
2871:
2872: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
2873: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2874: RAISE FND_API.G_EXC_ERROR;
2875: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2876: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2877: END IF;
2878: END IF;
2871:
2872: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
2873: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2874: RAISE FND_API.G_EXC_ERROR;
2875: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2876: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2877: END IF;
2878: END IF;
2879:
2872: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
2873: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2874: RAISE FND_API.G_EXC_ERROR;
2875: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2876: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2877: END IF;
2878: END IF;
2879:
2880: -- Initialize API return status to SUCCESS
2877: END IF;
2878: END IF;
2879:
2880: -- Initialize API return status to SUCCESS
2881: x_return_status := FND_API.G_RET_STS_SUCCESS;
2882:
2883: -- Debug Message
2884: IF OZF_DEBUG_LOW_ON THEN
2885: FND_MESSAGE.Set_Name('OZF','OZF_API_DEBUG_MESSAGE');
2892: (p_count => x_msg_count,
2893: p_data => x_msg_data
2894: );
2895: EXCEPTION
2896: WHEN FND_API.G_EXC_ERROR THEN
2897: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2898: x_return_status := FND_API.G_RET_STS_ERROR;
2899: -- Standard call to get message count and if count=1, get the message
2900: FND_MSG_PUB.Count_And_Get (
2894: );
2895: EXCEPTION
2896: WHEN FND_API.G_EXC_ERROR THEN
2897: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2898: x_return_status := FND_API.G_RET_STS_ERROR;
2899: -- Standard call to get message count and if count=1, get the message
2900: FND_MSG_PUB.Count_And_Get (
2901: p_encoded => FND_API.G_FALSE,
2902: p_count => x_msg_count,
2897: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2898: x_return_status := FND_API.G_RET_STS_ERROR;
2899: -- Standard call to get message count and if count=1, get the message
2900: FND_MSG_PUB.Count_And_Get (
2901: p_encoded => FND_API.G_FALSE,
2902: p_count => x_msg_count,
2903: p_data => x_msg_data
2904: );
2905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2901: p_encoded => FND_API.G_FALSE,
2902: p_count => x_msg_count,
2903: p_data => x_msg_data
2904: );
2905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2906: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2908: -- Standard call to get message count and if count=1, get the message
2909: FND_MSG_PUB.Count_And_Get (
2903: p_data => x_msg_data
2904: );
2905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2906: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2908: -- Standard call to get message count and if count=1, get the message
2909: FND_MSG_PUB.Count_And_Get (
2910: p_encoded => FND_API.G_FALSE,
2911: p_count => x_msg_count,
2906: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2908: -- Standard call to get message count and if count=1, get the message
2909: FND_MSG_PUB.Count_And_Get (
2910: p_encoded => FND_API.G_FALSE,
2911: p_count => x_msg_count,
2912: p_data => x_msg_data
2913: );
2914: WHEN OTHERS THEN
2912: p_data => x_msg_data
2913: );
2914: WHEN OTHERS THEN
2915: ROLLBACK TO VALIDATE_CLAIMS_HISTORY_PVT;
2916: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2917: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2918: THEN
2919: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2920: END IF;
2919: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2920: END IF;
2921: -- Standard call to get message count and if count=1, get the message
2922: FND_MSG_PUB.Count_And_Get (
2923: p_encoded => FND_API.G_FALSE,
2924: p_count => x_msg_count,
2925: p_data => x_msg_data
2926: );
2927: End Validate_claims_history;