39: counter := counter + 1;
40: end loop;
41:
42: if counter <> 1 then
43: raise fnd_api.g_exc_unexpected_error;
44: end if;
45:
46: return p_cei_id;
47: end;
49: PROCEDURE Unlock_CCI_Row(p_iface_id IN NUMBER, x_return_status OUT NOCOPY VARCHAR2)
50: IS
51: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
52: BEGIN
53: x_return_status := fnd_api.g_ret_sts_success;
54:
55: update mtl_cc_entries_interface
56: set
57: lock_flag = 2
66: cc_entry_interface_id = p_iface_id;
67:
68: EXCEPTION
69: WHEN OTHERS THEN
70: x_return_status := fnd_api.g_ret_sts_unexp_error;
71: END;
72:
73:
74: -- derives SKU and CCE data from cycle_count_entry row into
211: -- to be exported and interface record fields that can be derived from
212: -- cycle_count_entry will be overwritten by data from there.
213: PROCEDURE Enforce_SKU_CountEntry_Match
214: (p_api_version IN NUMBER,
215: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
217: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
218: x_return_status OUT NOCOPY VARCHAR2 ,
219: x_errorcode OUT NOCOPY NUMBER,
212: -- cycle_count_entry will be overwritten by data from there.
213: PROCEDURE Enforce_SKU_CountEntry_Match
214: (p_api_version IN NUMBER,
215: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
217: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
218: x_return_status OUT NOCOPY VARCHAR2 ,
219: x_errorcode OUT NOCOPY NUMBER,
220: x_msg_count OUT NOCOPY NUMBER ,
213: PROCEDURE Enforce_SKU_CountEntry_Match
214: (p_api_version IN NUMBER,
215: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
217: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
218: x_return_status OUT NOCOPY VARCHAR2 ,
219: x_errorcode OUT NOCOPY NUMBER,
220: x_msg_count OUT NOCOPY NUMBER ,
221: x_msg_data OUT NOCOPY VARCHAR2 ,
236: BEGIN
237: SAVEPOINT Enforce_SKU_CountEntry_Match;
238: --
239: -- Standard Call to check for call compatibility
240: IF NOT FND_API.Compatible_API_Call(l_api_version
241: , p_api_version
242: , l_api_name
243: , G_PKG_NAME) THEN
244: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
240: IF NOT FND_API.Compatible_API_Call(l_api_version
241: , p_api_version
242: , l_api_name
243: , G_PKG_NAME) THEN
244: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
245: END IF;
246:
247: --
248: -- Initialize message list if p_init_msg_list is set to true
245: END IF;
246:
247: --
248: -- Initialize message list if p_init_msg_list is set to true
249: IF FND_API.to_Boolean(p_init_msg_list) THEN
250: FND_MSG_PUB.initialize;
251: END IF;
252:
253: -- Initialize API return status to success
250: FND_MSG_PUB.initialize;
251: END IF;
252:
253: -- Initialize API return status to success
254: x_return_status := FND_API.G_RET_STS_SUCCESS;
255: x_errorcode := 0;
256: --
257: -- API body
258: --
269: p_cycle_count_header_id => x_iface_rec.cycle_count_header_id,
270: p_cycle_count_header_name => x_iface_rec.cycle_count_header_name
271: );
272:
273: if (x_return_status <> fnd_api.g_ret_sts_success) then
274: raise fnd_api.g_exc_error;
275: end if;
276:
277: mtl_cceoi_process_pvt.Validate_CountListSeq
270: p_cycle_count_header_name => x_iface_rec.cycle_count_header_name
271: );
272:
273: if (x_return_status <> fnd_api.g_ret_sts_success) then
274: raise fnd_api.g_exc_error;
275: end if;
276:
277: mtl_cceoi_process_pvt.Validate_CountListSeq
278: (
286: p_count_list_sequence => x_iface_rec.count_list_sequence,
287: p_organization_id =>
288: MTL_CCEOI_VAR_PVT.G_CYCLE_COUNT_HEADER_REC.organization_id);
289:
290: if (x_return_status <> fnd_api.g_ret_sts_success) then
291: raise fnd_api.g_exc_error;
292: end if;
293:
294: -- if no record found then stop verification, there is no record
287: p_organization_id =>
288: MTL_CCEOI_VAR_PVT.G_CYCLE_COUNT_HEADER_REC.organization_id);
289:
290: if (x_return_status <> fnd_api.g_ret_sts_success) then
291: raise fnd_api.g_exc_error;
292: end if;
293:
294: -- if no record found then stop verification, there is no record
295: -- that we can lock
313: END IF;
314: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_ENTRY_EXPORTED');
315: FND_MSG_PUB.Add;
316: x_errorcode := 201;
317: RAISE FND_API.G_EXC_ERROR;
318: end if;
319:
320:
321: if (not (c_rec.entry_status_code in (1,3))) then
321: if (not (c_rec.entry_status_code in (1,3))) then
322: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_ENTRY_STATUS_NA');
323: FND_MSG_PUB.Add;
324: x_errorcode := 202;
325: RAISE FND_API.G_EXC_ERROR;
326: end if;
327:
328: -- TODO: print warning about deriving stuff
329:
340: x_return_status => x_return_status,
341: p_cycle_count_entry_id => x_iface_rec.cycle_count_entry_id,
342: p_export_flag => 1);
343:
344: if (x_return_status <> fnd_api.g_ret_sts_success) then
345: raise fnd_api.g_exc_unexpected_error;
346: end if;
347:
348: end if;
341: p_cycle_count_entry_id => x_iface_rec.cycle_count_entry_id,
342: p_export_flag => 1);
343:
344: if (x_return_status <> fnd_api.g_ret_sts_success) then
345: raise fnd_api.g_exc_unexpected_error;
346: end if;
347:
348: end if;
349:
355: if (counter = 0) then
356: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_NO_CCE_WITH_CCEID');
357: FND_MSG_PUB.Add;
358: x_errorcode := 203;
359: raise fnd_api.g_exc_error;
360: end if;
361:
362:
363: --
364: -- END of API body
365: --
366:
367: -- Standard check of p_commit
368: IF FND_API.to_Boolean(p_commit) THEN
369: COMMIT;
370: END IF;
371:
372: FND_MSG_PUB.Count_And_Get
373: (p_count => x_msg_count
374: , p_data => x_msg_data);
375:
376: EXCEPTION
377: WHEN FND_API.G_EXC_ERROR THEN
378: --
379: ROLLBACK TO Enforce_SKU_CountEntry_Match;
380:
381: --
378: --
379: ROLLBACK TO Enforce_SKU_CountEntry_Match;
380:
381: --
382: x_return_status := FND_API.G_RET_STS_ERROR;
383: --
384: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
385: , p_data => x_msg_data);
386: --
383: --
384: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
385: , p_data => x_msg_data);
386: --
387: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
388: --
389: ROLLBACK TO Enforce_SKU_CountEntry_Match;
390: --
391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
388: --
389: ROLLBACK TO Enforce_SKU_CountEntry_Match;
390: --
391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
392: x_errorcode := -1;
393: --
394: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
395: , p_data => x_msg_data);
397: WHEN OTHERS THEN
398: --
399: ROLLBACK TO Enforce_SKU_CountEntry_Match;
400: --
401: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
402: x_errorcode := -1;
403: --
404: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
405: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
412:
413:
414: PROCEDURE Initial_Insert
415: (p_api_version IN NUMBER,
416: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
418: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
419: x_return_status OUT NOCOPY VARCHAR2 ,
420: x_errorcode OUT NOCOPY NUMBER,
413:
414: PROCEDURE Initial_Insert
415: (p_api_version IN NUMBER,
416: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
418: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
419: x_return_status OUT NOCOPY VARCHAR2 ,
420: x_errorcode OUT NOCOPY NUMBER,
421: x_msg_count OUT NOCOPY NUMBER ,
414: PROCEDURE Initial_Insert
415: (p_api_version IN NUMBER,
416: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
418: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
419: x_return_status OUT NOCOPY VARCHAR2 ,
420: x_errorcode OUT NOCOPY NUMBER,
421: x_msg_count OUT NOCOPY NUMBER ,
422: x_msg_data OUT NOCOPY VARCHAR2 ,
430: -- Parameters:
431: -- IN : p_api_version IN NUMBER (required)
432: -- API Version of this procedure
433: -- p_init_msg_level IN VARCHAR2 (optional)
434: -- DEFAULT = FND_API.G_FALSE,
435: -- p_commit IN VARCHAR2 (optional)
436: -- DEFAULT = FND_API.G_FALSE,
437: -- p_validation_level IN NUMBER (optional)
438: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
432: -- API Version of this procedure
433: -- p_init_msg_level IN VARCHAR2 (optional)
434: -- DEFAULT = FND_API.G_FALSE,
435: -- p_commit IN VARCHAR2 (optional)
436: -- DEFAULT = FND_API.G_FALSE,
437: -- p_validation_level IN NUMBER (optional)
438: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
439: -- OUT : X_return_status OUT NUMBER
440: -- Result of all the operations
434: -- DEFAULT = FND_API.G_FALSE,
435: -- p_commit IN VARCHAR2 (optional)
436: -- DEFAULT = FND_API.G_FALSE,
437: -- p_validation_level IN NUMBER (optional)
438: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
439: -- OUT : X_return_status OUT NUMBER
440: -- Result of all the operations
441: -- x_msg_count OUT NUMBER,
442: -- x_msg_data OUT VARCHAR2,
475:
476: SAVEPOINT Initial_Insert;
477: --
478: -- Standard Call to check for call compatibility
479: IF NOT FND_API.Compatible_API_Call(l_api_version
480: , p_api_version
481: , l_api_name
482: , G_PKG_NAME) THEN
483: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
479: IF NOT FND_API.Compatible_API_Call(l_api_version
480: , p_api_version
481: , l_api_name
482: , G_PKG_NAME) THEN
483: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
484: END IF;
485:
486: --
487: -- Initialize message list if p_init_msg_list is set to true
484: END IF;
485:
486: --
487: -- Initialize message list if p_init_msg_list is set to true
488: IF FND_API.to_Boolean(p_init_msg_list) THEN
489: FND_MSG_PUB.initialize;
490: END IF;
491:
492: -- Initialize API return status to success
489: FND_MSG_PUB.initialize;
490: END IF;
491:
492: -- Initialize API return status to success
493: x_return_status := FND_API.G_RET_STS_SUCCESS;
494: x_errorcode := 0;
495: --
496: -- API body
497: --
510:
511: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_ROW_LOCKED');
512: FND_MSG_PUB.Add;
513: x_errorcode := 200;
514: RAISE FND_API.G_EXC_ERROR;
515:
516: end if;
517:
518: if (c_rec.delete_flag = 1) then
518: if (c_rec.delete_flag = 1) then
519: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_MARKED_DELETED');
520: FND_MSG_PUB.Add;
521: x_errorcode := 204;
522: RAISE FND_API.G_EXC_ERROR;
523: end if;
524:
525: if (c_rec.status_flag in (0, 1)) then
526: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_STATUS_DONE');
525: if (c_rec.status_flag in (0, 1)) then
526: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_STATUS_DONE');
527: FND_MSG_PUB.Add;
528: x_errorcode := 206;
529: RAISE FND_API.G_EXC_ERROR;
530: end if;
531:
532: if (nvl(c_rec.process_flag,1) = 2) then
533: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_NOT_READY');
532: if (nvl(c_rec.process_flag,1) = 2) then
533: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_NOT_READY');
534: FND_MSG_PUB.Add;
535: x_errorcode := 207;
536: RAISE FND_API.G_EXC_ERROR;
537: end if;
538:
539: -- if interface record is already linked to mtl_cycle_count_entries
540: if (c_rec.cycle_count_entry_id is not null) then
544: x_iface_rec.lock_flag := 1;
545:
546: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
547:
548: if (x_return_status <> fnd_api.g_ret_sts_success) then
549: raise fnd_api.g_exc_unexpected_error;
550: end if;
551:
552: -- synchronize interface record in memory with interface record
545:
546: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
547:
548: if (x_return_status <> fnd_api.g_ret_sts_success) then
549: raise fnd_api.g_exc_unexpected_error;
550: end if;
551:
552: -- synchronize interface record in memory with interface record
553: -- in the table
576: x_errorcode => x_errorcode,
577: x_return_status => x_return_status,
578: x_iface_rec => x_iface_rec);
579:
580: if (x_return_status <> fnd_api.g_ret_sts_success) then
581: -- only raise exception and rollback if record cannot be
582: -- inserted into the interface (errors > 200)
583: if (x_errorcode < 0) then
584: raise fnd_api.g_exc_unexpected_error;
580: if (x_return_status <> fnd_api.g_ret_sts_success) then
581: -- only raise exception and rollback if record cannot be
582: -- inserted into the interface (errors > 200)
583: if (x_errorcode < 0) then
584: raise fnd_api.g_exc_unexpected_error;
585: elsif (x_errorcode >= 200) then
586: raise fnd_api.g_exc_error;
587: else
588: x_errorcode := 0;
582: -- inserted into the interface (errors > 200)
583: if (x_errorcode < 0) then
584: raise fnd_api.g_exc_unexpected_error;
585: elsif (x_errorcode >= 200) then
586: raise fnd_api.g_exc_error;
587: else
588: x_errorcode := 0;
589: x_return_status := fnd_api.g_ret_sts_success;
590: end if;
585: elsif (x_errorcode >= 200) then
586: raise fnd_api.g_exc_error;
587: else
588: x_errorcode := 0;
589: x_return_status := fnd_api.g_ret_sts_success;
590: end if;
591: end if;
592:
593:
598: x_iface_rec.cycle_count_header_id := mtl_cceoi_var_pvt.g_cc_header_id;
599:
600: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
601:
602: if (x_return_status <> fnd_api.g_ret_sts_success) then
603: raise fnd_api.g_exc_unexpected_error;
604: end if;
605: end if;
606:
599:
600: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
601:
602: if (x_return_status <> fnd_api.g_ret_sts_success) then
603: raise fnd_api.g_exc_unexpected_error;
604: end if;
605: end if;
606:
607:
627: x_errorcode => x_errorcode,
628: x_return_status => x_return_status,
629: x_iface_rec => x_iface_rec);
630:
631: if (x_return_status <> fnd_api.g_ret_sts_success) then
632: -- only raise exception and rollback if record cannot be
633: -- inserted into the interface (errors > 200)
634: -- otherwise just insert record in the interface and let
635: -- errors show up during processing
633: -- inserted into the interface (errors > 200)
634: -- otherwise just insert record in the interface and let
635: -- errors show up during processing
636: if (x_errorcode < 0) then
637: raise fnd_api.g_exc_unexpected_error;
638: elsif (x_errorcode >= 200) then
639: raise fnd_api.g_exc_error;
640: else
641: x_errorcode := 0;
635: -- errors show up during processing
636: if (x_errorcode < 0) then
637: raise fnd_api.g_exc_unexpected_error;
638: elsif (x_errorcode >= 200) then
639: raise fnd_api.g_exc_error;
640: else
641: x_errorcode := 0;
642: x_return_status := fnd_api.g_ret_sts_success;
643: end if;
638: elsif (x_errorcode >= 200) then
639: raise fnd_api.g_exc_error;
640: else
641: x_errorcode := 0;
642: x_return_status := fnd_api.g_ret_sts_success;
643: end if;
644: end if;
645:
646: -- mark record to be initially valid, unprocessed, no errors, locked
658: x_iface_rec.lock_flag := 1;
659:
660: mtl_cceoi_process_pvt.Insert_CCIEntry(x_iface_rec, x_return_status);
661:
662: if (x_return_status <> fnd_api.g_ret_sts_success) then
663: -- some exotic error or one of the non-null columns is missing
664: raise fnd_api.g_exc_unexpected_error;
665: end if;
666:
660: mtl_cceoi_process_pvt.Insert_CCIEntry(x_iface_rec, x_return_status);
661:
662: if (x_return_status <> fnd_api.g_ret_sts_success) then
663: -- some exotic error or one of the non-null columns is missing
664: raise fnd_api.g_exc_unexpected_error;
665: end if;
666:
667: else
668: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_INVALID_CEI_ID');
667: else
668: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_INVALID_CEI_ID');
669: FND_MSG_PUB.Add;
670: x_errorcode := 205;
671: raise fnd_api.g_exc_error;
672: end if;
673: end if;
674:
675: --
678: -- END of API body
679: --
680:
681: -- Standard check of p_commit
682: IF FND_API.to_Boolean(p_commit) THEN
683: COMMIT;
684: END IF;
685:
686: FND_MSG_PUB.Count_And_Get
687: (p_count => x_msg_count
688: , p_data => x_msg_data);
689:
690: EXCEPTION
691: WHEN FND_API.G_EXC_ERROR THEN
692: --
693: ROLLBACK TO Initial_Insert;
694:
695: --
692: --
693: ROLLBACK TO Initial_Insert;
694:
695: --
696: x_return_status := FND_API.G_RET_STS_ERROR;
697: --
698: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
699: , p_data => x_msg_data);
700: --
697: --
698: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
699: , p_data => x_msg_data);
700: --
701: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
702: --
703: ROLLBACK TO Initial_Insert;
704: --
705: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
701: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
702: --
703: ROLLBACK TO Initial_Insert;
704: --
705: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
706: x_errorcode := -1;
707: --
708: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
709: , p_data => x_msg_data);
711: WHEN OTHERS THEN
712: --
713: ROLLBACK TO Initial_Insert;
714: --
715: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
716: x_errorcode := -1;
717: --
718: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
719: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
728: --
729: -- Online processing for one record
730: PROCEDURE Import_CountRequest(
731: p_api_version IN NUMBER ,
732: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
733: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
734: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
735: X_return_status OUT NOCOPY VARCHAR2 ,
736: x_errorcode OUT NOCOPY NUMBER,
729: -- Online processing for one record
730: PROCEDURE Import_CountRequest(
731: p_api_version IN NUMBER ,
732: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
733: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
734: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
735: X_return_status OUT NOCOPY VARCHAR2 ,
736: x_errorcode OUT NOCOPY NUMBER,
737: x_msg_count OUT NOCOPY NUMBER ,
730: PROCEDURE Import_CountRequest(
731: p_api_version IN NUMBER ,
732: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
733: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
734: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
735: X_return_status OUT NOCOPY VARCHAR2 ,
736: x_errorcode OUT NOCOPY NUMBER,
737: x_msg_count OUT NOCOPY NUMBER ,
738: x_msg_data OUT NOCOPY VARCHAR2 ,
753: -- Parameters:
754: -- IN : p_api_version IN NUMBER (required)
755: -- API Version of this procedure
756: -- p_init_msg_level IN VARCHAR2 (optional)
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_commit IN VARCHAR2 (optional)
759: -- DEFAULT = FND_API.G_FALSE,
760: -- p_validation_level IN NUMBER (optional)
761: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
755: -- API Version of this procedure
756: -- p_init_msg_level IN VARCHAR2 (optional)
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_commit IN VARCHAR2 (optional)
759: -- DEFAULT = FND_API.G_FALSE,
760: -- p_validation_level IN NUMBER (optional)
761: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
762: -- p_interface_rec IN CCEOI_Rec_Type (required)
763: -- complete interface RECORD
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_commit IN VARCHAR2 (optional)
759: -- DEFAULT = FND_API.G_FALSE,
760: -- p_validation_level IN NUMBER (optional)
761: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
762: -- p_interface_rec IN CCEOI_Rec_Type (required)
763: -- complete interface RECORD
764: -- OUT : X_return_status OUT NUMBER
765: -- Result of all the operations
783: BEGIN
784: -- Standard start of API savepoint
785: SAVEPOINT Import_CountRequest_PUB;
786: -- Standard Call to check for call compatibility
787: IF NOT FND_API.Compatible_API_Call(l_api_version
788: , p_api_version
789: , l_api_name
790: , G_PKG_NAME) THEN
791: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
787: IF NOT FND_API.Compatible_API_Call(l_api_version
788: , p_api_version
789: , l_api_name
790: , G_PKG_NAME) THEN
791: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
792: END IF;
793: --
794: -- Initialize message list if p_init_msg_list is set to true
795: IF FND_API.to_Boolean(p_init_msg_list) THEN
791: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
792: END IF;
793: --
794: -- Initialize message list if p_init_msg_list is set to true
795: IF FND_API.to_Boolean(p_init_msg_list) THEN
796: FND_MSG_PUB.initialize;
797: END IF;
798: --
799: -- Initialisize API return status to access
796: FND_MSG_PUB.initialize;
797: END IF;
798: --
799: -- Initialisize API return status to access
800: x_return_status := FND_API.G_RET_STS_SUCCESS;
801: --
802: -- API body
803: IF (l_debug = 1) THEN
804: mdebug('Process: Import_CountRequest');
818: mdebug('invalid cost group id or cost group name');
819: END IF;
820: FND_MESSAGE.SET_NAME('INV', 'INV_INT_CSTEXT');
821: FND_MSG_PUB.ADD;
822: RAISE FND_API.G_EXC_ERROR;
823: END IF;
824: END IF;
825:
826: --Set Cost Group ID Global variable
851: x_msg_data => x_msg_data,
852: x_iface_rec => L_interface_rec );
853: end if;
854:
855: if (x_return_status <> fnd_api.g_ret_sts_success) then
856: IF (l_debug = 1) THEN
857: mdebug('initial_insert errocode='||x_errorcode);
858: END IF;
859: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
855: if (x_return_status <> fnd_api.g_ret_sts_success) then
856: IF (l_debug = 1) THEN
857: mdebug('initial_insert errocode='||x_errorcode);
858: END IF;
859: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
860: raise FND_API.g_exc_error;
861: else
862: raise fnd_api.g_exc_unexpected_error;
863: end if;
856: IF (l_debug = 1) THEN
857: mdebug('initial_insert errocode='||x_errorcode);
858: END IF;
859: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
860: raise FND_API.g_exc_error;
861: else
862: raise fnd_api.g_exc_unexpected_error;
863: end if;
864: end if;
858: END IF;
859: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
860: raise FND_API.g_exc_error;
861: else
862: raise fnd_api.g_exc_unexpected_error;
863: end if;
864: end if;
865:
866:
868: IF
869: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_VALIDATE THEN
870: MTL_CCEOI_ACTION_PVT.Validate_CountRequest(
871: p_api_version => 0.9
872: , p_init_msg_list => FND_API.G_TRUE
873: , x_return_status => x_return_status
874: , x_msg_count => x_msg_count
875: , x_msg_data => x_msg_data
876: , p_interface_rec => L_interface_rec);
877: ELSIF
878: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_CREATE THEN
879: MTL_CCEOI_ACTION_PVT.Create_CountRequest(
880: p_api_version => 0.9
881: , p_init_msg_list => FND_API.G_TRUE
882: , x_return_status => x_return_status
883: , x_msg_count => x_msg_count
884: , x_msg_data => x_msg_data
885: , p_interface_rec => L_interface_rec);
886: ELSIF
887: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_VALSIM THEN
888: MTL_CCEOI_ACTION_PVT.ValSim_CountRequest(
889: p_api_version => 0.9
890: , p_init_msg_list => FND_API.G_TRUE
891: , x_return_status => x_return_status
892: , x_msg_count => x_msg_count
893: , x_msg_data => x_msg_data
894: , p_interface_rec => L_interface_rec);
896: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_PROCESS THEN
897:
898: MTL_CCEOI_ACTION_PVT.Process_CountRequest(
899: p_api_version => 0.9
900: , p_init_msg_list => FND_API.G_TRUE
901: , x_return_status => x_return_status
902: , x_msg_count => x_msg_count
903: , x_msg_data => x_msg_data
904: , p_interface_rec => L_interface_rec);
928: p_error_column_name => 'ACTION_CODE'
929: , p_error_table_name => 'MTL_CC_ENTRIES_INTERFACE_ID'
930: , p_message_name => 'INV_CCEOI_UNKNOWN_ACTION_CODE');
931:
932: x_return_status := FND_API.G_RET_STS_ERROR;
933:
934: END IF;
935:
936:
942: --
943: -- If the record exists in database and the record is processed successful
944: -- mark it for deletion, and unexport the record from MCCE
945: -- if necessary
946: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
947: -- if (mtl_cceoi_var_pvt.g_rec_in_system) then
948: -- it is unnecessary to mark it for deletion since
949: -- it will be deleted by purge if status_flag in (0,1)
950: /* MTL_CCEOI_PROCESS_PVT.Set_CCEOIFlags(
948: -- it is unnecessary to mark it for deletion since
949: -- it will be deleted by purge if status_flag in (0,1)
950: /* MTL_CCEOI_PROCESS_PVT.Set_CCEOIFlags(
951: p_api_version => 0.9
952: , p_init_msg_list => FND_API.G_TRUE
953: , x_return_status => x_return_status
954: , x_msg_count => x_msg_count
955: , x_msg_data => x_msg_data
956: , p_cc_entry_interface_id => MTL_CCEOI_VAR_PVT.G_CC_ENTRY_INTERFACE_ID,
956: , p_cc_entry_interface_id => MTL_CCEOI_VAR_PVT.G_CC_ENTRY_INTERFACE_ID,
957: --=>L_interface_rec.cc_entry_interface_id,
958: p_flags => '$1$$');
959:
960: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
961: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
962: END IF;
963: -- end if;
964: */
957: --=>L_interface_rec.cc_entry_interface_id,
958: p_flags => '$1$$');
959:
960: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
961: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
962: END IF;
963: -- end if;
964: */
965:
980: x_msg_count => x_msg_count,
981: p_cycle_count_entry_id => mtl_cceoi_var_pvt.G_CYCLE_COUNT_ENTRY_REC.CYCLE_COUNT_ENTRY_ID,
982: p_export_flag => null);
983:
984: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
985: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
986: END IF;
987:
988: end if;
981: p_cycle_count_entry_id => mtl_cceoi_var_pvt.G_CYCLE_COUNT_ENTRY_REC.CYCLE_COUNT_ENTRY_ID,
982: p_export_flag => null);
983:
984: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
985: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
986: END IF;
987:
988: end if;
989:
1011: Unlock_CCI_Row(
1012: l_interface_rec.cc_entry_interface_id,
1013: l_return_status);
1014:
1015: if (l_return_status <> fnd_api.g_ret_sts_success) then
1016: raise fnd_api.g_exc_unexpected_error;
1017: end if;
1018:
1019: -- use a different x_return_status
1012: l_interface_rec.cc_entry_interface_id,
1013: l_return_status);
1014:
1015: if (l_return_status <> fnd_api.g_ret_sts_success) then
1016: raise fnd_api.g_exc_unexpected_error;
1017: end if;
1018:
1019: -- use a different x_return_status
1020:
1022: x_interface_id := mtl_cceoi_var_pvt.g_cc_entry_interface_id;
1023: --
1024: -- END of API body
1025: -- Standard check of p_commit
1026: IF FND_API.to_Boolean(p_commit) THEN
1027: COMMIT;
1028: END IF;
1029: -- Standard call to get message count and if count is 1, get message info
1030: FND_MSG_PUB.Count_And_Get
1032: , p_data => x_msg_data);
1033:
1034:
1035: EXCEPTION
1036: WHEN FND_API.G_EXC_ERROR THEN
1037: ROLLBACK TO Import_CountRequest_PUB;
1038: x_return_status := FND_API.G_RET_STS_ERROR;
1039: IF (l_debug = 1) THEN
1040: mdebug('Exception: ' || sqlerrm);
1034:
1035: EXCEPTION
1036: WHEN FND_API.G_EXC_ERROR THEN
1037: ROLLBACK TO Import_CountRequest_PUB;
1038: x_return_status := FND_API.G_RET_STS_ERROR;
1039: IF (l_debug = 1) THEN
1040: mdebug('Exception: ' || sqlerrm);
1041: END IF;
1042: FND_MSG_PUB.Count_And_Get(
1043: p_count => x_msg_count
1044: , p_data => x_msg_data);
1045:
1046:
1047: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1048: ROLLBACK TO Import_CountRequest_PUB;
1049: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1050: x_errorcode := -1;
1051: IF (l_debug = 1) THEN
1045:
1046:
1047: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1048: ROLLBACK TO Import_CountRequest_PUB;
1049: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1050: x_errorcode := -1;
1051: IF (l_debug = 1) THEN
1052: mdebug('Unexp-Exception: ' || sqlerrm);
1053: END IF;
1057:
1058:
1059: WHEN OTHERS THEN
1060: ROLLBACK TO Import_CountRequest_PUB;
1061: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1062:
1063: IF (l_debug = 1) THEN
1064: mdebug('Other-Exception: ' || sqlerrm);
1065: END IF;
1085:
1086: PROCEDURE Process_LPN_CountRequest
1087: (
1088: p_api_version IN NUMBER
1089: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1090: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1091: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1092: , x_return_status OUT NOCOPY VARCHAR2
1093: , x_errorcode OUT NOCOPY NUMBER
1086: PROCEDURE Process_LPN_CountRequest
1087: (
1088: p_api_version IN NUMBER
1089: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1090: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1091: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1092: , x_return_status OUT NOCOPY VARCHAR2
1093: , x_errorcode OUT NOCOPY NUMBER
1094: , x_msg_count OUT NOCOPY NUMBER
1087: (
1088: p_api_version IN NUMBER
1089: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1090: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1091: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1092: , x_return_status OUT NOCOPY VARCHAR2
1093: , x_errorcode OUT NOCOPY NUMBER
1094: , x_msg_count OUT NOCOPY NUMBER
1095: , x_msg_data OUT NOCOPY VARCHAR2
1128: -- Standard start of API savepoint
1129: SAVEPOINT Process_LPN_CountRequest;
1130:
1131: -- Standard Call to check for call compatibility
1132: IF NOT FND_API.Compatible_API_Call(l_api_version
1133: , p_api_version
1134: , l_api_name
1135: , G_PKG_NAME) THEN
1136: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1132: IF NOT FND_API.Compatible_API_Call(l_api_version
1133: , p_api_version
1134: , l_api_name
1135: , G_PKG_NAME) THEN
1136: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1137: END IF;
1138:
1139: -- Initialize message list if p_init_msg_list is set to true
1140: IF FND_API.to_Boolean(p_init_msg_list) THEN
1136: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1137: END IF;
1138:
1139: -- Initialize message list if p_init_msg_list is set to true
1140: IF FND_API.to_Boolean(p_init_msg_list) THEN
1141: FND_MSG_PUB.initialize;
1142: END IF;
1143: --
1144: -- Initialisize API return status to access
1141: FND_MSG_PUB.initialize;
1142: END IF;
1143: --
1144: -- Initialisize API return status to access
1145: x_return_status := FND_API.G_RET_STS_SUCCESS;
1146: x_errorcode := 0;
1147:
1148: IF (l_debug = 1) THEN
1149: mdebug('Process: Process_LPN_CountRequest ' || to_char(p_interface_rec.cycle_count_header_id));
1154: IF (l_debug = 1) THEN
1155: mdebug('wms not installed');
1156: END IF;
1157: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_NOT_INSTALLED_ERROR');
1158: RAISE fnd_api.g_exc_error;
1159: END IF;
1160:
1161: --No validation for performance reasons
1162: -- Except for header id and lpn id
1169: x_errorcode => x_errorcode,
1170: p_cycle_count_header_id => p_interface_rec.cycle_count_header_id,
1171: p_cycle_count_header_name => p_interface_rec.cycle_count_header_name
1172: );
1173: IF (x_return_status <> fnd_api.g_ret_sts_success) then
1174: IF (l_debug = 1) THEN
1175: mdebug('invalid header id');
1176: END IF;
1177: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_INVALID_HEADER');
1174: IF (l_debug = 1) THEN
1175: mdebug('invalid header id');
1176: END IF;
1177: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_INVALID_HEADER');
1178: raise fnd_api.g_exc_error;
1179: end IF;
1180:
1181: -- Validate LPN ID and LPN
1182: IF p_interface_rec.parent_lpn_id IS NOT NULL OR p_interface_rec.parent_lpn IS NOT NULL THEN
1213: IF p_interface_rec.parent_lpn_id <> p_interface_rec.outermost_lpn_id THEN
1214: -- error out, this case not supported
1215: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_CC_NESTED_LPN_DISCR');
1216: FND_MSG_PUB.ADD;
1217: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1218: ELSE
1219: -- set lpn discrepancy flag to 1 (yes)
1220: l_lpn_discrepancy := 1;
1221: -- change subinventory and locator
1242: AND l_item_rec.parent_lpn_id IS NULL) THEN -- record is not a container
1243:
1244: Import_CountRequest(
1245: p_api_version => 0.9,
1246: p_init_msg_list => FND_API.G_TRUE,
1247: p_commit => FND_API.G_TRUE,
1248: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1249: X_return_status => x_return_status,
1250: x_errorcode => x_errorcode,
1243:
1244: Import_CountRequest(
1245: p_api_version => 0.9,
1246: p_init_msg_list => FND_API.G_TRUE,
1247: p_commit => FND_API.G_TRUE,
1248: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1249: X_return_status => x_return_status,
1250: x_errorcode => x_errorcode,
1251: x_msg_count => x_msg_count,
1244: Import_CountRequest(
1245: p_api_version => 0.9,
1246: p_init_msg_list => FND_API.G_TRUE,
1247: p_commit => FND_API.G_TRUE,
1248: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1249: X_return_status => x_return_status,
1250: x_errorcode => x_errorcode,
1251: x_msg_count => x_msg_count,
1252: x_msg_data => x_msg_data,
1251: x_msg_count => x_msg_count,
1252: x_msg_data => x_msg_data,
1253: p_interface_rec => l_item_rec,
1254: x_interface_id => l_temp_int_id);
1255: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1256: IF (l_debug = 1) THEN
1257: mdebug('Import count request error');
1258: END IF;
1259: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1256: IF (l_debug = 1) THEN
1257: mdebug('Import count request error');
1258: END IF;
1259: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1260: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1261: END IF;
1262:
1263: -- insert interface id into table
1264: x_interface_id_list(l_counter) := l_temp_int_id;
1268: END IF;
1269: -- Record is a container, thus needs to be exploded
1270: WMS_CONTAINER_PUB.Explode_LPN(
1271: p_api_version => 1.0,
1272: p_init_msg_list => fnd_api.g_true,
1273: p_commit => fnd_api.g_true,
1274: x_return_status => x_return_status,
1275: x_msg_count => x_msg_count,
1276: x_msg_data => x_msg_data,
1269: -- Record is a container, thus needs to be exploded
1270: WMS_CONTAINER_PUB.Explode_LPN(
1271: p_api_version => 1.0,
1272: p_init_msg_list => fnd_api.g_true,
1273: p_commit => fnd_api.g_true,
1274: x_return_status => x_return_status,
1275: x_msg_count => x_msg_count,
1276: x_msg_data => x_msg_data,
1277: p_lpn_id => p_interface_rec.parent_lpn_id,
1275: x_msg_count => x_msg_count,
1276: x_msg_data => x_msg_data,
1277: p_lpn_id => p_interface_rec.parent_lpn_id,
1278: x_content_tbl => l_expl_tbl);
1279: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1280: IF (l_debug = 1) THEN
1281: mdebug('lpn exlpoder error');
1282: END IF;
1283: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1280: IF (l_debug = 1) THEN
1281: mdebug('lpn exlpoder error');
1282: END IF;
1283: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1284: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1285: END IF;
1286: -- Start 8300310
1287: BEGIN
1288:
1451: mdebug('invalid parent lpn id or parent lpn');
1452: END IF;
1453: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_CONT_INVALID_LPN');
1454: FND_MSG_PUB.ADD;
1455: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1456: END IF;
1457:
1458: -- put new lpn in record
1459: l_item_rec.parent_lpn_id := l_lpn.lpn_id;
1489: MTL_CCEOI_VAR_PVT.G_LPN_ID := l_expl_tbl(v_index).parent_lpn_id;
1490:
1491: Import_CountRequest(
1492: p_api_version => 0.9,
1493: p_init_msg_list => FND_API.G_TRUE,
1494: p_commit => FND_API.G_TRUE,
1495: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1496: X_return_status => x_return_status,
1497: x_errorcode => x_errorcode,
1490:
1491: Import_CountRequest(
1492: p_api_version => 0.9,
1493: p_init_msg_list => FND_API.G_TRUE,
1494: p_commit => FND_API.G_TRUE,
1495: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1496: X_return_status => x_return_status,
1497: x_errorcode => x_errorcode,
1498: x_msg_count => x_msg_count,
1491: Import_CountRequest(
1492: p_api_version => 0.9,
1493: p_init_msg_list => FND_API.G_TRUE,
1494: p_commit => FND_API.G_TRUE,
1495: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1496: X_return_status => x_return_status,
1497: x_errorcode => x_errorcode,
1498: x_msg_count => x_msg_count,
1499: x_msg_data => x_msg_data,
1498: x_msg_count => x_msg_count,
1499: x_msg_data => x_msg_data,
1500: p_interface_rec => l_item_rec,
1501: x_interface_id => l_temp_int_id);
1502: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1503: IF (l_debug = 1) THEN
1504: mdebug('LPN Import count request error');
1505: END IF;
1506: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1503: IF (l_debug = 1) THEN
1504: mdebug('LPN Import count request error');
1505: END IF;
1506: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1507: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1508: END IF;
1509:
1510: -- insert interface id into table
1511: x_interface_id_list(l_counter) := l_temp_int_id;
1573:
1574: END IF;
1575:
1576: EXCEPTION
1577: WHEN FND_API.G_EXC_ERROR THEN
1578: ROLLBACK TO Process_LPN_CountRequest;
1579: x_return_status := FND_API.G_RET_STS_ERROR;
1580: IF (l_debug = 1) THEN
1581: mdebug('Exception: ' || sqlerrm);
1575:
1576: EXCEPTION
1577: WHEN FND_API.G_EXC_ERROR THEN
1578: ROLLBACK TO Process_LPN_CountRequest;
1579: x_return_status := FND_API.G_RET_STS_ERROR;
1580: IF (l_debug = 1) THEN
1581: mdebug('Exception: ' || sqlerrm);
1582: END IF;
1583: FND_MSG_PUB.Count_And_Get(
1584: p_count => x_msg_count
1585: , p_data => x_msg_data);
1586:
1587:
1588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1589: ROLLBACK TO Process_LPN_CountRequest;
1590: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1591: x_errorcode := -1;
1592: IF (l_debug = 1) THEN
1586:
1587:
1588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1589: ROLLBACK TO Process_LPN_CountRequest;
1590: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1591: x_errorcode := -1;
1592: IF (l_debug = 1) THEN
1593: mdebug('Unexp-Exception: ' || sqlerrm);
1594: END IF;
1597: , p_data => x_msg_data);
1598:
1599: WHEN e_Invalid_Inputs THEN
1600: ROLLBACK TO Process_LPN_CountRequest;
1601: x_return_status := FND_API.G_RET_STS_ERROR;
1602: FND_MSG_PUB.Count_And_Get
1603: ( p_count => x_msg_count,
1604: p_data => x_msg_data
1605: );
1605: );
1606:
1607: WHEN OTHERS THEN
1608: ROLLBACK TO Process_LPN_CountRequest;
1609: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1610: IF (l_debug = 1) THEN
1611: mdebug('Other-Exception: ' || sqlerrm);
1612: END IF;
1613: