DBA Data[Home] [Help]

APPS.CSD_PROCESS_PVT dependencies on FND_API

Line 102: p_commit IN VARCHAR2 := Fnd_Api.g_false,

98: /* service requests */
99: /*--------------------------------------------------*/
100:
101: PROCEDURE process_service_request(p_api_version IN NUMBER,
102: p_commit IN VARCHAR2 := Fnd_Api.g_false,
103: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
104: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
105: p_action IN VARCHAR2,
106: p_incident_id IN NUMBER := NULL,

Line 103: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

99: /*--------------------------------------------------*/
100:
101: PROCEDURE process_service_request(p_api_version IN NUMBER,
102: p_commit IN VARCHAR2 := Fnd_Api.g_false,
103: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
104: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
105: p_action IN VARCHAR2,
106: p_incident_id IN NUMBER := NULL,
107: p_service_request_rec IN Csd_Process_Pvt.SERVICE_REQUEST_REC,

Line 104: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

100:
101: PROCEDURE process_service_request(p_api_version IN NUMBER,
102: p_commit IN VARCHAR2 := Fnd_Api.g_false,
103: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
104: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
105: p_action IN VARCHAR2,
106: p_incident_id IN NUMBER := NULL,
107: p_service_request_rec IN Csd_Process_Pvt.SERVICE_REQUEST_REC,
108: x_incident_id OUT NOCOPY NUMBER,

Line 141: p_commit IN VARCHAR2 := Fnd_Api.g_false,

137: /* service requests */
138: /*--------------------------------------------------*/
139:
140: PROCEDURE process_service_request(p_api_version IN NUMBER,
141: p_commit IN VARCHAR2 := Fnd_Api.g_false,
142: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
143: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
144: p_action IN VARCHAR2,
145: p_incident_id IN NUMBER := NULL,

Line 142: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

138: /*--------------------------------------------------*/
139:
140: PROCEDURE process_service_request(p_api_version IN NUMBER,
141: p_commit IN VARCHAR2 := Fnd_Api.g_false,
142: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
143: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
144: p_action IN VARCHAR2,
145: p_incident_id IN NUMBER := NULL,
146: p_service_request_rec IN Csd_Process_Pvt.SERVICE_REQUEST_REC,

Line 143: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

139:
140: PROCEDURE process_service_request(p_api_version IN NUMBER,
141: p_commit IN VARCHAR2 := Fnd_Api.g_false,
142: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
143: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
144: p_action IN VARCHAR2,
145: p_incident_id IN NUMBER := NULL,
146: p_service_request_rec IN Csd_Process_Pvt.SERVICE_REQUEST_REC,
147: p_notes_tbl IN Cs_Servicerequest_Pub.NOTES_TABLE,

Line 182: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

178: -- Standard Start of API savepoint
179: SAVEPOINT process_service_request;
180:
181: -- Standard call to check for call compatibility.
182: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
183: p_api_version,
184: l_api_name,
185: G_PKG_NAME)
186: THEN

Line 187: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

183: p_api_version,
184: l_api_name,
185: G_PKG_NAME)
186: THEN
187: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
188: END IF;
189:
190: -- Initialize message list if p_init_msg_list is set to TRUE.
191: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 191: IF Fnd_Api.to_Boolean(p_init_msg_list)

187: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
188: END IF;
189:
190: -- Initialize message list if p_init_msg_list is set to TRUE.
191: IF Fnd_Api.to_Boolean(p_init_msg_list)
192: THEN
193: Fnd_Msg_Pub.initialize;
194: END IF;
195:

Line 197: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

193: Fnd_Msg_Pub.initialize;
194: END IF;
195:
196: -- Initialize API return status to success
197: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
198:
199: IF (g_debug > 5)
200: THEN
201: Csd_Gen_Utility_Pvt.ADD('dump_sr_rec');

Line 291: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)

287:
288: Csd_Gen_Utility_Pvt.ADD('GETTING BILL-TO FIELDS');
289: -- Bill-To fields
290: IF (NVL(p_service_request_rec.bill_to_site_use_id,
291: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)
292: THEN
293: OPEN c_party_site_id(p_service_request_rec.bill_to_site_use_id);
294: FETCH c_party_site_id
295: INTO r_service_request_rec.bill_to_site_id;

Line 300: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)

296: CLOSE c_party_site_id;
297: Csd_Gen_Utility_Pvt.ADD('r_service_request_rec.bill_to_site_id ' ||
298: r_service_request_rec.bill_to_site_id);
299: IF (NVL(r_service_request_rec.bill_to_site_id,
300: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)
301: THEN
302: OPEN c_party_id(r_service_request_rec.bill_to_site_id);
303: FETCH c_party_id
304: INTO r_service_request_rec.bill_to_party_id;

Line 314: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)

310:
311: -- Ship-To fields
312: Csd_Gen_Utility_Pvt.ADD('GETTING SHIP-TO FIELDS');
313: IF (NVL(p_service_request_rec.ship_to_site_use_id,
314: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)
315: THEN
316: OPEN c_party_site_id(p_service_request_rec.ship_to_site_use_id);
317: FETCH c_party_site_id
318: INTO r_service_request_rec.ship_to_site_id;

Line 323: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)

319: CLOSE c_party_site_id;
320: Csd_Gen_Utility_Pvt.ADD('r_service_request_rec.ship_to_site_id ' ||
321: r_service_request_rec.ship_to_site_id);
322: IF (NVL(r_service_request_rec.ship_to_site_id,
323: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM)
324: THEN
325: OPEN c_party_id(r_service_request_rec.ship_to_site_id);
326: FETCH c_party_id
327: INTO r_service_request_rec.ship_to_party_id;

Line 338: p_init_msg_list => Fnd_Api.G_FALSE,

334: -- Call to Service Request API
335: IF (UPPER(p_action) = 'CREATE')
336: THEN
337: Cs_Servicerequest_Pub.Create_ServiceRequest(p_api_version => 3.0,
338: p_init_msg_list => Fnd_Api.G_FALSE,
339: p_commit => Fnd_Api.G_FALSE,
340: x_return_status => x_return_status,
341: x_msg_count => x_msg_count,
342: x_msg_data => x_msg_data,

Line 339: p_commit => Fnd_Api.G_FALSE,

335: IF (UPPER(p_action) = 'CREATE')
336: THEN
337: Cs_Servicerequest_Pub.Create_ServiceRequest(p_api_version => 3.0,
338: p_init_msg_list => Fnd_Api.G_FALSE,
339: p_commit => Fnd_Api.G_FALSE,
340: x_return_status => x_return_status,
341: x_msg_count => x_msg_count,
342: x_msg_data => x_msg_data,
343: p_resp_appl_id => NULL,

Line 366: IF Fnd_Api.To_Boolean(p_commit)

362:
363: -- Api body ends here
364:
365: -- Standard check of p_commit.
366: IF Fnd_Api.To_Boolean(p_commit)
367: THEN
368: COMMIT WORK;
369: END IF;
370:

Line 375: WHEN Fnd_Api.G_EXC_ERROR THEN

371: -- Standard call to get message count and IF count is get message info.
372: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
373: p_data => x_msg_data);
374: EXCEPTION
375: WHEN Fnd_Api.G_EXC_ERROR THEN
376: ROLLBACK TO process_service_request;
377: x_return_status := Fnd_Api.G_RET_STS_ERROR;
378: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
379: p_data => x_msg_data);

Line 377: x_return_status := Fnd_Api.G_RET_STS_ERROR;

373: p_data => x_msg_data);
374: EXCEPTION
375: WHEN Fnd_Api.G_EXC_ERROR THEN
376: ROLLBACK TO process_service_request;
377: x_return_status := Fnd_Api.G_RET_STS_ERROR;
378: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
379: p_data => x_msg_data);
380: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
381: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 380: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

376: ROLLBACK TO process_service_request;
377: x_return_status := Fnd_Api.G_RET_STS_ERROR;
378: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
379: p_data => x_msg_data);
380: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
381: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
382: ROLLBACK TO process_service_request;
383: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
384: p_data => x_msg_data);

Line 381: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

377: x_return_status := Fnd_Api.G_RET_STS_ERROR;
378: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
379: p_data => x_msg_data);
380: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
381: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
382: ROLLBACK TO process_service_request;
383: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
384: p_data => x_msg_data);
385: WHEN OTHERS THEN

Line 386: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

382: ROLLBACK TO process_service_request;
383: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
384: p_data => x_msg_data);
385: WHEN OTHERS THEN
386: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
387: ROLLBACK TO process_service_request;
388: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
389: THEN
390: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 404: p_commit IN VARCHAR2 := Fnd_Api.g_false,

400: /* */
401: /*--------------------------------------------------*/
402:
403: PROCEDURE process_charge_lines(p_api_version IN NUMBER,
404: p_commit IN VARCHAR2 := Fnd_Api.g_false,
405: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
406: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
407: p_action IN VARCHAR2,
408: p_Charges_Rec IN Cs_Charge_Details_Pub.Charges_Rec_Type,

Line 405: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

401: /*--------------------------------------------------*/
402:
403: PROCEDURE process_charge_lines(p_api_version IN NUMBER,
404: p_commit IN VARCHAR2 := Fnd_Api.g_false,
405: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
406: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
407: p_action IN VARCHAR2,
408: p_Charges_Rec IN Cs_Charge_Details_Pub.Charges_Rec_Type,
409: x_estimate_detail_id OUT NOCOPY NUMBER,

Line 406: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

402:
403: PROCEDURE process_charge_lines(p_api_version IN NUMBER,
404: p_commit IN VARCHAR2 := Fnd_Api.g_false,
405: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
406: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
407: p_action IN VARCHAR2,
408: p_Charges_Rec IN Cs_Charge_Details_Pub.Charges_Rec_Type,
409: x_estimate_detail_id OUT NOCOPY NUMBER,
410: x_return_status OUT NOCOPY VARCHAR2,

Line 434: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

430: -- Standard Start of API savepoint
431: SAVEPOINT process_charge_lines;
432:
433: -- Standard call to check for call compatibility.
434: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
435: p_api_version,
436: l_api_name,
437: G_PKG_NAME)
438: THEN

Line 439: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

435: p_api_version,
436: l_api_name,
437: G_PKG_NAME)
438: THEN
439: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
440: END IF;
441:
442: -- Initialize message list if p_init_msg_list is set to TRUE.
443: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 443: IF Fnd_Api.to_Boolean(p_init_msg_list)

439: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
440: END IF;
441:
442: -- Initialize message list if p_init_msg_list is set to TRUE.
443: IF Fnd_Api.to_Boolean(p_init_msg_list)
444: THEN
445: Fnd_Msg_Pub.initialize;
446: END IF;
447:

Line 449: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

445: Fnd_Msg_Pub.initialize;
446: END IF;
447:
448: -- Initialize API return status to success
449: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
450:
451: -- Api body starts
452:
453: Debug('Validate the action', l_mod_name, 1);

Line 458: RAISE Fnd_Api.G_EXC_ERROR;

454:
455: -- Validate the action code
456: IF NOT (Csd_Process_Util.VALIDATE_ACTION(p_action, l_api_name))
457: THEN
458: RAISE Fnd_Api.G_EXC_ERROR;
459: END IF;
460:
461: l_charges_rec := p_charges_rec;
462:

Line 470: l_Charges_Rec.invoice_to_org_id <> Fnd_Api.G_MISS_NUM)

466: Service Request level and it would error out if the bill to address selected at product
467: line level is of related party.
468: */
469: IF (l_Charges_Rec.invoice_to_org_id IS NOT NULL AND
470: l_Charges_Rec.invoice_to_org_id <> Fnd_Api.G_MISS_NUM)
471: THEN
472: BEGIN
473: SELECT party_id
474: INTO l_Charges_Rec.bill_to_party_id

Line 480: RAISE Fnd_Api.G_EXC_ERROR;

476: WHERE party_site_id = l_Charges_Rec.invoice_to_org_id;
477: EXCEPTION
478: WHEN NO_DATA_FOUND THEN
479: debug('No Bill to Party Id', l_mod_name, 1);
480: RAISE Fnd_Api.G_EXC_ERROR;
481: WHEN TOO_MANY_ROWS THEN
482: debug('Too many Bill to Party Id', l_mod_name, 1);
483: RAISE Fnd_Api.G_EXC_ERROR;
484: END;

Line 483: RAISE Fnd_Api.G_EXC_ERROR;

479: debug('No Bill to Party Id', l_mod_name, 1);
480: RAISE Fnd_Api.G_EXC_ERROR;
481: WHEN TOO_MANY_ROWS THEN
482: debug('Too many Bill to Party Id', l_mod_name, 1);
483: RAISE Fnd_Api.G_EXC_ERROR;
484: END;
485: END IF;
486:
487: /* Fixed for forward port bug#4214359.

Line 494: l_Charges_Rec.ship_to_org_id <> Fnd_Api.G_MISS_NUM)

490: Service Request level and it would error out if the ship to address selected at product
491: line level is of related party.
492: */
493: IF (l_Charges_Rec.ship_to_org_id IS NOT NULL AND
494: l_Charges_Rec.ship_to_org_id <> Fnd_Api.G_MISS_NUM)
495: THEN
496: BEGIN
497: SELECT party_id
498: INTO l_Charges_Rec.ship_to_party_id

Line 504: RAISE Fnd_Api.G_EXC_ERROR;

500: WHERE party_site_id = l_Charges_Rec.ship_to_org_id;
501: EXCEPTION
502: WHEN NO_DATA_FOUND THEN
503: debug('No Ship to Party Id', l_mod_name, 1);
504: RAISE Fnd_Api.G_EXC_ERROR;
505: WHEN TOO_MANY_ROWS THEN
506: debug('Too many Ship to Party Id', l_mod_name, 1);
507: RAISE Fnd_Api.G_EXC_ERROR;
508: END;

Line 507: RAISE Fnd_Api.G_EXC_ERROR;

503: debug('No Ship to Party Id', l_mod_name, 1);
504: RAISE Fnd_Api.G_EXC_ERROR;
505: WHEN TOO_MANY_ROWS THEN
506: debug('Too many Ship to Party Id', l_mod_name, 1);
507: RAISE Fnd_Api.G_EXC_ERROR;
508: END;
509: END IF;
510:
511: -- Based on the action, call the respective charges public api to

Line 526: p_transaction_control => Fnd_Api.G_TRUE,

522: Cs_Charge_Details_Pub.Create_Charge_Details(p_api_version => p_api_version,
523: p_init_msg_list => p_init_msg_list,
524: p_commit => p_commit,
525: p_validation_level => p_validation_level,
526: p_transaction_control => Fnd_Api.G_TRUE,
527: p_Charges_Rec => l_charges_rec,
528: x_object_version_number => x_object_version_number,
529: x_estimate_detail_id => x_estimate_detail_id,
530: x_line_number => x_line_number,

Line 540: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

536: x_return_status,
537: l_mod_name,
538: 1);
539:
540: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
541: THEN
542: Debug('Create_Charge_Details failed ', l_mod_name, 1);
543: RAISE Fnd_Api.G_EXC_ERROR;
544: END IF;

Line 543: RAISE Fnd_Api.G_EXC_ERROR;

539:
540: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
541: THEN
542: Debug('Create_Charge_Details failed ', l_mod_name, 1);
543: RAISE Fnd_Api.G_EXC_ERROR;
544: END IF;
545:
546: ELSIF p_action = 'UPDATE'
547: THEN

Line 559: IF ((NVL(l_Charges_Rec.business_process_id, Fnd_Api.G_MISS_NUM) =

555: l_Charges_Rec.business_process_id,
556: l_mod_name,
557: 1);
558:
559: IF ((NVL(l_Charges_Rec.business_process_id, Fnd_Api.G_MISS_NUM) =
560: Fnd_Api.G_MISS_NUM) AND
561: l_Charges_Rec.estimate_detail_id IS NOT NULL)
562: THEN
563: BEGIN

Line 560: Fnd_Api.G_MISS_NUM) AND

556: l_mod_name,
557: 1);
558:
559: IF ((NVL(l_Charges_Rec.business_process_id, Fnd_Api.G_MISS_NUM) =
560: Fnd_Api.G_MISS_NUM) AND
561: l_Charges_Rec.estimate_detail_id IS NOT NULL)
562: THEN
563: BEGIN
564: SELECT business_process_id

Line 574: RAISE Fnd_Api.G_EXC_ERROR;

570: WHEN NO_DATA_FOUND THEN
571: Debug('No Business business_process_id',
572: l_mod_name,
573: 1);
574: RAISE Fnd_Api.G_EXC_ERROR;
575: WHEN TOO_MANY_ROWS THEN
576: Debug('Too many business_process_id',
577: l_mod_name,
578: 1);

Line 579: RAISE Fnd_Api.G_EXC_ERROR;

575: WHEN TOO_MANY_ROWS THEN
576: Debug('Too many business_process_id',
577: l_mod_name,
578: 1);
579: RAISE Fnd_Api.G_EXC_ERROR;
580: END;
581: END IF;
582:
583: Debug('l_Charges_Rec.business_process_id=' ||

Line 592: p_transaction_control => Fnd_Api.G_TRUE,

588: Cs_Charge_Details_Pub.Update_Charge_Details(p_api_version => p_api_version,
589: p_init_msg_list => p_init_msg_list,
590: p_commit => p_commit,
591: p_validation_level => p_validation_level,
592: p_transaction_control => Fnd_Api.G_TRUE,
593: p_Charges_Rec => l_Charges_Rec,
594: x_object_version_number => x_object_version_number,
595: x_return_status => x_return_status,
596: x_msg_count => x_msg_count,

Line 604: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

600: x_return_status,
601: l_mod_name,
602: 1);
603:
604: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
605: THEN
606: Debug('update_charge_details failed', l_mod_name, 1);
607: RAISE Fnd_Api.G_EXC_ERROR;
608: END IF;

Line 607: RAISE Fnd_Api.G_EXC_ERROR;

603:
604: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
605: THEN
606: Debug('update_charge_details failed', l_mod_name, 1);
607: RAISE Fnd_Api.G_EXC_ERROR;
608: END IF;
609:
610: ELSIF p_action = 'DELETE'
611: THEN

Line 624: p_transaction_control => Fnd_Api.G_TRUE,

620: Cs_Charge_Details_Pub.Delete_Charge_Details(p_api_version => p_api_version,
621: p_init_msg_list => p_init_msg_list,
622: p_commit => p_commit,
623: p_validation_level => p_validation_level,
624: p_transaction_control => Fnd_Api.G_TRUE,
625: p_estimate_detail_id => l_estimate_detail_id,
626: x_return_status => x_return_status,
627: x_msg_count => x_msg_count,
628: x_msg_data => x_msg_data);

Line 635: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

631: x_return_status,
632: l_mod_name,
633: 1);
634:
635: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
636: THEN
637: Debug('Delete_Charge_Details failed ', l_mod_name, 1);
638: RAISE Fnd_Api.G_EXC_ERROR;
639: END IF;

Line 638: RAISE Fnd_Api.G_EXC_ERROR;

634:
635: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
636: THEN
637: Debug('Delete_Charge_Details failed ', l_mod_name, 1);
638: RAISE Fnd_Api.G_EXC_ERROR;
639: END IF;
640: END IF;
641:
642: -- Api body ends here

Line 645: IF Fnd_Api.To_Boolean(p_commit)

641:
642: -- Api body ends here
643:
644: -- Standard check of p_commit.
645: IF Fnd_Api.To_Boolean(p_commit)
646: THEN
647: COMMIT WORK;
648: END IF;
649:

Line 654: WHEN Fnd_Api.G_EXC_ERROR THEN

650: -- Standard call to get message count and IF count is get message info.
651: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
652: p_data => x_msg_data);
653: EXCEPTION
654: WHEN Fnd_Api.G_EXC_ERROR THEN
655: ROLLBACK TO process_charge_lines;
656: x_return_status := Fnd_Api.G_RET_STS_ERROR;
657: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
658: p_data => x_msg_data);

Line 656: x_return_status := Fnd_Api.G_RET_STS_ERROR;

652: p_data => x_msg_data);
653: EXCEPTION
654: WHEN Fnd_Api.G_EXC_ERROR THEN
655: ROLLBACK TO process_charge_lines;
656: x_return_status := Fnd_Api.G_RET_STS_ERROR;
657: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
658: p_data => x_msg_data);
659: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
660: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 659: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

655: ROLLBACK TO process_charge_lines;
656: x_return_status := Fnd_Api.G_RET_STS_ERROR;
657: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
658: p_data => x_msg_data);
659: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
660: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
661: ROLLBACK TO process_charge_lines;
662: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
663: p_data => x_msg_data);

Line 660: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

656: x_return_status := Fnd_Api.G_RET_STS_ERROR;
657: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
658: p_data => x_msg_data);
659: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
660: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
661: ROLLBACK TO process_charge_lines;
662: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
663: p_data => x_msg_data);
664: WHEN OTHERS THEN

Line 665: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

661: ROLLBACK TO process_charge_lines;
662: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
663: p_data => x_msg_data);
664: WHEN OTHERS THEN
665: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
666: ROLLBACK TO process_charge_lines;
667: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
668: THEN
669: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 682: p_commit IN VARCHAR2 := Fnd_Api.g_false,

678: /* */
679: /*--------------------------------------------------*/
680:
681: PROCEDURE apply_contract(p_api_version IN NUMBER,
682: p_commit IN VARCHAR2 := Fnd_Api.g_false,
683: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
684: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
685: p_incident_id IN NUMBER,
686: x_return_status OUT NOCOPY VARCHAR2,

Line 683: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

679: /*--------------------------------------------------*/
680:
681: PROCEDURE apply_contract(p_api_version IN NUMBER,
682: p_commit IN VARCHAR2 := Fnd_Api.g_false,
683: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
684: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
685: p_incident_id IN NUMBER,
686: x_return_status OUT NOCOPY VARCHAR2,
687: x_msg_count OUT NOCOPY NUMBER,

Line 684: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

680:
681: PROCEDURE apply_contract(p_api_version IN NUMBER,
682: p_commit IN VARCHAR2 := Fnd_Api.g_false,
683: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
684: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
685: p_incident_id IN NUMBER,
686: x_return_status OUT NOCOPY VARCHAR2,
687: x_msg_count OUT NOCOPY NUMBER,
688: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 701: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

697: -- Standard Start of API savepoint
698: SAVEPOINT apply_contract;
699:
700: -- Standard call to check for call compatibility.
701: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
702: p_api_version,
703: l_api_name,
704: G_PKG_NAME)
705: THEN

Line 706: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

702: p_api_version,
703: l_api_name,
704: G_PKG_NAME)
705: THEN
706: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
707: END IF;
708:
709: -- Initialize message list if p_init_msg_list is set to TRUE.
710: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 710: IF Fnd_Api.to_Boolean(p_init_msg_list)

706: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
707: END IF;
708:
709: -- Initialize message list if p_init_msg_list is set to TRUE.
710: IF Fnd_Api.to_Boolean(p_init_msg_list)
711: THEN
712: Fnd_Msg_Pub.initialize;
713: END IF;
714:

Line 716: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

712: Fnd_Msg_Pub.initialize;
713: END IF;
714:
715: -- Initialize API return status to success
716: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
717:
718: -- Api body starts
719: IF (g_debug > 0)
720: THEN

Line 733: RAISE Fnd_Api.G_EXC_ERROR;

729: END IF;
730:
731: IF NOT (Csd_Process_Util.VALIDATE_INCIDENT_ID(p_incident_id))
732: THEN
733: RAISE Fnd_Api.G_EXC_ERROR;
734: END IF;
735:
736: IF (g_debug > 0)
737: THEN

Line 749: IF Fnd_Api.To_Boolean(p_commit)

745:
746: -- Api body ends here
747:
748: -- Standard check of p_commit.
749: IF Fnd_Api.To_Boolean(p_commit)
750: THEN
751: COMMIT WORK;
752: END IF;
753:

Line 758: WHEN Fnd_Api.G_EXC_ERROR THEN

754: -- Standard call to get message count and IF count is get message info.
755: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
756: p_data => x_msg_data);
757: EXCEPTION
758: WHEN Fnd_Api.G_EXC_ERROR THEN
759: ROLLBACK TO apply_contract;
760: x_return_status := Fnd_Api.G_RET_STS_ERROR;
761: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
762: p_data => x_msg_data);

Line 760: x_return_status := Fnd_Api.G_RET_STS_ERROR;

756: p_data => x_msg_data);
757: EXCEPTION
758: WHEN Fnd_Api.G_EXC_ERROR THEN
759: ROLLBACK TO apply_contract;
760: x_return_status := Fnd_Api.G_RET_STS_ERROR;
761: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
762: p_data => x_msg_data);
763: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
764: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 763: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

759: ROLLBACK TO apply_contract;
760: x_return_status := Fnd_Api.G_RET_STS_ERROR;
761: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
762: p_data => x_msg_data);
763: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
764: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
765: ROLLBACK TO apply_contract;
766: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
767: p_data => x_msg_data);

Line 764: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

760: x_return_status := Fnd_Api.G_RET_STS_ERROR;
761: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
762: p_data => x_msg_data);
763: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
764: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
765: ROLLBACK TO apply_contract;
766: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
767: p_data => x_msg_data);
768: WHEN OTHERS THEN

Line 769: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

765: ROLLBACK TO apply_contract;
766: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
767: p_data => x_msg_data);
768: WHEN OTHERS THEN
769: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
770: ROLLBACK TO apply_contract;
771: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
772: THEN
773: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 787: p_commit IN VARCHAR2 := Fnd_Api.g_false,

783: /* */
784: /*--------------------------------------------------*/
785:
786: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
787: p_commit IN VARCHAR2 := Fnd_Api.g_false,
788: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
789: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
790: p_delivery_id IN OUT NOCOPY NUMBER,
791: x_return_status OUT NOCOPY VARCHAR2,

Line 788: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

784: /*--------------------------------------------------*/
785:
786: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
787: p_commit IN VARCHAR2 := Fnd_Api.g_false,
788: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
789: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
790: p_delivery_id IN OUT NOCOPY NUMBER,
791: x_return_status OUT NOCOPY VARCHAR2,
792: x_msg_count OUT NOCOPY NUMBER,

Line 789: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

785:
786: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
787: p_commit IN VARCHAR2 := Fnd_Api.g_false,
788: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
789: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
790: p_delivery_id IN OUT NOCOPY NUMBER,
791: x_return_status OUT NOCOPY VARCHAR2,
792: x_msg_count OUT NOCOPY NUMBER,
793: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 888: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

884: -- Standard Start of API savepoint
885: SAVEPOINT ship_sales_order;
886:
887: -- Standard call to check for call compatibility.
888: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
889: p_api_version,
890: l_api_name,
891: G_PKG_NAME)
892: THEN

Line 893: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

889: p_api_version,
890: l_api_name,
891: G_PKG_NAME)
892: THEN
893: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
894: END IF;
895:
896: -- Initialize message list if p_init_msg_list is set to TRUE.
897: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 897: IF Fnd_Api.to_Boolean(p_init_msg_list)

893: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
894: END IF;
895:
896: -- Initialize message list if p_init_msg_list is set to TRUE.
897: IF Fnd_Api.to_Boolean(p_init_msg_list)
898: THEN
899: Fnd_Msg_Pub.initialize;
900: END IF;
901:

Line 903: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

899: Fnd_Msg_Pub.initialize;
900: END IF;
901:
902: -- Initialize API return status to success
903: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
904:
905: -- Api body starts
906:
907: -- dbms_application_info.set_client_info('204');

Line 923: IF NVL(p_delivery_id, Fnd_Api.G_MISS_NUM) = Fnd_Api.G_MISS_NUM

919: Csd_Gen_Utility_Pvt.ADD('Shipping the Sales Order');
920: Csd_Gen_Utility_Pvt.ADD('p_delivery_id =' || p_delivery_id);
921: END IF;
922:
923: IF NVL(p_delivery_id, Fnd_Api.G_MISS_NUM) = Fnd_Api.G_MISS_NUM
924: THEN
925: Fnd_Message.SET_NAME('CSD', 'CSD_INV_DELIVERY_ID');
926: Fnd_Message.SET_TOKEN('DELIVERY_ID', p_delivery_id);
927: Fnd_Msg_Pub.ADD;

Line 932: RAISE Fnd_Api.G_EXC_ERROR;

928: IF (g_debug > 0)
929: THEN
930: Csd_Gen_Utility_Pvt.ADD('Delivery_id is invalid');
931: END IF;
932: RAISE Fnd_Api.G_EXC_ERROR;
933: ELSE
934:
935: BEGIN
936: SELECT '*'

Line 949: RAISE Fnd_Api.G_EXC_ERROR;

945: IF (g_debug > 0)
946: THEN
947: Csd_Gen_Utility_Pvt.ADD('Delivery_id is invalid');
948: END IF;
949: RAISE Fnd_Api.G_EXC_ERROR;
950: END;
951: END IF;
952:
953: FOR i IN delivery(p_delivery_id)

Line 960: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN

956: -- In case of serial controlled at SO issue item, update the serial number on the
957: -- delivery line details
958: -- This change was made to fix bug 3437177
959:
960: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
961: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
962: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
963: Fnd_Api.G_MISS_CHAR
964: THEN

Line 962: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>

958: -- This change was made to fix bug 3437177
959:
960: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
961: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
962: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
963: Fnd_Api.G_MISS_CHAR
964: THEN
965: BEGIN
966: source_code := 'OE'; -- The only source code that should be used by the API

Line 963: Fnd_Api.G_MISS_CHAR

959:
960: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
961: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
962: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
963: Fnd_Api.G_MISS_CHAR
964: THEN
965: BEGIN
966: source_code := 'OE'; -- The only source code that should be used by the API
967: changed_attributes(1).delivery_detail_id := i.delivery_detail_id;

Line 1027: RAISE Fnd_Api.G_EXC_ERROR;

1023: Fnd_Message.SET_NAME('CSD',
1024: 'CSD_UPDATE_SHIPPING_FAILED');
1025: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
1026: Fnd_Msg_Pub.ADD;
1027: RAISE Fnd_Api.G_EXC_ERROR;
1028: END;
1029:
1030: END IF; --end of update_shipping_attributes
1031:

Line 1133: RAISE Fnd_Api.G_EXC_ERROR;

1129: THEN
1130: Fnd_Message.SET_NAME('CSD', 'CSD_SHIP_CONFIRM_FAILED');
1131: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
1132: Fnd_Msg_Pub.ADD;
1133: RAISE Fnd_Api.G_EXC_ERROR;
1134: END IF;
1135:
1136: END; -- end of delivery action
1137:

Line 1141: IF Fnd_Api.To_Boolean(p_commit)

1137:
1138: -- Api body ends here
1139:
1140: -- Standard check of p_commit.
1141: IF Fnd_Api.To_Boolean(p_commit)
1142: THEN
1143: COMMIT WORK;
1144: END IF;
1145:

Line 1151: WHEN Fnd_Api.G_EXC_ERROR THEN

1147: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1148: p_data => x_msg_data);
1149:
1150: EXCEPTION
1151: WHEN Fnd_Api.G_EXC_ERROR THEN
1152: ROLLBACK TO ship_sales_order;
1153: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1154: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1155: p_data => x_msg_data);

Line 1153: x_return_status := Fnd_Api.G_RET_STS_ERROR;

1149:
1150: EXCEPTION
1151: WHEN Fnd_Api.G_EXC_ERROR THEN
1152: ROLLBACK TO ship_sales_order;
1153: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1154: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1155: p_data => x_msg_data);
1156: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1157: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 1156: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

1152: ROLLBACK TO ship_sales_order;
1153: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1154: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1155: p_data => x_msg_data);
1156: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1157: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1158: ROLLBACK TO ship_sales_order;
1159: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1160: p_data => x_msg_data);

Line 1157: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

1153: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1154: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1155: p_data => x_msg_data);
1156: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1157: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1158: ROLLBACK TO ship_sales_order;
1159: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1160: p_data => x_msg_data);
1161: WHEN OTHERS THEN

Line 1162: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

1158: ROLLBACK TO ship_sales_order;
1159: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1160: p_data => x_msg_data);
1161: WHEN OTHERS THEN
1162: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1163: ROLLBACK TO ship_sales_order;
1164: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
1165: THEN
1166: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 1181: l_msg := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;

1177:
1178: begin
1179: IF p_MSG_COUNT > 1 THEN
1180: FOR i IN 1..p_MSG_COUNT LOOP
1181: l_msg := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
1182: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1183: END LOOP ;
1184: ELSE
1185: l_msg := apps.FND_MSG_PUB.Get(1,apps.FND_API.G_FALSE) ;

Line 1185: l_msg := apps.FND_MSG_PUB.Get(1,apps.FND_API.G_FALSE) ;

1181: l_msg := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
1182: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1183: END LOOP ;
1184: ELSE
1185: l_msg := apps.FND_MSG_PUB.Get(1,apps.FND_API.G_FALSE) ;
1186: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1187: END IF ;
1188:
1189: end dbg_print_stack;

Line 1200: p_commit IN VARCHAR2 := Fnd_Api.g_false,

1196: /* */
1197: /*--------------------------------------------------*/
1198:
1199: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1200: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1201: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1202: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1203: p_action IN VARCHAR2,
1204: /*Fixed for bug#4433942 added product

Line 1201: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

1197: /*--------------------------------------------------*/
1198:
1199: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1200: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1201: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1202: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1203: p_action IN VARCHAR2,
1204: /*Fixed for bug#4433942 added product
1205: txn record as in parameter

Line 1202: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

1198:
1199: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1200: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1201: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1202: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1203: p_action IN VARCHAR2,
1204: /*Fixed for bug#4433942 added product
1205: txn record as in parameter
1206: */

Line 1383: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

1379: -- Standard Start of API savepoint
1380: SAVEPOINT process_sales_order;
1381:
1382: -- Standard call to check for call compatibility.
1383: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
1384: p_api_version,
1385: l_api_name,
1386: G_PKG_NAME)
1387: THEN

Line 1388: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

1384: p_api_version,
1385: l_api_name,
1386: G_PKG_NAME)
1387: THEN
1388: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
1389: END IF;
1390:
1391: -- Initialize message list if p_init_msg_list is set to TRUE.
1392: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 1392: IF Fnd_Api.to_Boolean(p_init_msg_list)

1388: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
1389: END IF;
1390:
1391: -- Initialize message list if p_init_msg_list is set to TRUE.
1392: IF Fnd_Api.to_Boolean(p_init_msg_list)
1393: THEN
1394: Fnd_Msg_Pub.initialize;
1395: END IF;
1396:

Line 1398: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

1394: Fnd_Msg_Pub.initialize;
1395: END IF;
1396:
1397: -- Initialize API return status to success
1398: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
1399:
1400: -- Api body starts
1401:
1402: -- dbms_application_info.set_client_info('204');

Line 1410: RAISE Fnd_Api.G_EXC_ERROR;

1406:
1407: -- Validate the action code
1408: IF NOT (Csd_Process_Util.VALIDATE_ACTION(p_action, l_api_name))
1409: THEN
1410: RAISE Fnd_Api.G_EXC_ERROR;
1411: END IF;
1412:
1413: IF p_action = 'CREATE'
1414: THEN

Line 1445: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

1441: Debug('Return Status from Submit_Order' || x_return_status,
1442: l_mod_name,
1443: 1);
1444:
1445: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1446: THEN
1447: Debug('Submit_Order API failed ', l_mod_name, 1);
1448: RAISE Fnd_Api.G_EXC_ERROR;
1449: END IF;

Line 1448: RAISE Fnd_Api.G_EXC_ERROR;

1444:
1445: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1446: THEN
1447: Debug('Submit_Order API failed ', l_mod_name, 1);
1448: RAISE Fnd_Api.G_EXC_ERROR;
1449: END IF;
1450:
1451: ELSIF p_action = 'BOOK'
1452: THEN

Line 1467: l_control_rec.book_flag := Fnd_Api.G_TRUE;

1463: 1);
1464:
1465: l_header_rec.org_id := p_order_rec.org_id;
1466: l_header_rec.order_id := p_order_rec.order_header_id;
1467: l_control_rec.book_flag := Fnd_Api.G_TRUE;
1468: l_control_rec.calculate_price := Fnd_Api.G_FALSE;
1469:
1470: open c_get_org_id(p_order_rec.order_header_id);
1471: fetch c_get_org_id into l_org_id;

Line 1468: l_control_rec.calculate_price := Fnd_Api.G_FALSE;

1464:
1465: l_header_rec.org_id := p_order_rec.org_id;
1466: l_header_rec.order_id := p_order_rec.order_header_id;
1467: l_control_rec.book_flag := Fnd_Api.G_TRUE;
1468: l_control_rec.calculate_price := Fnd_Api.G_FALSE;
1469:
1470: open c_get_org_id(p_order_rec.order_header_id);
1471: fetch c_get_org_id into l_org_id;
1472: close c_get_org_id;

Line 1480: P_Init_Msg_List => Fnd_Api.G_TRUE,

1476: mo_global.set_policy_context('S',l_org_id);
1477:
1478:
1479: Aso_Order_Int.Update_order(P_Api_Version_Number => 1.0,
1480: P_Init_Msg_List => Fnd_Api.G_TRUE,
1481: P_Commit => Fnd_Api.G_FALSE,
1482: P_Qte_Rec => l_header_rec,
1483: P_Qte_Line_Tbl => l_line_tbl,
1484: P_Qte_Line_Dtl_Tbl => l_line_dtl_tbl,

Line 1481: P_Commit => Fnd_Api.G_FALSE,

1477:
1478:
1479: Aso_Order_Int.Update_order(P_Api_Version_Number => 1.0,
1480: P_Init_Msg_List => Fnd_Api.G_TRUE,
1481: P_Commit => Fnd_Api.G_FALSE,
1482: P_Qte_Rec => l_header_rec,
1483: P_Qte_Line_Tbl => l_line_tbl,
1484: P_Qte_Line_Dtl_Tbl => l_line_dtl_tbl,
1485: P_Line_Shipment_Tbl => l_ln_shipment_tbl,

Line 1502: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

1498: Debug('Return Status from Update_order' || x_return_status,
1499: l_mod_name,
1500: 1);
1501:
1502: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1503: THEN
1504: Debug('ASO_ORDER_INT.UPDATE_ORDER failed', l_mod_name, 1);
1505: RAISE Fnd_Api.G_EXC_ERROR;
1506: END IF;

Line 1505: RAISE Fnd_Api.G_EXC_ERROR;

1501:
1502: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1503: THEN
1504: Debug('ASO_ORDER_INT.UPDATE_ORDER failed', l_mod_name, 1);
1505: RAISE Fnd_Api.G_EXC_ERROR;
1506: END IF;
1507:
1508: ELSIF p_action = 'PICK-RELEASE'
1509: THEN

Line 1520: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =

1516:
1517: -- If action is BOOK, then call charges private api to
1518: -- book the sales order
1519:
1520: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1521: Fnd_Api.G_MISS_NUM
1522: THEN
1523: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1524: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',

Line 1521: Fnd_Api.G_MISS_NUM

1517: -- If action is BOOK, then call charges private api to
1518: -- book the sales order
1519:
1520: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1521: Fnd_Api.G_MISS_NUM
1522: THEN
1523: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1524: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1525: p_order_rec.order_header_id);

Line 1528: RAISE Fnd_Api.G_EXC_ERROR;

1524: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1525: p_order_rec.order_header_id);
1526: Fnd_Msg_Pub.ADD;
1527: Debug('Invalid Order header Id is passed ', l_mod_name, 1);
1528: RAISE Fnd_Api.G_EXC_ERROR;
1529: END IF;
1530:
1531: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1532: Fnd_Api.G_MISS_NUM

Line 1531: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =

1527: Debug('Invalid Order header Id is passed ', l_mod_name, 1);
1528: RAISE Fnd_Api.G_EXC_ERROR;
1529: END IF;
1530:
1531: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1532: Fnd_Api.G_MISS_NUM
1533: THEN
1534: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICKING_RULE_ID');
1535: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',

Line 1532: Fnd_Api.G_MISS_NUM

1528: RAISE Fnd_Api.G_EXC_ERROR;
1529: END IF;
1530:
1531: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1532: Fnd_Api.G_MISS_NUM
1533: THEN
1534: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICKING_RULE_ID');
1535: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',
1536: p_order_rec.PICKING_RULE_ID);

Line 1539: RAISE Fnd_Api.G_EXC_ERROR;

1535: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',
1536: p_order_rec.PICKING_RULE_ID);
1537: Fnd_Msg_Pub.ADD;
1538: Debug('Invalid Picking rule Id is passed ', l_mod_name, 1);
1539: RAISE Fnd_Api.G_EXC_ERROR;
1540: END IF;
1541:
1542: -- Fetch user and login information
1543: l_user_id := Fnd_Global.USER_ID;

Line 1557: RAISE Fnd_Api.G_EXC_ERROR;

1553: 'does not exist or has expired',
1554: l_mod_name,
1555: 1);
1556: CLOSE pick_rule;
1557: RAISE Fnd_Api.G_EXC_ERROR;
1558: END IF;
1559: IF pick_rule%ISOPEN
1560: THEN
1561: CLOSE pick_rule;

Line 1573: RAISE Fnd_Api.G_EXC_ERROR;

1569: IF customer%NOTFOUND
1570: THEN
1571: Debug('invalid order header id ', l_mod_name, 1);
1572: CLOSE customer;
1573: RAISE Fnd_Api.G_EXC_ERROR;
1574: END IF;
1575:
1576: IF customer%ISOPEN
1577: THEN

Line 1581: IF NVL(p_order_rec.org_id, Fnd_Api.G_MISS_NUM) =

1577: THEN
1578: CLOSE customer;
1579: END IF;
1580:
1581: IF NVL(p_order_rec.org_id, Fnd_Api.G_MISS_NUM) =
1582: Fnd_Api.G_MISS_NUM
1583: THEN
1584: l_Organization_Id := NULL;
1585: ELSIF p_Order_Rec.Org_Id IS NULL

Line 1582: Fnd_Api.G_MISS_NUM

1578: CLOSE customer;
1579: END IF;
1580:
1581: IF NVL(p_order_rec.org_id, Fnd_Api.G_MISS_NUM) =
1582: Fnd_Api.G_MISS_NUM
1583: THEN
1584: l_Organization_Id := NULL;
1585: ELSIF p_Order_Rec.Org_Id IS NULL
1586: THEN

Line 1592: IF NVL(p_order_rec.pick_from_subinventory, Fnd_Api.G_MISS_CHAR) =

1588: ELSE
1589: l_Organization_Id := p_order_rec.org_id;
1590: END IF;
1591:
1592: IF NVL(p_order_rec.pick_from_subinventory, Fnd_Api.G_MISS_CHAR) =
1593: Fnd_Api.G_MISS_CHAR
1594: THEN
1595: l_sub_inventory := '';
1596: ELSIF p_Order_Rec.Pick_From_Subinventory IS NULL

Line 1593: Fnd_Api.G_MISS_CHAR

1589: l_Organization_Id := p_order_rec.org_id;
1590: END IF;
1591:
1592: IF NVL(p_order_rec.pick_from_subinventory, Fnd_Api.G_MISS_CHAR) =
1593: Fnd_Api.G_MISS_CHAR
1594: THEN
1595: l_sub_inventory := '';
1596: ELSIF p_Order_Rec.Pick_From_Subinventory IS NULL
1597: THEN

Line 1604: IF ((p_order_rec.locator_id is null) or (p_order_rec.locator_id = FND_API.G_MISS_NUM)) THEN

1600: l_sub_inventory := p_order_rec.pick_from_subinventory;
1601: END IF;
1602:
1603: -- Fix for Enh Req#3948563
1604: IF ((p_order_rec.locator_id is null) or (p_order_rec.locator_id = FND_API.G_MISS_NUM)) THEN
1605: l_locator_id := null;
1606: ELSE
1607: l_locator_id := p_order_rec.locator_id;
1608: END IF;

Line 1695: RAISE Fnd_Api.G_EXC_ERROR;

1691: Fnd_Message.SET_NAME('CSD', 'CSD_PICK_RELEASE_FAIL');
1692: Fnd_Message.SET_TOKEN('BATCH_NAME', l_batch_name);
1693: Fnd_Msg_Pub.ADD;
1694: Debug(' Picking rules insert failed ',l_mod_name, 1);
1695: RAISE Fnd_Api.G_EXC_ERROR;
1696: End ;
1697:
1698: /* override the auto pick confirm flag if the serial_number is reserved. */
1699: Debug(' serial_number['||p_product_txn_rec.source_serial_number||']',l_mod_name, 1);

Line 1701: if(nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR) then

1697:
1698: /* override the auto pick confirm flag if the serial_number is reserved. */
1699: Debug(' serial_number['||p_product_txn_rec.source_serial_number||']',l_mod_name, 1);
1700: Debug(' item['||to_char(p_product_txn_rec.inventory_item_id)||']',l_mod_name, 1);
1701: if(nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR) then
1702: Open c_srl_reservation(p_product_txn_rec.source_serial_number, p_product_txn_rec.inventory_item_Id);
1703: FETCH c_Srl_reservation into l_reservation_Id;
1704: if(c_Srl_reservation%notfound)then
1705: l_reservation_id := null;

Line 1717: p_init_msg_list => FND_API.G_FALSE,

1713: Debug(' pick_confirm_flag['||l_batch_Rec.auto_pick_confirm_flag||']',l_mod_name, 1);
1714:
1715: WSH_PICKING_BATCHES_GRP.Create_Batch(
1716: p_api_version_number => 1.0,
1717: p_init_msg_list => FND_API.G_FALSE,
1718: p_commit => FND_API.G_FALSE,
1719: x_return_status => l_ret_status,
1720: x_msg_count => l_msg_count,
1721: x_msg_data => l_msg_data,

Line 1718: p_commit => FND_API.G_FALSE,

1714:
1715: WSH_PICKING_BATCHES_GRP.Create_Batch(
1716: p_api_version_number => 1.0,
1717: p_init_msg_list => FND_API.G_FALSE,
1718: p_commit => FND_API.G_FALSE,
1719: x_return_status => l_ret_status,
1720: x_msg_count => l_msg_count,
1721: x_msg_data => l_msg_data,
1722: p_rule_id => p_order_rec.PICKING_RULE_ID,

Line 1728: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

1724: p_batch_rec => l_batch_rec,
1725: p_batch_prefix => p_batch_prefix,
1726: x_batch_id => l_batch_id);
1727:
1728: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1729: THEN
1730: Debug('WSH_PICKINGBATCHES_GRP.Create_batch failed', l_mod_name, 1);
1731: RAISE Fnd_Api.G_EXC_ERROR;
1732: END IF;

Line 1731: RAISE Fnd_Api.G_EXC_ERROR;

1727:
1728: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1729: THEN
1730: Debug('WSH_PICKINGBATCHES_GRP.Create_batch failed', l_mod_name, 1);
1731: RAISE Fnd_Api.G_EXC_ERROR;
1732: END IF;
1733: Debug('Batch created batch_id=['||l_batch_id||']',l_mod_name,1);
1734:
1735: wsh_picking_batches_pub.Release_Batch (

Line 1738: p_init_msg_list => Fnd_API.G_False,

1734:
1735: wsh_picking_batches_pub.Release_Batch (
1736: -- Standard parameters
1737: p_api_version => 1.0,
1738: p_init_msg_list => Fnd_API.G_False,
1739: p_commit => Fnd_API.G_False,
1740: x_return_status => x_Return_Status,
1741: x_msg_count => x_Msg_Count,
1742: x_msg_data => x_Msg_Data,

Line 1739: p_commit => Fnd_API.G_False,

1735: wsh_picking_batches_pub.Release_Batch (
1736: -- Standard parameters
1737: p_api_version => 1.0,
1738: p_init_msg_list => Fnd_API.G_False,
1739: p_commit => Fnd_API.G_False,
1740: x_return_status => x_Return_Status,
1741: x_msg_count => x_Msg_Count,
1742: x_msg_data => x_Msg_Data,
1743: -- program specific paramters.

Line 1754: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)

1750: Debug('After release Batch, msg_data['||x_msg_data||']' ||
1751: 'x_return_status=['||x_return_status||']', l_mod_name,1);
1752: --dbg_print_stack(x_msg_count, l_mod_name);
1753:
1754: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)
1755: THEN
1756: Fnd_Message.SET_NAME('CSD', 'CSD_PICK_RELEASE_FAIL');
1757: Fnd_Message.SET_TOKEN('BATCH_NAME', l_batch_name);
1758: Fnd_Msg_Pub.ADD;

Line 1762: RAISE Fnd_Api.G_EXC_ERROR;

1758: Fnd_Msg_Pub.ADD;
1759: Debug('WSH_PICK_LIST.RELEASE_BATCH failed for batch : ' ||
1760: l_batch_name,
1761: l_mod_name,1) ;
1762: RAISE Fnd_Api.G_EXC_ERROR;
1763: END IF;
1764: Debug('Batch processed, req_id=['||lx_request_id||']',l_mod_name,1);
1765:
1766: ELSIF p_action = 'SHIP'

Line 1776: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =

1772: p_order_rec.order_header_id,
1773: l_mod_name,
1774: 1);
1775:
1776: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1777: Fnd_Api.G_MISS_NUM
1778: THEN
1779: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1780: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',

Line 1777: Fnd_Api.G_MISS_NUM

1773: l_mod_name,
1774: 1);
1775:
1776: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1777: Fnd_Api.G_MISS_NUM
1778: THEN
1779: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1780: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1781: p_order_rec.order_header_id);

Line 1784: RAISE Fnd_Api.G_EXC_ERROR;

1780: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1781: p_order_rec.order_header_id);
1782: Fnd_Msg_Pub.ADD;
1783: Debug('Order_header_id is invalid', l_mod_name, 1);
1784: RAISE Fnd_Api.G_EXC_ERROR;
1785: END IF;
1786:
1787: FOR i IN delivery(p_order_rec.order_header_id,
1788: p_order_rec.order_line_id)

Line 1797: NVL(p_order_rec.serial_number, Fnd_Api.G_MISS_CHAR) <>

1793: -- delivery line details
1794: -- Update the serial number on the delivery lines only if the item
1795: -- is serialized at SO issue
1796: IF i.serial_number_control_code = 6 AND
1797: NVL(p_order_rec.serial_number, Fnd_Api.G_MISS_CHAR) <>
1798: Fnd_Api.G_MISS_CHAR
1799: THEN
1800:
1801: BEGIN

Line 1798: Fnd_Api.G_MISS_CHAR

1794: -- Update the serial number on the delivery lines only if the item
1795: -- is serialized at SO issue
1796: IF i.serial_number_control_code = 6 AND
1797: NVL(p_order_rec.serial_number, Fnd_Api.G_MISS_CHAR) <>
1798: Fnd_Api.G_MISS_CHAR
1799: THEN
1800:
1801: BEGIN
1802: source_code := 'OE'; -- The only source code that should be used by the API

Line 1942: if nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

1938: l_SN_at_SO_new_SN_number :=FALSE;
1939:
1940: if i.serial_number_control_code in (2,5,6) then
1941:
1942: if nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1943: /* Validation 3 */
1944: FND_MESSAGE.SET_NAME('CSD','CSD_API_SERIAL_NUM_REQD');
1945: FND_MSG_PUB.ADD;
1946: RAISE FND_API.G_EXC_ERROR;

Line 1946: RAISE FND_API.G_EXC_ERROR;

1942: if nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1943: /* Validation 3 */
1944: FND_MESSAGE.SET_NAME('CSD','CSD_API_SERIAL_NUM_REQD');
1945: FND_MSG_PUB.ADD;
1946: RAISE FND_API.G_EXC_ERROR;
1947: else
1948: l_shipped_serial_number := p_product_txn_rec.source_serial_number;
1949: end if;
1950:

Line 1966: RAISE FND_API.G_EXC_ERROR;

1962: FND_MESSAGE.SET_NAME('CSD','CSD_SERIAL_NUM_NOT_IN_INVORG');
1963: FND_MESSAGE.SET_TOKEN('SERIAL_NUMBER',l_shipped_serial_number);
1964: FND_MESSAGE.SET_TOKEN('INV_ORG',i.organization_code);
1965: FND_MSG_PUB.ADD;
1966: RAISE FND_API.G_EXC_ERROR;
1967: else /*if Item is Serialied at SO then user may pass SN that does not resides in any warehouse */
1968: l_SN_at_SO_new_SN_number :=TRUE;
1969: end if;
1970: end;

Line 1974: if nvl(p_product_txn_rec.sub_inventory ,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

1970: end;
1971: end if; /*end if of serialized item */
1972:
1973: if ( i.serial_number_control_code =1 or (i.serial_number_control_code=6 and l_SN_at_SO_new_SN_number=TRUE ) ) then
1974: if nvl(p_product_txn_rec.sub_inventory ,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1975: /*Validation 4 */
1976: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_IS_REQD');
1977: FND_MSG_PUB.ADD;
1978: RAISE FND_API.G_EXC_ERROR;

Line 1978: RAISE FND_API.G_EXC_ERROR;

1974: if nvl(p_product_txn_rec.sub_inventory ,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1975: /*Validation 4 */
1976: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_IS_REQD');
1977: FND_MSG_PUB.ADD;
1978: RAISE FND_API.G_EXC_ERROR;
1979: end if;
1980:
1981: begin
1982: SELECT msi.secondary_inventory_name

Line 1997: RAISE FND_API.G_EXC_ERROR;

1993: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_NOT_IN_INVORG');
1994: FND_MESSAGE.SET_TOKEN('SUB_INV',p_product_txn_rec.sub_inventory);
1995: FND_MESSAGE.SET_TOKEN('INV_ORG',i.organization_code);
1996: FND_MSG_PUB.ADD;
1997: RAISE FND_API.G_EXC_ERROR;
1998: end;
1999:
2000: if i.LOT_CONTROL_CODE =2 then
2001: if nvl(p_product_txn_rec.lot_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

Line 2001: if nvl(p_product_txn_rec.lot_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

1997: RAISE FND_API.G_EXC_ERROR;
1998: end;
1999:
2000: if i.LOT_CONTROL_CODE =2 then
2001: if nvl(p_product_txn_rec.lot_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2002: /*Validation 5 */
2003: FND_MESSAGE.SET_NAME('CSD','CSD_LOT_NUMBER_REQD');
2004: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2005: FND_MSG_PUB.ADD;

Line 2006: RAISE FND_API.G_EXC_ERROR;

2002: /*Validation 5 */
2003: FND_MESSAGE.SET_NAME('CSD','CSD_LOT_NUMBER_REQD');
2004: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2005: FND_MSG_PUB.ADD;
2006: RAISE FND_API.G_EXC_ERROR;
2007: else
2008: l_lot_number:= p_product_txn_rec.lot_number;
2009: end if;
2010: end if;

Line 2013: if nvl(p_product_txn_rec.revision,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

2009: end if;
2010: end if;
2011:
2012: if i.REVISION_QTY_CONTROL_CODE =2 then
2013: if nvl(p_product_txn_rec.revision,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2014: FND_MESSAGE.SET_NAME('CSD','CSD_ITEM_REVISION_REQD');
2015: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2016: FND_MSG_PUB.ADD;
2017: RAISE FND_API.G_EXC_ERROR;

Line 2017: RAISE FND_API.G_EXC_ERROR;

2013: if nvl(p_product_txn_rec.revision,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2014: FND_MESSAGE.SET_NAME('CSD','CSD_ITEM_REVISION_REQD');
2015: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2016: FND_MSG_PUB.ADD;
2017: RAISE FND_API.G_EXC_ERROR;
2018: else
2019: l_revision:=p_product_txn_rec.revision;
2020: end if;
2021: end if;

Line 2088: RAISE Fnd_Api.G_EXC_ERROR;

2084: 1);
2085: Fnd_Message.SET_NAME('CSD','CSD_UPDATE_SHIPPING_FAILED');
2086: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
2087: Fnd_Msg_Pub.ADD;
2088: RAISE Fnd_Api.G_EXC_ERROR;
2089: END;
2090:
2091: -- END IF; --end of update_shipping_attributes
2092:

Line 2185: RAISE Fnd_Api.G_EXC_ERROR;

2181: Fnd_Message.SET_NAME('CSD',
2182: 'CSD_SHIP_CONFIRM_FAILED');
2183: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
2184: Fnd_Msg_Pub.ADD;
2185: RAISE Fnd_Api.G_EXC_ERROR;
2186: END IF;
2187: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2188: END; -- end of delivery action
2189:

Line 2187: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

2183: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
2184: Fnd_Msg_Pub.ADD;
2185: RAISE Fnd_Api.G_EXC_ERROR;
2186: END IF;
2187: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2188: END; -- end of delivery action
2189:
2190: END LOOP; -- At the end of processing all the delivery id for an Order
2191: END IF; -- end of all actions

Line 2196: IF Fnd_Api.To_Boolean(p_commit)

2192:
2193: -- Api body ends here
2194:
2195: -- Standard check of p_commit.
2196: IF Fnd_Api.To_Boolean(p_commit)
2197: THEN
2198: COMMIT WORK;
2199: END IF;
2200:

Line 2206: WHEN Fnd_Api.G_EXC_ERROR THEN

2202: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2203: p_data => x_msg_data);
2204:
2205: EXCEPTION
2206: WHEN Fnd_Api.G_EXC_ERROR THEN
2207: Debug('In EXC_ERROR in process_sales_order', l_mod_name, 1);
2208: ROLLBACK TO process_sales_order;
2209:
2210: x_return_status := Fnd_Api.G_RET_STS_ERROR;

Line 2210: x_return_status := Fnd_Api.G_RET_STS_ERROR;

2206: WHEN Fnd_Api.G_EXC_ERROR THEN
2207: Debug('In EXC_ERROR in process_sales_order', l_mod_name, 1);
2208: ROLLBACK TO process_sales_order;
2209:
2210: x_return_status := Fnd_Api.G_RET_STS_ERROR;
2211: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2212: p_data => x_msg_data);
2213:
2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

2210: x_return_status := Fnd_Api.G_RET_STS_ERROR;
2211: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2212: p_data => x_msg_data);
2213:
2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2215: Debug('In EXC_UNEXP_ERROR in process_sales_order', l_mod_name, 1);
2216: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2217: ROLLBACK TO process_sales_order;
2218: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,

Line 2216: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

2212: p_data => x_msg_data);
2213:
2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2215: Debug('In EXC_UNEXP_ERROR in process_sales_order', l_mod_name, 1);
2216: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2217: ROLLBACK TO process_sales_order;
2218: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2219: p_data => x_msg_data);
2220: WHEN OTHERS THEN

Line 2221: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

2217: ROLLBACK TO process_sales_order;
2218: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2219: p_data => x_msg_data);
2220: WHEN OTHERS THEN
2221: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2222: Debug('In OTHERS in process_sales_order' || sqlerrm, l_mod_name, 1);
2223: ROLLBACK TO process_sales_order;
2224: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
2225: THEN

Line 2243: p_commit IN VARCHAR2 := Fnd_Api.g_false,

2239: /* repair orders */
2240: /*------------------------------------------------------------------*/
2241:
2242: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2243: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2244: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2246: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2247: x_return_status OUT NOCOPY VARCHAR2,

Line 2244: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

2240: /*------------------------------------------------------------------*/
2241:
2242: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2243: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2244: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2246: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2247: x_return_status OUT NOCOPY VARCHAR2,
2248: x_msg_count OUT NOCOPY NUMBER,

Line 2245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

2241:
2242: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2243: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2244: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2246: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2247: x_return_status OUT NOCOPY VARCHAR2,
2248: x_msg_count OUT NOCOPY NUMBER,
2249: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 2398: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

2394: -- Standard Start of API savepoint
2395: SAVEPOINT create_product_txn;
2396:
2397: -- Initialize API return status to success
2398: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2399:
2400: -- Standard call to check for call compatibility.
2401: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
2402: p_api_version,

Line 2401: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

2397: -- Initialize API return status to success
2398: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2399:
2400: -- Standard call to check for call compatibility.
2401: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
2402: p_api_version,
2403: l_api_name,
2404: G_PKG_NAME)
2405: THEN

Line 2406: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

2402: p_api_version,
2403: l_api_name,
2404: G_PKG_NAME)
2405: THEN
2406: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
2407: END IF;
2408:
2409: -- Initialize message list if p_init_msg_list is set to TRUE.
2410: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 2410: IF Fnd_Api.to_Boolean(p_init_msg_list)

2406: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
2407: END IF;
2408:
2409: -- Initialize message list if p_init_msg_list is set to TRUE.
2410: IF Fnd_Api.to_Boolean(p_init_msg_list)
2411: THEN
2412: Fnd_Msg_Pub.initialize;
2413: END IF;
2414:

Line 2472: RAISE Fnd_Api.G_EXC_ERROR;

2468: -- Validate the repair line ID if it exists in csd_repairs
2469: IF NOT
2470: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => x_product_txn_rec.repair_line_id))
2471: THEN
2472: RAISE Fnd_Api.G_EXC_ERROR;
2473: END IF;
2474:
2475: Debug('Validate action type', l_mod_name, 1);
2476:

Line 2481: RAISE Fnd_Api.G_EXC_ERROR;

2477: -- Validate the Action Type if it exists in fnd_lookups
2478: IF NOT
2479: (Csd_Process_Util.Validate_action_type(p_action_type => x_product_txn_rec.action_type))
2480: THEN
2481: RAISE Fnd_Api.G_EXC_ERROR;
2482: END IF;
2483:
2484: Debug('Validate action code', l_mod_name, 1);
2485:

Line 2490: RAISE Fnd_Api.G_EXC_ERROR;

2486: -- Validate the repair line ID if it exists in fnd_lookups
2487: IF NOT
2488: (Csd_Process_Util.Validate_action_code(p_action_code => x_product_txn_rec.action_code))
2489: THEN
2490: RAISE Fnd_Api.G_EXC_ERROR;
2491: END IF;
2492:
2493: --R12 Development changes begin
2494: Debug('Validating picking rule if passed[' ||

Line 2507: RAISE Fnd_Api.G_EXC_ERROR;

2503: IF (cur_pick_rules%NOTFOUND)
2504: THEN
2505: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICK_RULE');
2506: Fnd_Msg_Pub.ADD;
2507: RAISE Fnd_Api.G_EXC_ERROR;
2508: END IF;
2509: END IF;
2510: --R12 Development changes End
2511:

Line 2528: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

2524: Csd_Process_Util.Validate_quantity(p_action_type => x_product_txn_rec.action_type,
2525: p_repair_line_id => x_product_txn_rec.repair_line_id,
2526: p_prod_txn_qty => x_product_txn_rec.quantity,
2527: x_return_status => x_return_status);
2528: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2529: THEN
2530: Debug('Validate_Quantity failed ', l_mod_name, 1);
2531: RAISE Fnd_Api.G_EXC_ERROR;
2532: END IF;

Line 2531: RAISE Fnd_Api.G_EXC_ERROR;

2527: x_return_status => x_return_status);
2528: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2529: THEN
2530: Debug('Validate_Quantity failed ', l_mod_name, 1);
2531: RAISE Fnd_Api.G_EXC_ERROR;
2532: END IF;
2533: END IF;
2534:
2535: Debug('Validate product txn status', l_mod_name, 1);

Line 2543: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)

2539: 1);
2540:
2541: -- Validate the PROD_TXN_STATUS if it exists in fnd_lookups
2542: IF (x_product_txn_rec.PROD_TXN_STATUS IS NOT NULL) AND
2543: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)
2544: THEN
2545: BEGIN
2546: SELECT 'X'
2547: INTO l_check

Line 2555: RAISE Fnd_Api.G_EXC_ERROR;

2551: EXCEPTION
2552: WHEN OTHERS THEN
2553: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_PROD_TXN_STATUS');
2554: Fnd_Msg_Pub.ADD;
2555: RAISE Fnd_Api.G_EXC_ERROR;
2556: END;
2557: END IF;
2558:
2559: -- Get service request from csd_repairs table

Line 2578: RAISE Fnd_Api.G_EXC_ERROR;

2574: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
2575: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
2576: x_product_txn_rec.repair_line_id);
2577: Fnd_Msg_Pub.ADD;
2578: RAISE Fnd_Api.G_EXC_ERROR;
2579: END;
2580:
2581: Debug('l_incident_id =' || l_incident_id, l_mod_name, 1);
2582:

Line 2594: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM

2590:
2591: IF l_bus_process_id < 0
2592: THEN
2593: IF NVL(x_product_txn_rec.business_process_id,
2594: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM
2595: THEN
2596: l_bus_process_id := x_product_txn_rec.business_process_id;
2597: ELSE
2598: Debug('Business process Id does not exist ', l_mod_name, 1);

Line 2599: RAISE Fnd_Api.G_EXC_ERROR;

2595: THEN
2596: l_bus_process_id := x_product_txn_rec.business_process_id;
2597: ELSE
2598: Debug('Business process Id does not exist ', l_mod_name, 1);
2599: RAISE Fnd_Api.G_EXC_ERROR;
2600: END IF;
2601: END IF;
2602:
2603: Debug('Getting the Coverage and txn Group Id', l_mod_name, 1);

Line 2609: (x_product_txn_rec.transaction_type_id = Fnd_Api.G_MISS_NUM)

2605: l_mod_name,
2606: 1);
2607:
2608: IF (x_product_txn_rec.transaction_type_id IS NULL) OR
2609: (x_product_txn_rec.transaction_type_id = Fnd_Api.G_MISS_NUM)
2610: THEN
2611: BEGIN
2612: SELECT transaction_type_id
2613: INTO l_transaction_type_id

Line 2637: IF NVL(x_product_txn_rec.contract_id, Fnd_Api.G_MISS_NUM) <>

2633: END IF;
2634:
2635: -- Get the coverage details from the contract
2636: /******************************contract changes
2637: IF NVL(x_product_txn_rec.contract_id, Fnd_Api.G_MISS_NUM) <>
2638: Fnd_Api.G_MISS_NUM
2639: THEN
2640: BEGIN
2641: --Bug fix for 3399883 [

Line 2638: Fnd_Api.G_MISS_NUM

2634:
2635: -- Get the coverage details from the contract
2636: /******************************contract changes
2637: IF NVL(x_product_txn_rec.contract_id, Fnd_Api.G_MISS_NUM) <>
2638: Fnd_Api.G_MISS_NUM
2639: THEN
2640: BEGIN
2641: --Bug fix for 3399883 [
2642: l_no_contract_bp_vldn := NVL(Fnd_Profile.value('CSD_NO_CONTRACT_BP_VLDN'),

Line 2684: RAISE Fnd_Api.G_EXC_ERROR;

2680: Fnd_Message.SET_TOKEN('CONTRACT_LINE_ID',
2681: x_product_txn_rec.contract_id);
2682: Fnd_Msg_Pub.ADD;
2683: Debug('Contract Line Id missing', l_mod_name, 1);
2684: RAISE Fnd_Api.G_EXC_ERROR;
2685: WHEN TOO_MANY_ROWS THEN
2686: Debug('Too many Contract Line', l_mod_name, 1);
2687: END;
2688: x_product_txn_rec.coverage_id := l_coverage_id;

Line 2701: IF (nvl(l_Charges_Rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) OR

2697: THEN
2698: -- swai: bug 5931926 - 12.0.2 3rd party logistics
2699: -- only set order header info to SR party and account
2700: -- if it is not specified on the bill-to for the txn line.
2701: IF (nvl(l_Charges_Rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) OR
2702: (nvl(l_Charges_Rec.bill_to_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
2703: OPEN order_rec(l_incident_id);
2704: FETCH order_rec
2705: INTO l_party_id, l_account_id;

Line 2702: (nvl(l_Charges_Rec.bill_to_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN

2698: -- swai: bug 5931926 - 12.0.2 3rd party logistics
2699: -- only set order header info to SR party and account
2700: -- if it is not specified on the bill-to for the txn line.
2701: IF (nvl(l_Charges_Rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) OR
2702: (nvl(l_Charges_Rec.bill_to_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
2703: OPEN order_rec(l_incident_id);
2704: FETCH order_rec
2705: INTO l_party_id, l_account_id;
2706: IF (order_rec%NOTFOUND OR l_party_id IS NULL)

Line 2711: RAISE Fnd_Api.G_EXC_ERROR;

2707: THEN
2708: Fnd_Message.SET_NAME('CSD', 'CSD_API_PARTY_MISSING');
2709: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
2710: Fnd_Msg_Pub.ADD;
2711: RAISE Fnd_Api.G_EXC_ERROR;
2712: END IF;
2713: IF order_rec%ISOPEN
2714: THEN
2715: CLOSE order_rec;

Line 2746: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

2742: x_line_type_id => l_line_type_id,
2743: x_line_category_code => l_line_category_code,
2744: x_return_status => x_return_status);
2745:
2746: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2747: THEN
2748: RAISE Fnd_Api.G_EXC_ERROR;
2749: END IF;
2750:

Line 2748: RAISE Fnd_Api.G_EXC_ERROR;

2744: x_return_status => x_return_status);
2745:
2746: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2747: THEN
2748: RAISE Fnd_Api.G_EXC_ERROR;
2749: END IF;
2750:
2751: Debug('l_line_type_id =' || l_line_type_id,
2752: l_mod_name,

Line 2770: RAISE Fnd_Api.G_EXC_ERROR;

2766: Fnd_Message.SET_NAME('CSD', 'CSD_API_LINE_TYPE_MISSING');
2767: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
2768: x_product_txn_rec.txn_billing_type_id);
2769: Fnd_Msg_Pub.ADD;
2770: RAISE Fnd_Api.G_EXC_ERROR;
2771: END IF;
2772:
2773: -- Get the currency code from the price list if it is null or g_miss
2774: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

Line 2774: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

2770: RAISE Fnd_Api.G_EXC_ERROR;
2771: END IF;
2772:
2773: -- Get the currency code from the price list if it is null or g_miss
2774: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
2775: Fnd_Api.G_MISS_NUM
2776: THEN
2777: BEGIN
2778: SELECT currency_code

Line 2775: Fnd_Api.G_MISS_NUM

2771: END IF;
2772:
2773: -- Get the currency code from the price list if it is null or g_miss
2774: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
2775: Fnd_Api.G_MISS_NUM
2776: THEN
2777: BEGIN
2778: SELECT currency_code
2779: INTO l_curr_code

Line 2789: RAISE Fnd_Api.G_EXC_ERROR;

2785: 'CSD_API_INV_PRICE_LIST_ID');
2786: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
2787: x_product_txn_rec.price_list_id);
2788: Fnd_Msg_Pub.ADD;
2789: RAISE Fnd_Api.G_EXC_ERROR;
2790: WHEN TOO_MANY_ROWS THEN
2791: Debug('Too many currency_codes', l_mod_name, 1);
2792: END;
2793: END IF;

Line 2804: RAISE Fnd_Api.G_EXC_ERROR;

2800: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_CURR_CODE');
2801: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
2802: x_product_txn_rec.price_list_id);
2803: Fnd_Msg_Pub.ADD;
2804: RAISE Fnd_Api.G_EXC_ERROR;
2805: END IF;
2806:
2807: l_serial_flag := Csd_Process_Util.Is_item_serialized(x_product_txn_rec.inventory_item_id);
2808:

Line 2820: NVL(x_product_txn_rec.source_serial_number, Fnd_Api.G_MISS_CHAR) =

2816: /*****
2817: -- Serial Number required if the item is serialized
2818: IF l_serial_flag AND
2819: -- changing from serial_number to source_serial_number 11.5.10
2820: NVL(x_product_txn_rec.source_serial_number, Fnd_Api.G_MISS_CHAR) =
2821: Fnd_Api.G_MISS_CHAR AND
2822: x_product_txn_rec.action_type NOT IN ('SHIP', 'WALK_IN_ISSUE') AND
2823: (x_product_txn_rec.action_code <> 'LOANER' AND
2824: x_product_txn_rec.action_type <> 'RMA')

Line 2821: Fnd_Api.G_MISS_CHAR AND

2817: -- Serial Number required if the item is serialized
2818: IF l_serial_flag AND
2819: -- changing from serial_number to source_serial_number 11.5.10
2820: NVL(x_product_txn_rec.source_serial_number, Fnd_Api.G_MISS_CHAR) =
2821: Fnd_Api.G_MISS_CHAR AND
2822: x_product_txn_rec.action_type NOT IN ('SHIP', 'WALK_IN_ISSUE') AND
2823: (x_product_txn_rec.action_code <> 'LOANER' AND
2824: x_product_txn_rec.action_type <> 'RMA')
2825: THEN

Line 2834: RAISE Fnd_Api.G_EXC_ERROR;

2830: Debug('Serial Number missing for inventory_item_id =' ||
2831: x_product_txn_rec.inventory_item_id,
2832: l_mod_name,
2833: 1);
2834: RAISE Fnd_Api.G_EXC_ERROR;
2835: END IF;
2836: *****/
2837:
2838: IF (x_product_txn_rec.new_order_flag = 'N')

Line 2846: x_product_txn_rec.order_header_id := FND_API.G_MISS_NUM;

2842: x_product_txn_rec.add_to_order_flag := 'Y';
2843: x_product_txn_rec.order_header_id := x_product_txn_rec.add_to_order_id;
2844: ELSE
2845: x_product_txn_rec.add_to_order_flag := 'F';
2846: x_product_txn_rec.order_header_id := FND_API.G_MISS_NUM;
2847: END IF;
2848:
2849: ELSIF (x_product_txn_rec.new_order_flag = 'Y')
2850: THEN

Line 2852: x_product_txn_rec.order_header_id := Fnd_Api.G_MISS_NUM;

2848:
2849: ELSIF (x_product_txn_rec.new_order_flag = 'Y')
2850: THEN
2851: x_product_txn_rec.add_to_order_flag := 'F';
2852: x_product_txn_rec.order_header_id := Fnd_Api.G_MISS_NUM;
2853: END IF;
2854:
2855: Debug('x_product_txn_rec.new_order_flag =' ||
2856: x_product_txn_rec.new_order_flag,

Line 2880: IF ((nvl(x_product_txn_rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND

2876: IF ((l_incident_id is not NULL) AND
2877: (nvl(fnd_profile.value('CSD_DEFAULT_SR_ACCT_ADDR_FOR_LOGISTICS'), 'N') = 'Y'))
2878: THEN
2879:
2880: IF ((nvl(x_product_txn_rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2881: (nvl(x_product_txn_rec.invoice_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2882: THEN
2883: OPEN c_sr_primary_account_address (l_incident_id, 'BILL_TO');
2884: FETCH c_sr_primary_account_address INTO x_product_txn_rec.invoice_to_org_id;

Line 2881: (nvl(x_product_txn_rec.invoice_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))

2877: (nvl(fnd_profile.value('CSD_DEFAULT_SR_ACCT_ADDR_FOR_LOGISTICS'), 'N') = 'Y'))
2878: THEN
2879:
2880: IF ((nvl(x_product_txn_rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2881: (nvl(x_product_txn_rec.invoice_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2882: THEN
2883: OPEN c_sr_primary_account_address (l_incident_id, 'BILL_TO');
2884: FETCH c_sr_primary_account_address INTO x_product_txn_rec.invoice_to_org_id;
2885: IF c_sr_primary_account_address%ISOPEN THEN

Line 2890: IF ((nvl(x_product_txn_rec.ship_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND

2886: CLOSE c_sr_primary_account_address;
2887: END IF;
2888: END IF;
2889:
2890: IF ((nvl(x_product_txn_rec.ship_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2891: (nvl(x_product_txn_rec.ship_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2892: THEN
2893: OPEN c_sr_primary_account_address (l_incident_id, 'SHIP_TO');
2894: FETCH c_sr_primary_account_address INTO x_product_txn_rec.ship_to_org_id;

Line 2891: (nvl(x_product_txn_rec.ship_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))

2887: END IF;
2888: END IF;
2889:
2890: IF ((nvl(x_product_txn_rec.ship_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2891: (nvl(x_product_txn_rec.ship_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2892: THEN
2893: OPEN c_sr_primary_account_address (l_incident_id, 'SHIP_TO');
2894: FETCH c_sr_primary_account_address INTO x_product_txn_rec.ship_to_org_id;
2895: IF c_sr_primary_account_address%ISOPEN THEN

Line 2910: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

2906: Csd_Process_Util.CONVERT_TO_CHG_REC(p_prod_txn_rec => x_product_txn_rec,
2907: x_charges_rec => l_Charges_Rec,
2908: x_return_status => x_return_status);
2909:
2910: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2911: THEN
2912: RAISE Fnd_Api.G_EXC_ERROR;
2913: END IF;
2914:

Line 2912: RAISE Fnd_Api.G_EXC_ERROR;

2908: x_return_status => x_return_status);
2909:
2910: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2911: THEN
2912: RAISE Fnd_Api.G_EXC_ERROR;
2913: END IF;
2914:
2915: Debug('Call process_charge_lines to create charge lines ',
2916: l_mod_name,

Line 2928: p_commit => Fnd_Api.g_false,

2924: l_mod_name,
2925: 1);
2926:
2927: PROCESS_CHARGE_LINES(p_api_version => 1.0,
2928: p_commit => Fnd_Api.g_false,
2929: p_init_msg_list => Fnd_Api.g_true,
2930: p_validation_level => Fnd_Api.g_valid_level_full,
2931: p_action => 'CREATE',
2932: p_Charges_Rec => l_Charges_Rec,

Line 2929: p_init_msg_list => Fnd_Api.g_true,

2925: 1);
2926:
2927: PROCESS_CHARGE_LINES(p_api_version => 1.0,
2928: p_commit => Fnd_Api.g_false,
2929: p_init_msg_list => Fnd_Api.g_true,
2930: p_validation_level => Fnd_Api.g_valid_level_full,
2931: p_action => 'CREATE',
2932: p_Charges_Rec => l_Charges_Rec,
2933: x_estimate_detail_id => x_estimate_detail_id,

Line 2930: p_validation_level => Fnd_Api.g_valid_level_full,

2926:
2927: PROCESS_CHARGE_LINES(p_api_version => 1.0,
2928: p_commit => Fnd_Api.g_false,
2929: p_init_msg_list => Fnd_Api.g_true,
2930: p_validation_level => Fnd_Api.g_valid_level_full,
2931: p_action => 'CREATE',
2932: p_Charges_Rec => l_Charges_Rec,
2933: x_estimate_detail_id => x_estimate_detail_id,
2934: x_return_status => x_return_status,

Line 2938: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

2934: x_return_status => x_return_status,
2935: x_msg_count => x_msg_count,
2936: x_msg_data => x_msg_data);
2937:
2938: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2939: THEN
2940: RAISE Fnd_Api.G_EXC_ERROR;
2941: END IF;
2942:

Line 2940: RAISE Fnd_Api.G_EXC_ERROR;

2936: x_msg_data => x_msg_data);
2937:
2938: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2939: THEN
2940: RAISE Fnd_Api.G_EXC_ERROR;
2941: END IF;
2942:
2943: Debug('NEW ESTIMATE DETAIL ID =' || x_estimate_detail_id,
2944: l_mod_name,

Line 3026: RAISE Fnd_Api.G_EXC_ERROR;

3022: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_REPAIRS_UPDATE');
3023: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
3024: x_product_txn_rec.repair_line_id);
3025: Fnd_Msg_Pub.ADD;
3026: RAISE Fnd_Api.G_EXC_ERROR;
3027: END IF;
3028:
3029: -- Process the product txn only if the process_flag = 'Y'
3030: -- Else skip to the end and return the control to calling program

Line 3107: p_commit => Fnd_Api.g_false,

3103: FND_PROFILE.PUT('CSD_UNIT_NUMBER', x_product_txn_rec.unit_number);
3104: end if;
3105:
3106: PROCESS_SALES_ORDER(p_api_version => 1.0,
3107: p_commit => Fnd_Api.g_false,
3108: p_init_msg_list => Fnd_Api.g_true,
3109: p_validation_level => Fnd_Api.g_valid_level_full,
3110: p_action => 'CREATE',
3111: p_order_rec => l_order_rec,

Line 3108: p_init_msg_list => Fnd_Api.g_true,

3104: end if;
3105:
3106: PROCESS_SALES_ORDER(p_api_version => 1.0,
3107: p_commit => Fnd_Api.g_false,
3108: p_init_msg_list => Fnd_Api.g_true,
3109: p_validation_level => Fnd_Api.g_valid_level_full,
3110: p_action => 'CREATE',
3111: p_order_rec => l_order_rec,
3112: x_return_status => x_return_status,

Line 3109: p_validation_level => Fnd_Api.g_valid_level_full,

3105:
3106: PROCESS_SALES_ORDER(p_api_version => 1.0,
3107: p_commit => Fnd_Api.g_false,
3108: p_init_msg_list => Fnd_Api.g_true,
3109: p_validation_level => Fnd_Api.g_valid_level_full,
3110: p_action => 'CREATE',
3111: p_order_rec => l_order_rec,
3112: x_return_status => x_return_status,
3113: x_msg_count => x_msg_count,

Line 3125: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

3121: x_return_status,
3122: l_mod_name,
3123: 1);
3124:
3125: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3126: THEN
3127: Debug('process_sales_order failed', l_mod_name, 1);
3128: RAISE CREATE_ORDER;
3129: END IF;

Line 3166: and (x_product_txn_rec.project_id <> FND_API.G_MISS_NUM)) then --bug#6075825

3162: -- project, unit number, or 3rd party end_customer
3163: if (((x_product_txn_rec.project_id is not null)
3164: OR (x_product_txn_rec.unit_number is not null)
3165: OR (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')))
3166: and (x_product_txn_rec.project_id <> FND_API.G_MISS_NUM)) then --bug#6075825
3167:
3168: OPEN order_line_cu(x_estimate_detail_id);
3169: FETCH order_line_cu into l_order_line_id, l_p_ship_from_org_id;
3170: CLOSE order_line_cu;

Line 3223: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

3219: x_msg_count => x_msg_count,
3220: x_msg_data => x_msg_data
3221: );
3222:
3223: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3224: FND_MESSAGE.SET_NAME('CSD','CSD_ERR_OM_PROCESS_LINE');
3225: FND_MSG_PUB.ADD;
3226: RAISE CREATE_ORDER;
3227: END IF;

Line 3384: and (x_product_txn_rec.project_id <> FND_API.G_MISS_NUM)) then --bug#6075825

3380: -- project, unit number, or 3rd party end_customer
3381: if (((x_product_txn_rec.project_id is not null)
3382: OR (x_product_txn_rec.unit_number is not null)
3383: OR (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')))
3384: and (x_product_txn_rec.project_id <> FND_API.G_MISS_NUM)) then --bug#6075825
3385:
3386: if (l_order_line_id) is not null then
3387: l_Line_Tbl_Type(1) := OE_Order_PUB.G_MISS_LINE_REC;
3388: l_Line_Tbl_Type(1).line_id := l_order_line_id;

Line 3437: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

3433: x_msg_count => x_msg_count,
3434: x_msg_data => x_msg_data
3435: );
3436:
3437: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3438: FND_MESSAGE.SET_NAME('CSD','CSD_ERR_OM_PROCESS_LINE');
3439: FND_MSG_PUB.ADD;
3440: RAISE BOOK_ORDER;
3441: END IF;

Line 3450: p_commit => Fnd_Api.g_false,

3446: Debug('Call process_sales_order to book SO',
3447: l_mod_name,
3448: 1);
3449: PROCESS_SALES_ORDER(p_api_version => 1.0,
3450: p_commit => Fnd_Api.g_false,
3451: p_init_msg_list => Fnd_Api.g_true,
3452: p_validation_level => Fnd_Api.g_valid_level_full,
3453: p_action => 'BOOK',
3454: p_order_rec => l_order_rec,

Line 3451: p_init_msg_list => Fnd_Api.g_true,

3447: l_mod_name,
3448: 1);
3449: PROCESS_SALES_ORDER(p_api_version => 1.0,
3450: p_commit => Fnd_Api.g_false,
3451: p_init_msg_list => Fnd_Api.g_true,
3452: p_validation_level => Fnd_Api.g_valid_level_full,
3453: p_action => 'BOOK',
3454: p_order_rec => l_order_rec,
3455: x_return_status => x_return_status,

Line 3452: p_validation_level => Fnd_Api.g_valid_level_full,

3448: 1);
3449: PROCESS_SALES_ORDER(p_api_version => 1.0,
3450: p_commit => Fnd_Api.g_false,
3451: p_init_msg_list => Fnd_Api.g_true,
3452: p_validation_level => Fnd_Api.g_valid_level_full,
3453: p_action => 'BOOK',
3454: p_order_rec => l_order_rec,
3455: x_return_status => x_return_status,
3456: x_msg_count => x_msg_count,

Line 3459: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

3455: x_return_status => x_return_status,
3456: x_msg_count => x_msg_count,
3457: x_msg_data => x_msg_data);
3458:
3459: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3460: THEN
3461: Debug('process_sales_order failed to book Sales order',
3462: l_mod_name,
3463: 1);

Line 3482: p_commit => Fnd_Api.g_false);

3478: -- END IF;
3479:
3480: -- Fix for bug#4020651
3481: Csd_Update_Programs_Pvt.prod_txn_status_upd(p_repair_line_id => x_product_txn_rec.repair_line_id,
3482: p_commit => Fnd_Api.g_false);
3483:
3484: --Update csd_repairs with status
3485: UPDATE csd_repairs
3486: SET ro_txn_status = 'OM_BOOKED'

Line 3527: Fnd_Api.G_MISS_CHAR) <> Fnd_Api.G_MISS_CHAR

3523: l_mod_name,
3524: 1);
3525:
3526: IF NVL(x_product_txn_rec.sub_inventory,
3527: Fnd_Api.G_MISS_CHAR) <> Fnd_Api.G_MISS_CHAR
3528: THEN
3529: BEGIN
3530: SELECT 'x'
3531: INTO l_dummy

Line 3604: if(x_return_status = FND_API.G_RET_STS_ERROR) THEN

3600:
3601: Debug('Calling reserve serial..', l_mod_name, 1);
3602: CSD_LOGISTICS_UTIL.Reserve_serial_number(l_serial_rsv_rec, x_return_status);
3603:
3604: if(x_return_status = FND_API.G_RET_STS_ERROR) THEN
3605: Fnd_Message.SET_NAME('CSD', 'CSD_SRL_RESERVE_FAILED');
3606: Fnd_Msg_Pub.ADD;
3607: RAISE RELEASE_ORDER;
3608: END IF;

Line 3682: p_commit => Fnd_Api.g_false,

3678: Debug('Call process_sales_order to pick release sales order',
3679: l_mod_name,
3680: 1);
3681: PROCESS_SALES_ORDER(p_api_version => 1.0,
3682: p_commit => Fnd_Api.g_false,
3683: p_init_msg_list => Fnd_Api.g_true,
3684: p_validation_level => Fnd_Api.g_valid_level_full,
3685: p_action => 'PICK-RELEASE',
3686: p_order_rec => l_order_rec,

Line 3683: p_init_msg_list => Fnd_Api.g_true,

3679: l_mod_name,
3680: 1);
3681: PROCESS_SALES_ORDER(p_api_version => 1.0,
3682: p_commit => Fnd_Api.g_false,
3683: p_init_msg_list => Fnd_Api.g_true,
3684: p_validation_level => Fnd_Api.g_valid_level_full,
3685: p_action => 'PICK-RELEASE',
3686: p_order_rec => l_order_rec,
3687: x_return_status => x_return_status,

Line 3684: p_validation_level => Fnd_Api.g_valid_level_full,

3680: 1);
3681: PROCESS_SALES_ORDER(p_api_version => 1.0,
3682: p_commit => Fnd_Api.g_false,
3683: p_init_msg_list => Fnd_Api.g_true,
3684: p_validation_level => Fnd_Api.g_valid_level_full,
3685: p_action => 'PICK-RELEASE',
3686: p_order_rec => l_order_rec,
3687: x_return_status => x_return_status,
3688: x_msg_count => x_msg_count,

Line 3691: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)

3687: x_return_status => x_return_status,
3688: x_msg_count => x_msg_count,
3689: x_msg_data => x_msg_data);
3690:
3691: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)
3692: THEN
3693: Debug('process_sales_order failed',
3694: l_mod_name,
3695: 1);

Line 3841: p_commit => Fnd_Api.g_false,

3837: Debug('Call process_sales_order to ship SO',
3838: l_mod_name,
3839: 1);
3840: PROCESS_SALES_ORDER(p_api_version => 1.0,
3841: p_commit => Fnd_Api.g_false,
3842: p_init_msg_list => Fnd_Api.g_true,
3843: p_validation_level => Fnd_Api.g_valid_level_full,
3844: p_action => 'SHIP',
3845: /*Fixed for bug#4433942 passing product

Line 3842: p_init_msg_list => Fnd_Api.g_true,

3838: l_mod_name,
3839: 1);
3840: PROCESS_SALES_ORDER(p_api_version => 1.0,
3841: p_commit => Fnd_Api.g_false,
3842: p_init_msg_list => Fnd_Api.g_true,
3843: p_validation_level => Fnd_Api.g_valid_level_full,
3844: p_action => 'SHIP',
3845: /*Fixed for bug#4433942 passing product
3846: txn record as in parameter*/

Line 3843: p_validation_level => Fnd_Api.g_valid_level_full,

3839: 1);
3840: PROCESS_SALES_ORDER(p_api_version => 1.0,
3841: p_commit => Fnd_Api.g_false,
3842: p_init_msg_list => Fnd_Api.g_true,
3843: p_validation_level => Fnd_Api.g_valid_level_full,
3844: p_action => 'SHIP',
3845: /*Fixed for bug#4433942 passing product
3846: txn record as in parameter*/
3847: p_product_txn_rec => x_product_txn_rec,

Line 3853: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

3849: x_return_status => x_return_status,
3850: x_msg_count => x_msg_count,
3851: x_msg_data => x_msg_data);
3852:
3853: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3854: THEN
3855: Debug('process_sales_order failed to ship sales order',
3856: l_mod_name,
3857: 1);

Line 3911: IF Fnd_Api.To_Boolean(p_commit)

3907:
3908: -- Api body ends here
3909:
3910: -- Standard check of p_commit.
3911: IF Fnd_Api.To_Boolean(p_commit)
3912: THEN
3913: COMMIT WORK;
3914: END IF;
3915:

Line 3921: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

3917: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3918: p_data => x_msg_data);
3919: EXCEPTION
3920: WHEN CREATE_ORDER THEN
3921: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
3922: ROLLBACK TO create_sales_order;
3923: -- update the prod txn as the charge
3924: -- line was not interfaced
3925: UPDATE csd_product_transactions

Line 3944: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

3940: END IF;
3941: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3942: p_data => x_msg_data);
3943: WHEN BOOK_ORDER THEN
3944: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
3945: ROLLBACK TO book_sales_order;
3946: -- update the prod txn as the order
3947: -- line was not booked
3948: UPDATE csd_product_transactions

Line 3966: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

3962: END IF;
3963: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3964: p_data => x_msg_data);
3965: WHEN RELEASE_ORDER THEN
3966: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
3967: ROLLBACK TO release_sales_order;
3968: -- update the prod txn as the order
3969: -- line was not booked
3970: UPDATE csd_product_transactions

Line 3978: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

3974: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
3975: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3976: p_data => x_msg_data);
3977: WHEN SHIP_ORDER THEN
3978: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
3979: ROLLBACK TO ship_sales_order;
3980: -- update the prod txn as the order
3981: -- line was not booked
3982: UPDATE csd_product_transactions

Line 3988: WHEN Fnd_Api.G_EXC_ERROR THEN

3984: WHERE product_transaction_id =
3985: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
3986: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3987: p_data => x_msg_data);
3988: WHEN Fnd_Api.G_EXC_ERROR THEN
3989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
3990: ROLLBACK TO create_product_txn;
3991: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3992: p_data => x_msg_data);

Line 3989: x_return_status := Fnd_Api.G_RET_STS_ERROR;

3985: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
3986: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3987: p_data => x_msg_data);
3988: WHEN Fnd_Api.G_EXC_ERROR THEN
3989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
3990: ROLLBACK TO create_product_txn;
3991: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3992: p_data => x_msg_data);
3993: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 3993: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

3989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
3990: ROLLBACK TO create_product_txn;
3991: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3992: p_data => x_msg_data);
3993: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3994: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3995: ROLLBACK TO create_product_txn;
3996: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3997: p_data => x_msg_data);

Line 3994: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3990: ROLLBACK TO create_product_txn;
3991: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3992: p_data => x_msg_data);
3993: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3994: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3995: ROLLBACK TO create_product_txn;
3996: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3997: p_data => x_msg_data);
3998: WHEN OTHERS THEN

Line 3999: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3995: ROLLBACK TO create_product_txn;
3996: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
3997: p_data => x_msg_data);
3998: WHEN OTHERS THEN
3999: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4000: ROLLBACK TO create_product_txn;
4001: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
4002: THEN
4003: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 4088: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

4084: -- Standard Start of API savepoint
4085: SAVEPOINT create_product_txn;
4086:
4087: -- Standard call to check for call compatibility.
4088: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
4089: p_api_version,
4090: l_api_name,
4091: G_PKG_NAME)
4092: THEN

Line 4093: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4089: p_api_version,
4090: l_api_name,
4091: G_PKG_NAME)
4092: THEN
4093: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4094: END IF;
4095:
4096: -- Initialize message list if p_init_msg_list is set to TRUE.
4097: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 4097: IF Fnd_Api.to_Boolean(p_init_msg_list)

4093: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4094: END IF;
4095:
4096: -- Initialize message list if p_init_msg_list is set to TRUE.
4097: IF Fnd_Api.to_Boolean(p_init_msg_list)
4098: THEN
4099: Fnd_Msg_Pub.initialize;
4100: END IF;
4101:

Line 4103: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4099: Fnd_Msg_Pub.initialize;
4100: END IF;
4101:
4102: -- Initialize API return status to success
4103: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4104:
4105: -- Api body starts
4106:
4107: -- Dump the API in the log file

Line 4165: RAISE Fnd_Api.G_EXC_ERROR;

4161: -- Validate the repair line ID if it exists in csd_repairs
4162: IF NOT
4163: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => x_product_txn_rec.repair_line_id))
4164: THEN
4165: RAISE Fnd_Api.G_EXC_ERROR;
4166: END IF;
4167:
4168: IF (g_debug > 0)
4169: THEN

Line 4177: RAISE Fnd_Api.G_EXC_ERROR;

4173: -- Validate the Action Type if it exists in fnd_lookups
4174: IF NOT
4175: (Csd_Process_Util.Validate_action_type(p_action_type => x_product_txn_rec.action_type))
4176: THEN
4177: RAISE Fnd_Api.G_EXC_ERROR;
4178: END IF;
4179:
4180: IF (g_debug > 0)
4181: THEN

Line 4189: RAISE Fnd_Api.G_EXC_ERROR;

4185: -- Validate the repair line ID if it exists in fnd_lookups
4186: IF NOT
4187: (Csd_Process_Util.Validate_action_code(p_action_code => x_product_txn_rec.action_code))
4188: THEN
4189: RAISE Fnd_Api.G_EXC_ERROR;
4190: END IF;
4191:
4192: IF (g_debug > 0)
4193: THEN

Line 4211: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

4207: p_repair_line_id => x_product_txn_rec.repair_line_id,
4208: p_prod_txn_qty => x_product_txn_rec.quantity,
4209: x_return_status => x_return_status);
4210:
4211: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4212: THEN
4213: IF (g_debug > 0)
4214: THEN
4215: Csd_Gen_Utility_Pvt.ADD('Validate_Quantity failed ');

Line 4217: RAISE Fnd_Api.G_EXC_ERROR;

4213: IF (g_debug > 0)
4214: THEN
4215: Csd_Gen_Utility_Pvt.ADD('Validate_Quantity failed ');
4216: END IF;
4217: RAISE Fnd_Api.G_EXC_ERROR;
4218: END IF;
4219: END IF;
4220:
4221: IF (g_debug > 0)

Line 4230: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)

4226: END IF;
4227:
4228: -- Validate the PROD_TXN_STATUS if it exists in fnd_lookups
4229: IF (x_product_txn_rec.PROD_TXN_STATUS IS NOT NULL) AND
4230: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)
4231: THEN
4232: BEGIN
4233: SELECT 'X'
4234: INTO l_check

Line 4242: RAISE Fnd_Api.G_EXC_ERROR;

4238: EXCEPTION
4239: WHEN OTHERS THEN
4240: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_PROD_TXN_STATUS');
4241: Fnd_Msg_Pub.ADD;
4242: RAISE Fnd_Api.G_EXC_ERROR;
4243: END;
4244: END IF;
4245:
4246: -- Get service request id from csd_repairs table

Line 4259: RAISE Fnd_Api.G_EXC_ERROR;

4255: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
4256: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
4257: x_product_txn_rec.repair_line_id);
4258: Fnd_Msg_Pub.ADD;
4259: RAISE Fnd_Api.G_EXC_ERROR;
4260: END;
4261:
4262: IF (g_debug > 0)
4263: THEN

Line 4282: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM

4278:
4279: IF l_bus_process_id < 0
4280: THEN
4281: IF NVL(x_product_txn_rec.business_process_id,
4282: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM
4283: THEN
4284: l_bus_process_id := x_product_txn_rec.business_process_id;
4285: ELSE
4286: IF (g_debug > 0)

Line 4290: RAISE Fnd_Api.G_EXC_ERROR;

4286: IF (g_debug > 0)
4287: THEN
4288: Csd_Gen_Utility_Pvt.ADD('Business process Id does not exist ');
4289: END IF;
4290: RAISE Fnd_Api.G_EXC_ERROR;
4291: END IF;
4292: END IF;
4293:
4294: IF (g_debug > 0)

Line 4311: RAISE Fnd_Api.G_EXC_ERROR;

4307: THEN
4308: Fnd_Message.SET_NAME('CSD', 'CSD_API_PARTY_MISSING');
4309: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
4310: Fnd_Msg_Pub.ADD;
4311: RAISE Fnd_Api.G_EXC_ERROR;
4312: END IF;
4313: IF get_account_details%ISOPEN
4314: THEN
4315: CLOSE get_account_details;

Line 4339: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

4335: x_line_type_id => l_line_type_id,
4336: x_line_category_code => l_line_category_code,
4337: x_return_status => x_return_status);
4338:
4339: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4340: THEN
4341: RAISE Fnd_Api.G_EXC_ERROR;
4342: END IF;
4343:

Line 4341: RAISE Fnd_Api.G_EXC_ERROR;

4337: x_return_status => x_return_status);
4338:
4339: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4340: THEN
4341: RAISE Fnd_Api.G_EXC_ERROR;
4342: END IF;
4343:
4344: IF (g_debug > 0)
4345: THEN

Line 4362: RAISE Fnd_Api.G_EXC_ERROR;

4358: Fnd_Message.SET_NAME('CSD', 'CSD_API_LINE_TYPE_MISSING');
4359: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
4360: x_product_txn_rec.txn_billing_type_id);
4361: Fnd_Msg_Pub.ADD;
4362: RAISE Fnd_Api.G_EXC_ERROR;
4363: END IF;
4364:
4365: -- Get the currency code from the price list if it is null or g_miss
4366: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

Line 4366: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

4362: RAISE Fnd_Api.G_EXC_ERROR;
4363: END IF;
4364:
4365: -- Get the currency code from the price list if it is null or g_miss
4366: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
4367: Fnd_Api.G_MISS_NUM
4368: THEN
4369: BEGIN
4370: SELECT currency_code

Line 4367: Fnd_Api.G_MISS_NUM

4363: END IF;
4364:
4365: -- Get the currency code from the price list if it is null or g_miss
4366: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
4367: Fnd_Api.G_MISS_NUM
4368: THEN
4369: BEGIN
4370: SELECT currency_code
4371: INTO l_curr_code

Line 4381: RAISE Fnd_Api.G_EXC_ERROR;

4377: 'CSD_API_INV_PRICE_LIST_ID');
4378: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
4379: x_product_txn_rec.price_list_id);
4380: Fnd_Msg_Pub.ADD;
4381: RAISE Fnd_Api.G_EXC_ERROR;
4382: WHEN TOO_MANY_ROWS THEN
4383: IF (g_debug > 0)
4384: THEN
4385: Csd_Gen_Utility_Pvt.ADD('Too many currency_codes');

Line 4403: RAISE Fnd_Api.G_EXC_ERROR;

4399: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_CURR_CODE');
4400: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
4401: x_product_txn_rec.price_list_id);
4402: Fnd_Msg_Pub.ADD;
4403: RAISE Fnd_Api.G_EXC_ERROR;
4404: END IF;
4405:
4406: l_serial_flag := Csd_Process_Util.Is_item_serialized(x_product_txn_rec.inventory_item_id);
4407:

Line 4433: RAISE Fnd_Api.G_EXC_ERROR;

4429: THEN
4430: Csd_Gen_Utility_Pvt.ADD('Serial Number missing for inventory_item_id =' ||
4431: x_product_txn_rec.inventory_item_id);
4432: END IF;
4433: RAISE Fnd_Api.G_EXC_ERROR;
4434: END IF;
4435: *****/
4436:
4437: -- assigning values for the charge record

Line 4516: RAISE Fnd_Api.G_EXC_ERROR;

4512: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_REPAIRS_UPDATE');
4513: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
4514: x_product_txn_rec.repair_line_id);
4515: Fnd_Msg_Pub.ADD;
4516: RAISE Fnd_Api.G_EXC_ERROR;
4517: END IF;
4518:
4519: -- Api body ends here
4520:

Line 4522: IF Fnd_Api.To_Boolean(p_commit)

4518:
4519: -- Api body ends here
4520:
4521: -- Standard check of p_commit.
4522: IF Fnd_Api.To_Boolean(p_commit)
4523: THEN
4524: COMMIT WORK;
4525: END IF;
4526:

Line 4531: WHEN Fnd_Api.G_EXC_ERROR THEN

4527: -- Standard call to get message count and IF count is get message info.
4528: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4529: p_data => x_msg_data);
4530: EXCEPTION
4531: WHEN Fnd_Api.G_EXC_ERROR THEN
4532: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4533: ROLLBACK TO create_product_txn;
4534: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4535: p_data => x_msg_data);

Line 4532: x_return_status := Fnd_Api.G_RET_STS_ERROR;

4528: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4529: p_data => x_msg_data);
4530: EXCEPTION
4531: WHEN Fnd_Api.G_EXC_ERROR THEN
4532: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4533: ROLLBACK TO create_product_txn;
4534: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4535: p_data => x_msg_data);
4536: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 4536: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

4532: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4533: ROLLBACK TO create_product_txn;
4534: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4535: p_data => x_msg_data);
4536: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4537: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4538: ROLLBACK TO create_product_txn;
4539: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4540: p_data => x_msg_data);

Line 4537: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4533: ROLLBACK TO create_product_txn;
4534: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4535: p_data => x_msg_data);
4536: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4537: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4538: ROLLBACK TO create_product_txn;
4539: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4540: p_data => x_msg_data);
4541: WHEN OTHERS THEN

Line 4542: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4538: ROLLBACK TO create_product_txn;
4539: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4540: p_data => x_msg_data);
4541: WHEN OTHERS THEN
4542: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4543: ROLLBACK TO create_product_txn;
4544: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
4545: THEN
4546: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 4560: p_commit IN VARCHAR2 := Fnd_Api.g_false,

4556: /* order form */
4557: /*----------------------------------------------------------------*/
4558:
4559: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4560: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4561: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4562: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4563: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4564: x_return_status OUT NOCOPY VARCHAR2,

Line 4561: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

4557: /*----------------------------------------------------------------*/
4558:
4559: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4560: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4561: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4562: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4563: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4564: x_return_status OUT NOCOPY VARCHAR2,
4565: x_msg_count OUT NOCOPY NUMBER,

Line 4562: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

4558:
4559: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4560: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4561: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4562: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4563: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4564: x_return_status OUT NOCOPY VARCHAR2,
4565: x_msg_count OUT NOCOPY NUMBER,
4566: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 4613: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4609:
4610: SAVEPOINT UPDATE_PRODUCT_TXN_PVT;
4611:
4612: -- Initialize API return status to success
4613: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4614:
4615: -- Fix for bug#6210765
4616: -- Initialize message list if p_init_msg_list is set to TRUE.
4617: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 4617: IF Fnd_Api.to_Boolean(p_init_msg_list)

4613: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4614:
4615: -- Fix for bug#6210765
4616: -- Initialize message list if p_init_msg_list is set to TRUE.
4617: IF Fnd_Api.to_Boolean(p_init_msg_list)
4618: THEN
4619: Fnd_Msg_Pub.initialize;
4620: END IF;
4621:

Line 4689: /*IF (nvl(x_product_txn_rec.bill_to_account_id, FND_API.GMISS_NUM) <> FND_API.GMISS_NUM) AND

4685: -- swai: bug 5931926 - 12.0.2 3rd party logistics. If the bill to party
4686: -- and account have been specified, then this is a 3rd party logistics line,
4687: -- and we need to override the SR party and account from get_order_rec with
4688: -- the thrid party info
4689: /*IF (nvl(x_product_txn_rec.bill_to_account_id, FND_API.GMISS_NUM) <> FND_API.GMISS_NUM) AND
4690: (nvl(x_product_txn_rec.bill_to_party_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM) THEN */
4691: IF (x_product_txn_rec.bill_to_party_id is not null) and
4692: (x_product_txn_rec.bill_to_account_id is not null) THEN
4693: l_order_Rec.party_id := x_product_txn_rec.bill_to_party_id;

Line 4690: (nvl(x_product_txn_rec.bill_to_party_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM) THEN */

4686: -- and account have been specified, then this is a 3rd party logistics line,
4687: -- and we need to override the SR party and account from get_order_rec with
4688: -- the thrid party info
4689: /*IF (nvl(x_product_txn_rec.bill_to_account_id, FND_API.GMISS_NUM) <> FND_API.GMISS_NUM) AND
4690: (nvl(x_product_txn_rec.bill_to_party_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM) THEN */
4691: IF (x_product_txn_rec.bill_to_party_id is not null) and
4692: (x_product_txn_rec.bill_to_account_id is not null) THEN
4693: l_order_Rec.party_id := x_product_txn_rec.bill_to_party_id;
4694: l_order_Rec.account_id := x_product_txn_rec.bill_to_account_id;

Line 4702: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

4698: p_product_txn_rec => x_product_txn_rec,
4699: p_prodtxn_db_attr => l_prodtxn_db_attr,
4700: px_order_rec => l_order_rec);
4701:
4702: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4703: RAISE Create_ORDER;
4704: END IF;
4705: IF l_prodtxn_db_attr.curr_book_order_flag <>
4706: x_product_txn_rec.book_sales_order_flag AND

Line 4718: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

4714: Csd_Logistics_Util.book_prodtxn( x_return_status => l_return_status,
4715: p_product_txn_rec => x_product_txn_rec,
4716: p_prodtxn_db_attr => l_prodtxn_db_attr,
4717: px_order_rec => l_order_rec);
4718: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4719: RAISE BOOK_ORDER;
4720: END IF;
4721:
4722:

Line 4738: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

4734: Csd_Logistics_Util.pickrelease_prodtxn(x_return_status => l_return_status,
4735: p_product_txn_rec => x_product_txn_rec,
4736: p_prodtxn_db_attr => l_prodtxn_db_attr,
4737: px_order_rec => l_order_rec);
4738: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4739: RAISE RELEASE_ORDER;
4740: END IF;
4741: END IF; --end of pick-release sales order
4742:

Line 4757: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

4753: p_product_txn_rec => x_product_txn_rec,
4754: p_prodtxn_db_attr => l_prodtxn_db_attr,
4755: px_order_rec => l_order_rec);
4756:
4757: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4758: RAISE SHIP_ORDER;
4759: END IF;
4760:
4761: END IF; -- end of ship sales order

Line 4768: IF Fnd_Api.To_Boolean(p_commit)

4764:
4765: -- Api body ends here
4766:
4767: -- Standard check of p_commit.
4768: IF Fnd_Api.To_Boolean(p_commit)
4769: THEN
4770: COMMIT WORK;
4771: END IF;
4772:

Line 4778: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4774: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4775: p_data => x_msg_data);
4776: EXCEPTION
4777: WHEN CREATE_ORDER THEN
4778: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4779:
4780: /*FP Fixed for bug#4526773
4781: When error occurred then complete rollback should be
4782: done so that sanity of charge line and product line

Line 4801: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4797: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4798: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4799: p_data => x_msg_data);
4800: WHEN BOOK_ORDER THEN
4801: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4802: ROLLBACK TO book_sales_order;
4803: -- update the prod txn as the order
4804: -- line was not booked
4805: UPDATE csd_product_transactions

Line 4814: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4810: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4811: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4812: p_data => x_msg_data);
4813: WHEN RELEASE_ORDER THEN
4814: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4815: ROLLBACK TO release_sales_order;
4816: -- update the prod txn as the order
4817: -- line was not booked
4818: UPDATE csd_product_transactions

Line 4826: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4822: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4823: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4824: p_data => x_msg_data);
4825: WHEN SHIP_ORDER THEN
4826: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4827: ROLLBACK TO ship_sales_order;
4828: -- update the prod txn as the order
4829: -- line was not booked
4830: UPDATE csd_product_transactions

Line 4836: WHEN Fnd_Api.G_EXC_ERROR THEN

4832: WHERE product_transaction_id =
4833: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4834: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4835: p_data => x_msg_data);
4836: WHEN Fnd_Api.G_EXC_ERROR THEN
4837: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4838: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4839: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4840: p_data => x_msg_data);

Line 4837: x_return_status := Fnd_Api.G_RET_STS_ERROR;

4833: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4834: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4835: p_data => x_msg_data);
4836: WHEN Fnd_Api.G_EXC_ERROR THEN
4837: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4838: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4839: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4840: p_data => x_msg_data);
4841: Debug('in exc_error, x_msg_data,count[' || x_msg_data|| ','||to_char(x_msg_count)||']',

Line 4846: l_msg_data := apps.FND_MSG_PUB.Get(i,FND_API.G_TRUE) ;

4842: l_mod_name,
4843: l_statement_level);
4844: IF x_msg_count > 1 THEN
4845: FOR i IN 1..x_msg_count LOOP
4846: l_msg_data := apps.FND_MSG_PUB.Get(i,FND_API.G_TRUE) ;
4847: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
4848: l_mod_name,
4849: l_statement_level);
4850: END LOOP ;

Line 4852: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

4848: l_mod_name,
4849: l_statement_level);
4850: END LOOP ;
4851: END IF ;
4852: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4853: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4854: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4855: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4856: p_data => x_msg_data);

Line 4853: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4849: l_statement_level);
4850: END LOOP ;
4851: END IF ;
4852: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4853: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4854: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4855: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4856: p_data => x_msg_data);
4857: Debug('in unexp_Error, x_msg_data[' || x_msg_data||']',

Line 4862: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;

4858: l_mod_name,
4859: l_statement_level);
4860: IF x_msg_count > 1 THEN
4861: FOR i IN 1..x_msg_count LOOP
4862: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
4863: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
4864: l_mod_name,
4865: l_statement_level);
4866: END LOOP ;

Line 4869: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4865: l_statement_level);
4866: END LOOP ;
4867: END IF ;
4868: WHEN OTHERS THEN
4869: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4870: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4871: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
4872: THEN
4873: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 4882: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;

4878: l_mod_name,
4879: l_statement_level);
4880: IF x_msg_count > 1 THEN
4881: FOR i IN 1..x_msg_count LOOP
4882: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
4883: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
4884: l_mod_name,
4885: l_statement_level);
4886: END LOOP ;

Line 4898: p_commit IN VARCHAR2 := Fnd_Api.g_false,

4894: /* */
4895: /*--------------------------------------------------*/
4896:
4897: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
4898: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4899: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4900: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4901: p_product_txn_id IN NUMBER,
4902: x_return_status OUT NOCOPY VARCHAR2,

Line 4899: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

4895: /*--------------------------------------------------*/
4896:
4897: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
4898: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4899: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4900: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4901: p_product_txn_id IN NUMBER,
4902: x_return_status OUT NOCOPY VARCHAR2,
4903: x_msg_count OUT NOCOPY NUMBER,

Line 4900: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

4896:
4897: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
4898: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4899: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4900: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4901: p_product_txn_id IN NUMBER,
4902: x_return_status OUT NOCOPY VARCHAR2,
4903: x_msg_count OUT NOCOPY NUMBER,
4904: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 4920: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

4916: -- Standard Start of API savepoint
4917: SAVEPOINT delete_product_txn;
4918:
4919: -- Standard call to check for call compatibility.
4920: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
4921: p_api_version,
4922: l_api_name,
4923: G_PKG_NAME)
4924: THEN

Line 4925: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4921: p_api_version,
4922: l_api_name,
4923: G_PKG_NAME)
4924: THEN
4925: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4926: END IF;
4927:
4928: -- Initialize message list if p_init_msg_list is set to TRUE.
4929: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 4929: IF Fnd_Api.to_Boolean(p_init_msg_list)

4925: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4926: END IF;
4927:
4928: -- Initialize message list if p_init_msg_list is set to TRUE.
4929: IF Fnd_Api.to_Boolean(p_init_msg_list)
4930: THEN
4931: Fnd_Msg_Pub.initialize;
4932: END IF;
4933:

Line 4935: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4931: Fnd_Msg_Pub.initialize;
4932: END IF;
4933:
4934: -- Initialize API return status to success
4935: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4936:
4937: -- Api body starts
4938: IF (g_debug > 0)
4939: THEN

Line 4964: RAISE Fnd_Api.G_EXC_ERROR;

4960: -- Validate the repair line ID
4961: IF NOT
4962: (Csd_Process_Util.Validate_prod_txn_id(p_prod_txn_id => p_product_txn_id))
4963: THEN
4964: RAISE Fnd_Api.G_EXC_ERROR;
4965: END IF;
4966:
4967: -- The Product txn line is allowed to delete
4968: -- only if it is not interfaced

Line 4988: RAISE Fnd_Api.G_EXC_ERROR;

4984: IF (g_debug > 0)
4985: THEN
4986: Csd_Gen_Utility_Pvt.ADD('Product txn is interfaced,so it cannot be deleted');
4987: END IF;
4988: RAISE Fnd_Api.G_EXC_ERROR;
4989: WHEN TOO_MANY_ROWS THEN
4990: IF (g_debug > 0)
4991: THEN
4992: Csd_Gen_Utility_Pvt.ADD('Too many from Product txn line is allowed to delete');

Line 5013: p_commit => Fnd_Api.g_false,

5009: Csd_Gen_Utility_Pvt.ADD('Call process_charge_lines to delete');
5010: END IF;
5011:
5012: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5013: p_commit => Fnd_Api.g_false,
5014: p_init_msg_list => Fnd_Api.g_true,
5015: p_validation_level => Fnd_Api.g_valid_level_full,
5016: p_action => 'DELETE',
5017: p_Charges_Rec => l_Charges_Rec,

Line 5014: p_init_msg_list => Fnd_Api.g_true,

5010: END IF;
5011:
5012: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5013: p_commit => Fnd_Api.g_false,
5014: p_init_msg_list => Fnd_Api.g_true,
5015: p_validation_level => Fnd_Api.g_valid_level_full,
5016: p_action => 'DELETE',
5017: p_Charges_Rec => l_Charges_Rec,
5018: x_estimate_detail_id => x_estimate_detail_id,

Line 5015: p_validation_level => Fnd_Api.g_valid_level_full,

5011:
5012: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5013: p_commit => Fnd_Api.g_false,
5014: p_init_msg_list => Fnd_Api.g_true,
5015: p_validation_level => Fnd_Api.g_valid_level_full,
5016: p_action => 'DELETE',
5017: p_Charges_Rec => l_Charges_Rec,
5018: x_estimate_detail_id => x_estimate_detail_id,
5019: x_return_status => x_return_status,

Line 5023: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

5019: x_return_status => x_return_status,
5020: x_msg_count => x_msg_count,
5021: x_msg_data => x_msg_data);
5022:
5023: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5024: THEN
5025: RAISE Fnd_Api.G_EXC_ERROR;
5026: END IF;
5027:

Line 5025: RAISE Fnd_Api.G_EXC_ERROR;

5021: x_msg_data => x_msg_data);
5022:
5023: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5024: THEN
5025: RAISE Fnd_Api.G_EXC_ERROR;
5026: END IF;
5027:
5028: IF (g_debug > 0)
5029: THEN

Line 5039: IF Fnd_Api.To_Boolean(p_commit)

5035:
5036: -- Api body ends here
5037:
5038: -- Standard check of p_commit.
5039: IF Fnd_Api.To_Boolean(p_commit)
5040: THEN
5041: COMMIT WORK;
5042: END IF;
5043:

Line 5048: WHEN Fnd_Api.G_EXC_ERROR THEN

5044: -- Standard call to get message count and IF count is get message info.
5045: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5046: p_data => x_msg_data);
5047: EXCEPTION
5048: WHEN Fnd_Api.G_EXC_ERROR THEN
5049: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5050: ROLLBACK TO delete_product_txn;
5051: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5052: p_data => x_msg_data);

Line 5049: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5045: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5046: p_data => x_msg_data);
5047: EXCEPTION
5048: WHEN Fnd_Api.G_EXC_ERROR THEN
5049: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5050: ROLLBACK TO delete_product_txn;
5051: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5052: p_data => x_msg_data);
5053: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 5053: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5049: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5050: ROLLBACK TO delete_product_txn;
5051: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5052: p_data => x_msg_data);
5053: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5054: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5055: ROLLBACK TO delete_product_txn;
5056: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5057: p_data => x_msg_data);

Line 5054: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5050: ROLLBACK TO delete_product_txn;
5051: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5052: p_data => x_msg_data);
5053: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5054: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5055: ROLLBACK TO delete_product_txn;
5056: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5057: p_data => x_msg_data);
5058: WHEN OTHERS THEN

Line 5059: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5055: ROLLBACK TO delete_product_txn;
5056: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5057: p_data => x_msg_data);
5058: WHEN OTHERS THEN
5059: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5060: ROLLBACK TO delete_product_txn;
5061: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5062: THEN
5063: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 5077: p_commit IN VARCHAR2 := Fnd_Api.g_false,

5073: /* */
5074: /*--------------------------------------------------*/
5075:
5076: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5077: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5078: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5079: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5080: p_repair_line_id IN NUMBER,
5081: x_return_status OUT NOCOPY VARCHAR2,

Line 5078: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

5074: /*--------------------------------------------------*/
5075:
5076: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5077: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5078: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5079: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5080: p_repair_line_id IN NUMBER,
5081: x_return_status OUT NOCOPY VARCHAR2,
5082: x_msg_count OUT NOCOPY NUMBER,

Line 5079: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

5075:
5076: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5077: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5078: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5079: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5080: p_repair_line_id IN NUMBER,
5081: x_return_status OUT NOCOPY VARCHAR2,
5082: x_msg_count OUT NOCOPY NUMBER,
5083: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 5106: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5102: -- Standard Start of API savepoint
5103: SAVEPOINT create_default_prod_txn;
5104:
5105: -- Standard call to check for call compatibility.
5106: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5107: p_api_version,
5108: l_api_name,
5109: G_PKG_NAME)
5110: THEN

Line 5111: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5107: p_api_version,
5108: l_api_name,
5109: G_PKG_NAME)
5110: THEN
5111: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5112: END IF;
5113:
5114: -- Initialize message list if p_init_msg_list is set to TRUE.
5115: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 5115: IF Fnd_Api.to_Boolean(p_init_msg_list)

5111: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5112: END IF;
5113:
5114: -- Initialize message list if p_init_msg_list is set to TRUE.
5115: IF Fnd_Api.to_Boolean(p_init_msg_list)
5116: THEN
5117: Fnd_Msg_Pub.initialize;
5118: END IF;
5119:

Line 5121: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5117: Fnd_Msg_Pub.initialize;
5118: END IF;
5119:
5120: -- Initialize API return status to success
5121: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5122:
5123: -- Api body starts
5124: IF (g_debug > 0)
5125: THEN

Line 5149: RAISE Fnd_Api.G_EXC_ERROR;

5145: -- Validate the repair line ID
5146: IF NOT
5147: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => p_repair_line_id))
5148: THEN
5149: RAISE Fnd_Api.G_EXC_ERROR;
5150: END IF;
5151:
5152: IF (g_debug > 0)
5153: THEN

Line 5167: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

5163: Csd_Process_Util.BUILD_PROD_TXN_TBL(p_repair_line_id => p_repair_line_id,
5164: x_prod_txn_tbl => x_prod_txn_tbl,
5165: x_return_status => x_return_status);
5166:
5167: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5168: THEN
5169: RAISE Fnd_Api.G_EXC_ERROR;
5170: END IF;
5171:

Line 5169: RAISE Fnd_Api.G_EXC_ERROR;

5165: x_return_status => x_return_status);
5166:
5167: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5168: THEN
5169: RAISE Fnd_Api.G_EXC_ERROR;
5170: END IF;
5171:
5172: IF (g_debug > 0)
5173: THEN

Line 5188: p_commit => fnd_api.g_false,

5184: END IF;
5185:
5186: CREATE_PRODUCT_TXN
5187: (p_api_version => 1.0 ,
5188: p_commit => fnd_api.g_false,
5189: p_init_msg_list => 'F',
5190: p_validation_level => fnd_api.g_valid_level_full,
5191: x_product_txn_rec => x_prod_txn_tbl(i),
5192: x_return_status => x_return_status,

Line 5190: p_validation_level => fnd_api.g_valid_level_full,

5186: CREATE_PRODUCT_TXN
5187: (p_api_version => 1.0 ,
5188: p_commit => fnd_api.g_false,
5189: p_init_msg_list => 'F',
5190: p_validation_level => fnd_api.g_valid_level_full,
5191: x_product_txn_rec => x_prod_txn_tbl(i),
5192: x_return_status => x_return_status,
5193: x_msg_count => x_msg_count,
5194: x_msg_data => x_msg_data );

Line 5196: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

5192: x_return_status => x_return_status,
5193: x_msg_count => x_msg_count,
5194: x_msg_data => x_msg_data );
5195:
5196: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5197: RAISE FND_API.G_EXC_ERROR;
5198: END IF;
5199: -- Log the message after processing
5200: -- each prod txn

Line 5197: RAISE FND_API.G_EXC_ERROR;

5193: x_msg_count => x_msg_count,
5194: x_msg_data => x_msg_data );
5195:
5196: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5197: RAISE FND_API.G_EXC_ERROR;
5198: END IF;
5199: -- Log the message after processing
5200: -- each prod txn
5201: FOR i in 1..x_msg_Count LOOP

Line 5249: p_commit => fnd_api.g_false,

5245: END IF;
5246:
5247: CREATE_PRODUCT_TXN
5248: (p_api_version => 1.0 ,
5249: p_commit => fnd_api.g_false,
5250: p_init_msg_list => 'F',
5251: p_validation_level => fnd_api.g_valid_level_full,
5252: x_product_txn_rec => x_prod_txn_tbl(i),
5253: x_return_status => x_return_status,

Line 5251: p_validation_level => fnd_api.g_valid_level_full,

5247: CREATE_PRODUCT_TXN
5248: (p_api_version => 1.0 ,
5249: p_commit => fnd_api.g_false,
5250: p_init_msg_list => 'F',
5251: p_validation_level => fnd_api.g_valid_level_full,
5252: x_product_txn_rec => x_prod_txn_tbl(i),
5253: x_return_status => x_return_status,
5254: x_msg_count => x_msg_count,
5255: x_msg_data => x_msg_data );

Line 5257: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

5253: x_return_status => x_return_status,
5254: x_msg_count => x_msg_count,
5255: x_msg_data => x_msg_data );
5256:
5257: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5258: RAISE FND_API.G_EXC_ERROR;
5259: END IF;
5260: -- Log the message after processing
5261: -- each prod txn

Line 5258: RAISE FND_API.G_EXC_ERROR;

5254: x_msg_count => x_msg_count,
5255: x_msg_data => x_msg_data );
5256:
5257: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5258: RAISE FND_API.G_EXC_ERROR;
5259: END IF;
5260: -- Log the message after processing
5261: -- each prod txn
5262: FOR i in 1..x_msg_Count LOOP

Line 5285: IF Fnd_Api.To_Boolean(p_commit)

5281: Fnd_Msg_Pub.ADD;
5282: END IF;
5283:
5284: -- Standard check of p_commit.
5285: IF Fnd_Api.To_Boolean(p_commit)
5286: THEN
5287: COMMIT WORK;
5288: END IF;
5289:

Line 5295: WHEN Fnd_Api.G_EXC_ERROR THEN

5291: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5292: p_data => x_msg_data);
5293:
5294: EXCEPTION
5295: WHEN Fnd_Api.G_EXC_ERROR THEN
5296: ROLLBACK TO create_default_prod_txn;
5297: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5298: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5299: p_data => x_msg_data);

Line 5297: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5293:
5294: EXCEPTION
5295: WHEN Fnd_Api.G_EXC_ERROR THEN
5296: ROLLBACK TO create_default_prod_txn;
5297: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5298: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5299: p_data => x_msg_data);
5300: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5301: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5300: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5296: ROLLBACK TO create_default_prod_txn;
5297: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5298: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5299: p_data => x_msg_data);
5300: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5301: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5302: ROLLBACK TO create_default_prod_txn;
5303: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5304: p_data => x_msg_data);

Line 5301: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5297: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5298: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5299: p_data => x_msg_data);
5300: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5301: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5302: ROLLBACK TO create_default_prod_txn;
5303: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5304: p_data => x_msg_data);
5305: WHEN OTHERS THEN

Line 5306: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5302: ROLLBACK TO create_default_prod_txn;
5303: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5304: p_data => x_msg_data);
5305: WHEN OTHERS THEN
5306: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5307: ROLLBACK TO create_default_prod_txn;
5308: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5309: THEN
5310: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 5414: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

5410: /* procedure name: create_task */
5411: /* description : procedure used to create task */
5412: /* Called from : Depot Repair Form to Create Task */
5413: /* Input Parm : p_api_version NUMBER Required Api Version number */
5414: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5415: /* default value is fnd_api.g_false */
5416: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5417: /* fnd_api.g_false */
5418: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 5415: /* default value is fnd_api.g_false */

5411: /* description : procedure used to create task */
5412: /* Called from : Depot Repair Form to Create Task */
5413: /* Input Parm : p_api_version NUMBER Required Api Version number */
5414: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5415: /* default value is fnd_api.g_false */
5416: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5417: /* fnd_api.g_false */
5418: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5419: /* validation steps must be done and which steps */

Line 5416: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

5412: /* Called from : Depot Repair Form to Create Task */
5413: /* Input Parm : p_api_version NUMBER Required Api Version number */
5414: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5415: /* default value is fnd_api.g_false */
5416: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5417: /* fnd_api.g_false */
5418: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5419: /* validation steps must be done and which steps */
5420: /* should be skipped. */

Line 5417: /* fnd_api.g_false */

5413: /* Input Parm : p_api_version NUMBER Required Api Version number */
5414: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5415: /* default value is fnd_api.g_false */
5416: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5417: /* fnd_api.g_false */
5418: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5419: /* validation steps must be done and which steps */
5420: /* should be skipped. */
5421: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */

Line 5423: /* fnd_api.g_ret_sts_success (success) */

5419: /* validation steps must be done and which steps */
5420: /* should be skipped. */
5421: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5422: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5423: /* fnd_api.g_ret_sts_success (success) */
5424: /* fnd_api.g_ret_sts_error (error) */
5425: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5426: /* x_msg_count NUMBER Number of messages in the message stack */
5427: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 5424: /* fnd_api.g_ret_sts_error (error) */

5420: /* should be skipped. */
5421: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5422: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5423: /* fnd_api.g_ret_sts_success (success) */
5424: /* fnd_api.g_ret_sts_error (error) */
5425: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5426: /* x_msg_count NUMBER Number of messages in the message stack */
5427: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5428: /* x_task_id NUMBER Task Id of the created Task */

Line 5425: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

5421: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5422: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5423: /* fnd_api.g_ret_sts_success (success) */
5424: /* fnd_api.g_ret_sts_error (error) */
5425: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5426: /* x_msg_count NUMBER Number of messages in the message stack */
5427: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5428: /* x_task_id NUMBER Task Id of the created Task */
5429: /*-----------------------------------------------------------------------------------------------------------*/

Line 5432: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

5428: /* x_task_id NUMBER Task Id of the created Task */
5429: /*-----------------------------------------------------------------------------------------------------------*/
5430:
5431: PROCEDURE create_task(p_api_version IN NUMBER,
5432: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5433: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5434: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5435: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5436: x_return_status OUT NOCOPY VARCHAR2,

Line 5433: p_commit IN VARCHAR2 := Fnd_Api.g_false,

5429: /*-----------------------------------------------------------------------------------------------------------*/
5430:
5431: PROCEDURE create_task(p_api_version IN NUMBER,
5432: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5433: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5434: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5435: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5436: x_return_status OUT NOCOPY VARCHAR2,
5437: x_msg_count OUT NOCOPY NUMBER,

Line 5434: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

5430:
5431: PROCEDURE create_task(p_api_version IN NUMBER,
5432: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5433: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5434: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5435: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5436: x_return_status OUT NOCOPY VARCHAR2,
5437: x_msg_count OUT NOCOPY NUMBER,
5438: x_msg_data OUT NOCOPY VARCHAR2,

Line 5456: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5452: -- -----------------
5453: -- Standard Start of API savepoint
5454: SAVEPOINT create_task;
5455: -- Standard call to check for call compatibility.
5456: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5457: p_api_version,
5458: l_api_name,
5459: G_PKG_NAME)
5460: THEN

Line 5461: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5457: p_api_version,
5458: l_api_name,
5459: G_PKG_NAME)
5460: THEN
5461: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5462: END IF;
5463: -- Initialize message list if p_init_msg_list is set to TRUE.
5464: IF Fnd_Api.to_Boolean(p_init_msg_list)
5465: THEN

Line 5464: IF Fnd_Api.to_Boolean(p_init_msg_list)

5460: THEN
5461: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5462: END IF;
5463: -- Initialize message list if p_init_msg_list is set to TRUE.
5464: IF Fnd_Api.to_Boolean(p_init_msg_list)
5465: THEN
5466: Fnd_Msg_Pub.initialize;
5467: END IF;
5468: -- Initialize API return status to success

Line 5469: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5465: THEN
5466: Fnd_Msg_Pub.initialize;
5467: END IF;
5468: -- Initialize API return status to success
5469: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5470: -- ---------------
5471: -- Api body starts
5472: -- ---------------
5473: IF (g_debug > 0)

Line 5482: P_INIT_MSG_LIST => Fnd_Api.g_true,

5478: -- ----------------------------------------
5479: -- Calling Public JTF API to create a Task
5480: -- ----------------------------------------
5481: Jtf_Tasks_Pub.CREATE_TASK(P_API_VERSION => 1.0,
5482: P_INIT_MSG_LIST => Fnd_Api.g_true,
5483: P_COMMIT => Fnd_Api.g_false,
5484: P_TASK_ID => l_create_task_rec.task_id,
5485: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5486: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,

Line 5483: P_COMMIT => Fnd_Api.g_false,

5479: -- Calling Public JTF API to create a Task
5480: -- ----------------------------------------
5481: Jtf_Tasks_Pub.CREATE_TASK(P_API_VERSION => 1.0,
5482: P_INIT_MSG_LIST => Fnd_Api.g_true,
5483: P_COMMIT => Fnd_Api.g_false,
5484: P_TASK_ID => l_create_task_rec.task_id,
5485: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5486: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,
5487: P_DESCRIPTION => l_create_task_rec.DESCRIPTION,

Line 5551: IF Fnd_Api.To_Boolean(p_commit)

5547: -- -------------------
5548: -- Api body ends here
5549: -- -------------------
5550: -- Standard check of p_commit.
5551: IF Fnd_Api.To_Boolean(p_commit)
5552: THEN
5553: COMMIT WORK;
5554: END IF;
5555: -- Standard call to get message count and IF count is get message info.

Line 5559: WHEN Fnd_Api.G_EXC_ERROR THEN

5555: -- Standard call to get message count and IF count is get message info.
5556: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5557: p_data => x_msg_data);
5558: EXCEPTION
5559: WHEN Fnd_Api.G_EXC_ERROR THEN
5560: ROLLBACK TO create_task;
5561: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5562: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5563: p_data => x_msg_data);

Line 5561: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5557: p_data => x_msg_data);
5558: EXCEPTION
5559: WHEN Fnd_Api.G_EXC_ERROR THEN
5560: ROLLBACK TO create_task;
5561: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5562: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5563: p_data => x_msg_data);
5564: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5565: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5564: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5560: ROLLBACK TO create_task;
5561: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5562: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5563: p_data => x_msg_data);
5564: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5565: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5566: ROLLBACK TO create_task;
5567: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5568: p_data => x_msg_data);

Line 5565: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5561: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5562: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5563: p_data => x_msg_data);
5564: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5565: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5566: ROLLBACK TO create_task;
5567: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5568: p_data => x_msg_data);
5569: WHEN OTHERS THEN

Line 5570: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5566: ROLLBACK TO create_task;
5567: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5568: p_data => x_msg_data);
5569: WHEN OTHERS THEN
5570: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5571: ROLLBACK TO create_task;
5572: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5573: THEN
5574: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 5585: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

5581: /* procedure name: update_task */
5582: /* description : procedure used to update task */
5583: /* Called from : Depot Repair Form to Create Task */
5584: /* Input Parm : p_api_version NUMBER Required Api Version number */
5585: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5586: /* default value is fnd_api.g_false */
5587: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5588: /* fnd_api.g_false */
5589: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 5586: /* default value is fnd_api.g_false */

5582: /* description : procedure used to update task */
5583: /* Called from : Depot Repair Form to Create Task */
5584: /* Input Parm : p_api_version NUMBER Required Api Version number */
5585: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5586: /* default value is fnd_api.g_false */
5587: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5588: /* fnd_api.g_false */
5589: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5590: /* validation steps must be done and which steps */

Line 5587: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

5583: /* Called from : Depot Repair Form to Create Task */
5584: /* Input Parm : p_api_version NUMBER Required Api Version number */
5585: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5586: /* default value is fnd_api.g_false */
5587: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5588: /* fnd_api.g_false */
5589: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5590: /* validation steps must be done and which steps */
5591: /* should be skipped. */

Line 5588: /* fnd_api.g_false */

5584: /* Input Parm : p_api_version NUMBER Required Api Version number */
5585: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5586: /* default value is fnd_api.g_false */
5587: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5588: /* fnd_api.g_false */
5589: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5590: /* validation steps must be done and which steps */
5591: /* should be skipped. */
5592: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */

Line 5594: /* fnd_api.g_ret_sts_success (success) */

5590: /* validation steps must be done and which steps */
5591: /* should be skipped. */
5592: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5593: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5594: /* fnd_api.g_ret_sts_success (success) */
5595: /* fnd_api.g_ret_sts_error (error) */
5596: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5597: /* x_msg_count NUMBER Number of messages in the message stack */
5598: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 5595: /* fnd_api.g_ret_sts_error (error) */

5591: /* should be skipped. */
5592: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5593: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5594: /* fnd_api.g_ret_sts_success (success) */
5595: /* fnd_api.g_ret_sts_error (error) */
5596: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5597: /* x_msg_count NUMBER Number of messages in the message stack */
5598: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5599: /*-----------------------------------------------------------------------------------------------------------*/

Line 5596: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

5592: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5593: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5594: /* fnd_api.g_ret_sts_success (success) */
5595: /* fnd_api.g_ret_sts_error (error) */
5596: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5597: /* x_msg_count NUMBER Number of messages in the message stack */
5598: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5599: /*-----------------------------------------------------------------------------------------------------------*/
5600:

Line 5602: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

5598: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5599: /*-----------------------------------------------------------------------------------------------------------*/
5600:
5601: PROCEDURE update_task(p_api_version IN NUMBER,
5602: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5603: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5604: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5605: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5606: x_return_status OUT NOCOPY VARCHAR2,

Line 5603: p_commit IN VARCHAR2 := Fnd_Api.g_false,

5599: /*-----------------------------------------------------------------------------------------------------------*/
5600:
5601: PROCEDURE update_task(p_api_version IN NUMBER,
5602: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5603: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5604: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5605: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5606: x_return_status OUT NOCOPY VARCHAR2,
5607: x_msg_count OUT NOCOPY NUMBER,

Line 5604: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

5600:
5601: PROCEDURE update_task(p_api_version IN NUMBER,
5602: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5603: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5604: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5605: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5606: x_return_status OUT NOCOPY VARCHAR2,
5607: x_msg_count OUT NOCOPY NUMBER,
5608: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 5625: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5621: -- -----------------
5622: -- Standard Start of API savepoint
5623: SAVEPOINT update_task;
5624: -- Standard call to check for call compatibility.
5625: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5626: p_api_version,
5627: l_api_name,
5628: G_PKG_NAME)
5629: THEN

Line 5630: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5626: p_api_version,
5627: l_api_name,
5628: G_PKG_NAME)
5629: THEN
5630: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5631: END IF;
5632: -- Initialize message list if p_init_msg_list is set to TRUE.
5633: IF Fnd_Api.to_Boolean(p_init_msg_list)
5634: THEN

Line 5633: IF Fnd_Api.to_Boolean(p_init_msg_list)

5629: THEN
5630: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5631: END IF;
5632: -- Initialize message list if p_init_msg_list is set to TRUE.
5633: IF Fnd_Api.to_Boolean(p_init_msg_list)
5634: THEN
5635: Fnd_Msg_Pub.initialize;
5636: END IF;
5637: -- Initialize API return status to success

Line 5638: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5634: THEN
5635: Fnd_Msg_Pub.initialize;
5636: END IF;
5637: -- Initialize API return status to success
5638: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5639: -- ---------------
5640: -- Api body starts
5641: -- ---------------
5642: IF (g_debug > 0)

Line 5651: P_INIT_MSG_LIST => Fnd_Api.g_true,

5647: -- ----------------------------------------
5648: -- Calling Public JTF API to Update a Task
5649: -- ----------------------------------------
5650: Jtf_Tasks_Pub.UPDATE_TASK(P_API_VERSION => 1.0,
5651: P_INIT_MSG_LIST => Fnd_Api.g_true,
5652: P_COMMIT => Fnd_Api.g_false,
5653: P_TASK_ID => l_create_task_rec.task_id,
5654: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5655: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,

Line 5652: P_COMMIT => Fnd_Api.g_false,

5648: -- Calling Public JTF API to Update a Task
5649: -- ----------------------------------------
5650: Jtf_Tasks_Pub.UPDATE_TASK(P_API_VERSION => 1.0,
5651: P_INIT_MSG_LIST => Fnd_Api.g_true,
5652: P_COMMIT => Fnd_Api.g_false,
5653: P_TASK_ID => l_create_task_rec.task_id,
5654: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5655: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,
5656: P_DESCRIPTION => l_create_task_rec.DESCRIPTION,

Line 5721: IF Fnd_Api.To_Boolean(p_commit)

5717: -- -------------------
5718: -- Api body ends here
5719: -- -------------------
5720: -- Standard check of p_commit.
5721: IF Fnd_Api.To_Boolean(p_commit)
5722: THEN
5723: COMMIT WORK;
5724: END IF;
5725: -- Standard call to get message count and IF count is get message info.

Line 5729: WHEN Fnd_Api.G_EXC_ERROR THEN

5725: -- Standard call to get message count and IF count is get message info.
5726: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5727: p_data => x_msg_data);
5728: EXCEPTION
5729: WHEN Fnd_Api.G_EXC_ERROR THEN
5730: ROLLBACK TO update_task;
5731: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5732: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5733: p_data => x_msg_data);

Line 5731: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5727: p_data => x_msg_data);
5728: EXCEPTION
5729: WHEN Fnd_Api.G_EXC_ERROR THEN
5730: ROLLBACK TO update_task;
5731: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5732: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5733: p_data => x_msg_data);
5734: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5735: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5734: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5730: ROLLBACK TO update_task;
5731: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5732: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5733: p_data => x_msg_data);
5734: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5735: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5736: ROLLBACK TO update_task;
5737: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5738: p_data => x_msg_data);

Line 5735: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5731: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5732: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5733: p_data => x_msg_data);
5734: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5735: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5736: ROLLBACK TO update_task;
5737: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5738: p_data => x_msg_data);
5739: WHEN OTHERS THEN

Line 5740: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5736: ROLLBACK TO update_task;
5737: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5738: p_data => x_msg_data);
5739: WHEN OTHERS THEN
5740: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5741: ROLLBACK TO update_task;
5742: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5743: THEN
5744: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 5761: /* fnd_api.g_ret_sts_success (success) */

5757: /* description : procedure to create Address for the Contact */
5758: /* Called from : Depot Repair Form to Create Address */
5759: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5760: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5761: /* fnd_api.g_ret_sts_success (success) */
5762: /* fnd_api.g_ret_sts_error (error) */
5763: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5764: /* x_msg_count NUMBER Number of messages in the message stack */
5765: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 5762: /* fnd_api.g_ret_sts_error (error) */

5758: /* Called from : Depot Repair Form to Create Address */
5759: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5760: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5761: /* fnd_api.g_ret_sts_success (success) */
5762: /* fnd_api.g_ret_sts_error (error) */
5763: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5764: /* x_msg_count NUMBER Number of messages in the message stack */
5765: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5766: /* x_location_id NUMBER Location ID of the Contacts address created */

Line 5763: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

5759: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5760: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5761: /* fnd_api.g_ret_sts_success (success) */
5762: /* fnd_api.g_ret_sts_error (error) */
5763: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5764: /* x_msg_count NUMBER Number of messages in the message stack */
5765: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5766: /* x_location_id NUMBER Location ID of the Contacts address created */
5767: /*-----------------------------------------------------------------------------------------------------------*/

Line 5848: HZ_LOCATION_V2PUB.create_location(p_init_msg_list => Fnd_Api.G_FALSE,

5844: /* x_msg_count */
5845: /* x_msg_data */
5846: /* x_location_id */
5847: /*-----------------------------------------------------------------------------------------------------------*/
5848: HZ_LOCATION_V2PUB.create_location(p_init_msg_list => Fnd_Api.G_FALSE,
5849: p_location_rec => l_location_rec,
5850: x_location_id => l_location_id,
5851: x_return_status => l_return_status,
5852: x_msg_count => l_msg_count,

Line 5869: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

5865: /* procedure name: Create_repair_task_hist */
5866: /* description : procedure used to create Repair Order history for task creation */
5867: /* Called from : Depot Repair Form to Create Address */
5868: /* Input Parm : p_api_version NUMBER Required Api Version number */
5869: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5870: /* default value is fnd_api.g_false */
5871: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5872: /* fnd_api.g_false */
5873: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 5870: /* default value is fnd_api.g_false */

5866: /* description : procedure used to create Repair Order history for task creation */
5867: /* Called from : Depot Repair Form to Create Address */
5868: /* Input Parm : p_api_version NUMBER Required Api Version number */
5869: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5870: /* default value is fnd_api.g_false */
5871: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5872: /* fnd_api.g_false */
5873: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5874: /* validation steps must be done and which steps */

Line 5871: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

5867: /* Called from : Depot Repair Form to Create Address */
5868: /* Input Parm : p_api_version NUMBER Required Api Version number */
5869: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5870: /* default value is fnd_api.g_false */
5871: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5872: /* fnd_api.g_false */
5873: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5874: /* validation steps must be done and which steps */
5875: /* should be skipped. */

Line 5872: /* fnd_api.g_false */

5868: /* Input Parm : p_api_version NUMBER Required Api Version number */
5869: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5870: /* default value is fnd_api.g_false */
5871: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5872: /* fnd_api.g_false */
5873: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5874: /* validation steps must be done and which steps */
5875: /* should be skipped. */
5876: /* p_task_id NUMBER Required Task Id */

Line 5879: /* fnd_api.g_ret_sts_success (success) */

5875: /* should be skipped. */
5876: /* p_task_id NUMBER Required Task Id */
5877: /* p_repair_line_id NUMBER Required Repair_line_id */
5878: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5879: /* fnd_api.g_ret_sts_success (success) */
5880: /* fnd_api.g_ret_sts_error (error) */
5881: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5882: /* x_msg_count NUMBER Number of messages in the message stack */
5883: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 5880: /* fnd_api.g_ret_sts_error (error) */

5876: /* p_task_id NUMBER Required Task Id */
5877: /* p_repair_line_id NUMBER Required Repair_line_id */
5878: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5879: /* fnd_api.g_ret_sts_success (success) */
5880: /* fnd_api.g_ret_sts_error (error) */
5881: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5882: /* x_msg_count NUMBER Number of messages in the message stack */
5883: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5884: /*-----------------------------------------------------------------------------------------------------------*/

Line 5881: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

5877: /* p_repair_line_id NUMBER Required Repair_line_id */
5878: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5879: /* fnd_api.g_ret_sts_success (success) */
5880: /* fnd_api.g_ret_sts_error (error) */
5881: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5882: /* x_msg_count NUMBER Number of messages in the message stack */
5883: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5884: /*-----------------------------------------------------------------------------------------------------------*/
5885:

Line 5887: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

5883: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5884: /*-----------------------------------------------------------------------------------------------------------*/
5885:
5886: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
5887: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5888: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5889: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5890: p_task_id IN NUMBER,
5891: p_repair_line_id IN NUMBER,

Line 5888: p_commit IN VARCHAR2 := Fnd_Api.g_false,

5884: /*-----------------------------------------------------------------------------------------------------------*/
5885:
5886: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
5887: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5888: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5889: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5890: p_task_id IN NUMBER,
5891: p_repair_line_id IN NUMBER,
5892: x_return_status OUT NOCOPY VARCHAR2,

Line 5889: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

5885:
5886: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
5887: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5888: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5889: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5890: p_task_id IN NUMBER,
5891: p_repair_line_id IN NUMBER,
5892: x_return_status OUT NOCOPY VARCHAR2,
5893: x_msg_count OUT NOCOPY NUMBER,

Line 5991: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5987:
5988: -- Standard Start of API savepoint
5989: SAVEPOINT Create_repair_task_hist;
5990: -- Standard call to check for call compatibility.
5991: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5992: p_api_version,
5993: l_api_name,
5994: G_PKG_NAME)
5995: THEN

Line 5996: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5992: p_api_version,
5993: l_api_name,
5994: G_PKG_NAME)
5995: THEN
5996: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5997: END IF;
5998: -- Initialize message list if p_init_msg_list is set to TRUE.
5999: IF Fnd_Api.to_Boolean(p_init_msg_list)
6000: THEN

Line 5999: IF Fnd_Api.to_Boolean(p_init_msg_list)

5995: THEN
5996: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5997: END IF;
5998: -- Initialize message list if p_init_msg_list is set to TRUE.
5999: IF Fnd_Api.to_Boolean(p_init_msg_list)
6000: THEN
6001: Fnd_Msg_Pub.initialize;
6002: END IF;
6003: -- Initialize API return status to success

Line 6004: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6000: THEN
6001: Fnd_Msg_Pub.initialize;
6002: END IF;
6003: -- Initialize API return status to success
6004: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6005: -- ---------------
6006: -- Api body starts
6007: -- ---------------
6008: IF (g_debug > 0)

Line 6098: IF Fnd_Api.To_Boolean(p_commit)

6094: -- -------------------
6095: -- Api body ends here
6096: -- -------------------
6097: -- Standard check of p_commit.
6098: IF Fnd_Api.To_Boolean(p_commit)
6099: THEN
6100: COMMIT WORK;
6101: END IF;
6102:

Line 6108: WHEN Fnd_Api.G_EXC_ERROR THEN

6104: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6105: p_data => x_msg_data);
6106: END IF;
6107: EXCEPTION
6108: WHEN Fnd_Api.G_EXC_ERROR THEN
6109: ROLLBACK TO Create_repair_task_hist;
6110: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6111: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6112: p_data => x_msg_data);

Line 6110: x_return_status := Fnd_Api.G_RET_STS_ERROR;

6106: END IF;
6107: EXCEPTION
6108: WHEN Fnd_Api.G_EXC_ERROR THEN
6109: ROLLBACK TO Create_repair_task_hist;
6110: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6111: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6112: p_data => x_msg_data);
6113: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6114: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 6113: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

6109: ROLLBACK TO Create_repair_task_hist;
6110: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6111: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6112: p_data => x_msg_data);
6113: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6114: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6115: ROLLBACK TO Create_repair_task_hist;
6116: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6117: p_data => x_msg_data);

Line 6114: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6110: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6111: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6112: p_data => x_msg_data);
6113: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6114: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6115: ROLLBACK TO Create_repair_task_hist;
6116: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6117: p_data => x_msg_data);
6118: WHEN OTHERS THEN

Line 6119: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6115: ROLLBACK TO Create_repair_task_hist;
6116: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6117: p_data => x_msg_data);
6118: WHEN OTHERS THEN
6119: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6120: ROLLBACK TO Create_repair_task_hist;
6121: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
6122: THEN
6123: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 6135: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

6131: /* description : procedure used to Update Repair Order history */
6132: /* for task creation */
6133: /* Called from : Depot Repair Form to update to Repair history */
6134: /* Input Parm : p_api_version NUMBER Required Api Version number */
6135: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6136: /* default value is fnd_api.g_false */
6137: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6138: /* fnd_api.g_false */
6139: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 6136: /* default value is fnd_api.g_false */

6132: /* for task creation */
6133: /* Called from : Depot Repair Form to update to Repair history */
6134: /* Input Parm : p_api_version NUMBER Required Api Version number */
6135: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6136: /* default value is fnd_api.g_false */
6137: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6138: /* fnd_api.g_false */
6139: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6140: /* validation steps must be done and which steps */

Line 6137: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

6133: /* Called from : Depot Repair Form to update to Repair history */
6134: /* Input Parm : p_api_version NUMBER Required Api Version number */
6135: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6136: /* default value is fnd_api.g_false */
6137: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6138: /* fnd_api.g_false */
6139: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6140: /* validation steps must be done and which steps */
6141: /* should be skipped. */

Line 6138: /* fnd_api.g_false */

6134: /* Input Parm : p_api_version NUMBER Required Api Version number */
6135: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6136: /* default value is fnd_api.g_false */
6137: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6138: /* fnd_api.g_false */
6139: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6140: /* validation steps must be done and which steps */
6141: /* should be skipped. */
6142: /* p_task_id NUMBER Required Task Id */

Line 6145: /* fnd_api.g_ret_sts_success (success) */

6141: /* should be skipped. */
6142: /* p_task_id NUMBER Required Task Id */
6143: /* p_repair_line_id NUMBER Required Repair_line_id */
6144: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6145: /* fnd_api.g_ret_sts_success (success) */
6146: /* fnd_api.g_ret_sts_error (error) */
6147: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6148: /* x_msg_count NUMBER Number of messages in the message stack */
6149: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 6146: /* fnd_api.g_ret_sts_error (error) */

6142: /* p_task_id NUMBER Required Task Id */
6143: /* p_repair_line_id NUMBER Required Repair_line_id */
6144: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6145: /* fnd_api.g_ret_sts_success (success) */
6146: /* fnd_api.g_ret_sts_error (error) */
6147: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6148: /* x_msg_count NUMBER Number of messages in the message stack */
6149: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6150: /*-----------------------------------------------------------------------------------------------------------*/

Line 6147: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

6143: /* p_repair_line_id NUMBER Required Repair_line_id */
6144: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6145: /* fnd_api.g_ret_sts_success (success) */
6146: /* fnd_api.g_ret_sts_error (error) */
6147: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6148: /* x_msg_count NUMBER Number of messages in the message stack */
6149: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6150: /*-----------------------------------------------------------------------------------------------------------*/
6151: /*

Line 6154: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,

6150: /*-----------------------------------------------------------------------------------------------------------*/
6151: /*
6152: PROCEDURE Update_repair_task_hist
6153: ( p_api_version IN NUMBER,
6154: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6155: p_commit IN VARCHAR2 := fnd_api.g_false,
6156: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6157: p_task_id IN NUMBER,
6158: p_repair_line_id IN NUMBER,

Line 6155: p_commit IN VARCHAR2 := fnd_api.g_false,

6151: /*
6152: PROCEDURE Update_repair_task_hist
6153: ( p_api_version IN NUMBER,
6154: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6155: p_commit IN VARCHAR2 := fnd_api.g_false,
6156: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6157: p_task_id IN NUMBER,
6158: p_repair_line_id IN NUMBER,
6159: x_return_status OUT NOCOPY VARCHAR2,

Line 6156: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

6152: PROCEDURE Update_repair_task_hist
6153: ( p_api_version IN NUMBER,
6154: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6155: p_commit IN VARCHAR2 := fnd_api.g_false,
6156: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6157: p_task_id IN NUMBER,
6158: p_repair_line_id IN NUMBER,
6159: x_return_status OUT NOCOPY VARCHAR2,
6160: x_msg_count OUT NOCOPY NUMBER,

Line 6310: IF NOT FND_API.Compatible_API_Call (l_api_version,

6306: -- --------------------------------
6307: -- Standard Start of API savepoint
6308: SAVEPOINT Update_repair_task_hist;
6309: -- Standard call to check for call compatibility.
6310: IF NOT FND_API.Compatible_API_Call (l_api_version,
6311: p_api_version,
6312: l_api_name ,
6313: G_PKG_NAME )
6314: THEN

Line 6315: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6311: p_api_version,
6312: l_api_name ,
6313: G_PKG_NAME )
6314: THEN
6315: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6316: END IF;
6317: -- Initialize message list if p_init_msg_list is set to TRUE.
6318: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6319: FND_MSG_PUB.initialize;

Line 6318: IF FND_API.to_Boolean( p_init_msg_list ) THEN

6314: THEN
6315: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6316: END IF;
6317: -- Initialize message list if p_init_msg_list is set to TRUE.
6318: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6319: FND_MSG_PUB.initialize;
6320: END IF;
6321: -- Initialize API return status to success
6322: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6322: x_return_status := FND_API.G_RET_STS_SUCCESS;

6318: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6319: FND_MSG_PUB.initialize;
6320: END IF;
6321: -- Initialize API return status to success
6322: x_return_status := FND_API.G_RET_STS_SUCCESS;
6323: -- ---------------
6324: -- Api body starts
6325: -- ---------------
6326: IF (g_debug > 0 ) THEN

Line 6416: IF FND_API.To_Boolean( p_commit ) THEN

6412: -- -------------------
6413: -- Api body ends here
6414: -- -------------------
6415: -- Standard check of p_commit.
6416: IF FND_API.To_Boolean( p_commit ) THEN
6417: COMMIT WORK;
6418: END IF;
6419: -- Standard call to get message count and IF count is get message info.
6420: FND_MSG_PUB.Count_And_Get

Line 6426: WHEN FND_API.G_EXC_ERROR THEN

6422: p_data => x_msg_data );
6423: END IF;
6424: -- ---------------------------------------------------------
6425: EXCEPTION
6426: WHEN FND_API.G_EXC_ERROR THEN
6427: ROLLBACK TO Update_repair_task_hist;
6428: x_return_status := FND_API.G_RET_STS_ERROR ;
6429: FND_MSG_PUB.Count_And_Get
6430: (p_count => x_msg_count,

Line 6428: x_return_status := FND_API.G_RET_STS_ERROR ;

6424: -- ---------------------------------------------------------
6425: EXCEPTION
6426: WHEN FND_API.G_EXC_ERROR THEN
6427: ROLLBACK TO Update_repair_task_hist;
6428: x_return_status := FND_API.G_RET_STS_ERROR ;
6429: FND_MSG_PUB.Count_And_Get
6430: (p_count => x_msg_count,
6431: p_data => x_msg_data
6432: );

Line 6433: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6429: FND_MSG_PUB.Count_And_Get
6430: (p_count => x_msg_count,
6431: p_data => x_msg_data
6432: );
6433: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6435: ROLLBACK TO Update_repair_task_hist;
6436: FND_MSG_PUB.Count_And_Get
6437: ( p_count => x_msg_count,

Line 6434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6430: (p_count => x_msg_count,
6431: p_data => x_msg_data
6432: );
6433: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6435: ROLLBACK TO Update_repair_task_hist;
6436: FND_MSG_PUB.Count_And_Get
6437: ( p_count => x_msg_count,
6438: p_data => x_msg_data

Line 6441: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6437: ( p_count => x_msg_count,
6438: p_data => x_msg_data
6439: );
6440: WHEN OTHERS THEN
6441: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6442: ROLLBACK TO Update_repair_task_hist;
6443: IF FND_MSG_PUB.Check_Msg_Level
6444: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
6445: THEN

Line 6458: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,

6454: */
6455: -------------------- travi changes-------------
6456:
6457: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6458: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6459: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6460: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6461: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6462: x_return_status OUT NOCOPY VARCHAR2,

Line 6459: p_commit IN VARCHAR2 := Fnd_Api.g_false,

6455: -------------------- travi changes-------------
6456:
6457: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6458: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6459: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6460: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6461: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6462: x_return_status OUT NOCOPY VARCHAR2,
6463: x_msg_count OUT NOCOPY NUMBER,

Line 6460: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

6456:
6457: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6458: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6459: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6460: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6461: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6462: x_return_status OUT NOCOPY VARCHAR2,
6463: x_msg_count OUT NOCOPY NUMBER,
6464: x_msg_data OUT NOCOPY VARCHAR2)

Line 6596: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

6592:
6593: -- Standard Start of API savepoint
6594: SAVEPOINT Create_repair_task_hist;
6595: -- Standard call to check for call compatibility.
6596: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
6597: p_api_version,
6598: l_api_name,
6599: G_PKG_NAME)
6600: THEN

Line 6601: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

6597: p_api_version,
6598: l_api_name,
6599: G_PKG_NAME)
6600: THEN
6601: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6602: END IF;
6603: -- Initialize message list if p_init_msg_list is set to TRUE.
6604: IF Fnd_Api.to_Boolean(p_init_msg_list)
6605: THEN

Line 6604: IF Fnd_Api.to_Boolean(p_init_msg_list)

6600: THEN
6601: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6602: END IF;
6603: -- Initialize message list if p_init_msg_list is set to TRUE.
6604: IF Fnd_Api.to_Boolean(p_init_msg_list)
6605: THEN
6606: Fnd_Msg_Pub.initialize;
6607: END IF;
6608: -- Initialize API return status to success

Line 6609: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6605: THEN
6606: Fnd_Msg_Pub.initialize;
6607: END IF;
6608: -- Initialize API return status to success
6609: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6610: -- ---------------
6611: -- Api body starts
6612: -- ---------------
6613: IF (g_debug > 0)

Line 6703: IF Fnd_Api.To_Boolean(p_commit)

6699: -- -------------------
6700: -- Api body ends here
6701: -- -------------------
6702: -- Standard check of p_commit.
6703: IF Fnd_Api.To_Boolean(p_commit)
6704: THEN
6705: COMMIT WORK;
6706: END IF;
6707:

Line 6713: WHEN Fnd_Api.G_EXC_ERROR THEN

6709: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6710: p_data => x_msg_data);
6711: END IF;
6712: EXCEPTION
6713: WHEN Fnd_Api.G_EXC_ERROR THEN
6714: ROLLBACK TO Create_repair_task_hist;
6715: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6716: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6717: p_data => x_msg_data);

Line 6715: x_return_status := Fnd_Api.G_RET_STS_ERROR;

6711: END IF;
6712: EXCEPTION
6713: WHEN Fnd_Api.G_EXC_ERROR THEN
6714: ROLLBACK TO Create_repair_task_hist;
6715: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6716: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6717: p_data => x_msg_data);
6718: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6719: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 6718: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

6714: ROLLBACK TO Create_repair_task_hist;
6715: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6716: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6717: p_data => x_msg_data);
6718: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6719: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6720: ROLLBACK TO Create_repair_task_hist;
6721: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6722: p_data => x_msg_data);

Line 6719: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6715: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6716: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6717: p_data => x_msg_data);
6718: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6719: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6720: ROLLBACK TO Create_repair_task_hist;
6721: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6722: p_data => x_msg_data);
6723: WHEN OTHERS THEN

Line 6724: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6720: ROLLBACK TO Create_repair_task_hist;
6721: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6722: p_data => x_msg_data);
6723: WHEN OTHERS THEN
6724: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6725: ROLLBACK TO Create_repair_task_hist;
6726: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
6727: THEN
6728: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 6740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

6736: /* description : procedure used to Update Repair Order history */
6737: /* for task creation */
6738: /* Called from : Depot Repair Form to update to Repair history */
6739: /* Input Parm : p_api_version NUMBER Required Api Version number */
6740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6741: /* default value is fnd_api.g_false */
6742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6743: /* fnd_api.g_false */
6744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 6741: /* default value is fnd_api.g_false */

6737: /* for task creation */
6738: /* Called from : Depot Repair Form to update to Repair history */
6739: /* Input Parm : p_api_version NUMBER Required Api Version number */
6740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6741: /* default value is fnd_api.g_false */
6742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6743: /* fnd_api.g_false */
6744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6745: /* validation steps must be done and which steps */

Line 6742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

6738: /* Called from : Depot Repair Form to update to Repair history */
6739: /* Input Parm : p_api_version NUMBER Required Api Version number */
6740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6741: /* default value is fnd_api.g_false */
6742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6743: /* fnd_api.g_false */
6744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6745: /* validation steps must be done and which steps */
6746: /* should be skipped. */

Line 6743: /* fnd_api.g_false */

6739: /* Input Parm : p_api_version NUMBER Required Api Version number */
6740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6741: /* default value is fnd_api.g_false */
6742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6743: /* fnd_api.g_false */
6744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6745: /* validation steps must be done and which steps */
6746: /* should be skipped. */
6747: /* p_task_id NUMBER Required Task Id */

Line 6750: /* fnd_api.g_ret_sts_success (success) */

6746: /* should be skipped. */
6747: /* p_task_id NUMBER Required Task Id */
6748: /* p_repair_line_id NUMBER Required Repair_line_id */
6749: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6750: /* fnd_api.g_ret_sts_success (success) */
6751: /* fnd_api.g_ret_sts_error (error) */
6752: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6753: /* x_msg_count NUMBER Number of messages in the message stack */
6754: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 6751: /* fnd_api.g_ret_sts_error (error) */

6747: /* p_task_id NUMBER Required Task Id */
6748: /* p_repair_line_id NUMBER Required Repair_line_id */
6749: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6750: /* fnd_api.g_ret_sts_success (success) */
6751: /* fnd_api.g_ret_sts_error (error) */
6752: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6753: /* x_msg_count NUMBER Number of messages in the message stack */
6754: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6755: /*-----------------------------------------------------------------------------------------------------------*/

Line 6752: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

6748: /* p_repair_line_id NUMBER Required Repair_line_id */
6749: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6750: /* fnd_api.g_ret_sts_success (success) */
6751: /* fnd_api.g_ret_sts_error (error) */
6752: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6753: /* x_msg_count NUMBER Number of messages in the message stack */
6754: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6755: /*-----------------------------------------------------------------------------------------------------------*/
6756:

Line 6758: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,

6754: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6755: /*-----------------------------------------------------------------------------------------------------------*/
6756:
6757: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6758: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6759: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6760: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6761: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6762: x_return_status OUT NOCOPY VARCHAR2,

Line 6759: p_commit IN VARCHAR2 := Fnd_Api.g_false,

6755: /*-----------------------------------------------------------------------------------------------------------*/
6756:
6757: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6758: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6759: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6760: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6761: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6762: x_return_status OUT NOCOPY VARCHAR2,
6763: x_msg_count OUT NOCOPY NUMBER,

Line 6760: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

6756:
6757: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6758: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6759: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6760: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6761: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6762: x_return_status OUT NOCOPY VARCHAR2,
6763: x_msg_count OUT NOCOPY NUMBER,
6764: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 6830: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

6826: -- --------------------------------
6827: -- Standard Start of API savepoint
6828: SAVEPOINT Update_repair_task_hist;
6829: -- Standard call to check for call compatibility.
6830: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
6831: p_api_version,
6832: l_api_name,
6833: G_PKG_NAME)
6834: THEN

Line 6835: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

6831: p_api_version,
6832: l_api_name,
6833: G_PKG_NAME)
6834: THEN
6835: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6836: END IF;
6837: -- Initialize message list if p_init_msg_list is set to TRUE.
6838: IF Fnd_Api.to_Boolean(p_init_msg_list)
6839: THEN

Line 6838: IF Fnd_Api.to_Boolean(p_init_msg_list)

6834: THEN
6835: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6836: END IF;
6837: -- Initialize message list if p_init_msg_list is set to TRUE.
6838: IF Fnd_Api.to_Boolean(p_init_msg_list)
6839: THEN
6840: Fnd_Msg_Pub.initialize;
6841: END IF;
6842: -- Initialize API return status to success

Line 6843: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6839: THEN
6840: Fnd_Msg_Pub.initialize;
6841: END IF;
6842: -- Initialize API return status to success
6843: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6844: -- ---------------
6845: -- Api body starts
6846: -- ---------------
6847: -- if any of the values (Assignee, owner,status) have chnaged then proceed else get out

Line 7123: IF Fnd_Api.To_Boolean(p_commit)

7119: -- -------------------
7120: -- Api body ends here
7121: -- -------------------
7122: -- Standard check of p_commit.
7123: IF Fnd_Api.To_Boolean(p_commit)
7124: THEN
7125: COMMIT WORK;
7126: END IF;
7127: -- Standard call to get message count and IF count is get message info.

Line 7133: WHEN Fnd_Api.G_EXC_ERROR THEN

7129: p_data => x_msg_data);
7130: --END IF;
7131: -- ---------------------------------------------------------
7132: EXCEPTION
7133: WHEN Fnd_Api.G_EXC_ERROR THEN
7134: ROLLBACK TO Update_repair_task_hist;
7135: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7136: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7137: p_data => x_msg_data);

Line 7135: x_return_status := Fnd_Api.G_RET_STS_ERROR;

7131: -- ---------------------------------------------------------
7132: EXCEPTION
7133: WHEN Fnd_Api.G_EXC_ERROR THEN
7134: ROLLBACK TO Update_repair_task_hist;
7135: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7136: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7137: p_data => x_msg_data);
7138: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7139: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 7138: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

7134: ROLLBACK TO Update_repair_task_hist;
7135: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7136: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7137: p_data => x_msg_data);
7138: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7139: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7140: ROLLBACK TO Update_repair_task_hist;
7141: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7142: p_data => x_msg_data);

Line 7139: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7135: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7136: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7137: p_data => x_msg_data);
7138: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7139: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7140: ROLLBACK TO Update_repair_task_hist;
7141: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7142: p_data => x_msg_data);
7143: WHEN OTHERS THEN

Line 7144: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7140: ROLLBACK TO Update_repair_task_hist;
7141: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7142: p_data => x_msg_data);
7143: WHEN OTHERS THEN
7144: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7145: ROLLBACK TO Update_repair_task_hist;
7146: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
7147: THEN
7148: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 7161: p_commit IN VARCHAR2 := Fnd_Api.g_false,

7157: /* Close Service Request */
7158: /*----------------------------------------------------------------*/
7159:
7160: PROCEDURE Close_status(p_api_version IN NUMBER,
7161: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7162: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7163: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7164: p_incident_id IN NUMBER,
7165: p_repair_line_id IN NUMBER,

Line 7162: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

7158: /*----------------------------------------------------------------*/
7159:
7160: PROCEDURE Close_status(p_api_version IN NUMBER,
7161: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7162: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7163: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7164: p_incident_id IN NUMBER,
7165: p_repair_line_id IN NUMBER,
7166: x_return_status OUT NOCOPY VARCHAR2,

Line 7163: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

7159:
7160: PROCEDURE Close_status(p_api_version IN NUMBER,
7161: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7162: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7163: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7164: p_incident_id IN NUMBER,
7165: p_repair_line_id IN NUMBER,
7166: x_return_status OUT NOCOPY VARCHAR2,
7167: x_msg_count OUT NOCOPY NUMBER,

Line 7217: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

7213: --------------------------------------
7214: SAVEPOINT Close_Status;
7215:
7216: -- Standard call to check for call compatibility.
7217: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
7218: p_api_version,
7219: l_api_name,
7220: G_PKG_NAME)
7221: THEN

Line 7222: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

7218: p_api_version,
7219: l_api_name,
7220: G_PKG_NAME)
7221: THEN
7222: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7223: END IF;
7224: ------------------------------------------------------------
7225: -- Initialize message list if p_init_msg_list is set to TRUE.
7226: ------------------------------------------------------------

Line 7227: IF Fnd_Api.to_Boolean(p_init_msg_list)

7223: END IF;
7224: ------------------------------------------------------------
7225: -- Initialize message list if p_init_msg_list is set to TRUE.
7226: ------------------------------------------------------------
7227: IF Fnd_Api.to_Boolean(p_init_msg_list)
7228: THEN
7229: Fnd_Msg_Pub.initialize;
7230: END IF;
7231:

Line 7235: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

7231:
7232: ---------------------------------------------
7233: -- Initialize API return status to success
7234: ---------------------------------------------
7235: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
7236:
7237: --------------------
7238: -- Api body starts
7239: --------------------

Line 7272: RAISE Fnd_Api.G_EXC_ERROR;

7268: THEN
7269: Csd_Gen_Utility_Pvt.ADD('The Incident Id is invalid ');
7270: END IF;
7271:
7272: RAISE Fnd_Api.G_EXC_ERROR;
7273: END IF;
7274:
7275: -- For all the groups within SR
7276:

Line 7303: RAISE Fnd_Api.G_EXC_ERROR;

7299: FROM csd_repairs
7300: WHERE repair_line_id = ro.repair_line_id;
7301: EXCEPTION
7302: WHEN OTHERS THEN
7303: RAISE Fnd_Api.G_EXC_ERROR;
7304: END;
7305:
7306: l_ro_rec.object_version_number := l_ro_obj_version_number;
7307: l_ro_rec.status := 'C';

Line 7332: RAISE Fnd_Api.G_EXC_ERROR;

7328: 'CSD_API_RO_STAT_UPD_FAIL');
7329: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
7330: ro.repair_line_id);
7331: Fnd_Msg_Pub.ADD;
7332: RAISE Fnd_Api.G_EXC_ERROR;
7333: END IF;
7334:
7335: END LOOP;
7336:

Line 7344: RAISE Fnd_Api.G_EXC_ERROR;

7340: FROM csd_repair_order_groups
7341: WHERE repair_group_id = grp.repair_group_id;
7342: EXCEPTION
7343: WHEN OTHERS THEN
7344: RAISE Fnd_Api.G_EXC_ERROR;
7345: END;
7346:
7347: l_grp_rec.object_version_number := l_grp_obj_version_number;
7348: l_grp_rec.group_txn_status := 'CLOSED';

Line 7374: RAISE Fnd_Api.G_EXC_ERROR;

7370: 'CSD_API_GRP_STAT_UPD_FAIL');
7371: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7372: grp.repair_group_id);
7373: Fnd_Msg_Pub.ADD;
7374: RAISE Fnd_Api.G_EXC_ERROR;
7375: END IF;
7376:
7377: END IF;
7378:

Line 7397: RAISE Fnd_Api.G_EXC_ERROR;

7393: FROM csd_repairs
7394: WHERE repair_line_id = ro.repair_line_id;
7395: EXCEPTION
7396: WHEN OTHERS THEN
7397: RAISE Fnd_Api.G_EXC_ERROR;
7398: END;
7399:
7400: l_ro_rec.object_version_number := l_ro_obj_version_number;
7401: l_ro_rec.status := 'C';

Line 7426: RAISE Fnd_Api.G_EXC_ERROR;

7422: 'CSD_API_RO_STAT_UPD_FAIL');
7423: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
7424: ro.repair_line_id);
7425: Fnd_Msg_Pub.ADD;
7426: RAISE Fnd_Api.G_EXC_ERROR;
7427: END IF;
7428:
7429: END LOOP;
7430:

Line 7438: RAISE Fnd_Api.G_EXC_ERROR;

7434: FROM csd_repair_order_groups
7435: WHERE repair_group_id = grp.repair_group_id;
7436: EXCEPTION
7437: WHEN OTHERS THEN
7438: RAISE Fnd_Api.G_EXC_ERROR;
7439: END;
7440:
7441: l_grp_rec.object_version_number := l_grp_obj_version_number;
7442: l_grp_rec.group_txn_status := 'CLOSED';

Line 7469: RAISE Fnd_Api.G_EXC_ERROR;

7465: 'CSD_API_GRP_STAT_UPD_FAIL');
7466: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7467: grp.repair_group_id);
7468: Fnd_Msg_Pub.ADD;
7469: RAISE Fnd_Api.G_EXC_ERROR;
7470: END IF;
7471:
7472: END IF; -- grp_txn_status
7473:

Line 7583: RAISE Fnd_Api.G_EXC_ERROR;

7579: Fnd_Message.SET_NAME('CSD',
7580: 'CSD_API_SR_STAT_UPD_FAIL');
7581: Fnd_Message.SET_TOKEN('INCIDENT_ID', p_incident_id);
7582: Fnd_Msg_Pub.ADD;
7583: RAISE Fnd_Api.G_EXC_ERROR;
7584: END IF;
7585:
7586: END IF;
7587:

Line 7610: RAISE Fnd_Api.G_EXC_ERROR;

7606: THEN
7607: Csd_Gen_Utility_Pvt.ADD('Repair Line Id is invalid ');
7608: END IF;
7609:
7610: RAISE Fnd_Api.G_EXC_ERROR;
7611: END IF;
7612:
7613: BEGIN
7614: SELECT object_version_number

Line 7620: RAISE Fnd_Api.G_EXC_ERROR;

7616: FROM csd_repairs
7617: WHERE repair_line_id = p_repair_line_id;
7618: EXCEPTION
7619: WHEN OTHERS THEN
7620: RAISE Fnd_Api.G_EXC_ERROR;
7621: END;
7622:
7623: l_ro_rec.object_version_number := l_ro_obj_version_number;
7624: l_ro_rec.status := 'C';

Line 7642: RAISE Fnd_Api.G_EXC_ERROR;

7638: THEN
7639: Fnd_Message.SET_NAME('CSD', 'CSD_API_RO_STAT_UPD_FAIL');
7640: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID', p_repair_line_id);
7641: Fnd_Msg_Pub.ADD;
7642: RAISE Fnd_Api.G_EXC_ERROR;
7643: END IF;
7644:
7645: BEGIN
7646:

Line 7684: RAISE Fnd_Api.G_EXC_ERROR;

7680: FROM csd_repair_order_groups
7681: WHERE repair_group_id = l_repair_group_id;
7682: EXCEPTION
7683: WHEN OTHERS THEN
7684: RAISE Fnd_Api.G_EXC_ERROR;
7685: END;
7686:
7687: l_grp_rec.object_version_number := l_grp_obj_version_number;
7688: l_grp_rec.group_txn_status := 'CLOSED';

Line 7707: RAISE Fnd_Api.G_EXC_ERROR;

7703: 'CSD_API_GRP_STAT_UPD_FAIL');
7704: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7705: l_repair_group_id);
7706: Fnd_Msg_Pub.ADD;
7707: RAISE Fnd_Api.G_EXC_ERROR;
7708: END IF;
7709:
7710: END IF;
7711:

Line 7820: --RAISE FND_API.G_EXC_ERROR;

7816: 'CSD_API_SR_STAT_UPD_FAIL');
7817: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
7818: Fnd_Msg_Pub.ADD;
7819: --Bug fix for 3555256 Begin
7820: --RAISE FND_API.G_EXC_ERROR;
7821: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7822: p_data => x_msg_data);
7823: --Bug fix for 3555256 End
7824:

Line 7832: WHEN Fnd_Api.G_EXC_ERROR THEN

7828:
7829: END IF;
7830:
7831: EXCEPTION
7832: WHEN Fnd_Api.G_EXC_ERROR THEN
7833: ROLLBACK TO Close_Status;
7834: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7835: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7836: p_data => x_msg_data);

Line 7834: x_return_status := Fnd_Api.G_RET_STS_ERROR;

7830:
7831: EXCEPTION
7832: WHEN Fnd_Api.G_EXC_ERROR THEN
7833: ROLLBACK TO Close_Status;
7834: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7835: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7836: p_data => x_msg_data);
7837: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7838: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 7837: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

7833: ROLLBACK TO Close_Status;
7834: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7835: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7836: p_data => x_msg_data);
7837: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7838: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7839: ROLLBACK TO status_close;
7840: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7841: p_data => x_msg_data);

Line 7838: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7834: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7835: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7836: p_data => x_msg_data);
7837: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7838: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7839: ROLLBACK TO status_close;
7840: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7841: p_data => x_msg_data);
7842: WHEN OTHERS THEN

Line 7843: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7839: ROLLBACK TO status_close;
7840: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7841: p_data => x_msg_data);
7842: WHEN OTHERS THEN
7843: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7844: ROLLBACK TO status_close;
7845: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
7846: THEN
7847: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 7869: p_commit IN VARCHAR2 := Fnd_Api.g_false,

7865: /* 5: No unlinked RMA or SO */
7866: /*---------------------------------------------------------------*/
7867:
7868: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
7869: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7870: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7871: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7872: p_incident_id IN NUMBER,
7873: x_link_mode OUT NOCOPY NUMBER,

Line 7870: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

7866: /*---------------------------------------------------------------*/
7867:
7868: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
7869: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7870: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7871: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7872: p_incident_id IN NUMBER,
7873: x_link_mode OUT NOCOPY NUMBER,
7874: x_return_status OUT NOCOPY VARCHAR2,

Line 7871: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

7867:
7868: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
7869: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7870: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7871: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7872: p_incident_id IN NUMBER,
7873: x_link_mode OUT NOCOPY NUMBER,
7874: x_return_status OUT NOCOPY VARCHAR2,
7875: x_msg_count OUT NOCOPY NUMBER,

Line 7903: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

7899: THEN
7900: Csd_Gen_Utility_Pvt.ADD('In Check_Service_Request API');
7901: END IF;
7902:
7903: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
7904:
7905: -- Initialize the count vars
7906: l_rma_count := 0;
7907: l_so_count := 0;

Line 7967: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7963: END IF;
7964:
7965: EXCEPTION
7966: WHEN OTHERS THEN
7967: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7968: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
7969: THEN
7970: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
7971: END IF;

Line 8158: IF NOT Fnd_Api.compatible_api_call(l_api_version,

8154: l_module_name,
8155: 'checking api compatibility');
8156: END IF;
8157: -- standard call to check for call compatibility.
8158: IF NOT Fnd_Api.compatible_api_call(l_api_version,
8159: p_api_version,
8160: l_api_name,
8161: g_pkg_name)
8162: THEN

Line 8169: RAISE Fnd_Api.g_exc_unexpected_error;

8165: Fnd_Log.string(l_exception_level,
8166: l_module_name,
8167: 'checking api compatibility, was unsuccessful');
8168: END IF;
8169: RAISE Fnd_Api.g_exc_unexpected_error;
8170: END IF;
8171: IF l_statement_level >= l_debug_level
8172: THEN
8173: Fnd_Log.string(l_statement_level,

Line 8179: IF Fnd_Api.to_boolean(p_init_msg_list)

8175: 'checking api compatibility, was successful');
8176: END IF;
8177:
8178: -- initialize message list if p_init_msg_list is set to true.
8179: IF Fnd_Api.to_boolean(p_init_msg_list)
8180: THEN
8181: Fnd_Msg_Pub.initialize;
8182: END IF;
8183:

Line 8185: x_return_status := Fnd_Api.g_ret_sts_success;

8181: Fnd_Msg_Pub.initialize;
8182: END IF;
8183:
8184: -- initialize api return status to success
8185: x_return_status := Fnd_Api.g_ret_sts_success;
8186:
8187: IF l_statement_level >= l_debug_level
8188: THEN
8189: Fnd_Log.String(l_Statement_Level,

Line 8308: RAISE Fnd_Api.g_exc_error;

8304: Fnd_Log.string(l_exception_level,
8305: l_module_name || '.check_in_parameters',
8306: 'product txn id is not valid ');
8307: END IF;
8308: RAISE Fnd_Api.g_exc_error;
8309: END IF;
8310: IF l_statement_level >= l_debug_level
8311: THEN
8312: Fnd_Log.string(l_statement_level,

Line 8318: IF NVL(x_product_txn_rec.prod_txn_status, Fnd_Api.g_miss_char) <>

8314: 'product txn id is valid ');
8315: END IF;
8316:
8317: -- validate the prod_txn_status
8318: IF NVL(x_product_txn_rec.prod_txn_status, Fnd_Api.g_miss_char) <>
8319: Fnd_Api.g_miss_char
8320: THEN
8321: BEGIN
8322: SELECT 'x'

Line 8319: Fnd_Api.g_miss_char

8315: END IF;
8316:
8317: -- validate the prod_txn_status
8318: IF NVL(x_product_txn_rec.prod_txn_status, Fnd_Api.g_miss_char) <>
8319: Fnd_Api.g_miss_char
8320: THEN
8321: BEGIN
8322: SELECT 'x'
8323: INTO l_check

Line 8346: RAISE Fnd_Api.g_exc_error;

8342: 'Product txn status is invalid : ' ||
8343: x_product_txn_rec.prod_txn_status);
8344: END IF;
8345: Fnd_Msg_Pub.ADD;
8346: RAISE Fnd_Api.g_exc_error;
8347: END;
8348: END IF;
8349:
8350: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>

Line 8350: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>

8346: RAISE Fnd_Api.g_exc_error;
8347: END;
8348: END IF;
8349:
8350: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>
8351: Fnd_Api.g_miss_char
8352: THEN
8353: -- validate the action type
8354: IF NOT

Line 8351: Fnd_Api.g_miss_char

8347: END;
8348: END IF;
8349:
8350: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>
8351: Fnd_Api.g_miss_char
8352: THEN
8353: -- validate the action type
8354: IF NOT
8355: (Csd_Process_Util.validate_action_type(p_action_type => x_product_txn_rec.action_type))

Line 8364: RAISE Fnd_Api.g_exc_error;

8360: l_module_name || '.check_in_parameters',
8361: 'Action Type s invalid : ' ||
8362: x_product_txn_rec.Action_Type);
8363: END IF;
8364: RAISE Fnd_Api.g_exc_error;
8365: END IF;
8366: END IF;
8367:
8368: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>

Line 8368: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>

8364: RAISE Fnd_Api.g_exc_error;
8365: END IF;
8366: END IF;
8367:
8368: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>
8369: Fnd_Api.g_miss_char
8370: THEN
8371: -- validate the action code
8372: IF NOT

Line 8369: Fnd_Api.g_miss_char

8365: END IF;
8366: END IF;
8367:
8368: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>
8369: Fnd_Api.g_miss_char
8370: THEN
8371: -- validate the action code
8372: IF NOT
8373: (Csd_Process_Util.validate_action_code(p_action_code => x_product_txn_rec.action_code))

Line 8382: RAISE Fnd_Api.g_exc_error;

8378: l_module_name || '.check_in_parameters',
8379: 'Action Code is invalid : ' ||
8380: x_product_txn_rec.Action_Code);
8381: END IF;
8382: RAISE Fnd_Api.g_exc_error;
8383: END IF;
8384: END IF;
8385: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8386: -- statuses and Object_Version_Number values from database

Line 8387: IF NVL(x_product_txn_rec.product_transaction_id, Fnd_Api.g_miss_num) <>

8383: END IF;
8384: END IF;
8385: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8386: -- statuses and Object_Version_Number values from database
8387: IF NVL(x_product_txn_rec.product_transaction_id, Fnd_Api.g_miss_num) <>
8388: Fnd_Api.g_miss_num
8389: THEN
8390: OPEN prod_txn(x_product_txn_rec.product_transaction_id);
8391: FETCH prod_txn

Line 8388: Fnd_Api.g_miss_num

8384: END IF;
8385: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8386: -- statuses and Object_Version_Number values from database
8387: IF NVL(x_product_txn_rec.product_transaction_id, Fnd_Api.g_miss_num) <>
8388: Fnd_Api.g_miss_num
8389: THEN
8390: OPEN prod_txn(x_product_txn_rec.product_transaction_id);
8391: FETCH prod_txn
8392: INTO l_est_detail_id, l_repair_line_id, l_curr_submit_order_flag, l_curr_book_order_flag, l_curr_release_order_flag, l_curr_ship_order_flag, l_object_version_num;

Line 8396: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>

8392: INTO l_est_detail_id, l_repair_line_id, l_curr_submit_order_flag, l_curr_book_order_flag, l_curr_release_order_flag, l_curr_ship_order_flag, l_object_version_num;
8393: CLOSE prod_txn;
8394: END IF;
8395:
8396: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>
8397: Fnd_Api.g_miss_num
8398: THEN
8399: IF x_product_txn_rec.repair_line_id <> l_repair_line_id
8400: THEN

Line 8397: Fnd_Api.g_miss_num

8393: CLOSE prod_txn;
8394: END IF;
8395:
8396: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>
8397: Fnd_Api.g_miss_num
8398: THEN
8399: IF x_product_txn_rec.repair_line_id <> l_repair_line_id
8400: THEN
8401: IF l_exception_level >= l_debug_level

Line 8407: RAISE Fnd_Api.g_exc_error;

8403: Fnd_Log.string(l_exception_level,
8404: l_module_name || '.check_in_parameters',
8405: 'Repair Line id can not be changed');
8406: END IF;
8407: RAISE Fnd_Api.g_exc_error;
8408: END IF;
8409: ELSE
8410: x_product_txn_rec.repair_line_id := l_repair_line_id;
8411: END IF;

Line 8436: RAISE Fnd_Api.g_exc_error;

8432: '.check_in_parameters',
8433: 'Invalid repair line id ' ||
8434: x_product_txn_rec.repair_line_id);
8435: END IF;
8436: RAISE Fnd_Api.g_exc_error;
8437: END;
8438: IF l_incident_id IS NOT NULL
8439: THEN
8440: OPEN sr_rec(l_incident_id);

Line 8452: RAISE Fnd_Api.g_exc_error;

8448: IF (g_debug > 0)
8449: THEN
8450: Csd_Gen_Utility_Pvt.ADD('incident id missing ');
8451: END IF;
8452: RAISE Fnd_Api.g_exc_error;
8453: END IF;
8454:
8455: -- assigning values for the order record
8456: l_order_rec.incident_id := l_incident_id;

Line 8473: Fnd_Api.g_miss_char) <> Fnd_Api.g_miss_char

8469: THEN
8470: -- Sub Inventory column will have value if internal requisition has source sub inventory
8471: -- value else it will have null values.
8472: IF NVL(x_product_txn_rec.sub_inventory,
8473: Fnd_Api.g_miss_char) <> Fnd_Api.g_miss_char
8474: THEN
8475: l_order_rec.pick_from_subinventory := x_product_txn_rec.sub_inventory;
8476: l_order_rec.def_staging_subinventory := x_product_txn_rec.sub_inventory;
8477: END IF;

Line 8571: p_commit => Fnd_Api.g_false,

8567: l_module_name,
8568: 'Calling process_sales_order to release so');
8569: END IF;
8570: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8571: p_commit => Fnd_Api.g_false,
8572: p_init_msg_list => Fnd_Api.g_true,
8573: p_validation_level => Fnd_Api.g_valid_level_full,
8574: p_action => C_Action_Pick_Release,
8575: p_order_rec => l_order_rec,

Line 8572: p_init_msg_list => Fnd_Api.g_true,

8568: 'Calling process_sales_order to release so');
8569: END IF;
8570: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8571: p_commit => Fnd_Api.g_false,
8572: p_init_msg_list => Fnd_Api.g_true,
8573: p_validation_level => Fnd_Api.g_valid_level_full,
8574: p_action => C_Action_Pick_Release,
8575: p_order_rec => l_order_rec,
8576: x_return_status => x_return_status,

Line 8573: p_validation_level => Fnd_Api.g_valid_level_full,

8569: END IF;
8570: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8571: p_commit => Fnd_Api.g_false,
8572: p_init_msg_list => Fnd_Api.g_true,
8573: p_validation_level => Fnd_Api.g_valid_level_full,
8574: p_action => C_Action_Pick_Release,
8575: p_order_rec => l_order_rec,
8576: x_return_status => x_return_status,
8577: x_msg_count => x_msg_count,

Line 8579: IF (x_return_status = Fnd_Api.g_ret_sts_error)

8575: p_order_rec => l_order_rec,
8576: x_return_status => x_return_status,
8577: x_msg_count => x_msg_count,
8578: x_msg_data => x_msg_data);
8579: IF (x_return_status = Fnd_Api.g_ret_sts_error)
8580: THEN
8581: IF l_exception_level >= l_debug_level
8582: THEN
8583: Fnd_Log.string(l_exception_level,

Line 8782: p_commit => Fnd_Api.g_false,

8778: l_module_name,
8779: 'Calling Process Sales Order API');
8780: END IF;
8781: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8782: p_commit => Fnd_Api.g_false,
8783: p_init_msg_list => Fnd_Api.g_true,
8784: p_validation_level => Fnd_Api.g_valid_level_full,
8785: p_action => C_Action_Ship,
8786: p_order_rec => l_order_rec,

Line 8783: p_init_msg_list => Fnd_Api.g_true,

8779: 'Calling Process Sales Order API');
8780: END IF;
8781: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8782: p_commit => Fnd_Api.g_false,
8783: p_init_msg_list => Fnd_Api.g_true,
8784: p_validation_level => Fnd_Api.g_valid_level_full,
8785: p_action => C_Action_Ship,
8786: p_order_rec => l_order_rec,
8787: x_return_status => x_return_status,

Line 8784: p_validation_level => Fnd_Api.g_valid_level_full,

8780: END IF;
8781: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8782: p_commit => Fnd_Api.g_false,
8783: p_init_msg_list => Fnd_Api.g_true,
8784: p_validation_level => Fnd_Api.g_valid_level_full,
8785: p_action => C_Action_Ship,
8786: p_order_rec => l_order_rec,
8787: x_return_status => x_return_status,
8788: x_msg_count => x_msg_count,

Line 8790: IF NOT (x_return_status = Fnd_Api.g_ret_sts_success)

8786: p_order_rec => l_order_rec,
8787: x_return_status => x_return_status,
8788: x_msg_count => x_msg_count,
8789: x_msg_data => x_msg_data);
8790: IF NOT (x_return_status = Fnd_Api.g_ret_sts_success)
8791: THEN
8792: IF l_statement_level >= l_debug_level
8793: THEN
8794: Fnd_Log.string(l_statement_level,

Line 8799: END IF; -- If x_return_status <> fnd_api.g_ret_sts_success

8795: l_module_name,
8796: ' process sales order failed');
8797: END IF;
8798: RAISE ship_order_excep;
8799: END IF; -- If x_return_status <> fnd_api.g_ret_sts_success
8800: END IF; -- l_allow_ship = C_Yes
8801: -- Check if any of the delivery lines status are less then 'Shipped'
8802: -- for a given order header id and order line id , if so do not update
8803: -- product txn lines with Shipped status, if not then update product txn table

Line 8903: IF Fnd_Api.to_boolean(p_commit)

8899: END IF; -- end of ship sales order
8900: END IF; --end of process txn
8901: END IF; -- Action Type = MOVE_OUt
8902: -- standard check of p_commit.
8903: IF Fnd_Api.to_boolean(p_commit)
8904: THEN
8905: COMMIT WORK;
8906: END IF;
8907: EXCEPTION

Line 8910: x_return_status := Fnd_Api.g_ret_sts_success;

8906: END IF;
8907: EXCEPTION
8908: WHEN release_order_excep THEN
8909: -- Set return status to unexpected error
8910: x_return_status := Fnd_Api.g_ret_sts_success;
8911: -- If there is any error then rollback
8912: ROLLBACK TO release_sales_order;
8913: -- Standard procedure to get error message count and error message is also returned
8914: -- if error message count is 1

Line 8919: x_return_status := Fnd_Api.g_ret_sts_success;

8915: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8916: p_data => x_msg_data);
8917: WHEN ship_order_excep THEN
8918: -- Set return status to unexpected error
8919: x_return_status := Fnd_Api.g_ret_sts_success;
8920: -- If there is any error then rollback
8921: ROLLBACK TO ship_sales_order;
8922: -- Standard procedure to get error message count and error message is also returned
8923: -- if error message count is 1

Line 8926: WHEN Fnd_Api.g_exc_error THEN

8922: -- Standard procedure to get error message count and error message is also returned
8923: -- if error message count is 1
8924: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8925: p_data => x_msg_data);
8926: WHEN Fnd_Api.g_exc_error THEN
8927: -- Set return status to unexpected error
8928: x_return_status := Fnd_Api.g_ret_sts_error;
8929: -- If there is any error then rollback
8930: ROLLBACK TO update_iro_product_txn;

Line 8928: x_return_status := Fnd_Api.g_ret_sts_error;

8924: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8925: p_data => x_msg_data);
8926: WHEN Fnd_Api.g_exc_error THEN
8927: -- Set return status to unexpected error
8928: x_return_status := Fnd_Api.g_ret_sts_error;
8929: -- If there is any error then rollback
8930: ROLLBACK TO update_iro_product_txn;
8931: -- Standard procedure to get error message count and error message is also returned
8932: -- if error message count is 1

Line 8935: WHEN Fnd_Api.g_exc_unexpected_error THEN

8931: -- Standard procedure to get error message count and error message is also returned
8932: -- if error message count is 1
8933: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8934: p_data => x_msg_data);
8935: WHEN Fnd_Api.g_exc_unexpected_error THEN
8936: -- Set return status to unexpected error
8937: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
8938: -- If there is any error then rollback
8939: ROLLBACK TO update_iro_product_txn;

Line 8937: x_return_status := Fnd_Api.g_ret_sts_unexp_error;

8933: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8934: p_data => x_msg_data);
8935: WHEN Fnd_Api.g_exc_unexpected_error THEN
8936: -- Set return status to unexpected error
8937: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
8938: -- If there is any error then rollback
8939: ROLLBACK TO update_iro_product_txn;
8940: -- Standard procedure to get error message count and error message is also returned
8941: -- if error message count is 1

Line 8946: x_return_status := Fnd_Api.g_ret_sts_unexp_error;

8942: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
8943: p_data => x_msg_data);
8944: WHEN OTHERS THEN
8945: -- Set return status to unexpected error
8946: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
8947: -- If there is any error then rollback
8948: ROLLBACK TO update_iro_product_txn;
8949: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
8950: THEN

Line 9012: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9008: WHERE cpt.repair_line_id = p_Repair_Line_Id
9009: AND cpt.estimate_detail_id = ced.estimate_detail_id;
9010: BEGIN
9011: -- Standard call to check for call compatibility.
9012: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9013: p_api_version,
9014: l_api_name,
9015: G_PKG_NAME)
9016: THEN

Line 9017: RAISE Fnd_Api.G_Exc_UnExpected_Error;

9013: p_api_version,
9014: l_api_name,
9015: G_PKG_NAME)
9016: THEN
9017: RAISE Fnd_Api.G_Exc_UnExpected_Error;
9018: END IF;
9019:
9020: -- Initialize message list if p_init_msg_list is set to TRUE.
9021: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 9021: IF Fnd_Api.to_Boolean(p_init_msg_list)

9017: RAISE Fnd_Api.G_Exc_UnExpected_Error;
9018: END IF;
9019:
9020: -- Initialize message list if p_init_msg_list is set to TRUE.
9021: IF Fnd_Api.to_Boolean(p_init_msg_list)
9022: THEN
9023: Fnd_Msg_Pub.initialize;
9024: END IF;
9025:

Line 9027: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9023: Fnd_Msg_Pub.initialize;
9024: END IF;
9025:
9026: -- Initialize API return status to success
9027: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9028:
9029: -- Api body starts
9030: IF (g_debug > 0)
9031: THEN

Line 9084: RAISE Fnd_Api.G_EXC_ERROR;

9080: 'CSD_RO_NOT_OPEN_NO_PRODTXN_LNS');
9081: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9082: Fnd_Message.SET_TOKEN('RO_STATUS', l_RO_Status_Meaning);
9083: Fnd_Msg_Pub.ADD;
9084: RAISE Fnd_Api.G_EXC_ERROR;
9085: END IF;
9086: -- Check if repair Type Ref is Standard
9087: IF l_RO_Repair_Type_Ref = C_Repair_TYpe_Ref_Standard
9088: THEN

Line 9095: RAISE Fnd_Api.G_EXC_ERROR;

9091: Fnd_Message.SET_NAME('CSD',
9092: 'CSD_STD_REPTYPE_NO_PRODTXN_LNS');
9093: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9094: Fnd_Msg_Pub.ADD;
9095: RAISE Fnd_Api.G_EXC_ERROR;
9096: END IF;
9097: -- Check Serial control code if quantity is greater then 1
9098: IF l_RO_Quantity > 1
9099: THEN

Line 9115: RAISE Fnd_Api.G_EXC_ERROR;

9111: -- Raise G_Exc_Error,
9112: Fnd_Message.SET_NAME('CSD',
9113: 'CSD_RO_QTY_MORE_FOR_SRLCT_ITEM');
9114: Fnd_Msg_Pub.ADD;
9115: RAISE Fnd_Api.G_EXC_ERROR;
9116: END IF;
9117: EXCEPTION
9118: WHEN NO_DATA_FOUND THEN
9119: -- Get Item Name

Line 9140: RAISE Fnd_Api.G_EXC_ERROR;

9136: Fnd_Message.Set_Token('ITEM', l_Item_Name);
9137: Fnd_Message.Set_Token('ORG_NAME',
9138: l_Service_Valdn_Org_Name);
9139: Fnd_Msg_Pub.ADD;
9140: RAISE Fnd_Api.G_EXC_ERROR;
9141:
9142: END;
9143: END IF;
9144: -- CHeck if there are any product txn lines for a given repair line id

Line 9160: RAISE Fnd_Api.G_EXC_ERROR;

9156: Fnd_Message.SET_NAME('CSD',
9157: 'CSD_RO_HAS_PRODUCT_TXN_LINES');
9158: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9159: Fnd_Msg_Pub.ADD;
9160: RAISE Fnd_Api.G_EXC_ERROR;
9161: END IF;
9162: END;
9163: EXCEPTION
9164: WHEN NO_DATA_FOUND THEN

Line 9170: RAISE Fnd_Api.G_EXC_ERROR;

9166: -- Display message; Invalid repair line id is passed
9167: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
9168: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID', P_Repair_Line_ID);
9169: Fnd_Msg_Pub.ADD;
9170: RAISE Fnd_Api.G_EXC_ERROR;
9171: END;
9172: -- Now call Default Product Txn lines API
9173:
9174: create_default_prod_txn(p_api_version,

Line 9185: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)

9181: x_msg_Data);
9182:
9183: -- Once default product transaction lines are created successfully,
9184: -- assign new entities to new out variable x_Logistics_KeyAttr_Tbl.
9185: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
9186: THEN
9187: RAISE Fnd_Api.G_EXC_ERROR;
9188: ELSE
9189: -- New code added here

Line 9187: RAISE Fnd_Api.G_EXC_ERROR;

9183: -- Once default product transaction lines are created successfully,
9184: -- assign new entities to new out variable x_Logistics_KeyAttr_Tbl.
9185: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
9186: THEN
9187: RAISE Fnd_Api.G_EXC_ERROR;
9188: ELSE
9189: -- New code added here
9190: i := 0; -- Initialize loop variable to zero
9191: FOR Logistic_KeyAttr_Rec IN Logistic_KeyAttr_Cur_Type(p_Repair_line_id)

Line 9202: WHEN Fnd_Api.G_EXC_ERROR THEN

9198: END LOOP;
9199: END IF;
9200:
9201: EXCEPTION
9202: WHEN Fnd_Api.G_EXC_ERROR THEN
9203: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9204: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9205: p_data => x_msg_data);
9206: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 9203: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9199: END IF;
9200:
9201: EXCEPTION
9202: WHEN Fnd_Api.G_EXC_ERROR THEN
9203: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9204: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9205: p_data => x_msg_data);
9206: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9207: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9206: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9202: WHEN Fnd_Api.G_EXC_ERROR THEN
9203: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9204: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9205: p_data => x_msg_data);
9206: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9207: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9208: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9209: p_data => x_msg_data);
9210: WHEN OTHERS THEN

Line 9207: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9203: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9204: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9205: p_data => x_msg_data);
9206: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9207: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9208: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9209: p_data => x_msg_data);
9210: WHEN OTHERS THEN
9211: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9211: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9207: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9208: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9209: p_data => x_msg_data);
9210: WHEN OTHERS THEN
9211: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9212: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9213: THEN
9214: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
9215: END IF;

Line 9226: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

9222: /* procedure name: create_repair_task */
9223: /* description : procedure used to create DR specific tasks in Depot tables */
9224: /* Called from : Depot Repair Form to Create Task */
9225: /* Input Parm : p_api_version NUMBER Required Api Version number */
9226: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9227: /* default value is fnd_api.g_false */
9228: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9229: /* fnd_api.g_false */
9230: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 9227: /* default value is fnd_api.g_false */

9223: /* description : procedure used to create DR specific tasks in Depot tables */
9224: /* Called from : Depot Repair Form to Create Task */
9225: /* Input Parm : p_api_version NUMBER Required Api Version number */
9226: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9227: /* default value is fnd_api.g_false */
9228: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9229: /* fnd_api.g_false */
9230: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9231: /* validation steps must be done and which steps */

Line 9228: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

9224: /* Called from : Depot Repair Form to Create Task */
9225: /* Input Parm : p_api_version NUMBER Required Api Version number */
9226: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9227: /* default value is fnd_api.g_false */
9228: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9229: /* fnd_api.g_false */
9230: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9231: /* validation steps must be done and which steps */
9232: /* should be skipped. */

Line 9229: /* fnd_api.g_false */

9225: /* Input Parm : p_api_version NUMBER Required Api Version number */
9226: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9227: /* default value is fnd_api.g_false */
9228: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9229: /* fnd_api.g_false */
9230: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9231: /* validation steps must be done and which steps */
9232: /* should be skipped. */
9233: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */

Line 9235: /* fnd_api.g_ret_sts_success (success) */

9231: /* validation steps must be done and which steps */
9232: /* should be skipped. */
9233: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9234: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9235: /* fnd_api.g_ret_sts_success (success) */
9236: /* fnd_api.g_ret_sts_error (error) */
9237: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9238: /* x_msg_count NUMBER Number of messages in the message stack */
9239: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 9236: /* fnd_api.g_ret_sts_error (error) */

9232: /* should be skipped. */
9233: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9234: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9235: /* fnd_api.g_ret_sts_success (success) */
9236: /* fnd_api.g_ret_sts_error (error) */
9237: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9238: /* x_msg_count NUMBER Number of messages in the message stack */
9239: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9240: /* x_task_id NUMBER Task Id of the created Task */

Line 9237: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

9233: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9234: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9235: /* fnd_api.g_ret_sts_success (success) */
9236: /* fnd_api.g_ret_sts_error (error) */
9237: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9238: /* x_msg_count NUMBER Number of messages in the message stack */
9239: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9240: /* x_task_id NUMBER Task Id of the created Task */
9241: /*-----------------------------------------------------------------------------------------------------------*/

Line 9243: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

9239: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9240: /* x_task_id NUMBER Task Id of the created Task */
9241: /*-----------------------------------------------------------------------------------------------------------*/
9242: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9243: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9244: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9246: p_create_repair_task_rec IN REPAIR_TASK_REC,
9247: x_return_status OUT NOCOPY VARCHAR2,

Line 9244: p_commit IN VARCHAR2 := Fnd_Api.g_false,

9240: /* x_task_id NUMBER Task Id of the created Task */
9241: /*-----------------------------------------------------------------------------------------------------------*/
9242: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9243: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9244: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9246: p_create_repair_task_rec IN REPAIR_TASK_REC,
9247: x_return_status OUT NOCOPY VARCHAR2,
9248: x_msg_count OUT NOCOPY NUMBER,

Line 9245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

9241: /*-----------------------------------------------------------------------------------------------------------*/
9242: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9243: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9244: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9245: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9246: p_create_repair_task_rec IN REPAIR_TASK_REC,
9247: x_return_status OUT NOCOPY VARCHAR2,
9248: x_msg_count OUT NOCOPY NUMBER,
9249: x_msg_data OUT NOCOPY VARCHAR2,

Line 9298: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9294: Fnd_Log.string(l_statement_level,
9295: l_module_name,
9296: 'checking api compatibility');
9297: END IF;
9298: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9299: p_api_version,
9300: l_api_name,
9301: G_PKG_NAME)
9302: THEN

Line 9309: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

9305: Fnd_Log.string(l_exception_level,
9306: l_module_name,
9307: 'checking api compatibility, was unsuccessful');
9308: END IF;
9309: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
9310: END IF;
9311:
9312: IF l_statement_level >= l_debug_level
9313: THEN

Line 9320: IF Fnd_Api.to_Boolean(p_init_msg_list)

9316: 'checking api compatibility, was successful');
9317: END IF;
9318:
9319: -- Initialize message list if p_init_msg_list is set to TRUE.
9320: IF Fnd_Api.to_Boolean(p_init_msg_list)
9321: THEN
9322: Fnd_Msg_Pub.initialize;
9323: END IF;
9324: -- Initialize API return status to success

Line 9325: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9321: THEN
9322: Fnd_Msg_Pub.initialize;
9323: END IF;
9324: -- Initialize API return status to success
9325: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9326: -- ---------------
9327: -- Api body starts
9328: -- ---------------
9329: IF l_statement_level >= l_debug_level

Line 9401: IF Fnd_Api.To_Boolean(p_commit)

9397: -- -------------------
9398: -- Api body ends here
9399: -- -------------------
9400: -- Standard check of p_commit.
9401: IF Fnd_Api.To_Boolean(p_commit)
9402: THEN
9403: COMMIT WORK;
9404: END IF;
9405: -- Standard call to get message count and IF count is get message info.

Line 9409: WHEN Fnd_Api.G_EXC_ERROR THEN

9405: -- Standard call to get message count and IF count is get message info.
9406: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9407: p_data => x_msg_data);
9408: EXCEPTION
9409: WHEN Fnd_Api.G_EXC_ERROR THEN
9410: ROLLBACK TO create_task;
9411: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9412: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9413: p_data => x_msg_data);

Line 9411: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9407: p_data => x_msg_data);
9408: EXCEPTION
9409: WHEN Fnd_Api.G_EXC_ERROR THEN
9410: ROLLBACK TO create_task;
9411: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9412: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9413: p_data => x_msg_data);
9414: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9415: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9414: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9410: ROLLBACK TO create_task;
9411: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9412: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9413: p_data => x_msg_data);
9414: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9415: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9416: ROLLBACK TO create_task;
9417: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9418: p_data => x_msg_data);

Line 9415: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9411: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9412: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9413: p_data => x_msg_data);
9414: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9415: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9416: ROLLBACK TO create_task;
9417: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9418: p_data => x_msg_data);
9419: WHEN OTHERS THEN

Line 9420: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9416: ROLLBACK TO create_task;
9417: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9418: p_data => x_msg_data);
9419: WHEN OTHERS THEN
9420: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9421: ROLLBACK TO create_task;
9422: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9423: THEN
9424: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 9437: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */

9433: /* procedure name: update_repair_task */
9434: /* description : procedure used to update DR specifc task in Depot tables */
9435: /* Called from : Depot Repair Form to Update DR specifc Task */
9436: /* Input Parm : p_api_version NUMBER Required Api Version number */
9437: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9438: /* default value is fnd_api.g_false */
9439: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9440: /* fnd_api.g_false */
9441: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

Line 9438: /* default value is fnd_api.g_false */

9434: /* description : procedure used to update DR specifc task in Depot tables */
9435: /* Called from : Depot Repair Form to Update DR specifc Task */
9436: /* Input Parm : p_api_version NUMBER Required Api Version number */
9437: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9438: /* default value is fnd_api.g_false */
9439: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9440: /* fnd_api.g_false */
9441: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9442: /* validation steps must be done and which steps */

Line 9439: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */

9435: /* Called from : Depot Repair Form to Update DR specifc Task */
9436: /* Input Parm : p_api_version NUMBER Required Api Version number */
9437: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9438: /* default value is fnd_api.g_false */
9439: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9440: /* fnd_api.g_false */
9441: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9442: /* validation steps must be done and which steps */
9443: /* should be skipped. */

Line 9440: /* fnd_api.g_false */

9436: /* Input Parm : p_api_version NUMBER Required Api Version number */
9437: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9438: /* default value is fnd_api.g_false */
9439: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9440: /* fnd_api.g_false */
9441: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9442: /* validation steps must be done and which steps */
9443: /* should be skipped. */
9444: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */

Line 9446: /* fnd_api.g_ret_sts_success (success) */

9442: /* validation steps must be done and which steps */
9443: /* should be skipped. */
9444: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9445: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9446: /* fnd_api.g_ret_sts_success (success) */
9447: /* fnd_api.g_ret_sts_error (error) */
9448: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9449: /* x_msg_count NUMBER Number of messages in the message stack */
9450: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

Line 9447: /* fnd_api.g_ret_sts_error (error) */

9443: /* should be skipped. */
9444: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9445: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9446: /* fnd_api.g_ret_sts_success (success) */
9447: /* fnd_api.g_ret_sts_error (error) */
9448: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9449: /* x_msg_count NUMBER Number of messages in the message stack */
9450: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9451: /*-----------------------------------------------------------------------------------------------------------*/

Line 9448: /* fnd_api.g_ret_sts_unexp_error (unexpected) */

9444: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9445: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9446: /* fnd_api.g_ret_sts_success (success) */
9447: /* fnd_api.g_ret_sts_error (error) */
9448: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9449: /* x_msg_count NUMBER Number of messages in the message stack */
9450: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9451: /*-----------------------------------------------------------------------------------------------------------*/
9452:

Line 9454: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,

9450: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9451: /*-----------------------------------------------------------------------------------------------------------*/
9452:
9453: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9454: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9455: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9456: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9457: p_update_repair_task_rec IN REPAIR_TASK_REC,
9458: x_return_status OUT NOCOPY VARCHAR2,

Line 9455: p_commit IN VARCHAR2 := Fnd_Api.g_false,

9451: /*-----------------------------------------------------------------------------------------------------------*/
9452:
9453: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9454: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9455: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9456: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9457: p_update_repair_task_rec IN REPAIR_TASK_REC,
9458: x_return_status OUT NOCOPY VARCHAR2,
9459: x_msg_count OUT NOCOPY NUMBER,

Line 9456: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,

9452:
9453: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9454: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9455: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9456: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9457: p_update_repair_task_rec IN REPAIR_TASK_REC,
9458: x_return_status OUT NOCOPY VARCHAR2,
9459: x_msg_count OUT NOCOPY NUMBER,
9460: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 9508: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9504: Fnd_Log.string(l_statement_level,
9505: l_module_name,
9506: 'checking api compatibility');
9507: END IF;
9508: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9509: p_api_version,
9510: l_api_name,
9511: G_PKG_NAME)
9512: THEN

Line 9519: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

9515: Fnd_Log.string(l_exception_level,
9516: l_module_name,
9517: 'checking api compatibility, was unsuccessful');
9518: END IF;
9519: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
9520: END IF;
9521:
9522: IF l_statement_level >= l_debug_level
9523: THEN

Line 9530: IF Fnd_Api.to_Boolean(p_init_msg_list)

9526: 'checking api compatibility, was successful');
9527: END IF;
9528:
9529: -- Initialize message list if p_init_msg_list is set to TRUE.
9530: IF Fnd_Api.to_Boolean(p_init_msg_list)
9531: THEN
9532: Fnd_Msg_Pub.initialize;
9533: END IF;
9534: -- Initialize API return status to success

Line 9535: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9531: THEN
9532: Fnd_Msg_Pub.initialize;
9533: END IF;
9534: -- Initialize API return status to success
9535: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9536: -- ---------------
9537: -- Api body starts
9538: -- ---------------
9539: IF l_statement_level >= l_debug_level

Line 9618: IF Fnd_Api.To_Boolean(p_commit)

9614: -- -------------------
9615: -- Api body ends here
9616: -- -------------------
9617: -- Standard check of p_commit.
9618: IF Fnd_Api.To_Boolean(p_commit)
9619: THEN
9620: COMMIT WORK;
9621: END IF;
9622: -- Standard call to get message count and IF count is get message info.

Line 9626: WHEN Fnd_Api.G_EXC_ERROR THEN

9622: -- Standard call to get message count and IF count is get message info.
9623: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9624: p_data => x_msg_data);
9625: EXCEPTION
9626: WHEN Fnd_Api.G_EXC_ERROR THEN
9627: ROLLBACK TO update_repair_task;
9628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9629: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9630: p_data => x_msg_data);

Line 9628: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9624: p_data => x_msg_data);
9625: EXCEPTION
9626: WHEN Fnd_Api.G_EXC_ERROR THEN
9627: ROLLBACK TO update_repair_task;
9628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9629: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9630: p_data => x_msg_data);
9631: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9632: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9631: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9627: ROLLBACK TO update_repair_task;
9628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9629: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9630: p_data => x_msg_data);
9631: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9632: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9633: ROLLBACK TO update_repair_task;
9634: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9635: p_data => x_msg_data);

Line 9632: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9629: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9630: p_data => x_msg_data);
9631: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9632: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9633: ROLLBACK TO update_repair_task;
9634: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9635: p_data => x_msg_data);
9636: WHEN OTHERS THEN

Line 9637: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9633: ROLLBACK TO update_repair_task;
9634: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9635: p_data => x_msg_data);
9636: WHEN OTHERS THEN
9637: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9638: ROLLBACK TO update_repair_task;
9639: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9640: THEN
9641: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);