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 437: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

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

Line 442: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

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

Line 446: IF Fnd_Api.to_Boolean(p_init_msg_list)

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

Line 452: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

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

Line 461: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 471: l_Charges_Rec.estimate_detail_id <> FND_API.G_MISS_NUM) then

467: -- If this is an existing charge line, get the current
468: -- bill-to and ship-to site information so that
469: -- we can compare them with what is being passed in.
470: if (l_Charges_Rec.estimate_detail_id is not null and
471: l_Charges_Rec.estimate_detail_id <> FND_API.G_MISS_NUM) then
472: BEGIN
473: select invoice_to_org_id, ship_to_org_id
474: into l_invoice_to_org_id, l_ship_to_org_id
475: from cs_estimate_details

Line 480: RAISE FND_API.G_EXC_ERROR;

476: where estimate_detail_id = l_Charges_Rec.estimate_detail_id;
477: EXCEPTION
478: WHEN NO_DATA_FOUND THEN
479: debug('No existing Charges record',l_mod_name,1);
480: RAISE FND_API.G_EXC_ERROR;
481: END;
482: if (l_invoice_to_org_id <> l_Charges_Rec.invoice_to_org_id) then
483: l_Charges_Rec.bill_to_account_id := NULL;
484: end if;

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

494: Service Request level and it would error out if the bill to address selected at product
495: line level is of related party.
496: */
497: IF (l_Charges_Rec.invoice_to_org_id IS NOT NULL AND
498: l_Charges_Rec.invoice_to_org_id <> Fnd_Api.G_MISS_NUM)
499: THEN
500: BEGIN
501: SELECT party_id
502: INTO l_Charges_Rec.bill_to_party_id

Line 508: RAISE Fnd_Api.G_EXC_ERROR;

504: WHERE party_site_id = l_Charges_Rec.invoice_to_org_id;
505: EXCEPTION
506: WHEN NO_DATA_FOUND THEN
507: debug('No Bill to Party Id', l_mod_name, 1);
508: RAISE Fnd_Api.G_EXC_ERROR;
509: WHEN TOO_MANY_ROWS THEN
510: debug('Too many Bill to Party Id', l_mod_name, 1);
511: RAISE Fnd_Api.G_EXC_ERROR;
512: END;

Line 511: RAISE Fnd_Api.G_EXC_ERROR;

507: debug('No Bill to Party Id', l_mod_name, 1);
508: RAISE Fnd_Api.G_EXC_ERROR;
509: WHEN TOO_MANY_ROWS THEN
510: debug('Too many Bill to Party Id', l_mod_name, 1);
511: RAISE Fnd_Api.G_EXC_ERROR;
512: END;
513: END IF;
514:
515: /* Fixed for forward port bug#4214359.

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

518: Service Request level and it would error out if the ship to address selected at product
519: line level is of related party.
520: */
521: IF (l_Charges_Rec.ship_to_org_id IS NOT NULL AND
522: l_Charges_Rec.ship_to_org_id <> Fnd_Api.G_MISS_NUM)
523: THEN
524: BEGIN
525: SELECT party_id
526: INTO l_Charges_Rec.ship_to_party_id

Line 532: RAISE Fnd_Api.G_EXC_ERROR;

528: WHERE party_site_id = l_Charges_Rec.ship_to_org_id;
529: EXCEPTION
530: WHEN NO_DATA_FOUND THEN
531: debug('No Ship to Party Id', l_mod_name, 1);
532: RAISE Fnd_Api.G_EXC_ERROR;
533: WHEN TOO_MANY_ROWS THEN
534: debug('Too many Ship to Party Id', l_mod_name, 1);
535: RAISE Fnd_Api.G_EXC_ERROR;
536: END;

Line 535: RAISE Fnd_Api.G_EXC_ERROR;

531: debug('No Ship to Party Id', l_mod_name, 1);
532: RAISE Fnd_Api.G_EXC_ERROR;
533: WHEN TOO_MANY_ROWS THEN
534: debug('Too many Ship to Party Id', l_mod_name, 1);
535: RAISE Fnd_Api.G_EXC_ERROR;
536: END;
537: END IF;
538:
539: -- Based on the action, call the respective charges public api to

Line 554: p_transaction_control => Fnd_Api.G_TRUE,

550: Cs_Charge_Details_Pub.Create_Charge_Details(p_api_version => p_api_version,
551: p_init_msg_list => p_init_msg_list,
552: p_commit => p_commit,
553: p_validation_level => p_validation_level,
554: p_transaction_control => Fnd_Api.G_TRUE,
555: p_Charges_Rec => l_charges_rec,
556: x_object_version_number => x_object_version_number,
557: x_estimate_detail_id => x_estimate_detail_id,
558: x_line_number => x_line_number,

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

564: x_return_status,
565: l_mod_name,
566: 1);
567:
568: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
569: THEN
570: Debug('Create_Charge_Details failed ', l_mod_name, 1);
571: RAISE Fnd_Api.G_EXC_ERROR;
572: END IF;

Line 571: RAISE Fnd_Api.G_EXC_ERROR;

567:
568: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
569: THEN
570: Debug('Create_Charge_Details failed ', l_mod_name, 1);
571: RAISE Fnd_Api.G_EXC_ERROR;
572: END IF;
573:
574: ELSIF p_action = 'UPDATE'
575: THEN

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

583: l_Charges_Rec.business_process_id,
584: l_mod_name,
585: 1);
586:
587: IF ((NVL(l_Charges_Rec.business_process_id, Fnd_Api.G_MISS_NUM) =
588: Fnd_Api.G_MISS_NUM) AND
589: l_Charges_Rec.estimate_detail_id IS NOT NULL)
590: THEN
591: BEGIN

Line 588: Fnd_Api.G_MISS_NUM) AND

584: l_mod_name,
585: 1);
586:
587: IF ((NVL(l_Charges_Rec.business_process_id, Fnd_Api.G_MISS_NUM) =
588: Fnd_Api.G_MISS_NUM) AND
589: l_Charges_Rec.estimate_detail_id IS NOT NULL)
590: THEN
591: BEGIN
592: SELECT business_process_id

Line 602: RAISE Fnd_Api.G_EXC_ERROR;

598: WHEN NO_DATA_FOUND THEN
599: Debug('No Business business_process_id',
600: l_mod_name,
601: 1);
602: RAISE Fnd_Api.G_EXC_ERROR;
603: WHEN TOO_MANY_ROWS THEN
604: Debug('Too many business_process_id',
605: l_mod_name,
606: 1);

Line 607: RAISE Fnd_Api.G_EXC_ERROR;

603: WHEN TOO_MANY_ROWS THEN
604: Debug('Too many business_process_id',
605: l_mod_name,
606: 1);
607: RAISE Fnd_Api.G_EXC_ERROR;
608: END;
609: END IF;
610:
611: Debug('l_Charges_Rec.business_process_id=' ||

Line 620: p_transaction_control => Fnd_Api.G_TRUE,

616: Cs_Charge_Details_Pub.Update_Charge_Details(p_api_version => p_api_version,
617: p_init_msg_list => p_init_msg_list,
618: p_commit => p_commit,
619: p_validation_level => p_validation_level,
620: p_transaction_control => Fnd_Api.G_TRUE,
621: p_Charges_Rec => l_Charges_Rec,
622: x_object_version_number => x_object_version_number,
623: x_return_status => x_return_status,
624: x_msg_count => x_msg_count,

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

628: x_return_status,
629: l_mod_name,
630: 1);
631:
632: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
633: THEN
634: Debug('update_charge_details failed', l_mod_name, 1);
635: RAISE Fnd_Api.G_EXC_ERROR;
636: END IF;

Line 635: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 652: p_transaction_control => Fnd_Api.G_TRUE,

648: Cs_Charge_Details_Pub.Delete_Charge_Details(p_api_version => p_api_version,
649: p_init_msg_list => p_init_msg_list,
650: p_commit => p_commit,
651: p_validation_level => p_validation_level,
652: p_transaction_control => Fnd_Api.G_TRUE,
653: p_estimate_detail_id => l_estimate_detail_id,
654: x_return_status => x_return_status,
655: x_msg_count => x_msg_count,
656: x_msg_data => x_msg_data);

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

659: x_return_status,
660: l_mod_name,
661: 1);
662:
663: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
664: THEN
665: Debug('Delete_Charge_Details failed ', l_mod_name, 1);
666: RAISE Fnd_Api.G_EXC_ERROR;
667: END IF;

Line 666: RAISE Fnd_Api.G_EXC_ERROR;

662:
663: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
664: THEN
665: Debug('Delete_Charge_Details failed ', l_mod_name, 1);
666: RAISE Fnd_Api.G_EXC_ERROR;
667: END IF;
668: END IF;
669:
670: -- Api body ends here

Line 673: IF Fnd_Api.To_Boolean(p_commit)

669:
670: -- Api body ends here
671:
672: -- Standard check of p_commit.
673: IF Fnd_Api.To_Boolean(p_commit)
674: THEN
675: COMMIT WORK;
676: END IF;
677:

Line 682: WHEN Fnd_Api.G_EXC_ERROR THEN

678: -- Standard call to get message count and IF count is get message info.
679: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
680: p_data => x_msg_data);
681: EXCEPTION
682: WHEN Fnd_Api.G_EXC_ERROR THEN
683: ROLLBACK TO process_charge_lines;
684: x_return_status := Fnd_Api.G_RET_STS_ERROR;
685: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
686: p_data => x_msg_data);

Line 684: x_return_status := Fnd_Api.G_RET_STS_ERROR;

680: p_data => x_msg_data);
681: EXCEPTION
682: WHEN Fnd_Api.G_EXC_ERROR THEN
683: ROLLBACK TO process_charge_lines;
684: x_return_status := Fnd_Api.G_RET_STS_ERROR;
685: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
686: p_data => x_msg_data);
687: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
688: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 687: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

683: ROLLBACK TO process_charge_lines;
684: x_return_status := Fnd_Api.G_RET_STS_ERROR;
685: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
686: p_data => x_msg_data);
687: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
688: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
689: ROLLBACK TO process_charge_lines;
690: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
691: p_data => x_msg_data);

Line 688: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

684: x_return_status := Fnd_Api.G_RET_STS_ERROR;
685: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
686: p_data => x_msg_data);
687: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
688: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
689: ROLLBACK TO process_charge_lines;
690: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
691: p_data => x_msg_data);
692: WHEN OTHERS THEN

Line 693: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

689: ROLLBACK TO process_charge_lines;
690: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
691: p_data => x_msg_data);
692: WHEN OTHERS THEN
693: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
694: ROLLBACK TO process_charge_lines;
695: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
696: THEN
697: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

706: /* */
707: /*--------------------------------------------------*/
708:
709: PROCEDURE apply_contract(p_api_version IN NUMBER,
710: p_commit IN VARCHAR2 := Fnd_Api.g_false,
711: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
712: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
713: p_incident_id IN NUMBER,
714: x_return_status OUT NOCOPY VARCHAR2,

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

707: /*--------------------------------------------------*/
708:
709: PROCEDURE apply_contract(p_api_version IN NUMBER,
710: p_commit IN VARCHAR2 := Fnd_Api.g_false,
711: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
712: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
713: p_incident_id IN NUMBER,
714: x_return_status OUT NOCOPY VARCHAR2,
715: x_msg_count OUT NOCOPY NUMBER,

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

708:
709: PROCEDURE apply_contract(p_api_version IN NUMBER,
710: p_commit IN VARCHAR2 := Fnd_Api.g_false,
711: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
712: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
713: p_incident_id IN NUMBER,
714: x_return_status OUT NOCOPY VARCHAR2,
715: x_msg_count OUT NOCOPY NUMBER,
716: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 729: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

725: -- Standard Start of API savepoint
726: SAVEPOINT apply_contract;
727:
728: -- Standard call to check for call compatibility.
729: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
730: p_api_version,
731: l_api_name,
732: G_PKG_NAME)
733: THEN

Line 734: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

730: p_api_version,
731: l_api_name,
732: G_PKG_NAME)
733: THEN
734: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
735: END IF;
736:
737: -- Initialize message list if p_init_msg_list is set to TRUE.
738: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 738: IF Fnd_Api.to_Boolean(p_init_msg_list)

734: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
735: END IF;
736:
737: -- Initialize message list if p_init_msg_list is set to TRUE.
738: IF Fnd_Api.to_Boolean(p_init_msg_list)
739: THEN
740: Fnd_Msg_Pub.initialize;
741: END IF;
742:

Line 744: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

740: Fnd_Msg_Pub.initialize;
741: END IF;
742:
743: -- Initialize API return status to success
744: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
745:
746: -- Api body starts
747: IF (g_debug > 0)
748: THEN

Line 761: RAISE Fnd_Api.G_EXC_ERROR;

757: END IF;
758:
759: IF NOT (Csd_Process_Util.VALIDATE_INCIDENT_ID(p_incident_id))
760: THEN
761: RAISE Fnd_Api.G_EXC_ERROR;
762: END IF;
763:
764: IF (g_debug > 0)
765: THEN

Line 777: IF Fnd_Api.To_Boolean(p_commit)

773:
774: -- Api body ends here
775:
776: -- Standard check of p_commit.
777: IF Fnd_Api.To_Boolean(p_commit)
778: THEN
779: COMMIT WORK;
780: END IF;
781:

Line 786: WHEN Fnd_Api.G_EXC_ERROR THEN

782: -- Standard call to get message count and IF count is get message info.
783: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
784: p_data => x_msg_data);
785: EXCEPTION
786: WHEN Fnd_Api.G_EXC_ERROR THEN
787: ROLLBACK TO apply_contract;
788: x_return_status := Fnd_Api.G_RET_STS_ERROR;
789: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
790: p_data => x_msg_data);

Line 788: x_return_status := Fnd_Api.G_RET_STS_ERROR;

784: p_data => x_msg_data);
785: EXCEPTION
786: WHEN Fnd_Api.G_EXC_ERROR THEN
787: ROLLBACK TO apply_contract;
788: x_return_status := Fnd_Api.G_RET_STS_ERROR;
789: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
790: p_data => x_msg_data);
791: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
792: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 791: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

787: ROLLBACK TO apply_contract;
788: x_return_status := Fnd_Api.G_RET_STS_ERROR;
789: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
790: p_data => x_msg_data);
791: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
792: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
793: ROLLBACK TO apply_contract;
794: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
795: p_data => x_msg_data);

Line 792: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

788: x_return_status := Fnd_Api.G_RET_STS_ERROR;
789: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
790: p_data => x_msg_data);
791: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
792: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
793: ROLLBACK TO apply_contract;
794: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
795: p_data => x_msg_data);
796: WHEN OTHERS THEN

Line 797: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

793: ROLLBACK TO apply_contract;
794: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
795: p_data => x_msg_data);
796: WHEN OTHERS THEN
797: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
798: ROLLBACK TO apply_contract;
799: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
800: THEN
801: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

811: /* */
812: /*--------------------------------------------------*/
813:
814: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
815: p_commit IN VARCHAR2 := Fnd_Api.g_false,
816: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
817: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
818: p_delivery_id IN OUT NOCOPY NUMBER,
819: x_return_status OUT NOCOPY VARCHAR2,

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

812: /*--------------------------------------------------*/
813:
814: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
815: p_commit IN VARCHAR2 := Fnd_Api.g_false,
816: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
817: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
818: p_delivery_id IN OUT NOCOPY NUMBER,
819: x_return_status OUT NOCOPY VARCHAR2,
820: x_msg_count OUT NOCOPY NUMBER,

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

813:
814: PROCEDURE ship_sales_order(p_api_version IN NUMBER,
815: p_commit IN VARCHAR2 := Fnd_Api.g_false,
816: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
817: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
818: p_delivery_id IN OUT NOCOPY NUMBER,
819: x_return_status OUT NOCOPY VARCHAR2,
820: x_msg_count OUT NOCOPY NUMBER,
821: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 916: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

912: -- Standard Start of API savepoint
913: SAVEPOINT ship_sales_order;
914:
915: -- Standard call to check for call compatibility.
916: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
917: p_api_version,
918: l_api_name,
919: G_PKG_NAME)
920: THEN

Line 921: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

917: p_api_version,
918: l_api_name,
919: G_PKG_NAME)
920: THEN
921: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
922: END IF;
923:
924: -- Initialize message list if p_init_msg_list is set to TRUE.
925: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 925: IF Fnd_Api.to_Boolean(p_init_msg_list)

921: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
922: END IF;
923:
924: -- Initialize message list if p_init_msg_list is set to TRUE.
925: IF Fnd_Api.to_Boolean(p_init_msg_list)
926: THEN
927: Fnd_Msg_Pub.initialize;
928: END IF;
929:

Line 931: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

927: Fnd_Msg_Pub.initialize;
928: END IF;
929:
930: -- Initialize API return status to success
931: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
932:
933: -- Api body starts
934:
935: -- dbms_application_info.set_client_info('204');

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

947: Csd_Gen_Utility_Pvt.ADD('Shipping the Sales Order');
948: Csd_Gen_Utility_Pvt.ADD('p_delivery_id =' || p_delivery_id);
949: END IF;
950:
951: IF NVL(p_delivery_id, Fnd_Api.G_MISS_NUM) = Fnd_Api.G_MISS_NUM
952: THEN
953: Fnd_Message.SET_NAME('CSD', 'CSD_INV_DELIVERY_ID');
954: Fnd_Message.SET_TOKEN('DELIVERY_ID', p_delivery_id);
955: Fnd_Msg_Pub.ADD;

Line 960: RAISE Fnd_Api.G_EXC_ERROR;

956: IF (g_debug > 0)
957: THEN
958: Csd_Gen_Utility_Pvt.ADD('Delivery_id is invalid');
959: END IF;
960: RAISE Fnd_Api.G_EXC_ERROR;
961: ELSE
962:
963: BEGIN
964: SELECT '*'

Line 977: RAISE Fnd_Api.G_EXC_ERROR;

973: IF (g_debug > 0)
974: THEN
975: Csd_Gen_Utility_Pvt.ADD('Delivery_id is invalid');
976: END IF;
977: RAISE Fnd_Api.G_EXC_ERROR;
978: END;
979: END IF;
980:
981: FOR i IN delivery(p_delivery_id)

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

984: -- In case of serial controlled at SO issue item, update the serial number on the
985: -- delivery line details
986: -- This change was made to fix bug 3437177
987:
988: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
989: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
990: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
991: Fnd_Api.G_MISS_CHAR
992: THEN

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

986: -- This change was made to fix bug 3437177
987:
988: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
989: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
990: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
991: Fnd_Api.G_MISS_CHAR
992: THEN
993: BEGIN
994: source_code := 'OE'; -- The only source code that should be used by the API

Line 991: Fnd_Api.G_MISS_CHAR

987:
988: -- IF NVL(i.serial_number, FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR THEN
989: IF i.Serial_number_control_code = C_SRL_NUM_Cnt_Code_SO_ISSUE AND
990: NVL(i.serial_number, Fnd_Api.G_MISS_CHAR) <>
991: Fnd_Api.G_MISS_CHAR
992: THEN
993: BEGIN
994: source_code := 'OE'; -- The only source code that should be used by the API
995: changed_attributes(1).delivery_detail_id := i.delivery_detail_id;

Line 1055: RAISE Fnd_Api.G_EXC_ERROR;

1051: Fnd_Message.SET_NAME('CSD',
1052: 'CSD_UPDATE_SHIPPING_FAILED');
1053: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
1054: Fnd_Msg_Pub.ADD;
1055: RAISE Fnd_Api.G_EXC_ERROR;
1056: END;
1057:
1058: END IF; --end of update_shipping_attributes
1059:

Line 1161: RAISE Fnd_Api.G_EXC_ERROR;

1157: THEN
1158: Fnd_Message.SET_NAME('CSD', 'CSD_SHIP_CONFIRM_FAILED');
1159: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
1160: Fnd_Msg_Pub.ADD;
1161: RAISE Fnd_Api.G_EXC_ERROR;
1162: END IF;
1163:
1164: END; -- end of delivery action
1165:

Line 1169: IF Fnd_Api.To_Boolean(p_commit)

1165:
1166: -- Api body ends here
1167:
1168: -- Standard check of p_commit.
1169: IF Fnd_Api.To_Boolean(p_commit)
1170: THEN
1171: COMMIT WORK;
1172: END IF;
1173:

Line 1179: WHEN Fnd_Api.G_EXC_ERROR THEN

1175: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1176: p_data => x_msg_data);
1177:
1178: EXCEPTION
1179: WHEN Fnd_Api.G_EXC_ERROR THEN
1180: ROLLBACK TO ship_sales_order;
1181: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1182: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1183: p_data => x_msg_data);

Line 1181: x_return_status := Fnd_Api.G_RET_STS_ERROR;

1177:
1178: EXCEPTION
1179: WHEN Fnd_Api.G_EXC_ERROR THEN
1180: ROLLBACK TO ship_sales_order;
1181: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1182: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1183: p_data => x_msg_data);
1184: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1185: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 1184: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

1180: ROLLBACK TO ship_sales_order;
1181: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1182: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1183: p_data => x_msg_data);
1184: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1185: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1186: ROLLBACK TO ship_sales_order;
1187: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1188: p_data => x_msg_data);

Line 1185: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

1181: x_return_status := Fnd_Api.G_RET_STS_ERROR;
1182: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1183: p_data => x_msg_data);
1184: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1185: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1186: ROLLBACK TO ship_sales_order;
1187: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1188: p_data => x_msg_data);
1189: WHEN OTHERS THEN

Line 1190: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

1186: ROLLBACK TO ship_sales_order;
1187: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
1188: p_data => x_msg_data);
1189: WHEN OTHERS THEN
1190: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1191: ROLLBACK TO ship_sales_order;
1192: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
1193: THEN
1194: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

1205:
1206: begin
1207: IF p_MSG_COUNT > 1 THEN
1208: FOR i IN 1..p_MSG_COUNT LOOP
1209: l_msg := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
1210: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1211: END LOOP ;
1212: ELSE
1213: l_msg := apps.FND_MSG_PUB.Get(1,apps.FND_API.G_FALSE) ;

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

1209: l_msg := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
1210: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1211: END LOOP ;
1212: ELSE
1213: l_msg := apps.FND_MSG_PUB.Get(1,apps.FND_API.G_FALSE) ;
1214: Fnd_Log.STRING(l_stat_level, p_mod_name, l_msg);
1215: END IF ;
1216:
1217: end dbg_print_stack;

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

1224: /* */
1225: /*--------------------------------------------------*/
1226:
1227: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1228: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1229: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1230: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1231: p_action IN VARCHAR2,
1232: /*Fixed for bug#4433942 added product

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

1225: /*--------------------------------------------------*/
1226:
1227: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1228: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1229: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1230: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1231: p_action IN VARCHAR2,
1232: /*Fixed for bug#4433942 added product
1233: txn record as in parameter

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

1226:
1227: PROCEDURE process_sales_order(p_api_version IN NUMBER,
1228: p_commit IN VARCHAR2 := Fnd_Api.g_false,
1229: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
1230: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
1231: p_action IN VARCHAR2,
1232: /*Fixed for bug#4433942 added product
1233: txn record as in parameter
1234: */

Line 1420: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

1416: -- Standard Start of API savepoint
1417: SAVEPOINT process_sales_order;
1418:
1419: -- Standard call to check for call compatibility.
1420: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
1421: p_api_version,
1422: l_api_name,
1423: G_PKG_NAME)
1424: THEN

Line 1425: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

1421: p_api_version,
1422: l_api_name,
1423: G_PKG_NAME)
1424: THEN
1425: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
1426: END IF;
1427:
1428: -- Initialize message list if p_init_msg_list is set to TRUE.
1429: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 1429: IF Fnd_Api.to_Boolean(p_init_msg_list)

1425: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
1426: END IF;
1427:
1428: -- Initialize message list if p_init_msg_list is set to TRUE.
1429: IF Fnd_Api.to_Boolean(p_init_msg_list)
1430: THEN
1431: Fnd_Msg_Pub.initialize;
1432: END IF;
1433:

Line 1435: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

1431: Fnd_Msg_Pub.initialize;
1432: END IF;
1433:
1434: -- Initialize API return status to success
1435: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
1436:
1437: -- Api body starts
1438:
1439: -- dbms_application_info.set_client_info('204');

Line 1447: RAISE Fnd_Api.G_EXC_ERROR;

1443:
1444: -- Validate the action code
1445: IF NOT (Csd_Process_Util.VALIDATE_ACTION(p_action, l_api_name))
1446: THEN
1447: RAISE Fnd_Api.G_EXC_ERROR;
1448: END IF;
1449:
1450: IF p_action = 'CREATE'
1451: THEN

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

1478: Debug('Return Status from Submit_Order' || x_return_status,
1479: l_mod_name,
1480: 1);
1481:
1482: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1483: THEN
1484: Debug('Submit_Order API failed ', l_mod_name, 1);
1485: RAISE Fnd_Api.G_EXC_ERROR;
1486: END IF;

Line 1485: RAISE Fnd_Api.G_EXC_ERROR;

1481:
1482: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1483: THEN
1484: Debug('Submit_Order API failed ', l_mod_name, 1);
1485: RAISE Fnd_Api.G_EXC_ERROR;
1486: END IF;
1487:
1488: ELSIF p_action = 'BOOK'
1489: THEN

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

1500: 1);
1501:
1502: l_header_rec.org_id := p_order_rec.org_id;
1503: l_header_rec.order_id := p_order_rec.order_header_id;
1504: l_control_rec.book_flag := Fnd_Api.G_TRUE;
1505: l_control_rec.calculate_price := Fnd_Api.G_FALSE;
1506:
1507: open c_get_org_id(p_order_rec.order_header_id);
1508: fetch c_get_org_id into l_org_id;

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

1501:
1502: l_header_rec.org_id := p_order_rec.org_id;
1503: l_header_rec.order_id := p_order_rec.order_header_id;
1504: l_control_rec.book_flag := Fnd_Api.G_TRUE;
1505: l_control_rec.calculate_price := Fnd_Api.G_FALSE;
1506:
1507: open c_get_org_id(p_order_rec.order_header_id);
1508: fetch c_get_org_id into l_org_id;
1509: close c_get_org_id;

Line 1517: P_Init_Msg_List => Fnd_Api.G_TRUE,

1513: mo_global.set_policy_context('S',l_org_id);
1514:
1515:
1516: Aso_Order_Int.Update_order(P_Api_Version_Number => 1.0,
1517: P_Init_Msg_List => Fnd_Api.G_TRUE,
1518: P_Commit => Fnd_Api.G_FALSE,
1519: P_Qte_Rec => l_header_rec,
1520: P_Qte_Line_Tbl => l_line_tbl,
1521: P_Qte_Line_Dtl_Tbl => l_line_dtl_tbl,

Line 1518: P_Commit => Fnd_Api.G_FALSE,

1514:
1515:
1516: Aso_Order_Int.Update_order(P_Api_Version_Number => 1.0,
1517: P_Init_Msg_List => Fnd_Api.G_TRUE,
1518: P_Commit => Fnd_Api.G_FALSE,
1519: P_Qte_Rec => l_header_rec,
1520: P_Qte_Line_Tbl => l_line_tbl,
1521: P_Qte_Line_Dtl_Tbl => l_line_dtl_tbl,
1522: P_Line_Shipment_Tbl => l_ln_shipment_tbl,

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

1535: Debug('Return Status from Update_order' || x_return_status,
1536: l_mod_name,
1537: 1);
1538:
1539: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1540: THEN
1541: Debug('ASO_ORDER_INT.UPDATE_ORDER failed', l_mod_name, 1);
1542: RAISE Fnd_Api.G_EXC_ERROR;
1543: END IF;

Line 1542: RAISE Fnd_Api.G_EXC_ERROR;

1538:
1539: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1540: THEN
1541: Debug('ASO_ORDER_INT.UPDATE_ORDER failed', l_mod_name, 1);
1542: RAISE Fnd_Api.G_EXC_ERROR;
1543: END IF;
1544:
1545: ELSIF p_action = 'PICK-RELEASE'
1546: THEN

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

1553:
1554: -- If action is BOOK, then call charges private api to
1555: -- book the sales order
1556:
1557: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1558: Fnd_Api.G_MISS_NUM
1559: THEN
1560: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1561: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',

Line 1558: Fnd_Api.G_MISS_NUM

1554: -- If action is BOOK, then call charges private api to
1555: -- book the sales order
1556:
1557: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1558: Fnd_Api.G_MISS_NUM
1559: THEN
1560: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1561: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1562: p_order_rec.order_header_id);

Line 1565: RAISE Fnd_Api.G_EXC_ERROR;

1561: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1562: p_order_rec.order_header_id);
1563: Fnd_Msg_Pub.ADD;
1564: Debug('Invalid Order header Id is passed ', l_mod_name, 1);
1565: RAISE Fnd_Api.G_EXC_ERROR;
1566: END IF;
1567:
1568: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1569: Fnd_Api.G_MISS_NUM

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

1564: Debug('Invalid Order header Id is passed ', l_mod_name, 1);
1565: RAISE Fnd_Api.G_EXC_ERROR;
1566: END IF;
1567:
1568: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1569: Fnd_Api.G_MISS_NUM
1570: THEN
1571: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICKING_RULE_ID');
1572: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',

Line 1569: Fnd_Api.G_MISS_NUM

1565: RAISE Fnd_Api.G_EXC_ERROR;
1566: END IF;
1567:
1568: IF NVL(p_order_rec.PICKING_RULE_ID, Fnd_Api.G_MISS_NUM) =
1569: Fnd_Api.G_MISS_NUM
1570: THEN
1571: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICKING_RULE_ID');
1572: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',
1573: p_order_rec.PICKING_RULE_ID);

Line 1576: RAISE Fnd_Api.G_EXC_ERROR;

1572: Fnd_Message.SET_TOKEN('PICKING_RULE_ID',
1573: p_order_rec.PICKING_RULE_ID);
1574: Fnd_Msg_Pub.ADD;
1575: Debug('Invalid Picking rule Id is passed ', l_mod_name, 1);
1576: RAISE Fnd_Api.G_EXC_ERROR;
1577: END IF;
1578:
1579: -- Fetch user and login information
1580: l_user_id := Fnd_Global.USER_ID;

Line 1594: RAISE Fnd_Api.G_EXC_ERROR;

1590: 'does not exist or has expired',
1591: l_mod_name,
1592: 1);
1593: CLOSE pick_rule;
1594: RAISE Fnd_Api.G_EXC_ERROR;
1595: END IF;
1596: IF pick_rule%ISOPEN
1597: THEN
1598: CLOSE pick_rule;

Line 1610: RAISE Fnd_Api.G_EXC_ERROR;

1606: IF customer%NOTFOUND
1607: THEN
1608: Debug('invalid order header id ', l_mod_name, 1);
1609: CLOSE customer;
1610: RAISE Fnd_Api.G_EXC_ERROR;
1611: END IF;
1612:
1613: IF customer%ISOPEN
1614: THEN

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

1614: THEN
1615: CLOSE customer;
1616: END IF;
1617:
1618: IF NVL(p_order_rec.org_id, Fnd_Api.G_MISS_NUM) =
1619: Fnd_Api.G_MISS_NUM
1620: THEN
1621: l_Organization_Id := NULL;
1622: ELSIF p_Order_Rec.Org_Id IS NULL

Line 1619: Fnd_Api.G_MISS_NUM

1615: CLOSE customer;
1616: END IF;
1617:
1618: IF NVL(p_order_rec.org_id, Fnd_Api.G_MISS_NUM) =
1619: Fnd_Api.G_MISS_NUM
1620: THEN
1621: l_Organization_Id := NULL;
1622: ELSIF p_Order_Rec.Org_Id IS NULL
1623: THEN

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

1625: ELSE
1626: l_Organization_Id := p_order_rec.org_id;
1627: END IF;
1628:
1629: IF NVL(p_order_rec.pick_from_subinventory, Fnd_Api.G_MISS_CHAR) =
1630: Fnd_Api.G_MISS_CHAR
1631: THEN
1632: l_sub_inventory := '';
1633: ELSIF p_Order_Rec.Pick_From_Subinventory IS NULL

Line 1630: Fnd_Api.G_MISS_CHAR

1626: l_Organization_Id := p_order_rec.org_id;
1627: END IF;
1628:
1629: IF NVL(p_order_rec.pick_from_subinventory, Fnd_Api.G_MISS_CHAR) =
1630: Fnd_Api.G_MISS_CHAR
1631: THEN
1632: l_sub_inventory := '';
1633: ELSIF p_Order_Rec.Pick_From_Subinventory IS NULL
1634: THEN

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

1637: l_sub_inventory := p_order_rec.pick_from_subinventory;
1638: END IF;
1639:
1640: -- Fix for Enh Req#3948563
1641: IF ((p_order_rec.locator_id is null) or (p_order_rec.locator_id = FND_API.G_MISS_NUM)) THEN
1642: l_locator_id := null;
1643: ELSE
1644: l_locator_id := p_order_rec.locator_id;
1645: END IF;

Line 1732: RAISE Fnd_Api.G_EXC_ERROR;

1728: Fnd_Message.SET_NAME('CSD', 'CSD_PICK_RELEASE_FAIL');
1729: Fnd_Message.SET_TOKEN('BATCH_NAME', l_batch_name);
1730: Fnd_Msg_Pub.ADD;
1731: Debug(' Picking rules insert failed ',l_mod_name, 1);
1732: RAISE Fnd_Api.G_EXC_ERROR;
1733: End ;
1734:
1735: /* override the auto pick confirm flag if the serial_number is reserved. */
1736: Debug(' serial_number['||p_product_txn_rec.source_serial_number||']',l_mod_name, 1);

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

1734:
1735: /* override the auto pick confirm flag if the serial_number is reserved. */
1736: Debug(' serial_number['||p_product_txn_rec.source_serial_number||']',l_mod_name, 1);
1737: Debug(' item['||to_char(p_product_txn_rec.inventory_item_id)||']',l_mod_name, 1);
1738: if(nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR) then
1739: Open c_srl_reservation(p_product_txn_rec.source_serial_number, p_product_txn_rec.inventory_item_Id);
1740: FETCH c_Srl_reservation into l_reservation_Id;
1741: if(c_Srl_reservation%notfound)then
1742: l_reservation_id := null;

Line 1754: p_init_msg_list => FND_API.G_FALSE,

1750: Debug(' pick_confirm_flag['||l_batch_Rec.auto_pick_confirm_flag||']',l_mod_name, 1);
1751:
1752: WSH_PICKING_BATCHES_GRP.Create_Batch(
1753: p_api_version_number => 1.0,
1754: p_init_msg_list => FND_API.G_FALSE,
1755: p_commit => FND_API.G_FALSE,
1756: x_return_status => l_ret_status,
1757: x_msg_count => l_msg_count,
1758: x_msg_data => l_msg_data,

Line 1755: p_commit => FND_API.G_FALSE,

1751:
1752: WSH_PICKING_BATCHES_GRP.Create_Batch(
1753: p_api_version_number => 1.0,
1754: p_init_msg_list => FND_API.G_FALSE,
1755: p_commit => FND_API.G_FALSE,
1756: x_return_status => l_ret_status,
1757: x_msg_count => l_msg_count,
1758: x_msg_data => l_msg_data,
1759: p_rule_id => p_order_rec.PICKING_RULE_ID,

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

1761: p_batch_rec => l_batch_rec,
1762: p_batch_prefix => p_batch_prefix,
1763: x_batch_id => l_batch_id);
1764:
1765: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1766: THEN
1767: Debug('WSH_PICKINGBATCHES_GRP.Create_batch failed', l_mod_name, 1);
1768: RAISE Fnd_Api.G_EXC_ERROR;
1769: END IF;

Line 1768: RAISE Fnd_Api.G_EXC_ERROR;

1764:
1765: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
1766: THEN
1767: Debug('WSH_PICKINGBATCHES_GRP.Create_batch failed', l_mod_name, 1);
1768: RAISE Fnd_Api.G_EXC_ERROR;
1769: END IF;
1770: Debug('Batch created batch_id=['||l_batch_id||']',l_mod_name,1);
1771:
1772: wsh_picking_batches_pub.Release_Batch (

Line 1775: p_init_msg_list => Fnd_API.G_False,

1771:
1772: wsh_picking_batches_pub.Release_Batch (
1773: -- Standard parameters
1774: p_api_version => 1.0,
1775: p_init_msg_list => Fnd_API.G_False,
1776: p_commit => Fnd_API.G_False,
1777: x_return_status => x_Return_Status,
1778: x_msg_count => x_Msg_Count,
1779: x_msg_data => x_Msg_Data,

Line 1776: p_commit => Fnd_API.G_False,

1772: wsh_picking_batches_pub.Release_Batch (
1773: -- Standard parameters
1774: p_api_version => 1.0,
1775: p_init_msg_list => Fnd_API.G_False,
1776: p_commit => Fnd_API.G_False,
1777: x_return_status => x_Return_Status,
1778: x_msg_count => x_Msg_Count,
1779: x_msg_data => x_Msg_Data,
1780: -- program specific paramters.

Line 1794: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

1790:
1791: -- begin bug#9369021 , nnadig
1792: IF x_return_status = wsh_util_core.g_ret_sts_warning THEN
1793: Debug('release batch returning warning - interpreting that as success!', l_mod_name,1);
1794: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
1795: END IF;
1796: -- end bug#9369021
1797:
1798:

Line 1799: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)

1795: END IF;
1796: -- end bug#9369021
1797:
1798:
1799: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)
1800: THEN
1801: Fnd_Message.SET_NAME('CSD', 'CSD_PICK_RELEASE_FAIL');
1802: Fnd_Message.SET_TOKEN('BATCH_NAME', l_batch_name);
1803: Fnd_Msg_Pub.ADD;

Line 1807: RAISE Fnd_Api.G_EXC_ERROR;

1803: Fnd_Msg_Pub.ADD;
1804: Debug('WSH_PICK_LIST.RELEASE_BATCH failed for batch : ' ||
1805: l_batch_name,
1806: l_mod_name,1) ;
1807: RAISE Fnd_Api.G_EXC_ERROR;
1808: END IF;
1809: Debug('Batch processed, req_id=['||lx_request_id||']',l_mod_name,1);
1810:
1811: ELSIF p_action = 'SHIP'

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

1817: p_order_rec.order_header_id,
1818: l_mod_name,
1819: 1);
1820:
1821: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1822: Fnd_Api.G_MISS_NUM
1823: THEN
1824: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1825: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',

Line 1822: Fnd_Api.G_MISS_NUM

1818: l_mod_name,
1819: 1);
1820:
1821: IF NVL(p_order_rec.order_header_id, Fnd_Api.G_MISS_NUM) =
1822: Fnd_Api.G_MISS_NUM
1823: THEN
1824: Fnd_Message.SET_NAME('CSD', 'CSD_INV_ORDER_HEADER_ID');
1825: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1826: p_order_rec.order_header_id);

Line 1829: RAISE Fnd_Api.G_EXC_ERROR;

1825: Fnd_Message.SET_TOKEN('ORDER_HEADER_ID',
1826: p_order_rec.order_header_id);
1827: Fnd_Msg_Pub.ADD;
1828: Debug('Order_header_id is invalid', l_mod_name, 1);
1829: RAISE Fnd_Api.G_EXC_ERROR;
1830: END IF;
1831:
1832: FOR i IN delivery(p_order_rec.order_header_id,
1833: p_order_rec.order_line_id)

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

1838: -- delivery line details
1839: -- Update the serial number on the delivery lines only if the item
1840: -- is serialized at SO issue
1841: IF i.serial_number_control_code = 6 AND
1842: NVL(p_order_rec.serial_number, Fnd_Api.G_MISS_CHAR) <>
1843: Fnd_Api.G_MISS_CHAR
1844: THEN
1845:
1846: BEGIN

Line 1843: Fnd_Api.G_MISS_CHAR

1839: -- Update the serial number on the delivery lines only if the item
1840: -- is serialized at SO issue
1841: IF i.serial_number_control_code = 6 AND
1842: NVL(p_order_rec.serial_number, Fnd_Api.G_MISS_CHAR) <>
1843: Fnd_Api.G_MISS_CHAR
1844: THEN
1845:
1846: BEGIN
1847: source_code := 'OE'; -- The only source code that should be used by the API

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

1983: l_SN_at_SO_new_SN_number :=FALSE;
1984:
1985: if i.serial_number_control_code in (2,5,6) then
1986:
1987: if nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1988: /* Validation 3 */
1989: FND_MESSAGE.SET_NAME('CSD','CSD_API_SERIAL_NUM_REQD');
1990: FND_MSG_PUB.ADD;
1991: RAISE FND_API.G_EXC_ERROR;

Line 1991: RAISE FND_API.G_EXC_ERROR;

1987: if nvl(p_product_txn_rec.source_serial_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
1988: /* Validation 3 */
1989: FND_MESSAGE.SET_NAME('CSD','CSD_API_SERIAL_NUM_REQD');
1990: FND_MSG_PUB.ADD;
1991: RAISE FND_API.G_EXC_ERROR;
1992: else
1993: l_shipped_serial_number := p_product_txn_rec.source_serial_number;
1994: end if;
1995:

Line 2011: RAISE FND_API.G_EXC_ERROR;

2007: FND_MESSAGE.SET_NAME('CSD','CSD_SERIAL_NUM_NOT_IN_INVORG');
2008: FND_MESSAGE.SET_TOKEN('SERIAL_NUMBER',l_shipped_serial_number);
2009: FND_MESSAGE.SET_TOKEN('INV_ORG',i.organization_code);
2010: FND_MSG_PUB.ADD;
2011: RAISE FND_API.G_EXC_ERROR;
2012: else /*if Item is Serialied at SO then user may pass SN that does not resides in any warehouse */
2013: l_SN_at_SO_new_SN_number :=TRUE;
2014: end if;
2015: end;

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

2015: end;
2016: end if; /*end if of serialized item */
2017:
2018: if ( i.serial_number_control_code =1 or (i.serial_number_control_code=6 and l_SN_at_SO_new_SN_number=TRUE ) ) then
2019: if nvl(p_product_txn_rec.sub_inventory ,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2020: /*Validation 4 */
2021: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_IS_REQD');
2022: FND_MSG_PUB.ADD;
2023: RAISE FND_API.G_EXC_ERROR;

Line 2023: RAISE FND_API.G_EXC_ERROR;

2019: if nvl(p_product_txn_rec.sub_inventory ,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2020: /*Validation 4 */
2021: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_IS_REQD');
2022: FND_MSG_PUB.ADD;
2023: RAISE FND_API.G_EXC_ERROR;
2024: end if;
2025:
2026: begin
2027: SELECT msi.secondary_inventory_name

Line 2042: RAISE FND_API.G_EXC_ERROR;

2038: FND_MESSAGE.SET_NAME('CSD','CSD_SUBINV_NOT_IN_INVORG');
2039: FND_MESSAGE.SET_TOKEN('SUB_INV',p_product_txn_rec.sub_inventory);
2040: FND_MESSAGE.SET_TOKEN('INV_ORG',i.organization_code);
2041: FND_MSG_PUB.ADD;
2042: RAISE FND_API.G_EXC_ERROR;
2043: end;
2044:
2045: if i.LOT_CONTROL_CODE =2 then
2046: if nvl(p_product_txn_rec.lot_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then

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

2042: RAISE FND_API.G_EXC_ERROR;
2043: end;
2044:
2045: if i.LOT_CONTROL_CODE =2 then
2046: if nvl(p_product_txn_rec.lot_number,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2047: /*Validation 5 */
2048: FND_MESSAGE.SET_NAME('CSD','CSD_LOT_NUMBER_REQD');
2049: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2050: FND_MSG_PUB.ADD;

Line 2051: RAISE FND_API.G_EXC_ERROR;

2047: /*Validation 5 */
2048: FND_MESSAGE.SET_NAME('CSD','CSD_LOT_NUMBER_REQD');
2049: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2050: FND_MSG_PUB.ADD;
2051: RAISE FND_API.G_EXC_ERROR;
2052: else
2053: l_lot_number:= p_product_txn_rec.lot_number;
2054: end if;
2055: end if;

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

2054: end if;
2055: end if;
2056:
2057: if i.REVISION_QTY_CONTROL_CODE =2 then
2058: if nvl(p_product_txn_rec.revision,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2059: FND_MESSAGE.SET_NAME('CSD','CSD_ITEM_REVISION_REQD');
2060: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2061: FND_MSG_PUB.ADD;
2062: RAISE FND_API.G_EXC_ERROR;

Line 2062: RAISE FND_API.G_EXC_ERROR;

2058: if nvl(p_product_txn_rec.revision,FND_API.G_MISS_CHAR)=FND_API.G_MISS_CHAR then
2059: FND_MESSAGE.SET_NAME('CSD','CSD_ITEM_REVISION_REQD');
2060: FND_MESSAGE.SET_TOKEN('ITEM',i.item_name);
2061: FND_MSG_PUB.ADD;
2062: RAISE FND_API.G_EXC_ERROR;
2063: else
2064: l_revision:=p_product_txn_rec.revision;
2065: end if;
2066: end if;

Line 2137: RAISE Fnd_Api.G_EXC_ERROR;

2133: 1);
2134: Fnd_Message.SET_NAME('CSD','CSD_UPDATE_SHIPPING_FAILED');
2135: Fnd_Message.SET_TOKEN('ERR_MSG', x_msg_data);
2136: Fnd_Msg_Pub.ADD;
2137: RAISE Fnd_Api.G_EXC_ERROR;
2138: END;
2139:
2140: -- END IF; --end of update_shipping_attributes
2141:

Line 2266: RAISE FND_API.G_EXC_ERROR;

2262: if l_shipped_flag = 'N' then
2263: FND_MESSAGE.SET_NAME('CSD','CSD_SHIP_CONFIRM_FAILED');
2264: FND_MESSAGE.SET_TOKEN('ERR_MSG',x_msg_data);
2265: FND_MSG_PUB.ADD;
2266: RAISE FND_API.G_EXC_ERROR;
2267: end if;
2268: END IF;
2269: -- end bug#8269688, FP of bug#7659800, subhat
2270: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

Line 2270: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

2266: RAISE FND_API.G_EXC_ERROR;
2267: end if;
2268: END IF;
2269: -- end bug#8269688, FP of bug#7659800, subhat
2270: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2271: END; -- end of delivery action
2272:
2273: END LOOP; -- At the end of processing all the delivery id for an Order
2274: END IF; -- end of all actions

Line 2279: IF Fnd_Api.To_Boolean(p_commit)

2275:
2276: -- Api body ends here
2277:
2278: -- Standard check of p_commit.
2279: IF Fnd_Api.To_Boolean(p_commit)
2280: THEN
2281: COMMIT WORK;
2282: END IF;
2283:

Line 2289: WHEN Fnd_Api.G_EXC_ERROR THEN

2285: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2286: p_data => x_msg_data);
2287:
2288: EXCEPTION
2289: WHEN Fnd_Api.G_EXC_ERROR THEN
2290: Debug('In EXC_ERROR in process_sales_order', l_mod_name, 1);
2291: ROLLBACK TO process_sales_order;
2292:
2293: x_return_status := Fnd_Api.G_RET_STS_ERROR;

Line 2293: x_return_status := Fnd_Api.G_RET_STS_ERROR;

2289: WHEN Fnd_Api.G_EXC_ERROR THEN
2290: Debug('In EXC_ERROR in process_sales_order', l_mod_name, 1);
2291: ROLLBACK TO process_sales_order;
2292:
2293: x_return_status := Fnd_Api.G_RET_STS_ERROR;
2294: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2295: p_data => x_msg_data);
2296:
2297: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 2297: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

2293: x_return_status := Fnd_Api.G_RET_STS_ERROR;
2294: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2295: p_data => x_msg_data);
2296:
2297: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2298: Debug('In EXC_UNEXP_ERROR in process_sales_order', l_mod_name, 1);
2299: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2300: ROLLBACK TO process_sales_order;
2301: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,

Line 2299: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

2295: p_data => x_msg_data);
2296:
2297: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2298: Debug('In EXC_UNEXP_ERROR in process_sales_order', l_mod_name, 1);
2299: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2300: ROLLBACK TO process_sales_order;
2301: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2302: p_data => x_msg_data);
2303: WHEN OTHERS THEN

Line 2304: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

2300: ROLLBACK TO process_sales_order;
2301: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
2302: p_data => x_msg_data);
2303: WHEN OTHERS THEN
2304: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2305: Debug('In OTHERS in process_sales_order' || sqlerrm, l_mod_name, 1);
2306: ROLLBACK TO process_sales_order;
2307: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
2308: THEN

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

2322: /* repair orders */
2323: /*------------------------------------------------------------------*/
2324:
2325: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2326: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2327: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2328: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2329: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2330: x_return_status OUT NOCOPY VARCHAR2,

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

2323: /*------------------------------------------------------------------*/
2324:
2325: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2326: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2327: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2328: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2329: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2330: x_return_status OUT NOCOPY VARCHAR2,
2331: x_msg_count OUT NOCOPY NUMBER,

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

2324:
2325: PROCEDURE create_product_txn(p_api_version IN NUMBER,
2326: p_commit IN VARCHAR2 := Fnd_Api.g_false,
2327: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
2328: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
2329: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
2330: x_return_status OUT NOCOPY VARCHAR2,
2331: x_msg_count OUT NOCOPY NUMBER,
2332: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 2481: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

2477: -- Standard Start of API savepoint
2478: SAVEPOINT create_product_txn;
2479:
2480: -- Initialize API return status to success
2481: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2482:
2483: -- Standard call to check for call compatibility.
2484: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
2485: p_api_version,

Line 2484: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

2480: -- Initialize API return status to success
2481: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
2482:
2483: -- Standard call to check for call compatibility.
2484: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
2485: p_api_version,
2486: l_api_name,
2487: G_PKG_NAME)
2488: THEN

Line 2489: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

2485: p_api_version,
2486: l_api_name,
2487: G_PKG_NAME)
2488: THEN
2489: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
2490: END IF;
2491:
2492: -- Initialize message list if p_init_msg_list is set to TRUE.
2493: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 2493: IF Fnd_Api.to_Boolean(p_init_msg_list)

2489: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
2490: END IF;
2491:
2492: -- Initialize message list if p_init_msg_list is set to TRUE.
2493: IF Fnd_Api.to_Boolean(p_init_msg_list)
2494: THEN
2495: Fnd_Msg_Pub.initialize;
2496: END IF;
2497:

Line 2555: RAISE Fnd_Api.G_EXC_ERROR;

2551: -- Validate the repair line ID if it exists in csd_repairs
2552: IF NOT
2553: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => x_product_txn_rec.repair_line_id))
2554: THEN
2555: RAISE Fnd_Api.G_EXC_ERROR;
2556: END IF;
2557:
2558: Debug('Validate action type', l_mod_name, 1);
2559:

Line 2564: RAISE Fnd_Api.G_EXC_ERROR;

2560: -- Validate the Action Type if it exists in fnd_lookups
2561: IF NOT
2562: (Csd_Process_Util.Validate_action_type(p_action_type => x_product_txn_rec.action_type))
2563: THEN
2564: RAISE Fnd_Api.G_EXC_ERROR;
2565: END IF;
2566:
2567: Debug('Validate action code', l_mod_name, 1);
2568:

Line 2573: RAISE Fnd_Api.G_EXC_ERROR;

2569: -- Validate the repair line ID if it exists in fnd_lookups
2570: IF NOT
2571: (Csd_Process_Util.Validate_action_code(p_action_code => x_product_txn_rec.action_code))
2572: THEN
2573: RAISE Fnd_Api.G_EXC_ERROR;
2574: END IF;
2575:
2576: --R12 Development changes begin
2577: Debug('Validating picking rule if passed[' ||

Line 2590: RAISE Fnd_Api.G_EXC_ERROR;

2586: IF (cur_pick_rules%NOTFOUND)
2587: THEN
2588: Fnd_Message.SET_NAME('CSD', 'CSD_INV_PICK_RULE');
2589: Fnd_Msg_Pub.ADD;
2590: RAISE Fnd_Api.G_EXC_ERROR;
2591: END IF;
2592: END IF;
2593: --R12 Development changes End
2594: Debug('Validate product txn qty', l_mod_name, 1);

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

2606: Csd_Process_Util.Validate_quantity(p_action_type => x_product_txn_rec.action_type,
2607: p_repair_line_id => x_product_txn_rec.repair_line_id,
2608: p_prod_txn_qty => x_product_txn_rec.quantity,
2609: x_return_status => x_return_status);
2610: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2611: THEN
2612: Debug('Validate_Quantity failed ', l_mod_name, 1);
2613: RAISE Fnd_Api.G_EXC_ERROR;
2614: END IF;

Line 2613: RAISE Fnd_Api.G_EXC_ERROR;

2609: x_return_status => x_return_status);
2610: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2611: THEN
2612: Debug('Validate_Quantity failed ', l_mod_name, 1);
2613: RAISE Fnd_Api.G_EXC_ERROR;
2614: END IF;
2615: END IF;
2616:
2617: Debug('Validate product txn status', l_mod_name, 1);

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

2621: 1);
2622:
2623: -- Validate the PROD_TXN_STATUS if it exists in fnd_lookups
2624: IF (x_product_txn_rec.PROD_TXN_STATUS IS NOT NULL) AND
2625: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)
2626: THEN
2627: BEGIN
2628: SELECT 'X'
2629: INTO l_check

Line 2637: RAISE Fnd_Api.G_EXC_ERROR;

2633: EXCEPTION
2634: WHEN OTHERS THEN
2635: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_PROD_TXN_STATUS');
2636: Fnd_Msg_Pub.ADD;
2637: RAISE Fnd_Api.G_EXC_ERROR;
2638: END;
2639: END IF;
2640:
2641: -- Get service request from csd_repairs table

Line 2660: RAISE Fnd_Api.G_EXC_ERROR;

2656: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
2657: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
2658: x_product_txn_rec.repair_line_id);
2659: Fnd_Msg_Pub.ADD;
2660: RAISE Fnd_Api.G_EXC_ERROR;
2661: END;
2662:
2663: Debug('l_incident_id =' || l_incident_id, l_mod_name, 1);
2664:

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

2672:
2673: IF l_bus_process_id < 0
2674: THEN
2675: IF NVL(x_product_txn_rec.business_process_id,
2676: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM
2677: THEN
2678: l_bus_process_id := x_product_txn_rec.business_process_id;
2679: ELSE
2680: Debug('Business process Id does not exist ', l_mod_name, 1);

Line 2681: RAISE Fnd_Api.G_EXC_ERROR;

2677: THEN
2678: l_bus_process_id := x_product_txn_rec.business_process_id;
2679: ELSE
2680: Debug('Business process Id does not exist ', l_mod_name, 1);
2681: RAISE Fnd_Api.G_EXC_ERROR;
2682: END IF;
2683: END IF;
2684:
2685: Debug('Getting the Coverage and txn Group Id', l_mod_name, 1);

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

2687: l_mod_name,
2688: 1);
2689:
2690: IF (x_product_txn_rec.transaction_type_id IS NULL) OR
2691: (x_product_txn_rec.transaction_type_id = Fnd_Api.G_MISS_NUM)
2692: THEN
2693: BEGIN
2694: SELECT transaction_type_id
2695: INTO l_transaction_type_id

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

2715: END IF;
2716:
2717: -- Get the coverage details from the contract
2718: /******************************contract changes
2719: IF NVL(x_product_txn_rec.contract_id, Fnd_Api.G_MISS_NUM) <>
2720: Fnd_Api.G_MISS_NUM
2721: THEN
2722: BEGIN
2723: --Bug fix for 3399883 [

Line 2720: Fnd_Api.G_MISS_NUM

2716:
2717: -- Get the coverage details from the contract
2718: /******************************contract changes
2719: IF NVL(x_product_txn_rec.contract_id, Fnd_Api.G_MISS_NUM) <>
2720: Fnd_Api.G_MISS_NUM
2721: THEN
2722: BEGIN
2723: --Bug fix for 3399883 [
2724: l_no_contract_bp_vldn := NVL(Fnd_Profile.value('CSD_NO_CONTRACT_BP_VLDN'),

Line 2766: RAISE Fnd_Api.G_EXC_ERROR;

2762: Fnd_Message.SET_TOKEN('CONTRACT_LINE_ID',
2763: x_product_txn_rec.contract_id);
2764: Fnd_Msg_Pub.ADD;
2765: Debug('Contract Line Id missing', l_mod_name, 1);
2766: RAISE Fnd_Api.G_EXC_ERROR;
2767: WHEN TOO_MANY_ROWS THEN
2768: Debug('Too many Contract Line', l_mod_name, 1);
2769: END;
2770: x_product_txn_rec.coverage_id := l_coverage_id;

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

2779: THEN
2780: -- swai: bug 5931926 - 12.0.2 3rd party logistics
2781: -- only set order header info to SR party and account
2782: -- if it is not specified on the bill-to for the txn line.
2783: IF (nvl(l_Charges_Rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) OR
2784: (nvl(l_Charges_Rec.bill_to_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
2785: OPEN order_rec(l_incident_id);
2786: FETCH order_rec
2787: INTO l_party_id, l_account_id;

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

2780: -- swai: bug 5931926 - 12.0.2 3rd party logistics
2781: -- only set order header info to SR party and account
2782: -- if it is not specified on the bill-to for the txn line.
2783: IF (nvl(l_Charges_Rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) OR
2784: (nvl(l_Charges_Rec.bill_to_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
2785: OPEN order_rec(l_incident_id);
2786: FETCH order_rec
2787: INTO l_party_id, l_account_id;
2788: IF (order_rec%NOTFOUND OR l_party_id IS NULL)

Line 2793: RAISE Fnd_Api.G_EXC_ERROR;

2789: THEN
2790: Fnd_Message.SET_NAME('CSD', 'CSD_API_PARTY_MISSING');
2791: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
2792: Fnd_Msg_Pub.ADD;
2793: RAISE Fnd_Api.G_EXC_ERROR;
2794: END IF;
2795: IF order_rec%ISOPEN
2796: THEN
2797: CLOSE order_rec;

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

2824: x_line_type_id => l_line_type_id,
2825: x_line_category_code => l_line_category_code,
2826: x_return_status => x_return_status);
2827:
2828: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2829: THEN
2830: RAISE Fnd_Api.G_EXC_ERROR;
2831: END IF;
2832:

Line 2830: RAISE Fnd_Api.G_EXC_ERROR;

2826: x_return_status => x_return_status);
2827:
2828: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2829: THEN
2830: RAISE Fnd_Api.G_EXC_ERROR;
2831: END IF;
2832:
2833: Debug('l_line_type_id =' || l_line_type_id,
2834: l_mod_name,

Line 2852: RAISE Fnd_Api.G_EXC_ERROR;

2848: Fnd_Message.SET_NAME('CSD', 'CSD_API_LINE_TYPE_MISSING');
2849: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
2850: x_product_txn_rec.txn_billing_type_id);
2851: Fnd_Msg_Pub.ADD;
2852: RAISE Fnd_Api.G_EXC_ERROR;
2853: END IF;
2854:
2855: -- Get the currency code from the price list if it is null or g_miss
2856: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

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

2852: RAISE Fnd_Api.G_EXC_ERROR;
2853: END IF;
2854:
2855: -- Get the currency code from the price list if it is null or g_miss
2856: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
2857: Fnd_Api.G_MISS_NUM
2858: THEN
2859: BEGIN
2860: SELECT currency_code

Line 2857: Fnd_Api.G_MISS_NUM

2853: END IF;
2854:
2855: -- Get the currency code from the price list if it is null or g_miss
2856: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
2857: Fnd_Api.G_MISS_NUM
2858: THEN
2859: BEGIN
2860: SELECT currency_code
2861: INTO l_curr_code

Line 2871: RAISE Fnd_Api.G_EXC_ERROR;

2867: 'CSD_API_INV_PRICE_LIST_ID');
2868: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
2869: x_product_txn_rec.price_list_id);
2870: Fnd_Msg_Pub.ADD;
2871: RAISE Fnd_Api.G_EXC_ERROR;
2872: WHEN TOO_MANY_ROWS THEN
2873: Debug('Too many currency_codes', l_mod_name, 1);
2874: END;
2875: END IF;

Line 2886: RAISE Fnd_Api.G_EXC_ERROR;

2882: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_CURR_CODE');
2883: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
2884: x_product_txn_rec.price_list_id);
2885: Fnd_Msg_Pub.ADD;
2886: RAISE Fnd_Api.G_EXC_ERROR;
2887: END IF;
2888:
2889: l_serial_flag := Csd_Process_Util.Is_item_serialized(x_product_txn_rec.inventory_item_id);
2890:

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

2898: /*****
2899: -- Serial Number required if the item is serialized
2900: IF l_serial_flag AND
2901: -- changing from serial_number to source_serial_number 11.5.10
2902: NVL(x_product_txn_rec.source_serial_number, Fnd_Api.G_MISS_CHAR) =
2903: Fnd_Api.G_MISS_CHAR AND
2904: x_product_txn_rec.action_type NOT IN ('SHIP', 'WALK_IN_ISSUE') AND
2905: (x_product_txn_rec.action_code <> 'LOANER' AND
2906: x_product_txn_rec.action_type <> 'RMA')

Line 2903: Fnd_Api.G_MISS_CHAR AND

2899: -- Serial Number required if the item is serialized
2900: IF l_serial_flag AND
2901: -- changing from serial_number to source_serial_number 11.5.10
2902: NVL(x_product_txn_rec.source_serial_number, Fnd_Api.G_MISS_CHAR) =
2903: Fnd_Api.G_MISS_CHAR AND
2904: x_product_txn_rec.action_type NOT IN ('SHIP', 'WALK_IN_ISSUE') AND
2905: (x_product_txn_rec.action_code <> 'LOANER' AND
2906: x_product_txn_rec.action_type <> 'RMA')
2907: THEN

Line 2916: RAISE Fnd_Api.G_EXC_ERROR;

2912: Debug('Serial Number missing for inventory_item_id =' ||
2913: x_product_txn_rec.inventory_item_id,
2914: l_mod_name,
2915: 1);
2916: RAISE Fnd_Api.G_EXC_ERROR;
2917: END IF;
2918: *****/
2919:
2920: IF (x_product_txn_rec.new_order_flag = 'N')

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

2924: x_product_txn_rec.add_to_order_flag := 'Y';
2925: x_product_txn_rec.order_header_id := x_product_txn_rec.add_to_order_id;
2926: ELSE
2927: x_product_txn_rec.add_to_order_flag := 'F';
2928: x_product_txn_rec.order_header_id := FND_API.G_MISS_NUM;
2929: END IF;
2930:
2931: ELSIF (x_product_txn_rec.new_order_flag = 'Y')
2932: THEN

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

2930:
2931: ELSIF (x_product_txn_rec.new_order_flag = 'Y')
2932: THEN
2933: x_product_txn_rec.add_to_order_flag := 'F';
2934: x_product_txn_rec.order_header_id := Fnd_Api.G_MISS_NUM;
2935: END IF;
2936:
2937: Debug('x_product_txn_rec.new_order_flag =' ||
2938: x_product_txn_rec.new_order_flag,

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

2958: IF ((l_incident_id is not NULL) AND
2959: (nvl(fnd_profile.value('CSD_DEFAULT_SR_ACCT_ADDR_FOR_LOGISTICS'), 'N') = 'Y'))
2960: THEN
2961:
2962: IF ((nvl(x_product_txn_rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2963: (nvl(x_product_txn_rec.invoice_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2964: THEN
2965: OPEN c_sr_primary_account_address (l_incident_id, 'BILL_TO');
2966: FETCH c_sr_primary_account_address INTO x_product_txn_rec.invoice_to_org_id;

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

2959: (nvl(fnd_profile.value('CSD_DEFAULT_SR_ACCT_ADDR_FOR_LOGISTICS'), 'N') = 'Y'))
2960: THEN
2961:
2962: IF ((nvl(x_product_txn_rec.bill_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2963: (nvl(x_product_txn_rec.invoice_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2964: THEN
2965: OPEN c_sr_primary_account_address (l_incident_id, 'BILL_TO');
2966: FETCH c_sr_primary_account_address INTO x_product_txn_rec.invoice_to_org_id;
2967: IF c_sr_primary_account_address%ISOPEN THEN

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

2968: CLOSE c_sr_primary_account_address;
2969: END IF;
2970: END IF;
2971:
2972: IF ((nvl(x_product_txn_rec.ship_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2973: (nvl(x_product_txn_rec.ship_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2974: THEN
2975: OPEN c_sr_primary_account_address (l_incident_id, 'SHIP_TO');
2976: FETCH c_sr_primary_account_address INTO x_product_txn_rec.ship_to_org_id;

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

2969: END IF;
2970: END IF;
2971:
2972: IF ((nvl(x_product_txn_rec.ship_to_account_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) AND
2973: (nvl(x_product_txn_rec.ship_to_org_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM))
2974: THEN
2975: OPEN c_sr_primary_account_address (l_incident_id, 'SHIP_TO');
2976: FETCH c_sr_primary_account_address INTO x_product_txn_rec.ship_to_org_id;
2977: IF c_sr_primary_account_address%ISOPEN THEN

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

2988: Csd_Process_Util.CONVERT_TO_CHG_REC(p_prod_txn_rec => x_product_txn_rec,
2989: x_charges_rec => l_Charges_Rec,
2990: x_return_status => x_return_status);
2991:
2992: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2993: THEN
2994: RAISE Fnd_Api.G_EXC_ERROR;
2995: END IF;
2996:

Line 2994: RAISE Fnd_Api.G_EXC_ERROR;

2990: x_return_status => x_return_status);
2991:
2992: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
2993: THEN
2994: RAISE Fnd_Api.G_EXC_ERROR;
2995: END IF;
2996:
2997: Debug('Call process_charge_lines to create charge lines ',
2998: l_mod_name,

Line 3010: p_commit => Fnd_Api.g_false,

3006: l_mod_name,
3007: 1);
3008:
3009: PROCESS_CHARGE_LINES(p_api_version => 1.0,
3010: p_commit => Fnd_Api.g_false,
3011: p_init_msg_list => Fnd_Api.g_true,
3012: p_validation_level => Fnd_Api.g_valid_level_full,
3013: p_action => 'CREATE',
3014: p_Charges_Rec => l_Charges_Rec,

Line 3011: p_init_msg_list => Fnd_Api.g_true,

3007: 1);
3008:
3009: PROCESS_CHARGE_LINES(p_api_version => 1.0,
3010: p_commit => Fnd_Api.g_false,
3011: p_init_msg_list => Fnd_Api.g_true,
3012: p_validation_level => Fnd_Api.g_valid_level_full,
3013: p_action => 'CREATE',
3014: p_Charges_Rec => l_Charges_Rec,
3015: x_estimate_detail_id => x_estimate_detail_id,

Line 3012: p_validation_level => Fnd_Api.g_valid_level_full,

3008:
3009: PROCESS_CHARGE_LINES(p_api_version => 1.0,
3010: p_commit => Fnd_Api.g_false,
3011: p_init_msg_list => Fnd_Api.g_true,
3012: p_validation_level => Fnd_Api.g_valid_level_full,
3013: p_action => 'CREATE',
3014: p_Charges_Rec => l_Charges_Rec,
3015: x_estimate_detail_id => x_estimate_detail_id,
3016: x_return_status => x_return_status,

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

3016: x_return_status => x_return_status,
3017: x_msg_count => x_msg_count,
3018: x_msg_data => x_msg_data);
3019:
3020: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3021: THEN
3022: RAISE Fnd_Api.G_EXC_ERROR;
3023: END IF;
3024:

Line 3022: RAISE Fnd_Api.G_EXC_ERROR;

3018: x_msg_data => x_msg_data);
3019:
3020: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3021: THEN
3022: RAISE Fnd_Api.G_EXC_ERROR;
3023: END IF;
3024:
3025: Debug('NEW ESTIMATE DETAIL ID =' || x_estimate_detail_id,
3026: l_mod_name,

Line 3108: RAISE Fnd_Api.G_EXC_ERROR;

3104: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_REPAIRS_UPDATE');
3105: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
3106: x_product_txn_rec.repair_line_id);
3107: Fnd_Msg_Pub.ADD;
3108: RAISE Fnd_Api.G_EXC_ERROR;
3109: END IF;
3110:
3111: -- Process the product txn only if the process_flag = 'Y'
3112: -- Else skip to the end and return the control to calling program

Line 3189: p_commit => Fnd_Api.g_false,

3185: FND_PROFILE.PUT('CSD_UNIT_NUMBER', x_product_txn_rec.unit_number);
3186: end if;
3187:
3188: PROCESS_SALES_ORDER(p_api_version => 1.0,
3189: p_commit => Fnd_Api.g_false,
3190: p_init_msg_list => Fnd_Api.g_true,
3191: p_validation_level => Fnd_Api.g_valid_level_full,
3192: p_action => 'CREATE',
3193: p_order_rec => l_order_rec,

Line 3190: p_init_msg_list => Fnd_Api.g_true,

3186: end if;
3187:
3188: PROCESS_SALES_ORDER(p_api_version => 1.0,
3189: p_commit => Fnd_Api.g_false,
3190: p_init_msg_list => Fnd_Api.g_true,
3191: p_validation_level => Fnd_Api.g_valid_level_full,
3192: p_action => 'CREATE',
3193: p_order_rec => l_order_rec,
3194: x_return_status => x_return_status,

Line 3191: p_validation_level => Fnd_Api.g_valid_level_full,

3187:
3188: PROCESS_SALES_ORDER(p_api_version => 1.0,
3189: p_commit => Fnd_Api.g_false,
3190: p_init_msg_list => Fnd_Api.g_true,
3191: p_validation_level => Fnd_Api.g_valid_level_full,
3192: p_action => 'CREATE',
3193: p_order_rec => l_order_rec,
3194: x_return_status => x_return_status,
3195: x_msg_count => x_msg_count,

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

3203: x_return_status,
3204: l_mod_name,
3205: 1);
3206:
3207: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3208: THEN
3209: Debug('process_sales_order failed', l_mod_name, 1);
3210: RAISE CREATE_ORDER;
3211: END IF;

Line 3249: and ((NVL(x_product_txn_rec.project_id,-1)) <> FND_API.G_MISS_NUM)) then --bug#6075825

3245: if (((x_product_txn_rec.project_id is not null)
3246: OR (x_product_txn_rec.unit_number is not null)
3247: OR (x_product_txn_rec.sub_inventory is not null) ----bug#9955988
3248: OR (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')))
3249: and ((NVL(x_product_txn_rec.project_id,-1)) <> FND_API.G_MISS_NUM)) then --bug#6075825
3250:
3251: OPEN order_line_cu(x_estimate_detail_id);
3252: FETCH order_line_cu into l_order_line_id, l_p_ship_from_org_id;
3253: CLOSE order_line_cu;

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

3308: x_msg_count => x_msg_count,
3309: x_msg_data => x_msg_data
3310: );
3311:
3312: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3313: FND_MESSAGE.SET_NAME('CSD','CSD_ERR_OM_PROCESS_LINE');
3314: FND_MSG_PUB.ADD;
3315: RAISE CREATE_ORDER;
3316: END IF;

Line 3474: and ((NVL(x_product_txn_rec.project_id,-1)) <> FND_API.G_MISS_NUM)) then --bug#6075825

3470: if (((x_product_txn_rec.project_id is not null)
3471: OR (x_product_txn_rec.unit_number is not null)
3472: OR (x_product_txn_rec.sub_inventory is not null) ----bug#9955988
3473: OR (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')))
3474: and ((NVL(x_product_txn_rec.project_id,-1)) <> FND_API.G_MISS_NUM)) then --bug#6075825
3475:
3476: if (l_order_line_id) is not null then
3477: l_Line_Tbl_Type(1) := OE_Order_PUB.G_MISS_LINE_REC;
3478: l_Line_Tbl_Type(1).line_id := l_order_line_id;

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

3529: x_msg_count => x_msg_count,
3530: x_msg_data => x_msg_data
3531: );
3532:
3533: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
3534: FND_MESSAGE.SET_NAME('CSD','CSD_ERR_OM_PROCESS_LINE');
3535: FND_MSG_PUB.ADD;
3536: RAISE BOOK_ORDER;
3537: END IF;

Line 3546: p_commit => Fnd_Api.g_false,

3542: Debug('Call process_sales_order to book SO',
3543: l_mod_name,
3544: 1);
3545: PROCESS_SALES_ORDER(p_api_version => 1.0,
3546: p_commit => Fnd_Api.g_false,
3547: p_init_msg_list => Fnd_Api.g_true,
3548: p_validation_level => Fnd_Api.g_valid_level_full,
3549: p_action => 'BOOK',
3550: p_order_rec => l_order_rec,

Line 3547: p_init_msg_list => Fnd_Api.g_true,

3543: l_mod_name,
3544: 1);
3545: PROCESS_SALES_ORDER(p_api_version => 1.0,
3546: p_commit => Fnd_Api.g_false,
3547: p_init_msg_list => Fnd_Api.g_true,
3548: p_validation_level => Fnd_Api.g_valid_level_full,
3549: p_action => 'BOOK',
3550: p_order_rec => l_order_rec,
3551: x_return_status => x_return_status,

Line 3548: p_validation_level => Fnd_Api.g_valid_level_full,

3544: 1);
3545: PROCESS_SALES_ORDER(p_api_version => 1.0,
3546: p_commit => Fnd_Api.g_false,
3547: p_init_msg_list => Fnd_Api.g_true,
3548: p_validation_level => Fnd_Api.g_valid_level_full,
3549: p_action => 'BOOK',
3550: p_order_rec => l_order_rec,
3551: x_return_status => x_return_status,
3552: x_msg_count => x_msg_count,

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

3551: x_return_status => x_return_status,
3552: x_msg_count => x_msg_count,
3553: x_msg_data => x_msg_data);
3554:
3555: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3556: THEN
3557: Debug('process_sales_order failed to book Sales order',
3558: l_mod_name,
3559: 1);

Line 3578: p_commit => Fnd_Api.g_false);

3574: -- END IF;
3575:
3576: -- Fix for bug#4020651
3577: Csd_Update_Programs_Pvt.prod_txn_status_upd(p_repair_line_id => x_product_txn_rec.repair_line_id,
3578: p_commit => Fnd_Api.g_false);
3579:
3580: --Update csd_repairs with status
3581: UPDATE csd_repairs
3582: SET ro_txn_status = 'OM_BOOKED'

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

3619: l_mod_name,
3620: 1);
3621:
3622: IF NVL(x_product_txn_rec.sub_inventory,
3623: Fnd_Api.G_MISS_CHAR) <> Fnd_Api.G_MISS_CHAR
3624: THEN
3625: BEGIN
3626: SELECT 'x'
3627: INTO l_dummy

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

3696:
3697: Debug('Calling reserve serial..', l_mod_name, 1);
3698: CSD_LOGISTICS_UTIL.Reserve_serial_number(l_serial_rsv_rec, x_return_status);
3699:
3700: if(x_return_status = FND_API.G_RET_STS_ERROR) THEN
3701: Fnd_Message.SET_NAME('CSD', 'CSD_SRL_RESERVE_FAILED');
3702: Fnd_Msg_Pub.ADD;
3703: RAISE RELEASE_ORDER;
3704: END IF;

Line 3778: p_commit => Fnd_Api.g_false,

3774: Debug('Call process_sales_order to pick release sales order',
3775: l_mod_name,
3776: 1);
3777: PROCESS_SALES_ORDER(p_api_version => 1.0,
3778: p_commit => Fnd_Api.g_false,
3779: p_init_msg_list => Fnd_Api.g_true,
3780: p_validation_level => Fnd_Api.g_valid_level_full,
3781: p_action => 'PICK-RELEASE',
3782: p_order_rec => l_order_rec,

Line 3779: p_init_msg_list => Fnd_Api.g_true,

3775: l_mod_name,
3776: 1);
3777: PROCESS_SALES_ORDER(p_api_version => 1.0,
3778: p_commit => Fnd_Api.g_false,
3779: p_init_msg_list => Fnd_Api.g_true,
3780: p_validation_level => Fnd_Api.g_valid_level_full,
3781: p_action => 'PICK-RELEASE',
3782: p_order_rec => l_order_rec,
3783: x_return_status => x_return_status,

Line 3780: p_validation_level => Fnd_Api.g_valid_level_full,

3776: 1);
3777: PROCESS_SALES_ORDER(p_api_version => 1.0,
3778: p_commit => Fnd_Api.g_false,
3779: p_init_msg_list => Fnd_Api.g_true,
3780: p_validation_level => Fnd_Api.g_valid_level_full,
3781: p_action => 'PICK-RELEASE',
3782: p_order_rec => l_order_rec,
3783: x_return_status => x_return_status,
3784: x_msg_count => x_msg_count,

Line 3787: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)

3783: x_return_status => x_return_status,
3784: x_msg_count => x_msg_count,
3785: x_msg_data => x_msg_data);
3786:
3787: IF (x_return_status = Fnd_Api.G_RET_STS_ERROR)
3788: THEN
3789: Debug('process_sales_order failed',
3790: l_mod_name,
3791: 1);

Line 3937: p_commit => Fnd_Api.g_false,

3933: Debug('Call process_sales_order to ship SO',
3934: l_mod_name,
3935: 1);
3936: PROCESS_SALES_ORDER(p_api_version => 1.0,
3937: p_commit => Fnd_Api.g_false,
3938: p_init_msg_list => Fnd_Api.g_true,
3939: p_validation_level => Fnd_Api.g_valid_level_full,
3940: p_action => 'SHIP',
3941: /*Fixed for bug#4433942 passing product

Line 3938: p_init_msg_list => Fnd_Api.g_true,

3934: l_mod_name,
3935: 1);
3936: PROCESS_SALES_ORDER(p_api_version => 1.0,
3937: p_commit => Fnd_Api.g_false,
3938: p_init_msg_list => Fnd_Api.g_true,
3939: p_validation_level => Fnd_Api.g_valid_level_full,
3940: p_action => 'SHIP',
3941: /*Fixed for bug#4433942 passing product
3942: txn record as in parameter*/

Line 3939: p_validation_level => Fnd_Api.g_valid_level_full,

3935: 1);
3936: PROCESS_SALES_ORDER(p_api_version => 1.0,
3937: p_commit => Fnd_Api.g_false,
3938: p_init_msg_list => Fnd_Api.g_true,
3939: p_validation_level => Fnd_Api.g_valid_level_full,
3940: p_action => 'SHIP',
3941: /*Fixed for bug#4433942 passing product
3942: txn record as in parameter*/
3943: p_product_txn_rec => x_product_txn_rec,

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

3945: x_return_status => x_return_status,
3946: x_msg_count => x_msg_count,
3947: x_msg_data => x_msg_data);
3948:
3949: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
3950: THEN
3951: Debug('process_sales_order failed to ship sales order',
3952: l_mod_name,
3953: 1);

Line 4007: IF Fnd_Api.To_Boolean(p_commit)

4003:
4004: -- Api body ends here
4005:
4006: -- Standard check of p_commit.
4007: IF Fnd_Api.To_Boolean(p_commit)
4008: THEN
4009: COMMIT WORK;
4010: END IF;
4011:

Line 4017: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4013: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4014: p_data => x_msg_data);
4015: EXCEPTION
4016: WHEN CREATE_ORDER THEN
4017: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4018: ROLLBACK TO create_sales_order;
4019: -- update the prod txn as the charge
4020: -- line was not interfaced
4021: UPDATE csd_product_transactions

Line 4040: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4036: END IF;
4037: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4038: p_data => x_msg_data);
4039: WHEN BOOK_ORDER THEN
4040: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4041: ROLLBACK TO book_sales_order;
4042: -- update the prod txn as the order
4043: -- line was not booked
4044: UPDATE csd_product_transactions

Line 4062: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4058: END IF;
4059: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4060: p_data => x_msg_data);
4061: WHEN RELEASE_ORDER THEN
4062: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4063: ROLLBACK TO release_sales_order;
4064: -- update the prod txn as the order
4065: -- line was not booked
4066: UPDATE csd_product_transactions

Line 4074: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4070: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4071: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4072: p_data => x_msg_data);
4073: WHEN SHIP_ORDER THEN
4074: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4075: ROLLBACK TO ship_sales_order;
4076: -- update the prod txn as the order
4077: -- line was not booked
4078: UPDATE csd_product_transactions

Line 4084: WHEN Fnd_Api.G_EXC_ERROR THEN

4080: WHERE product_transaction_id =
4081: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4082: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4083: p_data => x_msg_data);
4084: WHEN Fnd_Api.G_EXC_ERROR THEN
4085: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4086: ROLLBACK TO create_product_txn;
4087: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4088: p_data => x_msg_data);

Line 4085: x_return_status := Fnd_Api.G_RET_STS_ERROR;

4081: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4082: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4083: p_data => x_msg_data);
4084: WHEN Fnd_Api.G_EXC_ERROR THEN
4085: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4086: ROLLBACK TO create_product_txn;
4087: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4088: p_data => x_msg_data);
4089: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 4089: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

4085: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4086: ROLLBACK TO create_product_txn;
4087: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4088: p_data => x_msg_data);
4089: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4090: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4091: ROLLBACK TO create_product_txn;
4092: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4093: p_data => x_msg_data);

Line 4090: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4086: ROLLBACK TO create_product_txn;
4087: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4088: p_data => x_msg_data);
4089: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4090: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4091: ROLLBACK TO create_product_txn;
4092: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4093: p_data => x_msg_data);
4094: WHEN OTHERS THEN

Line 4095: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4091: ROLLBACK TO create_product_txn;
4092: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4093: p_data => x_msg_data);
4094: WHEN OTHERS THEN
4095: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4096: ROLLBACK TO create_product_txn;
4097: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
4098: THEN
4099: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

Line 4184: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

4180: -- Standard Start of API savepoint
4181: SAVEPOINT create_product_txn;
4182:
4183: -- Standard call to check for call compatibility.
4184: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
4185: p_api_version,
4186: l_api_name,
4187: G_PKG_NAME)
4188: THEN

Line 4189: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4185: p_api_version,
4186: l_api_name,
4187: G_PKG_NAME)
4188: THEN
4189: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4190: END IF;
4191:
4192: -- Initialize message list if p_init_msg_list is set to TRUE.
4193: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 4193: IF Fnd_Api.to_Boolean(p_init_msg_list)

4189: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4190: END IF;
4191:
4192: -- Initialize message list if p_init_msg_list is set to TRUE.
4193: IF Fnd_Api.to_Boolean(p_init_msg_list)
4194: THEN
4195: Fnd_Msg_Pub.initialize;
4196: END IF;
4197:

Line 4199: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4195: Fnd_Msg_Pub.initialize;
4196: END IF;
4197:
4198: -- Initialize API return status to success
4199: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4200:
4201: -- Api body starts
4202:
4203: -- Dump the API in the log file

Line 4261: RAISE Fnd_Api.G_EXC_ERROR;

4257: -- Validate the repair line ID if it exists in csd_repairs
4258: IF NOT
4259: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => x_product_txn_rec.repair_line_id))
4260: THEN
4261: RAISE Fnd_Api.G_EXC_ERROR;
4262: END IF;
4263:
4264: IF (g_debug > 0)
4265: THEN

Line 4273: RAISE Fnd_Api.G_EXC_ERROR;

4269: -- Validate the Action Type if it exists in fnd_lookups
4270: IF NOT
4271: (Csd_Process_Util.Validate_action_type(p_action_type => x_product_txn_rec.action_type))
4272: THEN
4273: RAISE Fnd_Api.G_EXC_ERROR;
4274: END IF;
4275:
4276: IF (g_debug > 0)
4277: THEN

Line 4285: RAISE Fnd_Api.G_EXC_ERROR;

4281: -- Validate the repair line ID if it exists in fnd_lookups
4282: IF NOT
4283: (Csd_Process_Util.Validate_action_code(p_action_code => x_product_txn_rec.action_code))
4284: THEN
4285: RAISE Fnd_Api.G_EXC_ERROR;
4286: END IF;
4287:
4288: IF (g_debug > 0)
4289: THEN

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

4303: p_repair_line_id => x_product_txn_rec.repair_line_id,
4304: p_prod_txn_qty => x_product_txn_rec.quantity,
4305: x_return_status => x_return_status);
4306:
4307: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4308: THEN
4309: IF (g_debug > 0)
4310: THEN
4311: Csd_Gen_Utility_Pvt.ADD('Validate_Quantity failed ');

Line 4313: RAISE Fnd_Api.G_EXC_ERROR;

4309: IF (g_debug > 0)
4310: THEN
4311: Csd_Gen_Utility_Pvt.ADD('Validate_Quantity failed ');
4312: END IF;
4313: RAISE Fnd_Api.G_EXC_ERROR;
4314: END IF;
4315: END IF;
4316:
4317: IF (g_debug > 0)

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

4322: END IF;
4323:
4324: -- Validate the PROD_TXN_STATUS if it exists in fnd_lookups
4325: IF (x_product_txn_rec.PROD_TXN_STATUS IS NOT NULL) AND
4326: (x_product_txn_rec.PROD_TXN_STATUS <> Fnd_Api.G_MISS_CHAR)
4327: THEN
4328: BEGIN
4329: SELECT 'X'
4330: INTO l_check

Line 4338: RAISE Fnd_Api.G_EXC_ERROR;

4334: EXCEPTION
4335: WHEN OTHERS THEN
4336: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_PROD_TXN_STATUS');
4337: Fnd_Msg_Pub.ADD;
4338: RAISE Fnd_Api.G_EXC_ERROR;
4339: END;
4340: END IF;
4341:
4342: -- Get service request id from csd_repairs table

Line 4355: RAISE Fnd_Api.G_EXC_ERROR;

4351: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
4352: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
4353: x_product_txn_rec.repair_line_id);
4354: Fnd_Msg_Pub.ADD;
4355: RAISE Fnd_Api.G_EXC_ERROR;
4356: END;
4357:
4358: IF (g_debug > 0)
4359: THEN

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

4374:
4375: IF l_bus_process_id < 0
4376: THEN
4377: IF NVL(x_product_txn_rec.business_process_id,
4378: Fnd_Api.G_MISS_NUM) <> Fnd_Api.G_MISS_NUM
4379: THEN
4380: l_bus_process_id := x_product_txn_rec.business_process_id;
4381: ELSE
4382: IF (g_debug > 0)

Line 4386: RAISE Fnd_Api.G_EXC_ERROR;

4382: IF (g_debug > 0)
4383: THEN
4384: Csd_Gen_Utility_Pvt.ADD('Business process Id does not exist ');
4385: END IF;
4386: RAISE Fnd_Api.G_EXC_ERROR;
4387: END IF;
4388: END IF;
4389:
4390: IF (g_debug > 0)

Line 4407: RAISE Fnd_Api.G_EXC_ERROR;

4403: THEN
4404: Fnd_Message.SET_NAME('CSD', 'CSD_API_PARTY_MISSING');
4405: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
4406: Fnd_Msg_Pub.ADD;
4407: RAISE Fnd_Api.G_EXC_ERROR;
4408: END IF;
4409: IF get_account_details%ISOPEN
4410: THEN
4411: CLOSE get_account_details;

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

4431: x_line_type_id => l_line_type_id,
4432: x_line_category_code => l_line_category_code,
4433: x_return_status => x_return_status);
4434:
4435: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4436: THEN
4437: RAISE Fnd_Api.G_EXC_ERROR;
4438: END IF;
4439:

Line 4437: RAISE Fnd_Api.G_EXC_ERROR;

4433: x_return_status => x_return_status);
4434:
4435: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
4436: THEN
4437: RAISE Fnd_Api.G_EXC_ERROR;
4438: END IF;
4439:
4440: IF (g_debug > 0)
4441: THEN

Line 4458: RAISE Fnd_Api.G_EXC_ERROR;

4454: Fnd_Message.SET_NAME('CSD', 'CSD_API_LINE_TYPE_MISSING');
4455: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
4456: x_product_txn_rec.txn_billing_type_id);
4457: Fnd_Msg_Pub.ADD;
4458: RAISE Fnd_Api.G_EXC_ERROR;
4459: END IF;
4460:
4461: -- Get the currency code from the price list if it is null or g_miss
4462: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>

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

4458: RAISE Fnd_Api.G_EXC_ERROR;
4459: END IF;
4460:
4461: -- Get the currency code from the price list if it is null or g_miss
4462: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
4463: Fnd_Api.G_MISS_NUM
4464: THEN
4465: BEGIN
4466: SELECT currency_code

Line 4463: Fnd_Api.G_MISS_NUM

4459: END IF;
4460:
4461: -- Get the currency code from the price list if it is null or g_miss
4462: IF NVL(x_product_txn_rec.price_list_id, Fnd_Api.G_MISS_NUM) <>
4463: Fnd_Api.G_MISS_NUM
4464: THEN
4465: BEGIN
4466: SELECT currency_code
4467: INTO l_curr_code

Line 4477: RAISE Fnd_Api.G_EXC_ERROR;

4473: 'CSD_API_INV_PRICE_LIST_ID');
4474: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
4475: x_product_txn_rec.price_list_id);
4476: Fnd_Msg_Pub.ADD;
4477: RAISE Fnd_Api.G_EXC_ERROR;
4478: WHEN TOO_MANY_ROWS THEN
4479: IF (g_debug > 0)
4480: THEN
4481: Csd_Gen_Utility_Pvt.ADD('Too many currency_codes');

Line 4499: RAISE Fnd_Api.G_EXC_ERROR;

4495: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_CURR_CODE');
4496: Fnd_Message.SET_TOKEN('PRICE_LIST_ID',
4497: x_product_txn_rec.price_list_id);
4498: Fnd_Msg_Pub.ADD;
4499: RAISE Fnd_Api.G_EXC_ERROR;
4500: END IF;
4501:
4502: l_serial_flag := Csd_Process_Util.Is_item_serialized(x_product_txn_rec.inventory_item_id);
4503:

Line 4529: RAISE Fnd_Api.G_EXC_ERROR;

4525: THEN
4526: Csd_Gen_Utility_Pvt.ADD('Serial Number missing for inventory_item_id =' ||
4527: x_product_txn_rec.inventory_item_id);
4528: END IF;
4529: RAISE Fnd_Api.G_EXC_ERROR;
4530: END IF;
4531: *****/
4532:
4533: -- assigning values for the charge record

Line 4612: RAISE Fnd_Api.G_EXC_ERROR;

4608: Fnd_Message.SET_NAME('CSD', 'CSD_ERR_REPAIRS_UPDATE');
4609: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
4610: x_product_txn_rec.repair_line_id);
4611: Fnd_Msg_Pub.ADD;
4612: RAISE Fnd_Api.G_EXC_ERROR;
4613: END IF;
4614:
4615: -- Api body ends here
4616:

Line 4618: IF Fnd_Api.To_Boolean(p_commit)

4614:
4615: -- Api body ends here
4616:
4617: -- Standard check of p_commit.
4618: IF Fnd_Api.To_Boolean(p_commit)
4619: THEN
4620: COMMIT WORK;
4621: END IF;
4622:

Line 4627: WHEN Fnd_Api.G_EXC_ERROR THEN

4623: -- Standard call to get message count and IF count is get message info.
4624: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4625: p_data => x_msg_data);
4626: EXCEPTION
4627: WHEN Fnd_Api.G_EXC_ERROR THEN
4628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4629: ROLLBACK TO create_product_txn;
4630: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4631: p_data => x_msg_data);

Line 4628: x_return_status := Fnd_Api.G_RET_STS_ERROR;

4624: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4625: p_data => x_msg_data);
4626: EXCEPTION
4627: WHEN Fnd_Api.G_EXC_ERROR THEN
4628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4629: ROLLBACK TO create_product_txn;
4630: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4631: p_data => x_msg_data);
4632: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 4632: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

4628: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4629: ROLLBACK TO create_product_txn;
4630: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4631: p_data => x_msg_data);
4632: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4633: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4634: ROLLBACK TO create_product_txn;
4635: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4636: p_data => x_msg_data);

Line 4633: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4629: ROLLBACK TO create_product_txn;
4630: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4631: p_data => x_msg_data);
4632: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4633: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4634: ROLLBACK TO create_product_txn;
4635: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4636: p_data => x_msg_data);
4637: WHEN OTHERS THEN

Line 4638: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4634: ROLLBACK TO create_product_txn;
4635: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4636: p_data => x_msg_data);
4637: WHEN OTHERS THEN
4638: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4639: ROLLBACK TO create_product_txn;
4640: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
4641: THEN
4642: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

4652: /* order form */
4653: /*----------------------------------------------------------------*/
4654:
4655: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4656: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4657: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4658: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4659: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4660: x_return_status OUT NOCOPY VARCHAR2,

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

4653: /*----------------------------------------------------------------*/
4654:
4655: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4656: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4657: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4658: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4659: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4660: x_return_status OUT NOCOPY VARCHAR2,
4661: x_msg_count OUT NOCOPY NUMBER,

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

4654:
4655: PROCEDURE update_product_txn(p_api_version IN NUMBER,
4656: p_commit IN VARCHAR2 := Fnd_Api.g_false,
4657: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
4658: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
4659: x_product_txn_rec IN OUT NOCOPY PRODUCT_TXN_REC,
4660: x_return_status OUT NOCOPY VARCHAR2,
4661: x_msg_count OUT NOCOPY NUMBER,
4662: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 4710: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4706:
4707: SAVEPOINT UPDATE_PRODUCT_TXN_PVT;
4708:
4709: -- Initialize API return status to success
4710: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4711:
4712: -- Fix for bug#6210765
4713: -- Initialize message list if p_init_msg_list is set to TRUE.
4714: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 4714: IF Fnd_Api.to_Boolean(p_init_msg_list)

4710: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4711:
4712: -- Fix for bug#6210765
4713: -- Initialize message list if p_init_msg_list is set to TRUE.
4714: IF Fnd_Api.to_Boolean(p_init_msg_list)
4715: THEN
4716: Fnd_Msg_Pub.initialize;
4717: END IF;
4718:

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

4780: -- swai: bug 5931926 - 12.0.2 3rd party logistics. If the bill to party
4781: -- and account have been specified, then this is a 3rd party logistics line,
4782: -- and we need to override the SR party and account from get_order_rec with
4783: -- the thrid party info
4784: /*IF (nvl(x_product_txn_rec.bill_to_account_id, FND_API.GMISS_NUM) <> FND_API.GMISS_NUM) AND
4785: (nvl(x_product_txn_rec.bill_to_party_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM) THEN */
4786: -- nnadig: bug 9187830 - ensure bill-to info is only set for 3rd party lines
4787: IF (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')) and
4788: (x_product_txn_rec.bill_to_party_id is not null) and

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

4781: -- and account have been specified, then this is a 3rd party logistics line,
4782: -- and we need to override the SR party and account from get_order_rec with
4783: -- the thrid party info
4784: /*IF (nvl(x_product_txn_rec.bill_to_account_id, FND_API.GMISS_NUM) <> FND_API.GMISS_NUM) AND
4785: (nvl(x_product_txn_rec.bill_to_party_id, FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM) THEN */
4786: -- nnadig: bug 9187830 - ensure bill-to info is only set for 3rd party lines
4787: IF (x_product_txn_rec.action_type in ('RMA_THIRD_PTY', 'SHIP_THIRD_PTY')) and
4788: (x_product_txn_rec.bill_to_party_id is not null) and
4789: (x_product_txn_rec.bill_to_account_id is not null) THEN

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

4795: p_product_txn_rec => x_product_txn_rec,
4796: p_prodtxn_db_attr => l_prodtxn_db_attr,
4797: px_order_rec => l_order_rec);
4798:
4799: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4800: RAISE Create_ORDER;
4801: END IF;
4802: IF l_prodtxn_db_attr.curr_book_order_flag <>
4803: x_product_txn_rec.book_sales_order_flag AND

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

4811: Csd_Logistics_Util.book_prodtxn( x_return_status => l_return_status,
4812: p_product_txn_rec => x_product_txn_rec,
4813: p_prodtxn_db_attr => l_prodtxn_db_attr,
4814: px_order_rec => l_order_rec);
4815: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4816: RAISE BOOK_ORDER;
4817: END IF;
4818:
4819:

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

4876: Csd_Logistics_Util.pickrelease_prodtxn(x_return_status => l_return_status,
4877: p_product_txn_rec => x_product_txn_rec,
4878: p_prodtxn_db_attr => l_prodtxn_db_attr,
4879: px_order_rec => l_order_rec);
4880: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4881: RAISE RELEASE_ORDER;
4882: END IF;
4883: END IF; --end of pick-release sales order
4884:

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

4896: p_product_txn_rec => x_product_txn_rec,
4897: p_prodtxn_db_attr => l_prodtxn_db_attr,
4898: px_order_rec => l_order_rec);
4899:
4900: IF NOT (l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4901: RAISE SHIP_ORDER;
4902: END IF;
4903:
4904: END IF; -- end of ship sales order

Line 4911: IF Fnd_Api.To_Boolean(p_commit)

4907:
4908: -- Api body ends here
4909:
4910: -- Standard check of p_commit.
4911: IF Fnd_Api.To_Boolean(p_commit)
4912: THEN
4913: COMMIT WORK;
4914: END IF;
4915:

Line 4921: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4917: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4918: p_data => x_msg_data);
4919: EXCEPTION
4920: WHEN CREATE_ORDER THEN
4921: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4922:
4923: /*FP Fixed for bug#4526773
4924: When error occurred then complete rollback should be
4925: done so that sanity of charge line and product line

Line 4944: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4940: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4941: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4942: p_data => x_msg_data);
4943: WHEN BOOK_ORDER THEN
4944: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4945: ROLLBACK TO book_sales_order;
4946: -- update the prod txn as the order
4947: -- line was not booked
4948: UPDATE csd_product_transactions

Line 4957: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4953: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4954: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4955: p_data => x_msg_data);
4956: WHEN RELEASE_ORDER THEN
4957: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4958: ROLLBACK TO release_sales_order;
4959: -- update the prod txn as the order
4960: -- line was not booked
4961: UPDATE csd_product_transactions

Line 4969: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

4965: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4966: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4967: p_data => x_msg_data);
4968: WHEN SHIP_ORDER THEN
4969: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
4970: ROLLBACK TO ship_sales_order;
4971: -- update the prod txn as the order
4972: -- line was not booked
4973: UPDATE csd_product_transactions

Line 4979: WHEN Fnd_Api.G_EXC_ERROR THEN

4975: WHERE product_transaction_id =
4976: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4977: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4978: p_data => x_msg_data);
4979: WHEN Fnd_Api.G_EXC_ERROR THEN
4980: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4981: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4982: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4983: p_data => x_msg_data);

Line 4980: x_return_status := Fnd_Api.G_RET_STS_ERROR;

4976: x_product_txn_rec.PRODUCT_TRANSACTION_ID;
4977: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4978: p_data => x_msg_data);
4979: WHEN Fnd_Api.G_EXC_ERROR THEN
4980: x_return_status := Fnd_Api.G_RET_STS_ERROR;
4981: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4982: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4983: p_data => x_msg_data);
4984: Debug('in exc_error, x_msg_data,count[' || x_msg_data|| ','||to_char(x_msg_count)||']',

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

4985: l_mod_name,
4986: l_statement_level);
4987: IF x_msg_count > 1 THEN
4988: FOR i IN 1..x_msg_count LOOP
4989: l_msg_data := apps.FND_MSG_PUB.Get(i,FND_API.G_TRUE) ;
4990: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
4991: l_mod_name,
4992: l_statement_level);
4993: END LOOP ;

Line 4995: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

4991: l_mod_name,
4992: l_statement_level);
4993: END LOOP ;
4994: END IF ;
4995: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4996: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4997: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4998: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4999: p_data => x_msg_data);

Line 4996: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4992: l_statement_level);
4993: END LOOP ;
4994: END IF ;
4995: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4996: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4997: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
4998: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
4999: p_data => x_msg_data);
5000: Debug('in unexp_Error, x_msg_data[' || x_msg_data||']',

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

5001: l_mod_name,
5002: l_statement_level);
5003: IF x_msg_count > 1 THEN
5004: FOR i IN 1..x_msg_count LOOP
5005: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
5006: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
5007: l_mod_name,
5008: l_statement_level);
5009: END LOOP ;

Line 5012: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5008: l_statement_level);
5009: END LOOP ;
5010: END IF ;
5011: WHEN OTHERS THEN
5012: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5013: ROLLBACK TO UPDATE_PRODUCT_TXN_PVT;
5014: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5015: THEN
5016: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

5021: l_mod_name,
5022: l_statement_level);
5023: IF x_msg_count > 1 THEN
5024: FOR i IN 1..x_msg_count LOOP
5025: l_msg_data := apps.FND_MSG_PUB.Get(i,apps.FND_API.G_FALSE) ;
5026: Debug('in exc_error, l_msg_data[' || l_msg_data||']',
5027: l_mod_name,
5028: l_statement_level);
5029: END LOOP ;

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

5037: /* */
5038: /*--------------------------------------------------*/
5039:
5040: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
5041: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5043: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5044: p_product_txn_id IN NUMBER,
5045: x_return_status OUT NOCOPY VARCHAR2,

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

5038: /*--------------------------------------------------*/
5039:
5040: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
5041: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5043: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5044: p_product_txn_id IN NUMBER,
5045: x_return_status OUT NOCOPY VARCHAR2,
5046: x_msg_count OUT NOCOPY NUMBER,

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

5039:
5040: PROCEDURE delete_product_txn(p_api_version IN NUMBER,
5041: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5043: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5044: p_product_txn_id IN NUMBER,
5045: x_return_status OUT NOCOPY VARCHAR2,
5046: x_msg_count OUT NOCOPY NUMBER,
5047: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 5063: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5059: -- Standard Start of API savepoint
5060: SAVEPOINT delete_product_txn;
5061:
5062: -- Standard call to check for call compatibility.
5063: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5064: p_api_version,
5065: l_api_name,
5066: G_PKG_NAME)
5067: THEN

Line 5068: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5064: p_api_version,
5065: l_api_name,
5066: G_PKG_NAME)
5067: THEN
5068: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5069: END IF;
5070:
5071: -- Initialize message list if p_init_msg_list is set to TRUE.
5072: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 5072: IF Fnd_Api.to_Boolean(p_init_msg_list)

5068: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5069: END IF;
5070:
5071: -- Initialize message list if p_init_msg_list is set to TRUE.
5072: IF Fnd_Api.to_Boolean(p_init_msg_list)
5073: THEN
5074: Fnd_Msg_Pub.initialize;
5075: END IF;
5076:

Line 5078: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5074: Fnd_Msg_Pub.initialize;
5075: END IF;
5076:
5077: -- Initialize API return status to success
5078: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5079:
5080: -- Api body starts
5081: IF (g_debug > 0)
5082: THEN

Line 5107: RAISE Fnd_Api.G_EXC_ERROR;

5103: -- Validate the repair line ID
5104: IF NOT
5105: (Csd_Process_Util.Validate_prod_txn_id(p_prod_txn_id => p_product_txn_id))
5106: THEN
5107: RAISE Fnd_Api.G_EXC_ERROR;
5108: END IF;
5109:
5110: -- The Product txn line is allowed to delete
5111: -- only if it is not interfaced

Line 5131: RAISE Fnd_Api.G_EXC_ERROR;

5127: IF (g_debug > 0)
5128: THEN
5129: Csd_Gen_Utility_Pvt.ADD('Product txn is interfaced,so it cannot be deleted');
5130: END IF;
5131: RAISE Fnd_Api.G_EXC_ERROR;
5132: WHEN TOO_MANY_ROWS THEN
5133: IF (g_debug > 0)
5134: THEN
5135: Csd_Gen_Utility_Pvt.ADD('Too many from Product txn line is allowed to delete');

Line 5156: p_commit => Fnd_Api.g_false,

5152: Csd_Gen_Utility_Pvt.ADD('Call process_charge_lines to delete');
5153: END IF;
5154:
5155: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5156: p_commit => Fnd_Api.g_false,
5157: p_init_msg_list => Fnd_Api.g_true,
5158: p_validation_level => Fnd_Api.g_valid_level_full,
5159: p_action => 'DELETE',
5160: p_Charges_Rec => l_Charges_Rec,

Line 5157: p_init_msg_list => Fnd_Api.g_true,

5153: END IF;
5154:
5155: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5156: p_commit => Fnd_Api.g_false,
5157: p_init_msg_list => Fnd_Api.g_true,
5158: p_validation_level => Fnd_Api.g_valid_level_full,
5159: p_action => 'DELETE',
5160: p_Charges_Rec => l_Charges_Rec,
5161: x_estimate_detail_id => x_estimate_detail_id,

Line 5158: p_validation_level => Fnd_Api.g_valid_level_full,

5154:
5155: PROCESS_CHARGE_LINES(p_api_version => 1.0,
5156: p_commit => Fnd_Api.g_false,
5157: p_init_msg_list => Fnd_Api.g_true,
5158: p_validation_level => Fnd_Api.g_valid_level_full,
5159: p_action => 'DELETE',
5160: p_Charges_Rec => l_Charges_Rec,
5161: x_estimate_detail_id => x_estimate_detail_id,
5162: x_return_status => x_return_status,

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

5162: x_return_status => x_return_status,
5163: x_msg_count => x_msg_count,
5164: x_msg_data => x_msg_data);
5165:
5166: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5167: THEN
5168: RAISE Fnd_Api.G_EXC_ERROR;
5169: END IF;
5170:

Line 5168: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 5182: IF Fnd_Api.To_Boolean(p_commit)

5178:
5179: -- Api body ends here
5180:
5181: -- Standard check of p_commit.
5182: IF Fnd_Api.To_Boolean(p_commit)
5183: THEN
5184: COMMIT WORK;
5185: END IF;
5186:

Line 5191: WHEN Fnd_Api.G_EXC_ERROR THEN

5187: -- Standard call to get message count and IF count is get message info.
5188: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5189: p_data => x_msg_data);
5190: EXCEPTION
5191: WHEN Fnd_Api.G_EXC_ERROR THEN
5192: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5193: ROLLBACK TO delete_product_txn;
5194: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5195: p_data => x_msg_data);

Line 5192: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5188: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5189: p_data => x_msg_data);
5190: EXCEPTION
5191: WHEN Fnd_Api.G_EXC_ERROR THEN
5192: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5193: ROLLBACK TO delete_product_txn;
5194: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5195: p_data => x_msg_data);
5196: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 5196: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5192: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5193: ROLLBACK TO delete_product_txn;
5194: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5195: p_data => x_msg_data);
5196: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5197: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5198: ROLLBACK TO delete_product_txn;
5199: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5200: p_data => x_msg_data);

Line 5197: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5193: ROLLBACK TO delete_product_txn;
5194: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5195: p_data => x_msg_data);
5196: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5197: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5198: ROLLBACK TO delete_product_txn;
5199: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5200: p_data => x_msg_data);
5201: WHEN OTHERS THEN

Line 5202: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5198: ROLLBACK TO delete_product_txn;
5199: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5200: p_data => x_msg_data);
5201: WHEN OTHERS THEN
5202: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5203: ROLLBACK TO delete_product_txn;
5204: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5205: THEN
5206: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

5216: /* */
5217: /*--------------------------------------------------*/
5218:
5219: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5220: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5221: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5222: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5223: p_repair_line_id IN NUMBER,
5224: p_create_thirdpty_line IN VARCHAR2 := Fnd_Api.g_false,

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

5217: /*--------------------------------------------------*/
5218:
5219: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5220: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5221: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5222: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5223: p_repair_line_id IN NUMBER,
5224: p_create_thirdpty_line IN VARCHAR2 := Fnd_Api.g_false,
5225: p_return_reason_code IN VARCHAR2 := NULL,

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

5218:
5219: PROCEDURE create_default_prod_txn(p_api_version IN NUMBER,
5220: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5221: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5222: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5223: p_repair_line_id IN NUMBER,
5224: p_create_thirdpty_line IN VARCHAR2 := Fnd_Api.g_false,
5225: p_return_reason_code IN VARCHAR2 := NULL,
5226: p_invoice_to_org_id IN NUMBER := NULL,

Line 5224: p_create_thirdpty_line IN VARCHAR2 := Fnd_Api.g_false,

5220: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5221: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5222: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5223: p_repair_line_id IN NUMBER,
5224: p_create_thirdpty_line IN VARCHAR2 := Fnd_Api.g_false,
5225: p_return_reason_code IN VARCHAR2 := NULL,
5226: p_invoice_to_org_id IN NUMBER := NULL,
5227: p_ship_to_org_id IN NUMBER := NULL,
5228: x_return_status OUT NOCOPY VARCHAR2,

Line 5258: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5254: --
5255: MO_GLOBAL.init('CS_CHARGES');
5256:
5257: -- Standard call to check for call compatibility.
5258: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5259: p_api_version,
5260: l_api_name,
5261: G_PKG_NAME)
5262: THEN

Line 5263: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5259: p_api_version,
5260: l_api_name,
5261: G_PKG_NAME)
5262: THEN
5263: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5264: END IF;
5265:
5266: -- Initialize message list if p_init_msg_list is set to TRUE.
5267: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 5267: IF Fnd_Api.to_Boolean(p_init_msg_list)

5263: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5264: END IF;
5265:
5266: -- Initialize message list if p_init_msg_list is set to TRUE.
5267: IF Fnd_Api.to_Boolean(p_init_msg_list)
5268: THEN
5269: Fnd_Msg_Pub.initialize;
5270: END IF;
5271:

Line 5273: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5269: Fnd_Msg_Pub.initialize;
5270: END IF;
5271:
5272: -- Initialize API return status to success
5273: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5274:
5275: -- Api body starts
5276: IF (g_debug > 0)
5277: THEN

Line 5301: RAISE Fnd_Api.G_EXC_ERROR;

5297: -- Validate the repair line ID
5298: IF NOT
5299: (Csd_Process_Util.Validate_rep_line_id(p_repair_line_id => p_repair_line_id))
5300: THEN
5301: RAISE Fnd_Api.G_EXC_ERROR;
5302: END IF;
5303:
5304: IF (g_debug > 0)
5305: THEN

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

5319: p_return_reason_code => p_return_reason_code,
5320: p_invoice_to_org_id => p_invoice_to_org_id,
5321: p_ship_to_org_id => p_ship_to_org_id);
5322:
5323: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5324: THEN
5325: RAISE Fnd_Api.G_EXC_ERROR;
5326: END IF;
5327:

Line 5325: RAISE Fnd_Api.G_EXC_ERROR;

5321: p_ship_to_org_id => p_ship_to_org_id);
5322:
5323: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
5324: THEN
5325: RAISE Fnd_Api.G_EXC_ERROR;
5326: END IF;
5327:
5328: IF (g_debug > 0)
5329: THEN

Line 5343: p_commit => fnd_api.g_false,

5339: csd_gen_utility_pvt.ADD('Call create_product_txn in a loop');
5340: END IF;
5341: CREATE_PRODUCT_TXN
5342: (p_api_version => 1.0 ,
5343: p_commit => fnd_api.g_false,
5344: p_init_msg_list => 'F',
5345: p_validation_level => fnd_api.g_valid_level_full,
5346: x_product_txn_rec => x_prod_txn_tbl(i),
5347: x_return_status => x_return_status,

Line 5345: p_validation_level => fnd_api.g_valid_level_full,

5341: CREATE_PRODUCT_TXN
5342: (p_api_version => 1.0 ,
5343: p_commit => fnd_api.g_false,
5344: p_init_msg_list => 'F',
5345: p_validation_level => fnd_api.g_valid_level_full,
5346: x_product_txn_rec => x_prod_txn_tbl(i),
5347: x_return_status => x_return_status,
5348: x_msg_count => x_msg_count,
5349: x_msg_data => x_msg_data );

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

5347: x_return_status => x_return_status,
5348: x_msg_count => x_msg_count,
5349: x_msg_data => x_msg_data );
5350:
5351: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5352: RAISE FND_API.G_EXC_ERROR;
5353: END IF;
5354: -- Log the message after processing
5355: -- each prod txn

Line 5352: RAISE FND_API.G_EXC_ERROR;

5348: x_msg_count => x_msg_count,
5349: x_msg_data => x_msg_data );
5350:
5351: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5352: RAISE FND_API.G_EXC_ERROR;
5353: END IF;
5354: -- Log the message after processing
5355: -- each prod txn
5356: FOR i in 1..x_msg_Count LOOP

Line 5404: p_commit => fnd_api.g_false,

5400: END IF;
5401:
5402: CREATE_PRODUCT_TXN
5403: (p_api_version => 1.0 ,
5404: p_commit => fnd_api.g_false,
5405: p_init_msg_list => 'F',
5406: p_validation_level => fnd_api.g_valid_level_full,
5407: x_product_txn_rec => x_prod_txn_tbl(i),
5408: x_return_status => x_return_status,

Line 5406: p_validation_level => fnd_api.g_valid_level_full,

5402: CREATE_PRODUCT_TXN
5403: (p_api_version => 1.0 ,
5404: p_commit => fnd_api.g_false,
5405: p_init_msg_list => 'F',
5406: p_validation_level => fnd_api.g_valid_level_full,
5407: x_product_txn_rec => x_prod_txn_tbl(i),
5408: x_return_status => x_return_status,
5409: x_msg_count => x_msg_count,
5410: x_msg_data => x_msg_data );

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

5408: x_return_status => x_return_status,
5409: x_msg_count => x_msg_count,
5410: x_msg_data => x_msg_data );
5411:
5412: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5413: RAISE FND_API.G_EXC_ERROR;
5414: END IF;
5415: -- Log the message after processing
5416: -- each prod txn

Line 5413: RAISE FND_API.G_EXC_ERROR;

5409: x_msg_count => x_msg_count,
5410: x_msg_data => x_msg_data );
5411:
5412: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
5413: RAISE FND_API.G_EXC_ERROR;
5414: END IF;
5415: -- Log the message after processing
5416: -- each prod txn
5417: FOR i in 1..x_msg_Count LOOP

Line 5440: IF Fnd_Api.To_Boolean(p_commit)

5436: Fnd_Msg_Pub.ADD;
5437: END IF;
5438:
5439: -- Standard check of p_commit.
5440: IF Fnd_Api.To_Boolean(p_commit)
5441: THEN
5442: COMMIT WORK;
5443: END IF;
5444:

Line 5450: WHEN Fnd_Api.G_EXC_ERROR THEN

5446: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5447: p_data => x_msg_data);
5448:
5449: EXCEPTION
5450: WHEN Fnd_Api.G_EXC_ERROR THEN
5451: ROLLBACK TO create_default_prod_txn;
5452: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5453: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5454: p_data => x_msg_data);

Line 5452: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5448:
5449: EXCEPTION
5450: WHEN Fnd_Api.G_EXC_ERROR THEN
5451: ROLLBACK TO create_default_prod_txn;
5452: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5453: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5454: p_data => x_msg_data);
5455: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5456: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5455: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5451: ROLLBACK TO create_default_prod_txn;
5452: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5453: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5454: p_data => x_msg_data);
5455: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5456: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5457: ROLLBACK TO create_default_prod_txn;
5458: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5459: p_data => x_msg_data);

Line 5456: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5452: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5453: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5454: p_data => x_msg_data);
5455: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5456: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5457: ROLLBACK TO create_default_prod_txn;
5458: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5459: p_data => x_msg_data);
5460: WHEN OTHERS THEN

Line 5461: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5457: ROLLBACK TO create_default_prod_txn;
5458: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5459: p_data => x_msg_data);
5460: WHEN OTHERS THEN
5461: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5462: ROLLBACK TO create_default_prod_txn;
5463: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5464: THEN
5465: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

5565: /* procedure name: create_task */
5566: /* description : procedure used to create task */
5567: /* Called from : Depot Repair Form to Create Task */
5568: /* Input Parm : p_api_version NUMBER Required Api Version number */
5569: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5570: /* default value is fnd_api.g_false */
5571: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5572: /* fnd_api.g_false */
5573: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

5566: /* description : procedure used to create task */
5567: /* Called from : Depot Repair Form to Create Task */
5568: /* Input Parm : p_api_version NUMBER Required Api Version number */
5569: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5570: /* default value is fnd_api.g_false */
5571: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5572: /* fnd_api.g_false */
5573: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5574: /* validation steps must be done and which steps */

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

5567: /* Called from : Depot Repair Form to Create Task */
5568: /* Input Parm : p_api_version NUMBER Required Api Version number */
5569: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5570: /* default value is fnd_api.g_false */
5571: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5572: /* fnd_api.g_false */
5573: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5574: /* validation steps must be done and which steps */
5575: /* should be skipped. */

Line 5572: /* fnd_api.g_false */

5568: /* Input Parm : p_api_version NUMBER Required Api Version number */
5569: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5570: /* default value is fnd_api.g_false */
5571: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5572: /* fnd_api.g_false */
5573: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5574: /* validation steps must be done and which steps */
5575: /* should be skipped. */
5576: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */

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

5574: /* validation steps must be done and which steps */
5575: /* should be skipped. */
5576: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5577: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5578: /* fnd_api.g_ret_sts_success (success) */
5579: /* fnd_api.g_ret_sts_error (error) */
5580: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5581: /* x_msg_count NUMBER Number of messages in the message stack */
5582: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

5575: /* should be skipped. */
5576: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5577: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5578: /* fnd_api.g_ret_sts_success (success) */
5579: /* fnd_api.g_ret_sts_error (error) */
5580: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5581: /* x_msg_count NUMBER Number of messages in the message stack */
5582: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5583: /* x_task_id NUMBER Task Id of the created Task */

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

5576: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5577: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5578: /* fnd_api.g_ret_sts_success (success) */
5579: /* fnd_api.g_ret_sts_error (error) */
5580: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5581: /* x_msg_count NUMBER Number of messages in the message stack */
5582: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5583: /* x_task_id NUMBER Task Id of the created Task */
5584: /*-----------------------------------------------------------------------------------------------------------*/

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

5583: /* x_task_id NUMBER Task Id of the created Task */
5584: /*-----------------------------------------------------------------------------------------------------------*/
5585:
5586: PROCEDURE create_task(p_api_version IN NUMBER,
5587: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5588: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5589: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5590: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5591: x_return_status OUT NOCOPY VARCHAR2,

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

5584: /*-----------------------------------------------------------------------------------------------------------*/
5585:
5586: PROCEDURE create_task(p_api_version IN NUMBER,
5587: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5588: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5589: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5590: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5591: x_return_status OUT NOCOPY VARCHAR2,
5592: x_msg_count OUT NOCOPY NUMBER,

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

5585:
5586: PROCEDURE create_task(p_api_version IN NUMBER,
5587: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5588: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5589: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5590: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5591: x_return_status OUT NOCOPY VARCHAR2,
5592: x_msg_count OUT NOCOPY NUMBER,
5593: x_msg_data OUT NOCOPY VARCHAR2,

Line 5611: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5607: -- -----------------
5608: -- Standard Start of API savepoint
5609: SAVEPOINT create_task;
5610: -- Standard call to check for call compatibility.
5611: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5612: p_api_version,
5613: l_api_name,
5614: G_PKG_NAME)
5615: THEN

Line 5616: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5612: p_api_version,
5613: l_api_name,
5614: G_PKG_NAME)
5615: THEN
5616: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5617: END IF;
5618: -- Initialize message list if p_init_msg_list is set to TRUE.
5619: IF Fnd_Api.to_Boolean(p_init_msg_list)
5620: THEN

Line 5619: IF Fnd_Api.to_Boolean(p_init_msg_list)

5615: THEN
5616: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5617: END IF;
5618: -- Initialize message list if p_init_msg_list is set to TRUE.
5619: IF Fnd_Api.to_Boolean(p_init_msg_list)
5620: THEN
5621: Fnd_Msg_Pub.initialize;
5622: END IF;
5623: -- Initialize API return status to success

Line 5624: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5620: THEN
5621: Fnd_Msg_Pub.initialize;
5622: END IF;
5623: -- Initialize API return status to success
5624: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5625: -- ---------------
5626: -- Api body starts
5627: -- ---------------
5628: IF (g_debug > 0)

Line 5637: P_INIT_MSG_LIST => Fnd_Api.g_true,

5633: -- ----------------------------------------
5634: -- Calling Public JTF API to create a Task
5635: -- ----------------------------------------
5636: Jtf_Tasks_Pub.CREATE_TASK(P_API_VERSION => 1.0,
5637: P_INIT_MSG_LIST => Fnd_Api.g_true,
5638: P_COMMIT => Fnd_Api.g_false,
5639: P_TASK_ID => l_create_task_rec.task_id,
5640: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5641: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,

Line 5638: P_COMMIT => Fnd_Api.g_false,

5634: -- Calling Public JTF API to create a Task
5635: -- ----------------------------------------
5636: Jtf_Tasks_Pub.CREATE_TASK(P_API_VERSION => 1.0,
5637: P_INIT_MSG_LIST => Fnd_Api.g_true,
5638: P_COMMIT => Fnd_Api.g_false,
5639: P_TASK_ID => l_create_task_rec.task_id,
5640: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5641: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,
5642: P_DESCRIPTION => l_create_task_rec.DESCRIPTION,

Line 5706: IF Fnd_Api.To_Boolean(p_commit)

5702: -- -------------------
5703: -- Api body ends here
5704: -- -------------------
5705: -- Standard check of p_commit.
5706: IF Fnd_Api.To_Boolean(p_commit)
5707: THEN
5708: COMMIT WORK;
5709: END IF;
5710: -- Standard call to get message count and IF count is get message info.

Line 5714: WHEN Fnd_Api.G_EXC_ERROR THEN

5710: -- Standard call to get message count and IF count is get message info.
5711: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5712: p_data => x_msg_data);
5713: EXCEPTION
5714: WHEN Fnd_Api.G_EXC_ERROR THEN
5715: ROLLBACK TO create_task;
5716: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5717: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5718: p_data => x_msg_data);

Line 5716: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5712: p_data => x_msg_data);
5713: EXCEPTION
5714: WHEN Fnd_Api.G_EXC_ERROR THEN
5715: ROLLBACK TO create_task;
5716: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5717: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5718: p_data => x_msg_data);
5719: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5720: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5719: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5715: ROLLBACK TO create_task;
5716: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5717: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5718: p_data => x_msg_data);
5719: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5720: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5721: ROLLBACK TO create_task;
5722: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5723: p_data => x_msg_data);

Line 5720: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5716: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5717: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5718: p_data => x_msg_data);
5719: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5720: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5721: ROLLBACK TO create_task;
5722: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5723: p_data => x_msg_data);
5724: WHEN OTHERS THEN

Line 5725: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5721: ROLLBACK TO create_task;
5722: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5723: p_data => x_msg_data);
5724: WHEN OTHERS THEN
5725: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5726: ROLLBACK TO create_task;
5727: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5728: THEN
5729: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

5736: /* procedure name: update_task */
5737: /* description : procedure used to update task */
5738: /* Called from : Depot Repair Form to Create Task */
5739: /* Input Parm : p_api_version NUMBER Required Api Version number */
5740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5741: /* default value is fnd_api.g_false */
5742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5743: /* fnd_api.g_false */
5744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

5737: /* description : procedure used to update task */
5738: /* Called from : Depot Repair Form to Create Task */
5739: /* Input Parm : p_api_version NUMBER Required Api Version number */
5740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5741: /* default value is fnd_api.g_false */
5742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5743: /* fnd_api.g_false */
5744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5745: /* validation steps must be done and which steps */

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

5738: /* Called from : Depot Repair Form to Create Task */
5739: /* Input Parm : p_api_version NUMBER Required Api Version number */
5740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5741: /* default value is fnd_api.g_false */
5742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5743: /* fnd_api.g_false */
5744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5745: /* validation steps must be done and which steps */
5746: /* should be skipped. */

Line 5743: /* fnd_api.g_false */

5739: /* Input Parm : p_api_version NUMBER Required Api Version number */
5740: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
5741: /* default value is fnd_api.g_false */
5742: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
5743: /* fnd_api.g_false */
5744: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
5745: /* validation steps must be done and which steps */
5746: /* should be skipped. */
5747: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */

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

5745: /* validation steps must be done and which steps */
5746: /* should be skipped. */
5747: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5748: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5749: /* fnd_api.g_ret_sts_success (success) */
5750: /* fnd_api.g_ret_sts_error (error) */
5751: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5752: /* x_msg_count NUMBER Number of messages in the message stack */
5753: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

5746: /* should be skipped. */
5747: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5748: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5749: /* fnd_api.g_ret_sts_success (success) */
5750: /* fnd_api.g_ret_sts_error (error) */
5751: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5752: /* x_msg_count NUMBER Number of messages in the message stack */
5753: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5754: /*-----------------------------------------------------------------------------------------------------------*/

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

5747: /* CREATE_TASK_REC_TYPE RECORD Required Columns are in the Record CREATE_TASK_REC_TYPE */
5748: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5749: /* fnd_api.g_ret_sts_success (success) */
5750: /* fnd_api.g_ret_sts_error (error) */
5751: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5752: /* x_msg_count NUMBER Number of messages in the message stack */
5753: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5754: /*-----------------------------------------------------------------------------------------------------------*/
5755:

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

5753: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5754: /*-----------------------------------------------------------------------------------------------------------*/
5755:
5756: PROCEDURE update_task(p_api_version IN NUMBER,
5757: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5758: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5759: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5760: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5761: x_return_status OUT NOCOPY VARCHAR2,

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

5754: /*-----------------------------------------------------------------------------------------------------------*/
5755:
5756: PROCEDURE update_task(p_api_version IN NUMBER,
5757: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5758: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5759: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5760: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5761: x_return_status OUT NOCOPY VARCHAR2,
5762: x_msg_count OUT NOCOPY NUMBER,

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

5755:
5756: PROCEDURE update_task(p_api_version IN NUMBER,
5757: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
5758: p_commit IN VARCHAR2 := Fnd_Api.g_false,
5759: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
5760: p_create_task_rec IN CREATE_TASK_REC_TYPE,
5761: x_return_status OUT NOCOPY VARCHAR2,
5762: x_msg_count OUT NOCOPY NUMBER,
5763: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 5780: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

5776: -- -----------------
5777: -- Standard Start of API savepoint
5778: SAVEPOINT update_task;
5779: -- Standard call to check for call compatibility.
5780: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
5781: p_api_version,
5782: l_api_name,
5783: G_PKG_NAME)
5784: THEN

Line 5785: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

5781: p_api_version,
5782: l_api_name,
5783: G_PKG_NAME)
5784: THEN
5785: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5786: END IF;
5787: -- Initialize message list if p_init_msg_list is set to TRUE.
5788: IF Fnd_Api.to_Boolean(p_init_msg_list)
5789: THEN

Line 5788: IF Fnd_Api.to_Boolean(p_init_msg_list)

5784: THEN
5785: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
5786: END IF;
5787: -- Initialize message list if p_init_msg_list is set to TRUE.
5788: IF Fnd_Api.to_Boolean(p_init_msg_list)
5789: THEN
5790: Fnd_Msg_Pub.initialize;
5791: END IF;
5792: -- Initialize API return status to success

Line 5793: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

5789: THEN
5790: Fnd_Msg_Pub.initialize;
5791: END IF;
5792: -- Initialize API return status to success
5793: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
5794: -- ---------------
5795: -- Api body starts
5796: -- ---------------
5797: IF (g_debug > 0)

Line 5806: P_INIT_MSG_LIST => Fnd_Api.g_true,

5802: -- ----------------------------------------
5803: -- Calling Public JTF API to Update a Task
5804: -- ----------------------------------------
5805: Jtf_Tasks_Pub.UPDATE_TASK(P_API_VERSION => 1.0,
5806: P_INIT_MSG_LIST => Fnd_Api.g_true,
5807: P_COMMIT => Fnd_Api.g_false,
5808: P_TASK_ID => l_create_task_rec.task_id,
5809: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5810: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,

Line 5807: P_COMMIT => Fnd_Api.g_false,

5803: -- Calling Public JTF API to Update a Task
5804: -- ----------------------------------------
5805: Jtf_Tasks_Pub.UPDATE_TASK(P_API_VERSION => 1.0,
5806: P_INIT_MSG_LIST => Fnd_Api.g_true,
5807: P_COMMIT => Fnd_Api.g_false,
5808: P_TASK_ID => l_create_task_rec.task_id,
5809: P_TASK_NAME => l_create_task_rec.TASK_NAME,
5810: P_TASK_TYPE_ID => l_create_task_rec.TASK_TYPE_ID,
5811: P_DESCRIPTION => l_create_task_rec.DESCRIPTION,

Line 5876: IF Fnd_Api.To_Boolean(p_commit)

5872: -- -------------------
5873: -- Api body ends here
5874: -- -------------------
5875: -- Standard check of p_commit.
5876: IF Fnd_Api.To_Boolean(p_commit)
5877: THEN
5878: COMMIT WORK;
5879: END IF;
5880: -- Standard call to get message count and IF count is get message info.

Line 5884: WHEN Fnd_Api.G_EXC_ERROR THEN

5880: -- Standard call to get message count and IF count is get message info.
5881: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5882: p_data => x_msg_data);
5883: EXCEPTION
5884: WHEN Fnd_Api.G_EXC_ERROR THEN
5885: ROLLBACK TO update_task;
5886: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5887: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5888: p_data => x_msg_data);

Line 5886: x_return_status := Fnd_Api.G_RET_STS_ERROR;

5882: p_data => x_msg_data);
5883: EXCEPTION
5884: WHEN Fnd_Api.G_EXC_ERROR THEN
5885: ROLLBACK TO update_task;
5886: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5887: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5888: p_data => x_msg_data);
5889: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5890: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 5889: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

5885: ROLLBACK TO update_task;
5886: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5887: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5888: p_data => x_msg_data);
5889: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5890: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5891: ROLLBACK TO update_task;
5892: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5893: p_data => x_msg_data);

Line 5890: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5886: x_return_status := Fnd_Api.G_RET_STS_ERROR;
5887: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5888: p_data => x_msg_data);
5889: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5890: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5891: ROLLBACK TO update_task;
5892: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5893: p_data => x_msg_data);
5894: WHEN OTHERS THEN

Line 5895: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

5891: ROLLBACK TO update_task;
5892: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
5893: p_data => x_msg_data);
5894: WHEN OTHERS THEN
5895: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
5896: ROLLBACK TO update_task;
5897: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
5898: THEN
5899: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

5912: /* description : procedure to create Address for the Contact */
5913: /* Called from : Depot Repair Form to Create Address */
5914: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5915: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5916: /* fnd_api.g_ret_sts_success (success) */
5917: /* fnd_api.g_ret_sts_error (error) */
5918: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5919: /* x_msg_count NUMBER Number of messages in the message stack */
5920: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

5913: /* Called from : Depot Repair Form to Create Address */
5914: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5915: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5916: /* fnd_api.g_ret_sts_success (success) */
5917: /* fnd_api.g_ret_sts_error (error) */
5918: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5919: /* x_msg_count NUMBER Number of messages in the message stack */
5920: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5921: /* x_location_id NUMBER Location ID of the Contacts address created */

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

5914: /* Input Parm : p_address_rec RECORD Required Record ADDRESS_REC_TYPE */
5915: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
5916: /* fnd_api.g_ret_sts_success (success) */
5917: /* fnd_api.g_ret_sts_error (error) */
5918: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
5919: /* x_msg_count NUMBER Number of messages in the message stack */
5920: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
5921: /* x_location_id NUMBER Location ID of the Contacts address created */
5922: /*-----------------------------------------------------------------------------------------------------------*/

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

5999: /* x_msg_count */
6000: /* x_msg_data */
6001: /* x_location_id */
6002: /*-----------------------------------------------------------------------------------------------------------*/
6003: HZ_LOCATION_V2PUB.create_location(p_init_msg_list => Fnd_Api.G_FALSE,
6004: p_location_rec => l_location_rec,
6005: x_location_id => l_location_id,
6006: x_return_status => l_return_status,
6007: x_msg_count => l_msg_count,

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

6020: /* procedure name: Create_repair_task_hist */
6021: /* description : procedure used to create Repair Order history for task creation */
6022: /* Called from : Depot Repair Form to Create Address */
6023: /* Input Parm : p_api_version NUMBER Required Api Version number */
6024: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6025: /* default value is fnd_api.g_false */
6026: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6027: /* fnd_api.g_false */
6028: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

6021: /* description : procedure used to create Repair Order history for task creation */
6022: /* Called from : Depot Repair Form to Create Address */
6023: /* Input Parm : p_api_version NUMBER Required Api Version number */
6024: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6025: /* default value is fnd_api.g_false */
6026: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6027: /* fnd_api.g_false */
6028: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6029: /* validation steps must be done and which steps */

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

6022: /* Called from : Depot Repair Form to Create Address */
6023: /* Input Parm : p_api_version NUMBER Required Api Version number */
6024: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6025: /* default value is fnd_api.g_false */
6026: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6027: /* fnd_api.g_false */
6028: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6029: /* validation steps must be done and which steps */
6030: /* should be skipped. */

Line 6027: /* fnd_api.g_false */

6023: /* Input Parm : p_api_version NUMBER Required Api Version number */
6024: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6025: /* default value is fnd_api.g_false */
6026: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6027: /* fnd_api.g_false */
6028: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6029: /* validation steps must be done and which steps */
6030: /* should be skipped. */
6031: /* p_task_id NUMBER Required Task Id */

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

6030: /* should be skipped. */
6031: /* p_task_id NUMBER Required Task Id */
6032: /* p_repair_line_id NUMBER Required Repair_line_id */
6033: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6034: /* fnd_api.g_ret_sts_success (success) */
6035: /* fnd_api.g_ret_sts_error (error) */
6036: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6037: /* x_msg_count NUMBER Number of messages in the message stack */
6038: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

6031: /* p_task_id NUMBER Required Task Id */
6032: /* p_repair_line_id NUMBER Required Repair_line_id */
6033: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6034: /* fnd_api.g_ret_sts_success (success) */
6035: /* fnd_api.g_ret_sts_error (error) */
6036: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6037: /* x_msg_count NUMBER Number of messages in the message stack */
6038: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6039: /*-----------------------------------------------------------------------------------------------------------*/

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

6032: /* p_repair_line_id NUMBER Required Repair_line_id */
6033: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6034: /* fnd_api.g_ret_sts_success (success) */
6035: /* fnd_api.g_ret_sts_error (error) */
6036: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6037: /* x_msg_count NUMBER Number of messages in the message stack */
6038: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6039: /*-----------------------------------------------------------------------------------------------------------*/
6040:

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

6038: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6039: /*-----------------------------------------------------------------------------------------------------------*/
6040:
6041: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
6043: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6044: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6045: p_task_id IN NUMBER,
6046: p_repair_line_id IN NUMBER,

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

6039: /*-----------------------------------------------------------------------------------------------------------*/
6040:
6041: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
6043: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6044: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6045: p_task_id IN NUMBER,
6046: p_repair_line_id IN NUMBER,
6047: x_return_status OUT NOCOPY VARCHAR2,

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

6040:
6041: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6042: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
6043: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6044: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6045: p_task_id IN NUMBER,
6046: p_repair_line_id IN NUMBER,
6047: x_return_status OUT NOCOPY VARCHAR2,
6048: x_msg_count OUT NOCOPY NUMBER,

Line 6146: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

6142:
6143: -- Standard Start of API savepoint
6144: SAVEPOINT Create_repair_task_hist;
6145: -- Standard call to check for call compatibility.
6146: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
6147: p_api_version,
6148: l_api_name,
6149: G_PKG_NAME)
6150: THEN

Line 6151: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

6147: p_api_version,
6148: l_api_name,
6149: G_PKG_NAME)
6150: THEN
6151: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6152: END IF;
6153: -- Initialize message list if p_init_msg_list is set to TRUE.
6154: IF Fnd_Api.to_Boolean(p_init_msg_list)
6155: THEN

Line 6154: IF Fnd_Api.to_Boolean(p_init_msg_list)

6150: THEN
6151: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6152: END IF;
6153: -- Initialize message list if p_init_msg_list is set to TRUE.
6154: IF Fnd_Api.to_Boolean(p_init_msg_list)
6155: THEN
6156: Fnd_Msg_Pub.initialize;
6157: END IF;
6158: -- Initialize API return status to success

Line 6159: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6155: THEN
6156: Fnd_Msg_Pub.initialize;
6157: END IF;
6158: -- Initialize API return status to success
6159: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6160: -- ---------------
6161: -- Api body starts
6162: -- ---------------
6163: IF (g_debug > 0)

Line 6253: IF Fnd_Api.To_Boolean(p_commit)

6249: -- -------------------
6250: -- Api body ends here
6251: -- -------------------
6252: -- Standard check of p_commit.
6253: IF Fnd_Api.To_Boolean(p_commit)
6254: THEN
6255: COMMIT WORK;
6256: END IF;
6257:

Line 6263: WHEN Fnd_Api.G_EXC_ERROR THEN

6259: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6260: p_data => x_msg_data);
6261: END IF;
6262: EXCEPTION
6263: WHEN Fnd_Api.G_EXC_ERROR THEN
6264: ROLLBACK TO Create_repair_task_hist;
6265: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6266: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6267: p_data => x_msg_data);

Line 6265: x_return_status := Fnd_Api.G_RET_STS_ERROR;

6261: END IF;
6262: EXCEPTION
6263: WHEN Fnd_Api.G_EXC_ERROR THEN
6264: ROLLBACK TO Create_repair_task_hist;
6265: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6266: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6267: p_data => x_msg_data);
6268: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6269: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 6268: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

6264: ROLLBACK TO Create_repair_task_hist;
6265: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6266: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6267: p_data => x_msg_data);
6268: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6269: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6270: ROLLBACK TO Create_repair_task_hist;
6271: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6272: p_data => x_msg_data);

Line 6269: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6265: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6266: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6267: p_data => x_msg_data);
6268: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6269: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6270: ROLLBACK TO Create_repair_task_hist;
6271: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6272: p_data => x_msg_data);
6273: WHEN OTHERS THEN

Line 6274: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6270: ROLLBACK TO Create_repair_task_hist;
6271: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6272: p_data => x_msg_data);
6273: WHEN OTHERS THEN
6274: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6275: ROLLBACK TO Create_repair_task_hist;
6276: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
6277: THEN
6278: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

6286: /* description : procedure used to Update Repair Order history */
6287: /* for task creation */
6288: /* Called from : Depot Repair Form to update to Repair history */
6289: /* Input Parm : p_api_version NUMBER Required Api Version number */
6290: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6291: /* default value is fnd_api.g_false */
6292: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6293: /* fnd_api.g_false */
6294: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

6287: /* for task creation */
6288: /* Called from : Depot Repair Form to update to Repair history */
6289: /* Input Parm : p_api_version NUMBER Required Api Version number */
6290: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6291: /* default value is fnd_api.g_false */
6292: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6293: /* fnd_api.g_false */
6294: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6295: /* validation steps must be done and which steps */

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

6288: /* Called from : Depot Repair Form to update to Repair history */
6289: /* Input Parm : p_api_version NUMBER Required Api Version number */
6290: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6291: /* default value is fnd_api.g_false */
6292: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6293: /* fnd_api.g_false */
6294: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6295: /* validation steps must be done and which steps */
6296: /* should be skipped. */

Line 6293: /* fnd_api.g_false */

6289: /* Input Parm : p_api_version NUMBER Required Api Version number */
6290: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6291: /* default value is fnd_api.g_false */
6292: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6293: /* fnd_api.g_false */
6294: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6295: /* validation steps must be done and which steps */
6296: /* should be skipped. */
6297: /* p_task_id NUMBER Required Task Id */

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

6296: /* should be skipped. */
6297: /* p_task_id NUMBER Required Task Id */
6298: /* p_repair_line_id NUMBER Required Repair_line_id */
6299: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6300: /* fnd_api.g_ret_sts_success (success) */
6301: /* fnd_api.g_ret_sts_error (error) */
6302: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6303: /* x_msg_count NUMBER Number of messages in the message stack */
6304: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

6297: /* p_task_id NUMBER Required Task Id */
6298: /* p_repair_line_id NUMBER Required Repair_line_id */
6299: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6300: /* fnd_api.g_ret_sts_success (success) */
6301: /* fnd_api.g_ret_sts_error (error) */
6302: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6303: /* x_msg_count NUMBER Number of messages in the message stack */
6304: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6305: /*-----------------------------------------------------------------------------------------------------------*/

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

6298: /* p_repair_line_id NUMBER Required Repair_line_id */
6299: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6300: /* fnd_api.g_ret_sts_success (success) */
6301: /* fnd_api.g_ret_sts_error (error) */
6302: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6303: /* x_msg_count NUMBER Number of messages in the message stack */
6304: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6305: /*-----------------------------------------------------------------------------------------------------------*/
6306: /*

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

6305: /*-----------------------------------------------------------------------------------------------------------*/
6306: /*
6307: PROCEDURE Update_repair_task_hist
6308: ( p_api_version IN NUMBER,
6309: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6310: p_commit IN VARCHAR2 := fnd_api.g_false,
6311: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6312: p_task_id IN NUMBER,
6313: p_repair_line_id IN NUMBER,

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

6306: /*
6307: PROCEDURE Update_repair_task_hist
6308: ( p_api_version IN NUMBER,
6309: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6310: p_commit IN VARCHAR2 := fnd_api.g_false,
6311: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6312: p_task_id IN NUMBER,
6313: p_repair_line_id IN NUMBER,
6314: x_return_status OUT NOCOPY VARCHAR2,

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

6307: PROCEDURE Update_repair_task_hist
6308: ( p_api_version IN NUMBER,
6309: p_init_msg_list IN VARCHAR2 := fnd_api.g_true,
6310: p_commit IN VARCHAR2 := fnd_api.g_false,
6311: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
6312: p_task_id IN NUMBER,
6313: p_repair_line_id IN NUMBER,
6314: x_return_status OUT NOCOPY VARCHAR2,
6315: x_msg_count OUT NOCOPY NUMBER,

Line 6465: IF NOT FND_API.Compatible_API_Call (l_api_version,

6461: -- --------------------------------
6462: -- Standard Start of API savepoint
6463: SAVEPOINT Update_repair_task_hist;
6464: -- Standard call to check for call compatibility.
6465: IF NOT FND_API.Compatible_API_Call (l_api_version,
6466: p_api_version,
6467: l_api_name ,
6468: G_PKG_NAME )
6469: THEN

Line 6470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6466: p_api_version,
6467: l_api_name ,
6468: G_PKG_NAME )
6469: THEN
6470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6471: END IF;
6472: -- Initialize message list if p_init_msg_list is set to TRUE.
6473: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6474: FND_MSG_PUB.initialize;

Line 6473: IF FND_API.to_Boolean( p_init_msg_list ) THEN

6469: THEN
6470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6471: END IF;
6472: -- Initialize message list if p_init_msg_list is set to TRUE.
6473: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6474: FND_MSG_PUB.initialize;
6475: END IF;
6476: -- Initialize API return status to success
6477: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6477: x_return_status := FND_API.G_RET_STS_SUCCESS;

6473: IF FND_API.to_Boolean( p_init_msg_list ) THEN
6474: FND_MSG_PUB.initialize;
6475: END IF;
6476: -- Initialize API return status to success
6477: x_return_status := FND_API.G_RET_STS_SUCCESS;
6478: -- ---------------
6479: -- Api body starts
6480: -- ---------------
6481: IF (g_debug > 0 ) THEN

Line 6571: IF FND_API.To_Boolean( p_commit ) THEN

6567: -- -------------------
6568: -- Api body ends here
6569: -- -------------------
6570: -- Standard check of p_commit.
6571: IF FND_API.To_Boolean( p_commit ) THEN
6572: COMMIT WORK;
6573: END IF;
6574: -- Standard call to get message count and IF count is get message info.
6575: FND_MSG_PUB.Count_And_Get

Line 6581: WHEN FND_API.G_EXC_ERROR THEN

6577: p_data => x_msg_data );
6578: END IF;
6579: -- ---------------------------------------------------------
6580: EXCEPTION
6581: WHEN FND_API.G_EXC_ERROR THEN
6582: ROLLBACK TO Update_repair_task_hist;
6583: x_return_status := FND_API.G_RET_STS_ERROR ;
6584: FND_MSG_PUB.Count_And_Get
6585: (p_count => x_msg_count,

Line 6583: x_return_status := FND_API.G_RET_STS_ERROR ;

6579: -- ---------------------------------------------------------
6580: EXCEPTION
6581: WHEN FND_API.G_EXC_ERROR THEN
6582: ROLLBACK TO Update_repair_task_hist;
6583: x_return_status := FND_API.G_RET_STS_ERROR ;
6584: FND_MSG_PUB.Count_And_Get
6585: (p_count => x_msg_count,
6586: p_data => x_msg_data
6587: );

Line 6588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6584: FND_MSG_PUB.Count_And_Get
6585: (p_count => x_msg_count,
6586: p_data => x_msg_data
6587: );
6588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6589: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6590: ROLLBACK TO Update_repair_task_hist;
6591: FND_MSG_PUB.Count_And_Get
6592: ( p_count => x_msg_count,

Line 6589: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6585: (p_count => x_msg_count,
6586: p_data => x_msg_data
6587: );
6588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6589: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6590: ROLLBACK TO Update_repair_task_hist;
6591: FND_MSG_PUB.Count_And_Get
6592: ( p_count => x_msg_count,
6593: p_data => x_msg_data

Line 6596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6592: ( p_count => x_msg_count,
6593: p_data => x_msg_data
6594: );
6595: WHEN OTHERS THEN
6596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6597: ROLLBACK TO Update_repair_task_hist;
6598: IF FND_MSG_PUB.Check_Msg_Level
6599: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
6600: THEN

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

6609: */
6610: -------------------- travi changes-------------
6611:
6612: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6616: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6617: x_return_status OUT NOCOPY VARCHAR2,

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

6610: -------------------- travi changes-------------
6611:
6612: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6616: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6617: x_return_status OUT NOCOPY VARCHAR2,
6618: x_msg_count OUT NOCOPY NUMBER,

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

6611:
6612: PROCEDURE Create_repair_task_hist(p_api_version IN NUMBER,
6613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6616: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6617: x_return_status OUT NOCOPY VARCHAR2,
6618: x_msg_count OUT NOCOPY NUMBER,
6619: x_msg_data OUT NOCOPY VARCHAR2)

Line 6751: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

6747:
6748: -- Standard Start of API savepoint
6749: SAVEPOINT Create_repair_task_hist;
6750: -- Standard call to check for call compatibility.
6751: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
6752: p_api_version,
6753: l_api_name,
6754: G_PKG_NAME)
6755: THEN

Line 6756: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

6752: p_api_version,
6753: l_api_name,
6754: G_PKG_NAME)
6755: THEN
6756: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6757: END IF;
6758: -- Initialize message list if p_init_msg_list is set to TRUE.
6759: IF Fnd_Api.to_Boolean(p_init_msg_list)
6760: THEN

Line 6759: IF Fnd_Api.to_Boolean(p_init_msg_list)

6755: THEN
6756: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6757: END IF;
6758: -- Initialize message list if p_init_msg_list is set to TRUE.
6759: IF Fnd_Api.to_Boolean(p_init_msg_list)
6760: THEN
6761: Fnd_Msg_Pub.initialize;
6762: END IF;
6763: -- Initialize API return status to success

Line 6764: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6760: THEN
6761: Fnd_Msg_Pub.initialize;
6762: END IF;
6763: -- Initialize API return status to success
6764: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6765: -- ---------------
6766: -- Api body starts
6767: -- ---------------
6768: IF (g_debug > 0)

Line 6858: IF Fnd_Api.To_Boolean(p_commit)

6854: -- -------------------
6855: -- Api body ends here
6856: -- -------------------
6857: -- Standard check of p_commit.
6858: IF Fnd_Api.To_Boolean(p_commit)
6859: THEN
6860: COMMIT WORK;
6861: END IF;
6862:

Line 6868: WHEN Fnd_Api.G_EXC_ERROR THEN

6864: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6865: p_data => x_msg_data);
6866: END IF;
6867: EXCEPTION
6868: WHEN Fnd_Api.G_EXC_ERROR THEN
6869: ROLLBACK TO Create_repair_task_hist;
6870: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6871: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6872: p_data => x_msg_data);

Line 6870: x_return_status := Fnd_Api.G_RET_STS_ERROR;

6866: END IF;
6867: EXCEPTION
6868: WHEN Fnd_Api.G_EXC_ERROR THEN
6869: ROLLBACK TO Create_repair_task_hist;
6870: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6871: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6872: p_data => x_msg_data);
6873: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6874: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 6873: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

6869: ROLLBACK TO Create_repair_task_hist;
6870: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6871: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6872: p_data => x_msg_data);
6873: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6874: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6875: ROLLBACK TO Create_repair_task_hist;
6876: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6877: p_data => x_msg_data);

Line 6874: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6870: x_return_status := Fnd_Api.G_RET_STS_ERROR;
6871: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6872: p_data => x_msg_data);
6873: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6874: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6875: ROLLBACK TO Create_repair_task_hist;
6876: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6877: p_data => x_msg_data);
6878: WHEN OTHERS THEN

Line 6879: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

6875: ROLLBACK TO Create_repair_task_hist;
6876: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
6877: p_data => x_msg_data);
6878: WHEN OTHERS THEN
6879: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
6880: ROLLBACK TO Create_repair_task_hist;
6881: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
6882: THEN
6883: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

6891: /* description : procedure used to Update Repair Order history */
6892: /* for task creation */
6893: /* Called from : Depot Repair Form to update to Repair history */
6894: /* Input Parm : p_api_version NUMBER Required Api Version number */
6895: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6896: /* default value is fnd_api.g_false */
6897: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6898: /* fnd_api.g_false */
6899: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

6892: /* for task creation */
6893: /* Called from : Depot Repair Form to update to Repair history */
6894: /* Input Parm : p_api_version NUMBER Required Api Version number */
6895: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6896: /* default value is fnd_api.g_false */
6897: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6898: /* fnd_api.g_false */
6899: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6900: /* validation steps must be done and which steps */

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

6893: /* Called from : Depot Repair Form to update to Repair history */
6894: /* Input Parm : p_api_version NUMBER Required Api Version number */
6895: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6896: /* default value is fnd_api.g_false */
6897: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6898: /* fnd_api.g_false */
6899: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6900: /* validation steps must be done and which steps */
6901: /* should be skipped. */

Line 6898: /* fnd_api.g_false */

6894: /* Input Parm : p_api_version NUMBER Required Api Version number */
6895: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
6896: /* default value is fnd_api.g_false */
6897: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
6898: /* fnd_api.g_false */
6899: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
6900: /* validation steps must be done and which steps */
6901: /* should be skipped. */
6902: /* p_task_id NUMBER Required Task Id */

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

6901: /* should be skipped. */
6902: /* p_task_id NUMBER Required Task Id */
6903: /* p_repair_line_id NUMBER Required Repair_line_id */
6904: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6905: /* fnd_api.g_ret_sts_success (success) */
6906: /* fnd_api.g_ret_sts_error (error) */
6907: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6908: /* x_msg_count NUMBER Number of messages in the message stack */
6909: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

6902: /* p_task_id NUMBER Required Task Id */
6903: /* p_repair_line_id NUMBER Required Repair_line_id */
6904: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6905: /* fnd_api.g_ret_sts_success (success) */
6906: /* fnd_api.g_ret_sts_error (error) */
6907: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6908: /* x_msg_count NUMBER Number of messages in the message stack */
6909: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6910: /*-----------------------------------------------------------------------------------------------------------*/

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

6903: /* p_repair_line_id NUMBER Required Repair_line_id */
6904: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
6905: /* fnd_api.g_ret_sts_success (success) */
6906: /* fnd_api.g_ret_sts_error (error) */
6907: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
6908: /* x_msg_count NUMBER Number of messages in the message stack */
6909: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6910: /*-----------------------------------------------------------------------------------------------------------*/
6911:

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

6909: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
6910: /*-----------------------------------------------------------------------------------------------------------*/
6911:
6912: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6913: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6914: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6915: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6916: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6917: x_return_status OUT NOCOPY VARCHAR2,

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

6910: /*-----------------------------------------------------------------------------------------------------------*/
6911:
6912: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6913: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6914: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6915: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6916: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6917: x_return_status OUT NOCOPY VARCHAR2,
6918: x_msg_count OUT NOCOPY NUMBER,

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

6911:
6912: PROCEDURE Update_repair_task_hist(p_api_version IN NUMBER,
6913: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_true,
6914: p_commit IN VARCHAR2 := Fnd_Api.g_false,
6915: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
6916: p_task_activity_rec IN Csd_Process_Pvt.TASK_ACTIVITY_REC,
6917: x_return_status OUT NOCOPY VARCHAR2,
6918: x_msg_count OUT NOCOPY NUMBER,
6919: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 6985: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

6981: -- --------------------------------
6982: -- Standard Start of API savepoint
6983: SAVEPOINT Update_repair_task_hist;
6984: -- Standard call to check for call compatibility.
6985: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
6986: p_api_version,
6987: l_api_name,
6988: G_PKG_NAME)
6989: THEN

Line 6990: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

6986: p_api_version,
6987: l_api_name,
6988: G_PKG_NAME)
6989: THEN
6990: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6991: END IF;
6992: -- Initialize message list if p_init_msg_list is set to TRUE.
6993: IF Fnd_Api.to_Boolean(p_init_msg_list)
6994: THEN

Line 6993: IF Fnd_Api.to_Boolean(p_init_msg_list)

6989: THEN
6990: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6991: END IF;
6992: -- Initialize message list if p_init_msg_list is set to TRUE.
6993: IF Fnd_Api.to_Boolean(p_init_msg_list)
6994: THEN
6995: Fnd_Msg_Pub.initialize;
6996: END IF;
6997: -- Initialize API return status to success

Line 6998: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

6994: THEN
6995: Fnd_Msg_Pub.initialize;
6996: END IF;
6997: -- Initialize API return status to success
6998: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6999: -- ---------------
7000: -- Api body starts
7001: -- ---------------
7002: -- if any of the values (Assignee, owner,status) have chnaged then proceed else get out

Line 7278: IF Fnd_Api.To_Boolean(p_commit)

7274: -- -------------------
7275: -- Api body ends here
7276: -- -------------------
7277: -- Standard check of p_commit.
7278: IF Fnd_Api.To_Boolean(p_commit)
7279: THEN
7280: COMMIT WORK;
7281: END IF;
7282: -- Standard call to get message count and IF count is get message info.

Line 7288: WHEN Fnd_Api.G_EXC_ERROR THEN

7284: p_data => x_msg_data);
7285: --END IF;
7286: -- ---------------------------------------------------------
7287: EXCEPTION
7288: WHEN Fnd_Api.G_EXC_ERROR THEN
7289: ROLLBACK TO Update_repair_task_hist;
7290: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7291: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7292: p_data => x_msg_data);

Line 7290: x_return_status := Fnd_Api.G_RET_STS_ERROR;

7286: -- ---------------------------------------------------------
7287: EXCEPTION
7288: WHEN Fnd_Api.G_EXC_ERROR THEN
7289: ROLLBACK TO Update_repair_task_hist;
7290: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7291: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7292: p_data => x_msg_data);
7293: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7294: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 7293: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

7289: ROLLBACK TO Update_repair_task_hist;
7290: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7291: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7292: p_data => x_msg_data);
7293: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7294: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7295: ROLLBACK TO Update_repair_task_hist;
7296: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7297: p_data => x_msg_data);

Line 7294: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7290: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7291: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7292: p_data => x_msg_data);
7293: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7294: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7295: ROLLBACK TO Update_repair_task_hist;
7296: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7297: p_data => x_msg_data);
7298: WHEN OTHERS THEN

Line 7299: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7295: ROLLBACK TO Update_repair_task_hist;
7296: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7297: p_data => x_msg_data);
7298: WHEN OTHERS THEN
7299: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7300: ROLLBACK TO Update_repair_task_hist;
7301: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
7302: THEN
7303: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

7312: /* Close Service Request */
7313: /*----------------------------------------------------------------*/
7314:
7315: PROCEDURE Close_status(p_api_version IN NUMBER,
7316: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7317: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7318: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7319: p_incident_id IN NUMBER,
7320: p_repair_line_id IN NUMBER,

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

7313: /*----------------------------------------------------------------*/
7314:
7315: PROCEDURE Close_status(p_api_version IN NUMBER,
7316: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7317: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7318: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7319: p_incident_id IN NUMBER,
7320: p_repair_line_id IN NUMBER,
7321: x_return_status OUT NOCOPY VARCHAR2,

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

7314:
7315: PROCEDURE Close_status(p_api_version IN NUMBER,
7316: p_commit IN VARCHAR2 := Fnd_Api.g_false,
7317: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
7318: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
7319: p_incident_id IN NUMBER,
7320: p_repair_line_id IN NUMBER,
7321: x_return_status OUT NOCOPY VARCHAR2,
7322: x_msg_count OUT NOCOPY NUMBER,

Line 7372: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

7368: --------------------------------------
7369: SAVEPOINT Close_Status;
7370:
7371: -- Standard call to check for call compatibility.
7372: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
7373: p_api_version,
7374: l_api_name,
7375: G_PKG_NAME)
7376: THEN

Line 7377: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

7373: p_api_version,
7374: l_api_name,
7375: G_PKG_NAME)
7376: THEN
7377: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7378: END IF;
7379: ------------------------------------------------------------
7380: -- Initialize message list if p_init_msg_list is set to TRUE.
7381: ------------------------------------------------------------

Line 7382: IF Fnd_Api.to_Boolean(p_init_msg_list)

7378: END IF;
7379: ------------------------------------------------------------
7380: -- Initialize message list if p_init_msg_list is set to TRUE.
7381: ------------------------------------------------------------
7382: IF Fnd_Api.to_Boolean(p_init_msg_list)
7383: THEN
7384: Fnd_Msg_Pub.initialize;
7385: END IF;
7386:

Line 7390: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

7386:
7387: ---------------------------------------------
7388: -- Initialize API return status to success
7389: ---------------------------------------------
7390: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
7391:
7392: --------------------
7393: -- Api body starts
7394: --------------------

Line 7427: RAISE Fnd_Api.G_EXC_ERROR;

7423: THEN
7424: Csd_Gen_Utility_Pvt.ADD('The Incident Id is invalid ');
7425: END IF;
7426:
7427: RAISE Fnd_Api.G_EXC_ERROR;
7428: END IF;
7429:
7430: -- For all the groups within SR
7431:

Line 7458: RAISE Fnd_Api.G_EXC_ERROR;

7454: FROM csd_repairs
7455: WHERE repair_line_id = ro.repair_line_id;
7456: EXCEPTION
7457: WHEN OTHERS THEN
7458: RAISE Fnd_Api.G_EXC_ERROR;
7459: END;
7460:
7461: l_ro_rec.object_version_number := l_ro_obj_version_number;
7462: l_ro_rec.status := 'C';

Line 7487: RAISE Fnd_Api.G_EXC_ERROR;

7483: 'CSD_API_RO_STAT_UPD_FAIL');
7484: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
7485: ro.repair_line_id);
7486: Fnd_Msg_Pub.ADD;
7487: RAISE Fnd_Api.G_EXC_ERROR;
7488: END IF;
7489:
7490: END LOOP;
7491:

Line 7499: RAISE Fnd_Api.G_EXC_ERROR;

7495: FROM csd_repair_order_groups
7496: WHERE repair_group_id = grp.repair_group_id;
7497: EXCEPTION
7498: WHEN OTHERS THEN
7499: RAISE Fnd_Api.G_EXC_ERROR;
7500: END;
7501:
7502: l_grp_rec.object_version_number := l_grp_obj_version_number;
7503: l_grp_rec.group_txn_status := 'CLOSED';

Line 7529: RAISE Fnd_Api.G_EXC_ERROR;

7525: 'CSD_API_GRP_STAT_UPD_FAIL');
7526: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7527: grp.repair_group_id);
7528: Fnd_Msg_Pub.ADD;
7529: RAISE Fnd_Api.G_EXC_ERROR;
7530: END IF;
7531:
7532: END IF;
7533:

Line 7552: RAISE Fnd_Api.G_EXC_ERROR;

7548: FROM csd_repairs
7549: WHERE repair_line_id = ro.repair_line_id;
7550: EXCEPTION
7551: WHEN OTHERS THEN
7552: RAISE Fnd_Api.G_EXC_ERROR;
7553: END;
7554:
7555: l_ro_rec.object_version_number := l_ro_obj_version_number;
7556: l_ro_rec.status := 'C';

Line 7581: RAISE Fnd_Api.G_EXC_ERROR;

7577: 'CSD_API_RO_STAT_UPD_FAIL');
7578: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID',
7579: ro.repair_line_id);
7580: Fnd_Msg_Pub.ADD;
7581: RAISE Fnd_Api.G_EXC_ERROR;
7582: END IF;
7583:
7584: END LOOP;
7585:

Line 7593: RAISE Fnd_Api.G_EXC_ERROR;

7589: FROM csd_repair_order_groups
7590: WHERE repair_group_id = grp.repair_group_id;
7591: EXCEPTION
7592: WHEN OTHERS THEN
7593: RAISE Fnd_Api.G_EXC_ERROR;
7594: END;
7595:
7596: l_grp_rec.object_version_number := l_grp_obj_version_number;
7597: l_grp_rec.group_txn_status := 'CLOSED';

Line 7624: RAISE Fnd_Api.G_EXC_ERROR;

7620: 'CSD_API_GRP_STAT_UPD_FAIL');
7621: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7622: grp.repair_group_id);
7623: Fnd_Msg_Pub.ADD;
7624: RAISE Fnd_Api.G_EXC_ERROR;
7625: END IF;
7626:
7627: END IF; -- grp_txn_status
7628:

Line 7738: RAISE Fnd_Api.G_EXC_ERROR;

7734: Fnd_Message.SET_NAME('CSD',
7735: 'CSD_API_SR_STAT_UPD_FAIL');
7736: Fnd_Message.SET_TOKEN('INCIDENT_ID', p_incident_id);
7737: Fnd_Msg_Pub.ADD;
7738: RAISE Fnd_Api.G_EXC_ERROR;
7739: END IF;
7740:
7741: END IF;
7742:

Line 7765: RAISE Fnd_Api.G_EXC_ERROR;

7761: THEN
7762: Csd_Gen_Utility_Pvt.ADD('Repair Line Id is invalid ');
7763: END IF;
7764:
7765: RAISE Fnd_Api.G_EXC_ERROR;
7766: END IF;
7767:
7768: BEGIN
7769: SELECT object_version_number

Line 7775: RAISE Fnd_Api.G_EXC_ERROR;

7771: FROM csd_repairs
7772: WHERE repair_line_id = p_repair_line_id;
7773: EXCEPTION
7774: WHEN OTHERS THEN
7775: RAISE Fnd_Api.G_EXC_ERROR;
7776: END;
7777:
7778: l_ro_rec.object_version_number := l_ro_obj_version_number;
7779: l_ro_rec.status := 'C';

Line 7797: RAISE Fnd_Api.G_EXC_ERROR;

7793: THEN
7794: Fnd_Message.SET_NAME('CSD', 'CSD_API_RO_STAT_UPD_FAIL');
7795: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID', p_repair_line_id);
7796: Fnd_Msg_Pub.ADD;
7797: RAISE Fnd_Api.G_EXC_ERROR;
7798: END IF;
7799:
7800: BEGIN
7801:

Line 7839: RAISE Fnd_Api.G_EXC_ERROR;

7835: FROM csd_repair_order_groups
7836: WHERE repair_group_id = l_repair_group_id;
7837: EXCEPTION
7838: WHEN OTHERS THEN
7839: RAISE Fnd_Api.G_EXC_ERROR;
7840: END;
7841:
7842: l_grp_rec.object_version_number := l_grp_obj_version_number;
7843: l_grp_rec.group_txn_status := 'CLOSED';

Line 7862: RAISE Fnd_Api.G_EXC_ERROR;

7858: 'CSD_API_GRP_STAT_UPD_FAIL');
7859: Fnd_Message.SET_TOKEN('REPAIR_GROUP_ID',
7860: l_repair_group_id);
7861: Fnd_Msg_Pub.ADD;
7862: RAISE Fnd_Api.G_EXC_ERROR;
7863: END IF;
7864:
7865: END IF;
7866:

Line 7975: --RAISE FND_API.G_EXC_ERROR;

7971: 'CSD_API_SR_STAT_UPD_FAIL');
7972: Fnd_Message.SET_TOKEN('INCIDENT_ID', l_incident_id);
7973: Fnd_Msg_Pub.ADD;
7974: --Bug fix for 3555256 Begin
7975: --RAISE FND_API.G_EXC_ERROR;
7976: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7977: p_data => x_msg_data);
7978: --Bug fix for 3555256 End
7979:

Line 7987: WHEN Fnd_Api.G_EXC_ERROR THEN

7983:
7984: END IF;
7985:
7986: EXCEPTION
7987: WHEN Fnd_Api.G_EXC_ERROR THEN
7988: ROLLBACK TO Close_Status;
7989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7990: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7991: p_data => x_msg_data);

Line 7989: x_return_status := Fnd_Api.G_RET_STS_ERROR;

7985:
7986: EXCEPTION
7987: WHEN Fnd_Api.G_EXC_ERROR THEN
7988: ROLLBACK TO Close_Status;
7989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7990: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7991: p_data => x_msg_data);
7992: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7993: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 7992: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

7988: ROLLBACK TO Close_Status;
7989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7990: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7991: p_data => x_msg_data);
7992: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7993: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7994: ROLLBACK TO status_close;
7995: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7996: p_data => x_msg_data);

Line 7993: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7989: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7990: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7991: p_data => x_msg_data);
7992: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7993: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7994: ROLLBACK TO status_close;
7995: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7996: p_data => x_msg_data);
7997: WHEN OTHERS THEN

Line 7998: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

7994: ROLLBACK TO status_close;
7995: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
7996: p_data => x_msg_data);
7997: WHEN OTHERS THEN
7998: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7999: ROLLBACK TO status_close;
8000: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
8001: THEN
8002: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

8020: /* 5: No unlinked RMA or SO */
8021: /*---------------------------------------------------------------*/
8022:
8023: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
8024: p_commit IN VARCHAR2 := Fnd_Api.g_false,
8025: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
8026: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
8027: p_incident_id IN NUMBER,
8028: x_link_mode OUT NOCOPY NUMBER,

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

8021: /*---------------------------------------------------------------*/
8022:
8023: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
8024: p_commit IN VARCHAR2 := Fnd_Api.g_false,
8025: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
8026: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
8027: p_incident_id IN NUMBER,
8028: x_link_mode OUT NOCOPY NUMBER,
8029: x_return_status OUT NOCOPY VARCHAR2,

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

8022:
8023: PROCEDURE Check_Service_Request(p_api_version IN NUMBER,
8024: p_commit IN VARCHAR2 := Fnd_Api.g_false,
8025: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
8026: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
8027: p_incident_id IN NUMBER,
8028: x_link_mode OUT NOCOPY NUMBER,
8029: x_return_status OUT NOCOPY VARCHAR2,
8030: x_msg_count OUT NOCOPY NUMBER,

Line 8058: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

8054: THEN
8055: Csd_Gen_Utility_Pvt.ADD('In Check_Service_Request API');
8056: END IF;
8057:
8058: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
8059:
8060: -- Initialize the count vars
8061: l_rma_count := 0;
8062: l_so_count := 0;

Line 8122: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

8118: END IF;
8119:
8120: EXCEPTION
8121: WHEN OTHERS THEN
8122: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
8123: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
8124: THEN
8125: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
8126: END IF;

Line 8313: IF NOT Fnd_Api.compatible_api_call(l_api_version,

8309: l_module_name,
8310: 'checking api compatibility');
8311: END IF;
8312: -- standard call to check for call compatibility.
8313: IF NOT Fnd_Api.compatible_api_call(l_api_version,
8314: p_api_version,
8315: l_api_name,
8316: g_pkg_name)
8317: THEN

Line 8324: RAISE Fnd_Api.g_exc_unexpected_error;

8320: Fnd_Log.string(l_exception_level,
8321: l_module_name,
8322: 'checking api compatibility, was unsuccessful');
8323: END IF;
8324: RAISE Fnd_Api.g_exc_unexpected_error;
8325: END IF;
8326: IF l_statement_level >= l_debug_level
8327: THEN
8328: Fnd_Log.string(l_statement_level,

Line 8334: IF Fnd_Api.to_boolean(p_init_msg_list)

8330: 'checking api compatibility, was successful');
8331: END IF;
8332:
8333: -- initialize message list if p_init_msg_list is set to true.
8334: IF Fnd_Api.to_boolean(p_init_msg_list)
8335: THEN
8336: Fnd_Msg_Pub.initialize;
8337: END IF;
8338:

Line 8340: x_return_status := Fnd_Api.g_ret_sts_success;

8336: Fnd_Msg_Pub.initialize;
8337: END IF;
8338:
8339: -- initialize api return status to success
8340: x_return_status := Fnd_Api.g_ret_sts_success;
8341:
8342: IF l_statement_level >= l_debug_level
8343: THEN
8344: Fnd_Log.String(l_Statement_Level,

Line 8463: RAISE Fnd_Api.g_exc_error;

8459: Fnd_Log.string(l_exception_level,
8460: l_module_name || '.check_in_parameters',
8461: 'product txn id is not valid ');
8462: END IF;
8463: RAISE Fnd_Api.g_exc_error;
8464: END IF;
8465: IF l_statement_level >= l_debug_level
8466: THEN
8467: Fnd_Log.string(l_statement_level,

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

8469: 'product txn id is valid ');
8470: END IF;
8471:
8472: -- validate the prod_txn_status
8473: IF NVL(x_product_txn_rec.prod_txn_status, Fnd_Api.g_miss_char) <>
8474: Fnd_Api.g_miss_char
8475: THEN
8476: BEGIN
8477: SELECT 'x'

Line 8474: Fnd_Api.g_miss_char

8470: END IF;
8471:
8472: -- validate the prod_txn_status
8473: IF NVL(x_product_txn_rec.prod_txn_status, Fnd_Api.g_miss_char) <>
8474: Fnd_Api.g_miss_char
8475: THEN
8476: BEGIN
8477: SELECT 'x'
8478: INTO l_check

Line 8501: RAISE Fnd_Api.g_exc_error;

8497: 'Product txn status is invalid : ' ||
8498: x_product_txn_rec.prod_txn_status);
8499: END IF;
8500: Fnd_Msg_Pub.ADD;
8501: RAISE Fnd_Api.g_exc_error;
8502: END;
8503: END IF;
8504:
8505: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>

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

8501: RAISE Fnd_Api.g_exc_error;
8502: END;
8503: END IF;
8504:
8505: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>
8506: Fnd_Api.g_miss_char
8507: THEN
8508: -- validate the action type
8509: IF NOT

Line 8506: Fnd_Api.g_miss_char

8502: END;
8503: END IF;
8504:
8505: IF NVL(x_product_txn_rec.action_type, Fnd_Api.g_miss_char) <>
8506: Fnd_Api.g_miss_char
8507: THEN
8508: -- validate the action type
8509: IF NOT
8510: (Csd_Process_Util.validate_action_type(p_action_type => x_product_txn_rec.action_type))

Line 8519: RAISE Fnd_Api.g_exc_error;

8515: l_module_name || '.check_in_parameters',
8516: 'Action Type s invalid : ' ||
8517: x_product_txn_rec.Action_Type);
8518: END IF;
8519: RAISE Fnd_Api.g_exc_error;
8520: END IF;
8521: END IF;
8522:
8523: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>

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

8519: RAISE Fnd_Api.g_exc_error;
8520: END IF;
8521: END IF;
8522:
8523: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>
8524: Fnd_Api.g_miss_char
8525: THEN
8526: -- validate the action code
8527: IF NOT

Line 8524: Fnd_Api.g_miss_char

8520: END IF;
8521: END IF;
8522:
8523: IF NVL(x_product_txn_rec.action_code, Fnd_Api.g_miss_char) <>
8524: Fnd_Api.g_miss_char
8525: THEN
8526: -- validate the action code
8527: IF NOT
8528: (Csd_Process_Util.validate_action_code(p_action_code => x_product_txn_rec.action_code))

Line 8537: RAISE Fnd_Api.g_exc_error;

8533: l_module_name || '.check_in_parameters',
8534: 'Action Code is invalid : ' ||
8535: x_product_txn_rec.Action_Code);
8536: END IF;
8537: RAISE Fnd_Api.g_exc_error;
8538: END IF;
8539: END IF;
8540: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8541: -- statuses and Object_Version_Number values from database

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

8538: END IF;
8539: END IF;
8540: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8541: -- statuses and Object_Version_Number values from database
8542: IF NVL(x_product_txn_rec.product_transaction_id, Fnd_Api.g_miss_num) <>
8543: Fnd_Api.g_miss_num
8544: THEN
8545: OPEN prod_txn(x_product_txn_rec.product_transaction_id);
8546: FETCH prod_txn

Line 8543: Fnd_Api.g_miss_num

8539: END IF;
8540: -- Get Current submit_order_flag, book_order_flag, release_order_flag and Ship_Order_Flag
8541: -- statuses and Object_Version_Number values from database
8542: IF NVL(x_product_txn_rec.product_transaction_id, Fnd_Api.g_miss_num) <>
8543: Fnd_Api.g_miss_num
8544: THEN
8545: OPEN prod_txn(x_product_txn_rec.product_transaction_id);
8546: FETCH prod_txn
8547: 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 8551: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>

8547: 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;
8548: CLOSE prod_txn;
8549: END IF;
8550:
8551: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>
8552: Fnd_Api.g_miss_num
8553: THEN
8554: IF x_product_txn_rec.repair_line_id <> l_repair_line_id
8555: THEN

Line 8552: Fnd_Api.g_miss_num

8548: CLOSE prod_txn;
8549: END IF;
8550:
8551: IF NVL(x_product_txn_rec.repair_line_id, Fnd_Api.g_miss_num) <>
8552: Fnd_Api.g_miss_num
8553: THEN
8554: IF x_product_txn_rec.repair_line_id <> l_repair_line_id
8555: THEN
8556: IF l_exception_level >= l_debug_level

Line 8562: RAISE Fnd_Api.g_exc_error;

8558: Fnd_Log.string(l_exception_level,
8559: l_module_name || '.check_in_parameters',
8560: 'Repair Line id can not be changed');
8561: END IF;
8562: RAISE Fnd_Api.g_exc_error;
8563: END IF;
8564: ELSE
8565: x_product_txn_rec.repair_line_id := l_repair_line_id;
8566: END IF;

Line 8591: RAISE Fnd_Api.g_exc_error;

8587: '.check_in_parameters',
8588: 'Invalid repair line id ' ||
8589: x_product_txn_rec.repair_line_id);
8590: END IF;
8591: RAISE Fnd_Api.g_exc_error;
8592: END;
8593: IF l_incident_id IS NOT NULL
8594: THEN
8595: OPEN sr_rec(l_incident_id);

Line 8607: RAISE Fnd_Api.g_exc_error;

8603: IF (g_debug > 0)
8604: THEN
8605: Csd_Gen_Utility_Pvt.ADD('incident id missing ');
8606: END IF;
8607: RAISE Fnd_Api.g_exc_error;
8608: END IF;
8609:
8610: -- assigning values for the order record
8611: l_order_rec.incident_id := l_incident_id;

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

8624: THEN
8625: -- Sub Inventory column will have value if internal requisition has source sub inventory
8626: -- value else it will have null values.
8627: IF NVL(x_product_txn_rec.sub_inventory,
8628: Fnd_Api.g_miss_char) <> Fnd_Api.g_miss_char
8629: THEN
8630: l_order_rec.pick_from_subinventory := x_product_txn_rec.sub_inventory;
8631: l_order_rec.def_staging_subinventory := x_product_txn_rec.sub_inventory;
8632: END IF;

Line 8726: p_commit => Fnd_Api.g_false,

8722: l_module_name,
8723: 'Calling process_sales_order to release so');
8724: END IF;
8725: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8726: p_commit => Fnd_Api.g_false,
8727: p_init_msg_list => Fnd_Api.g_true,
8728: p_validation_level => Fnd_Api.g_valid_level_full,
8729: p_action => C_Action_Pick_Release,
8730: p_order_rec => l_order_rec,

Line 8727: p_init_msg_list => Fnd_Api.g_true,

8723: 'Calling process_sales_order to release so');
8724: END IF;
8725: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8726: p_commit => Fnd_Api.g_false,
8727: p_init_msg_list => Fnd_Api.g_true,
8728: p_validation_level => Fnd_Api.g_valid_level_full,
8729: p_action => C_Action_Pick_Release,
8730: p_order_rec => l_order_rec,
8731: x_return_status => x_return_status,

Line 8728: p_validation_level => Fnd_Api.g_valid_level_full,

8724: END IF;
8725: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8726: p_commit => Fnd_Api.g_false,
8727: p_init_msg_list => Fnd_Api.g_true,
8728: p_validation_level => Fnd_Api.g_valid_level_full,
8729: p_action => C_Action_Pick_Release,
8730: p_order_rec => l_order_rec,
8731: x_return_status => x_return_status,
8732: x_msg_count => x_msg_count,

Line 8734: IF (x_return_status = Fnd_Api.g_ret_sts_error)

8730: p_order_rec => l_order_rec,
8731: x_return_status => x_return_status,
8732: x_msg_count => x_msg_count,
8733: x_msg_data => x_msg_data);
8734: IF (x_return_status = Fnd_Api.g_ret_sts_error)
8735: THEN
8736: IF l_exception_level >= l_debug_level
8737: THEN
8738: Fnd_Log.string(l_exception_level,

Line 8937: p_commit => Fnd_Api.g_false,

8933: l_module_name,
8934: 'Calling Process Sales Order API');
8935: END IF;
8936: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8937: p_commit => Fnd_Api.g_false,
8938: p_init_msg_list => Fnd_Api.g_true,
8939: p_validation_level => Fnd_Api.g_valid_level_full,
8940: p_action => C_Action_Ship,
8941: p_order_rec => l_order_rec,

Line 8938: p_init_msg_list => Fnd_Api.g_true,

8934: 'Calling Process Sales Order API');
8935: END IF;
8936: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8937: p_commit => Fnd_Api.g_false,
8938: p_init_msg_list => Fnd_Api.g_true,
8939: p_validation_level => Fnd_Api.g_valid_level_full,
8940: p_action => C_Action_Ship,
8941: p_order_rec => l_order_rec,
8942: x_return_status => x_return_status,

Line 8939: p_validation_level => Fnd_Api.g_valid_level_full,

8935: END IF;
8936: Csd_Process_Pvt.process_sales_order(p_api_version => 1.0,
8937: p_commit => Fnd_Api.g_false,
8938: p_init_msg_list => Fnd_Api.g_true,
8939: p_validation_level => Fnd_Api.g_valid_level_full,
8940: p_action => C_Action_Ship,
8941: p_order_rec => l_order_rec,
8942: x_return_status => x_return_status,
8943: x_msg_count => x_msg_count,

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

8941: p_order_rec => l_order_rec,
8942: x_return_status => x_return_status,
8943: x_msg_count => x_msg_count,
8944: x_msg_data => x_msg_data);
8945: IF NOT (x_return_status = Fnd_Api.g_ret_sts_success)
8946: THEN
8947: IF l_statement_level >= l_debug_level
8948: THEN
8949: Fnd_Log.string(l_statement_level,

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

8950: l_module_name,
8951: ' process sales order failed');
8952: END IF;
8953: RAISE ship_order_excep;
8954: END IF; -- If x_return_status <> fnd_api.g_ret_sts_success
8955: END IF; -- l_allow_ship = C_Yes
8956: -- Check if any of the delivery lines status are less then 'Shipped'
8957: -- for a given order header id and order line id , if so do not update
8958: -- product txn lines with Shipped status, if not then update product txn table

Line 9058: IF Fnd_Api.to_boolean(p_commit)

9054: END IF; -- end of ship sales order
9055: END IF; --end of process txn
9056: END IF; -- Action Type = MOVE_OUt
9057: -- standard check of p_commit.
9058: IF Fnd_Api.to_boolean(p_commit)
9059: THEN
9060: COMMIT WORK;
9061: END IF;
9062: EXCEPTION

Line 9065: x_return_status := Fnd_Api.g_ret_sts_success;

9061: END IF;
9062: EXCEPTION
9063: WHEN release_order_excep THEN
9064: -- Set return status to unexpected error
9065: x_return_status := Fnd_Api.g_ret_sts_success;
9066: -- If there is any error then rollback
9067: ROLLBACK TO release_sales_order;
9068: -- Standard procedure to get error message count and error message is also returned
9069: -- if error message count is 1

Line 9074: x_return_status := Fnd_Api.g_ret_sts_success;

9070: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9071: p_data => x_msg_data);
9072: WHEN ship_order_excep THEN
9073: -- Set return status to unexpected error
9074: x_return_status := Fnd_Api.g_ret_sts_success;
9075: -- If there is any error then rollback
9076: ROLLBACK TO ship_sales_order;
9077: -- Standard procedure to get error message count and error message is also returned
9078: -- if error message count is 1

Line 9081: WHEN Fnd_Api.g_exc_error THEN

9077: -- Standard procedure to get error message count and error message is also returned
9078: -- if error message count is 1
9079: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9080: p_data => x_msg_data);
9081: WHEN Fnd_Api.g_exc_error THEN
9082: -- Set return status to unexpected error
9083: x_return_status := Fnd_Api.g_ret_sts_error;
9084: -- If there is any error then rollback
9085: ROLLBACK TO update_iro_product_txn;

Line 9083: x_return_status := Fnd_Api.g_ret_sts_error;

9079: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9080: p_data => x_msg_data);
9081: WHEN Fnd_Api.g_exc_error THEN
9082: -- Set return status to unexpected error
9083: x_return_status := Fnd_Api.g_ret_sts_error;
9084: -- If there is any error then rollback
9085: ROLLBACK TO update_iro_product_txn;
9086: -- Standard procedure to get error message count and error message is also returned
9087: -- if error message count is 1

Line 9090: WHEN Fnd_Api.g_exc_unexpected_error THEN

9086: -- Standard procedure to get error message count and error message is also returned
9087: -- if error message count is 1
9088: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9089: p_data => x_msg_data);
9090: WHEN Fnd_Api.g_exc_unexpected_error THEN
9091: -- Set return status to unexpected error
9092: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
9093: -- If there is any error then rollback
9094: ROLLBACK TO update_iro_product_txn;

Line 9092: x_return_status := Fnd_Api.g_ret_sts_unexp_error;

9088: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9089: p_data => x_msg_data);
9090: WHEN Fnd_Api.g_exc_unexpected_error THEN
9091: -- Set return status to unexpected error
9092: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
9093: -- If there is any error then rollback
9094: ROLLBACK TO update_iro_product_txn;
9095: -- Standard procedure to get error message count and error message is also returned
9096: -- if error message count is 1

Line 9101: x_return_status := Fnd_Api.g_ret_sts_unexp_error;

9097: Fnd_Msg_Pub.count_and_get(p_count => x_msg_count,
9098: p_data => x_msg_data);
9099: WHEN OTHERS THEN
9100: -- Set return status to unexpected error
9101: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
9102: -- If there is any error then rollback
9103: ROLLBACK TO update_iro_product_txn;
9104: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_unexp_error)
9105: THEN

Line 9167: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9163: WHERE cpt.repair_line_id = p_Repair_Line_Id
9164: AND cpt.estimate_detail_id = ced.estimate_detail_id;
9165: BEGIN
9166: -- Standard call to check for call compatibility.
9167: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9168: p_api_version,
9169: l_api_name,
9170: G_PKG_NAME)
9171: THEN

Line 9172: RAISE Fnd_Api.G_Exc_UnExpected_Error;

9168: p_api_version,
9169: l_api_name,
9170: G_PKG_NAME)
9171: THEN
9172: RAISE Fnd_Api.G_Exc_UnExpected_Error;
9173: END IF;
9174:
9175: -- Initialize message list if p_init_msg_list is set to TRUE.
9176: IF Fnd_Api.to_Boolean(p_init_msg_list)

Line 9176: IF Fnd_Api.to_Boolean(p_init_msg_list)

9172: RAISE Fnd_Api.G_Exc_UnExpected_Error;
9173: END IF;
9174:
9175: -- Initialize message list if p_init_msg_list is set to TRUE.
9176: IF Fnd_Api.to_Boolean(p_init_msg_list)
9177: THEN
9178: Fnd_Msg_Pub.initialize;
9179: END IF;
9180:

Line 9182: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9178: Fnd_Msg_Pub.initialize;
9179: END IF;
9180:
9181: -- Initialize API return status to success
9182: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9183:
9184: -- Api body starts
9185: IF (g_debug > 0)
9186: THEN

Line 9239: RAISE Fnd_Api.G_EXC_ERROR;

9235: 'CSD_RO_NOT_OPEN_NO_PRODTXN_LNS');
9236: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9237: Fnd_Message.SET_TOKEN('RO_STATUS', l_RO_Status_Meaning);
9238: Fnd_Msg_Pub.ADD;
9239: RAISE Fnd_Api.G_EXC_ERROR;
9240: END IF;
9241: -- Check if repair Type Ref is Standard
9242: IF l_RO_Repair_Type_Ref = C_Repair_TYpe_Ref_Standard
9243: THEN

Line 9250: RAISE Fnd_Api.G_EXC_ERROR;

9246: Fnd_Message.SET_NAME('CSD',
9247: 'CSD_STD_REPTYPE_NO_PRODTXN_LNS');
9248: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9249: Fnd_Msg_Pub.ADD;
9250: RAISE Fnd_Api.G_EXC_ERROR;
9251: END IF;
9252: -- Check Serial control code if quantity is greater then 1
9253: IF l_RO_Quantity > 1
9254: THEN

Line 9270: RAISE Fnd_Api.G_EXC_ERROR;

9266: -- Raise G_Exc_Error,
9267: Fnd_Message.SET_NAME('CSD',
9268: 'CSD_RO_QTY_MORE_FOR_SRLCT_ITEM');
9269: Fnd_Msg_Pub.ADD;
9270: RAISE Fnd_Api.G_EXC_ERROR;
9271: END IF;
9272: EXCEPTION
9273: WHEN NO_DATA_FOUND THEN
9274: -- Get Item Name

Line 9295: RAISE Fnd_Api.G_EXC_ERROR;

9291: Fnd_Message.Set_Token('ITEM', l_Item_Name);
9292: Fnd_Message.Set_Token('ORG_NAME',
9293: l_Service_Valdn_Org_Name);
9294: Fnd_Msg_Pub.ADD;
9295: RAISE Fnd_Api.G_EXC_ERROR;
9296:
9297: END;
9298: END IF;
9299: -- CHeck if there are any product txn lines for a given repair line id

Line 9315: RAISE Fnd_Api.G_EXC_ERROR;

9311: Fnd_Message.SET_NAME('CSD',
9312: 'CSD_RO_HAS_PRODUCT_TXN_LINES');
9313: Fnd_Message.SET_TOKEN('RO_NUMBER', l_RO_Number);
9314: Fnd_Msg_Pub.ADD;
9315: RAISE Fnd_Api.G_EXC_ERROR;
9316: END IF;
9317: END;
9318: EXCEPTION
9319: WHEN NO_DATA_FOUND THEN

Line 9325: RAISE Fnd_Api.G_EXC_ERROR;

9321: -- Display message; Invalid repair line id is passed
9322: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_REP_LINE_ID');
9323: Fnd_Message.SET_TOKEN('REPAIR_LINE_ID', P_Repair_Line_ID);
9324: Fnd_Msg_Pub.ADD;
9325: RAISE Fnd_Api.G_EXC_ERROR;
9326: END;
9327: -- Now call Default Product Txn lines API
9328:
9329: create_default_prod_txn(p_api_version,

Line 9337: Fnd_Api.g_false,

9333: p_repair_line_id,
9334: NULL,
9335: NULL,
9336: NULL,
9337: Fnd_Api.g_false,
9338: x_return_status,
9339: x_msg_count,
9340: x_msg_Data);
9341:

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

9340: x_msg_Data);
9341:
9342: -- Once default product transaction lines are created successfully,
9343: -- assign new entities to new out variable x_Logistics_KeyAttr_Tbl.
9344: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
9345: THEN
9346: RAISE Fnd_Api.G_EXC_ERROR;
9347: ELSE
9348: -- New code added here

Line 9346: RAISE Fnd_Api.G_EXC_ERROR;

9342: -- Once default product transaction lines are created successfully,
9343: -- assign new entities to new out variable x_Logistics_KeyAttr_Tbl.
9344: IF NOT (x_return_status = Fnd_Api.G_RET_STS_SUCCESS)
9345: THEN
9346: RAISE Fnd_Api.G_EXC_ERROR;
9347: ELSE
9348: -- New code added here
9349: i := 0; -- Initialize loop variable to zero
9350: FOR Logistic_KeyAttr_Rec IN Logistic_KeyAttr_Cur_Type(p_Repair_line_id)

Line 9361: WHEN Fnd_Api.G_EXC_ERROR THEN

9357: END LOOP;
9358: END IF;
9359:
9360: EXCEPTION
9361: WHEN Fnd_Api.G_EXC_ERROR THEN
9362: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9363: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9364: p_data => x_msg_data);
9365: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 9362: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9358: END IF;
9359:
9360: EXCEPTION
9361: WHEN Fnd_Api.G_EXC_ERROR THEN
9362: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9363: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9364: p_data => x_msg_data);
9365: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9366: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9365: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9361: WHEN Fnd_Api.G_EXC_ERROR THEN
9362: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9363: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9364: p_data => x_msg_data);
9365: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9366: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9367: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9368: p_data => x_msg_data);
9369: WHEN OTHERS THEN

Line 9366: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9362: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9363: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9364: p_data => x_msg_data);
9365: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9366: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9367: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9368: p_data => x_msg_data);
9369: WHEN OTHERS THEN
9370: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9370: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9366: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9367: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9368: p_data => x_msg_data);
9369: WHEN OTHERS THEN
9370: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9371: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9372: THEN
9373: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);
9374: END IF;

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

9381: /* procedure name: create_repair_task */
9382: /* description : procedure used to create DR specific tasks in Depot tables */
9383: /* Called from : Depot Repair Form to Create Task */
9384: /* Input Parm : p_api_version NUMBER Required Api Version number */
9385: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9386: /* default value is fnd_api.g_false */
9387: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9388: /* fnd_api.g_false */
9389: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

9382: /* description : procedure used to create DR specific tasks in Depot tables */
9383: /* Called from : Depot Repair Form to Create Task */
9384: /* Input Parm : p_api_version NUMBER Required Api Version number */
9385: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9386: /* default value is fnd_api.g_false */
9387: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9388: /* fnd_api.g_false */
9389: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9390: /* validation steps must be done and which steps */

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

9383: /* Called from : Depot Repair Form to Create Task */
9384: /* Input Parm : p_api_version NUMBER Required Api Version number */
9385: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9386: /* default value is fnd_api.g_false */
9387: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9388: /* fnd_api.g_false */
9389: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9390: /* validation steps must be done and which steps */
9391: /* should be skipped. */

Line 9388: /* fnd_api.g_false */

9384: /* Input Parm : p_api_version NUMBER Required Api Version number */
9385: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9386: /* default value is fnd_api.g_false */
9387: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9388: /* fnd_api.g_false */
9389: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9390: /* validation steps must be done and which steps */
9391: /* should be skipped. */
9392: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */

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

9390: /* validation steps must be done and which steps */
9391: /* should be skipped. */
9392: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9393: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9394: /* fnd_api.g_ret_sts_success (success) */
9395: /* fnd_api.g_ret_sts_error (error) */
9396: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9397: /* x_msg_count NUMBER Number of messages in the message stack */
9398: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

9391: /* should be skipped. */
9392: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9393: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9394: /* fnd_api.g_ret_sts_success (success) */
9395: /* fnd_api.g_ret_sts_error (error) */
9396: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9397: /* x_msg_count NUMBER Number of messages in the message stack */
9398: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9399: /* x_task_id NUMBER Task Id of the created Task */

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

9392: /* p_CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record REPAIR_TASK_REC_TYPE */
9393: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9394: /* fnd_api.g_ret_sts_success (success) */
9395: /* fnd_api.g_ret_sts_error (error) */
9396: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9397: /* x_msg_count NUMBER Number of messages in the message stack */
9398: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9399: /* x_task_id NUMBER Task Id of the created Task */
9400: /*-----------------------------------------------------------------------------------------------------------*/

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

9398: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9399: /* x_task_id NUMBER Task Id of the created Task */
9400: /*-----------------------------------------------------------------------------------------------------------*/
9401: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9402: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9403: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9404: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9405: p_create_repair_task_rec IN REPAIR_TASK_REC,
9406: x_return_status OUT NOCOPY VARCHAR2,

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

9399: /* x_task_id NUMBER Task Id of the created Task */
9400: /*-----------------------------------------------------------------------------------------------------------*/
9401: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9402: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9403: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9404: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9405: p_create_repair_task_rec IN REPAIR_TASK_REC,
9406: x_return_status OUT NOCOPY VARCHAR2,
9407: x_msg_count OUT NOCOPY NUMBER,

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

9400: /*-----------------------------------------------------------------------------------------------------------*/
9401: PROCEDURE CREATE_REPAIR_TASK(p_api_version IN NUMBER,
9402: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9403: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9404: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9405: p_create_repair_task_rec IN REPAIR_TASK_REC,
9406: x_return_status OUT NOCOPY VARCHAR2,
9407: x_msg_count OUT NOCOPY NUMBER,
9408: x_msg_data OUT NOCOPY VARCHAR2,

Line 9457: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9453: Fnd_Log.string(l_statement_level,
9454: l_module_name,
9455: 'checking api compatibility');
9456: END IF;
9457: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9458: p_api_version,
9459: l_api_name,
9460: G_PKG_NAME)
9461: THEN

Line 9468: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

9464: Fnd_Log.string(l_exception_level,
9465: l_module_name,
9466: 'checking api compatibility, was unsuccessful');
9467: END IF;
9468: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
9469: END IF;
9470:
9471: IF l_statement_level >= l_debug_level
9472: THEN

Line 9479: IF Fnd_Api.to_Boolean(p_init_msg_list)

9475: 'checking api compatibility, was successful');
9476: END IF;
9477:
9478: -- Initialize message list if p_init_msg_list is set to TRUE.
9479: IF Fnd_Api.to_Boolean(p_init_msg_list)
9480: THEN
9481: Fnd_Msg_Pub.initialize;
9482: END IF;
9483: -- Initialize API return status to success

Line 9484: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9480: THEN
9481: Fnd_Msg_Pub.initialize;
9482: END IF;
9483: -- Initialize API return status to success
9484: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9485: -- ---------------
9486: -- Api body starts
9487: -- ---------------
9488: IF l_statement_level >= l_debug_level

Line 9560: IF Fnd_Api.To_Boolean(p_commit)

9556: -- -------------------
9557: -- Api body ends here
9558: -- -------------------
9559: -- Standard check of p_commit.
9560: IF Fnd_Api.To_Boolean(p_commit)
9561: THEN
9562: COMMIT WORK;
9563: END IF;
9564: -- Standard call to get message count and IF count is get message info.

Line 9568: WHEN Fnd_Api.G_EXC_ERROR THEN

9564: -- Standard call to get message count and IF count is get message info.
9565: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9566: p_data => x_msg_data);
9567: EXCEPTION
9568: WHEN Fnd_Api.G_EXC_ERROR THEN
9569: ROLLBACK TO create_task;
9570: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9571: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9572: p_data => x_msg_data);

Line 9570: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9566: p_data => x_msg_data);
9567: EXCEPTION
9568: WHEN Fnd_Api.G_EXC_ERROR THEN
9569: ROLLBACK TO create_task;
9570: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9571: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9572: p_data => x_msg_data);
9573: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9574: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9573: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9569: ROLLBACK TO create_task;
9570: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9571: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9572: p_data => x_msg_data);
9573: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9574: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9575: ROLLBACK TO create_task;
9576: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9577: p_data => x_msg_data);

Line 9574: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9570: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9571: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9572: p_data => x_msg_data);
9573: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9574: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9575: ROLLBACK TO create_task;
9576: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9577: p_data => x_msg_data);
9578: WHEN OTHERS THEN

Line 9579: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9575: ROLLBACK TO create_task;
9576: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9577: p_data => x_msg_data);
9578: WHEN OTHERS THEN
9579: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9580: ROLLBACK TO create_task;
9581: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9582: THEN
9583: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);

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

9592: /* procedure name: update_repair_task */
9593: /* description : procedure used to update DR specifc task in Depot tables */
9594: /* Called from : Depot Repair Form to Update DR specifc Task */
9595: /* Input Parm : p_api_version NUMBER Required Api Version number */
9596: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9597: /* default value is fnd_api.g_false */
9598: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9599: /* fnd_api.g_false */
9600: /* p_validation_level NUMBER Optional API uses this parameter to determine which */

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

9593: /* description : procedure used to update DR specifc task in Depot tables */
9594: /* Called from : Depot Repair Form to Update DR specifc Task */
9595: /* Input Parm : p_api_version NUMBER Required Api Version number */
9596: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9597: /* default value is fnd_api.g_false */
9598: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9599: /* fnd_api.g_false */
9600: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9601: /* validation steps must be done and which steps */

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

9594: /* Called from : Depot Repair Form to Update DR specifc Task */
9595: /* Input Parm : p_api_version NUMBER Required Api Version number */
9596: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9597: /* default value is fnd_api.g_false */
9598: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9599: /* fnd_api.g_false */
9600: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9601: /* validation steps must be done and which steps */
9602: /* should be skipped. */

Line 9599: /* fnd_api.g_false */

9595: /* Input Parm : p_api_version NUMBER Required Api Version number */
9596: /* p_init_msg_list VARCHAR2 Optional Initializes message stack if fnd_api.g_true, */
9597: /* default value is fnd_api.g_false */
9598: /* p_commit VARCHAR2 Optional Commits in API if fnd_api.g_true, default */
9599: /* fnd_api.g_false */
9600: /* p_validation_level NUMBER Optional API uses this parameter to determine which */
9601: /* validation steps must be done and which steps */
9602: /* should be skipped. */
9603: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */

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

9601: /* validation steps must be done and which steps */
9602: /* should be skipped. */
9603: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9604: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9605: /* fnd_api.g_ret_sts_success (success) */
9606: /* fnd_api.g_ret_sts_error (error) */
9607: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9608: /* x_msg_count NUMBER Number of messages in the message stack */
9609: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */

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

9602: /* should be skipped. */
9603: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9604: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9605: /* fnd_api.g_ret_sts_success (success) */
9606: /* fnd_api.g_ret_sts_error (error) */
9607: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9608: /* x_msg_count NUMBER Number of messages in the message stack */
9609: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9610: /*-----------------------------------------------------------------------------------------------------------*/

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

9603: /* CREATE_REPAIR_TASK_REC RECORD Required Columns are in the Record CREATE_REPAIR_TASK_REC_TYPE */
9604: /* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
9605: /* fnd_api.g_ret_sts_success (success) */
9606: /* fnd_api.g_ret_sts_error (error) */
9607: /* fnd_api.g_ret_sts_unexp_error (unexpected) */
9608: /* x_msg_count NUMBER Number of messages in the message stack */
9609: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9610: /*-----------------------------------------------------------------------------------------------------------*/
9611:

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

9609: /* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
9610: /*-----------------------------------------------------------------------------------------------------------*/
9611:
9612: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9616: p_update_repair_task_rec IN REPAIR_TASK_REC,
9617: x_return_status OUT NOCOPY VARCHAR2,

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

9610: /*-----------------------------------------------------------------------------------------------------------*/
9611:
9612: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9616: p_update_repair_task_rec IN REPAIR_TASK_REC,
9617: x_return_status OUT NOCOPY VARCHAR2,
9618: x_msg_count OUT NOCOPY NUMBER,

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

9611:
9612: PROCEDURE UPDATE_REPAIR_TASK(p_api_version IN NUMBER,
9613: p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
9614: p_commit IN VARCHAR2 := Fnd_Api.g_false,
9615: p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
9616: p_update_repair_task_rec IN REPAIR_TASK_REC,
9617: x_return_status OUT NOCOPY VARCHAR2,
9618: x_msg_count OUT NOCOPY NUMBER,
9619: x_msg_data OUT NOCOPY VARCHAR2) IS

Line 9667: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,

9663: Fnd_Log.string(l_statement_level,
9664: l_module_name,
9665: 'checking api compatibility');
9666: END IF;
9667: IF NOT Fnd_Api.Compatible_API_Call(l_api_version,
9668: p_api_version,
9669: l_api_name,
9670: G_PKG_NAME)
9671: THEN

Line 9678: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

9674: Fnd_Log.string(l_exception_level,
9675: l_module_name,
9676: 'checking api compatibility, was unsuccessful');
9677: END IF;
9678: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
9679: END IF;
9680:
9681: IF l_statement_level >= l_debug_level
9682: THEN

Line 9689: IF Fnd_Api.to_Boolean(p_init_msg_list)

9685: 'checking api compatibility, was successful');
9686: END IF;
9687:
9688: -- Initialize message list if p_init_msg_list is set to TRUE.
9689: IF Fnd_Api.to_Boolean(p_init_msg_list)
9690: THEN
9691: Fnd_Msg_Pub.initialize;
9692: END IF;
9693: -- Initialize API return status to success

Line 9694: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;

9690: THEN
9691: Fnd_Msg_Pub.initialize;
9692: END IF;
9693: -- Initialize API return status to success
9694: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
9695: -- ---------------
9696: -- Api body starts
9697: -- ---------------
9698: IF l_statement_level >= l_debug_level

Line 9777: IF Fnd_Api.To_Boolean(p_commit)

9773: -- -------------------
9774: -- Api body ends here
9775: -- -------------------
9776: -- Standard check of p_commit.
9777: IF Fnd_Api.To_Boolean(p_commit)
9778: THEN
9779: COMMIT WORK;
9780: END IF;
9781: -- Standard call to get message count and IF count is get message info.

Line 9785: WHEN Fnd_Api.G_EXC_ERROR THEN

9781: -- Standard call to get message count and IF count is get message info.
9782: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9783: p_data => x_msg_data);
9784: EXCEPTION
9785: WHEN Fnd_Api.G_EXC_ERROR THEN
9786: ROLLBACK TO update_repair_task;
9787: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9788: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9789: p_data => x_msg_data);

Line 9787: x_return_status := Fnd_Api.G_RET_STS_ERROR;

9783: p_data => x_msg_data);
9784: EXCEPTION
9785: WHEN Fnd_Api.G_EXC_ERROR THEN
9786: ROLLBACK TO update_repair_task;
9787: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9788: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9789: p_data => x_msg_data);
9790: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9791: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

Line 9790: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

9786: ROLLBACK TO update_repair_task;
9787: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9788: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9789: p_data => x_msg_data);
9790: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9791: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9792: ROLLBACK TO update_repair_task;
9793: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9794: p_data => x_msg_data);

Line 9791: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9787: x_return_status := Fnd_Api.G_RET_STS_ERROR;
9788: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9789: p_data => x_msg_data);
9790: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
9791: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9792: ROLLBACK TO update_repair_task;
9793: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9794: p_data => x_msg_data);
9795: WHEN OTHERS THEN

Line 9796: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

9792: ROLLBACK TO update_repair_task;
9793: Fnd_Msg_Pub.Count_And_Get(p_count => x_msg_count,
9794: p_data => x_msg_data);
9795: WHEN OTHERS THEN
9796: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
9797: ROLLBACK TO update_repair_task;
9798: IF Fnd_Msg_Pub.Check_Msg_Level(Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR)
9799: THEN
9800: Fnd_Msg_Pub.Add_Exc_Msg(G_PKG_NAME, l_api_name);