52: BEGIN
53: -- Standard Start of API savepoint
54: SAVEPOINT CREATE_ESTIMATE_HEADER_PUB;
55: -- Standard call to check for call compatibility.
56: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
57: p_api_version,
58: l_api_name,
59: G_PKG_NAME)
60: THEN
57: p_api_version,
58: l_api_name,
59: G_PKG_NAME)
60: THEN
61: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
62: END IF;
63: -- Initialize message list if p_init_msg_list is set to TRUE.
64: IF Fnd_Api.to_Boolean(p_init_msg_list)
65: THEN
60: THEN
61: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
62: END IF;
63: -- Initialize message list if p_init_msg_list is set to TRUE.
64: IF Fnd_Api.to_Boolean(p_init_msg_list)
65: THEN
66: Fnd_Msg_Pub.initialize;
67: END IF;
68: -- Initialize API return status to success
65: THEN
66: Fnd_Msg_Pub.initialize;
67: END IF;
68: -- Initialize API return status to success
69: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
70: --
71: -- API body
72: --
73: Csd_Repair_Estimate_Pvt.Create_estimate_header(P_Api_Version => 1.0,
71: -- API body
72: --
73: Csd_Repair_Estimate_Pvt.Create_estimate_header(P_Api_Version => 1.0,
74: P_Init_Msg_List => p_init_msg_list,
75: P_Commit => Fnd_Api.G_FALSE,
76: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
77: X_Return_Status => x_return_status,
78: X_Msg_Count => x_msg_count,
79: X_Msg_Data => x_msg_data,
72: --
73: Csd_Repair_Estimate_Pvt.Create_estimate_header(P_Api_Version => 1.0,
74: P_Init_Msg_List => p_init_msg_list,
75: P_Commit => Fnd_Api.G_FALSE,
76: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
77: X_Return_Status => x_return_status,
78: X_Msg_Count => x_msg_count,
79: X_Msg_Data => x_msg_data,
80: p_estimate_hdr_rec => p_estimate_hdr_rec,
80: p_estimate_hdr_rec => p_estimate_hdr_rec,
81: x_estimate_hdr_id => x_estimate_hdr_id);
82: --
83: -- Check return status from the above procedure call
84: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
85: THEN
86: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
87: RETURN;
88: END IF;
89: --
90: -- End of API body.
91: --
92: -- Standard check for p_commit
93: IF Fnd_Api.to_Boolean(p_commit)
94: THEN
95: COMMIT WORK;
96: END IF;
97: -- Standard call to get message count and if count is 1, get message info.
98: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
99: p_data => x_msg_data);
100: --
101: EXCEPTION
102: WHEN Fnd_Api.g_exc_error THEN
103: x_return_status := Fnd_Api.g_ret_sts_error;
104: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
105: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
106: p_data => x_msg_data);
99: p_data => x_msg_data);
100: --
101: EXCEPTION
102: WHEN Fnd_Api.g_exc_error THEN
103: x_return_status := Fnd_Api.g_ret_sts_error;
104: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
105: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
106: p_data => x_msg_data);
107:
110: Fnd_Log.STRING(Fnd_Log.level_error,
111: 'csd.plsql.csd_repair_estimate_pub.create_estimate_header',
112: 'EXC_ERROR[' || x_msg_data || ']');
113: END IF;
114: WHEN Fnd_Api.g_exc_unexpected_error THEN
115: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
116: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
117: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
118: p_data => x_msg_data);
111: 'csd.plsql.csd_repair_estimate_pub.create_estimate_header',
112: 'EXC_ERROR[' || x_msg_data || ']');
113: END IF;
114: WHEN Fnd_Api.g_exc_unexpected_error THEN
115: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
116: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
117: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
118: p_data => x_msg_data);
119:
123: 'csd.plsql.csd_repair_estimate_pub.create_estimate_header',
124: 'EXC_UNEXP_ERROR[' || x_msg_data || ']');
125: END IF;
126: WHEN OTHERS THEN
127: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
128: ROLLBACK TO CREATE_ESTIMATE_HEADER_PUB;
129:
130: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
131: THEN
177: BEGIN
178: -- Standard Start of API savepoint
179: SAVEPOINT UPDATE_ESTIMATE_HEADER_PUB;
180: -- Standard call to check for call compatibility.
181: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
182: p_api_version,
183: l_api_name,
184: G_PKG_NAME)
185: THEN
182: p_api_version,
183: l_api_name,
184: G_PKG_NAME)
185: THEN
186: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
187: END IF;
188: -- Initialize message list if p_init_msg_list is set to TRUE.
189: IF Fnd_Api.to_Boolean(p_init_msg_list)
190: THEN
185: THEN
186: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
187: END IF;
188: -- Initialize message list if p_init_msg_list is set to TRUE.
189: IF Fnd_Api.to_Boolean(p_init_msg_list)
190: THEN
191: Fnd_Msg_Pub.initialize;
192: END IF;
193: -- Initialize API return status to success
190: THEN
191: Fnd_Msg_Pub.initialize;
192: END IF;
193: -- Initialize API return status to success
194: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
195: --
196: -- API body
197: --
198: Csd_Repair_Estimate_Pvt.Update_estimate_header(p_api_version => 1.0,
196: -- API body
197: --
198: Csd_Repair_Estimate_Pvt.Update_estimate_header(p_api_version => 1.0,
199: p_init_msg_list => p_init_msg_list,
200: p_commit => Fnd_Api.G_FALSE,
201: p_validation_level => Fnd_Api.G_VALID_LEVEL_FULL,
202: x_return_status => x_return_status,
203: x_msg_count => x_msg_count,
204: x_msg_data => x_msg_data,
197: --
198: Csd_Repair_Estimate_Pvt.Update_estimate_header(p_api_version => 1.0,
199: p_init_msg_list => p_init_msg_list,
200: p_commit => Fnd_Api.G_FALSE,
201: p_validation_level => Fnd_Api.G_VALID_LEVEL_FULL,
202: x_return_status => x_return_status,
203: x_msg_count => x_msg_count,
204: x_msg_data => x_msg_data,
205: p_estimate_hdr_rec => p_estimate_hdr_rec,
206: x_object_version_number => x_object_version_number);
207:
208: --
209: -- Check return status from the above procedure call
210: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
211: THEN
212: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
213: RETURN;
214: END IF;
215: --
216: -- End of API body.
217: --
218: -- Standard check for p_commit
219: IF Fnd_Api.to_Boolean(p_commit)
220: THEN
221: COMMIT WORK;
222: END IF;
223: -- Standard call to get message count and if count is 1, get message info.
224: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
225: p_data => x_msg_data);
226: --
227: EXCEPTION
228: WHEN Fnd_Api.g_exc_error THEN
229: x_return_status := Fnd_Api.g_ret_sts_error;
230: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
231: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
232: p_data => x_msg_data);
225: p_data => x_msg_data);
226: --
227: EXCEPTION
228: WHEN Fnd_Api.g_exc_error THEN
229: x_return_status := Fnd_Api.g_ret_sts_error;
230: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
231: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
232: p_data => x_msg_data);
233:
236: Fnd_Log.STRING(Fnd_Log.level_error,
237: 'csd.plsql.csd_repair_estimate_pub.update_estimate_header',
238: 'EXC_ERROR[' || x_msg_data || ']');
239: END IF;
240: WHEN Fnd_Api.g_exc_unexpected_error THEN
241: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
242: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
243: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
244: p_data => x_msg_data);
237: 'csd.plsql.csd_repair_estimate_pub.update_estimate_header',
238: 'EXC_ERROR[' || x_msg_data || ']');
239: END IF;
240: WHEN Fnd_Api.g_exc_unexpected_error THEN
241: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
242: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
243: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
244: p_data => x_msg_data);
245:
249: 'csd.plsql.csd_repair_estimate_pub.update_estimate_header',
250: 'EXC_UNEXP_ERROR[' || x_msg_data || ']');
251: END IF;
252: WHEN OTHERS THEN
253: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
254: ROLLBACK TO UPDATE_ESTIMATE_HEADER_PUB;
255:
256: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
257: THEN
306: BEGIN
307: -- Standard Start of API savepoint
308: SAVEPOINT CREATE_ESTIMATE_LINE_PUB;
309: -- Standard call to check for call compatibility.
310: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
311: p_api_version,
312: l_api_name,
313: G_PKG_NAME)
314: THEN
311: p_api_version,
312: l_api_name,
313: G_PKG_NAME)
314: THEN
315: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
316: END IF;
317: -- Initialize message list if p_init_msg_list is set to TRUE.
318: IF Fnd_Api.to_Boolean(p_init_msg_list)
319: THEN
314: THEN
315: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
316: END IF;
317: -- Initialize message list if p_init_msg_list is set to TRUE.
318: IF Fnd_Api.to_Boolean(p_init_msg_list)
319: THEN
320: Fnd_Msg_Pub.initialize;
321: END IF;
322: -- Initialize API return status to success
319: THEN
320: Fnd_Msg_Pub.initialize;
321: END IF;
322: -- Initialize API return status to success
323: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
324: --
325: -- API body
326: --
327: Csd_Repair_Estimate_Pvt.Create_estimate_Line(P_Api_Version => 1.0,
325: -- API body
326: --
327: Csd_Repair_Estimate_Pvt.Create_estimate_Line(P_Api_Version => 1.0,
328: P_Init_Msg_List => p_init_msg_list,
329: P_Commit => Fnd_Api.G_FALSE,
330: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
331: X_Return_Status => x_return_status,
332: X_Msg_Count => x_msg_count,
333: X_Msg_Data => x_msg_data,
326: --
327: Csd_Repair_Estimate_Pvt.Create_estimate_Line(P_Api_Version => 1.0,
328: P_Init_Msg_List => p_init_msg_list,
329: P_Commit => Fnd_Api.G_FALSE,
330: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
331: X_Return_Status => x_return_status,
332: X_Msg_Count => x_msg_count,
333: X_Msg_Data => x_msg_data,
334: p_estimate_line_rec => p_estimate_line_rec,
334: p_estimate_line_rec => p_estimate_line_rec,
335: x_estimate_line_id => x_estimate_line_id);
336: --
337: -- Check return status from the above procedure call
338: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
339: THEN
340: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
341: RETURN;
342: END IF;
343: --
344: -- End of API body.
345: --
346: -- Standard check for p_commit
347: IF Fnd_Api.to_Boolean(p_commit)
348: THEN
349: COMMIT WORK;
350: END IF;
351: -- Standard call to get message count and if count is 1, get message info.
352: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
353: p_data => x_msg_data);
354: --
355: EXCEPTION
356: WHEN Fnd_Api.g_exc_error THEN
357: x_return_status := Fnd_Api.g_ret_sts_error;
358: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
359: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
360: p_data => x_msg_data);
353: p_data => x_msg_data);
354: --
355: EXCEPTION
356: WHEN Fnd_Api.g_exc_error THEN
357: x_return_status := Fnd_Api.g_ret_sts_error;
358: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
359: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
360: p_data => x_msg_data);
361:
364: Fnd_Log.STRING(Fnd_Log.level_error,
365: 'csd.plsql.csd_repair_estimate_pub.create_estimate_line',
366: 'EXC_ERROR[' || x_msg_data || ']');
367: END IF;
368: WHEN Fnd_Api.g_exc_unexpected_error THEN
369: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
370: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
371: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
372: p_data => x_msg_data);
365: 'csd.plsql.csd_repair_estimate_pub.create_estimate_line',
366: 'EXC_ERROR[' || x_msg_data || ']');
367: END IF;
368: WHEN Fnd_Api.g_exc_unexpected_error THEN
369: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
370: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
371: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
372: p_data => x_msg_data);
373:
377: 'csd.plsql.csd_repair_estimate_pub.create_estimate_line',
378: 'EXC_UNEXP_ERROR[' || x_msg_data || ']');
379: END IF;
380: WHEN OTHERS THEN
381: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
382: ROLLBACK TO CREATE_ESTIMATE_LINE_PUB;
383:
384: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
385: THEN
434: BEGIN
435: -- Standard Start of API savepoint
436: SAVEPOINT UPDATE_ESTIMATE_LINE_PUB;
437: -- Standard call to check for call compatibility.
438: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
439: p_api_version,
440: l_api_name,
441: G_PKG_NAME)
442: THEN
439: p_api_version,
440: l_api_name,
441: G_PKG_NAME)
442: THEN
443: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
444: END IF;
445: -- Initialize message list if p_init_msg_list is set to TRUE.
446: IF Fnd_Api.to_Boolean(p_init_msg_list)
447: THEN
442: THEN
443: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
444: END IF;
445: -- Initialize message list if p_init_msg_list is set to TRUE.
446: IF Fnd_Api.to_Boolean(p_init_msg_list)
447: THEN
448: Fnd_Msg_Pub.initialize;
449: END IF;
450: -- Initialize API return status to success
447: THEN
448: Fnd_Msg_Pub.initialize;
449: END IF;
450: -- Initialize API return status to success
451: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
452: --
453: -- API body
454: --
455: Csd_Repair_Estimate_Pvt.Update_estimate_Line(P_Api_Version => 1.0,
453: -- API body
454: --
455: Csd_Repair_Estimate_Pvt.Update_estimate_Line(P_Api_Version => 1.0,
456: P_Init_Msg_List => p_init_msg_list,
457: P_Commit => Fnd_Api.G_FALSE,
458: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
459: X_Return_Status => x_return_status,
460: X_Msg_Count => x_msg_count,
461: X_Msg_Data => x_msg_data,
454: --
455: Csd_Repair_Estimate_Pvt.Update_estimate_Line(P_Api_Version => 1.0,
456: P_Init_Msg_List => p_init_msg_list,
457: P_Commit => Fnd_Api.G_FALSE,
458: P_Validation_Level => Fnd_Api.G_VALID_LEVEL_FULL,
459: X_Return_Status => x_return_status,
460: X_Msg_Count => x_msg_count,
461: X_Msg_Data => x_msg_data,
462: p_estimate_line_rec => p_estimate_line_rec,
462: p_estimate_line_rec => p_estimate_line_rec,
463: x_object_version_number => x_object_version_number);
464: --
465: -- Check return status from the above procedure call
466: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
467: THEN
468: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
469: RETURN;
470: END IF;
471: --
472: -- End of API body.
473: --
474: -- Standard check for p_commit
475: IF Fnd_Api.to_Boolean(p_commit)
476: THEN
477: COMMIT WORK;
478: END IF;
479: -- Standard call to get message count and if count is 1, get message info.
480: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
481: p_data => x_msg_data);
482: --
483: EXCEPTION
484: WHEN Fnd_Api.g_exc_error THEN
485: x_return_status := Fnd_Api.g_ret_sts_error;
486: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
487: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
488: p_data => x_msg_data);
481: p_data => x_msg_data);
482: --
483: EXCEPTION
484: WHEN Fnd_Api.g_exc_error THEN
485: x_return_status := Fnd_Api.g_ret_sts_error;
486: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
487: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
488: p_data => x_msg_data);
489:
492: Fnd_Log.STRING(Fnd_Log.level_error,
493: 'csd.plsql.csd_repair_estimate_pub.update_estimate_line',
494: 'EXC_ERROR[' || x_msg_data || ']');
495: END IF;
496: WHEN Fnd_Api.g_exc_unexpected_error THEN
497: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
498: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
499: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
500: p_data => x_msg_data);
493: 'csd.plsql.csd_repair_estimate_pub.update_estimate_line',
494: 'EXC_ERROR[' || x_msg_data || ']');
495: END IF;
496: WHEN Fnd_Api.g_exc_unexpected_error THEN
497: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
498: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
499: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
500: p_data => x_msg_data);
501:
505: 'csd.plsql.csd_repair_estimate_pub.update_estimate_line',
506: 'EXC_UNEXP_ERROR[' || x_msg_data || ']');
507: END IF;
508: WHEN OTHERS THEN
509: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
510: ROLLBACK TO UPDATE_ESTIMATE_LINE_PUB;
511:
512: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
513: THEN