38: counter := counter + 1;
39: end loop;
40:
41: if counter <> 1 then
42: raise fnd_api.g_exc_unexpected_error;
43: end if;
44:
45: return p_cei_id;
46: end;
48: PROCEDURE Unlock_CCI_Row(p_iface_id IN NUMBER, x_return_status OUT NOCOPY VARCHAR2)
49: IS
50: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
51: BEGIN
52: x_return_status := fnd_api.g_ret_sts_success;
53:
54: update mtl_cc_entries_interface
55: set
56: lock_flag = 2
65: cc_entry_interface_id = p_iface_id;
66:
67: EXCEPTION
68: WHEN OTHERS THEN
69: x_return_status := fnd_api.g_ret_sts_unexp_error;
70: END;
71:
72:
73: -- derives SKU and CCE data from cycle_count_entry row into
210: -- to be exported and interface record fields that can be derived from
211: -- cycle_count_entry will be overwritten by data from there.
212: PROCEDURE Enforce_SKU_CountEntry_Match
213: (p_api_version IN NUMBER,
214: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
215: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
217: x_return_status OUT NOCOPY VARCHAR2 ,
218: x_errorcode OUT NOCOPY NUMBER,
211: -- cycle_count_entry will be overwritten by data from there.
212: PROCEDURE Enforce_SKU_CountEntry_Match
213: (p_api_version IN NUMBER,
214: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
215: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
217: x_return_status OUT NOCOPY VARCHAR2 ,
218: x_errorcode OUT NOCOPY NUMBER,
219: x_msg_count OUT NOCOPY NUMBER ,
212: PROCEDURE Enforce_SKU_CountEntry_Match
213: (p_api_version IN NUMBER,
214: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
215: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
216: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
217: x_return_status OUT NOCOPY VARCHAR2 ,
218: x_errorcode OUT NOCOPY NUMBER,
219: x_msg_count OUT NOCOPY NUMBER ,
220: x_msg_data OUT NOCOPY VARCHAR2 ,
235: BEGIN
236: SAVEPOINT Enforce_SKU_CountEntry_Match;
237: --
238: -- Standard Call to check for call compatibility
239: IF NOT FND_API.Compatible_API_Call(l_api_version
240: , p_api_version
241: , l_api_name
242: , G_PKG_NAME) THEN
243: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
239: IF NOT FND_API.Compatible_API_Call(l_api_version
240: , p_api_version
241: , l_api_name
242: , G_PKG_NAME) THEN
243: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
244: END IF;
245:
246: --
247: -- Initialize message list if p_init_msg_list is set to true
244: END IF;
245:
246: --
247: -- Initialize message list if p_init_msg_list is set to true
248: IF FND_API.to_Boolean(p_init_msg_list) THEN
249: FND_MSG_PUB.initialize;
250: END IF;
251:
252: -- Initialize API return status to success
249: FND_MSG_PUB.initialize;
250: END IF;
251:
252: -- Initialize API return status to success
253: x_return_status := FND_API.G_RET_STS_SUCCESS;
254: x_errorcode := 0;
255: --
256: -- API body
257: --
268: p_cycle_count_header_id => x_iface_rec.cycle_count_header_id,
269: p_cycle_count_header_name => x_iface_rec.cycle_count_header_name
270: );
271:
272: if (x_return_status <> fnd_api.g_ret_sts_success) then
273: raise fnd_api.g_exc_error;
274: end if;
275:
276: mtl_cceoi_process_pvt.Validate_CountListSeq
269: p_cycle_count_header_name => x_iface_rec.cycle_count_header_name
270: );
271:
272: if (x_return_status <> fnd_api.g_ret_sts_success) then
273: raise fnd_api.g_exc_error;
274: end if;
275:
276: mtl_cceoi_process_pvt.Validate_CountListSeq
277: (
285: p_count_list_sequence => x_iface_rec.count_list_sequence,
286: p_organization_id =>
287: MTL_CCEOI_VAR_PVT.G_CYCLE_COUNT_HEADER_REC.organization_id);
288:
289: if (x_return_status <> fnd_api.g_ret_sts_success) then
290: raise fnd_api.g_exc_error;
291: end if;
292:
293: -- if no record found then stop verification, there is no record
286: p_organization_id =>
287: MTL_CCEOI_VAR_PVT.G_CYCLE_COUNT_HEADER_REC.organization_id);
288:
289: if (x_return_status <> fnd_api.g_ret_sts_success) then
290: raise fnd_api.g_exc_error;
291: end if;
292:
293: -- if no record found then stop verification, there is no record
294: -- that we can lock
312: END IF;
313: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_ENTRY_EXPORTED');
314: FND_MSG_PUB.Add;
315: x_errorcode := 201;
316: RAISE FND_API.G_EXC_ERROR;
317: end if;
318:
319:
320: if (not (c_rec.entry_status_code in (1,3))) then
320: if (not (c_rec.entry_status_code in (1,3))) then
321: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_ENTRY_STATUS_NA');
322: FND_MSG_PUB.Add;
323: x_errorcode := 202;
324: RAISE FND_API.G_EXC_ERROR;
325: end if;
326:
327: -- TODO: print warning about deriving stuff
328:
339: x_return_status => x_return_status,
340: p_cycle_count_entry_id => x_iface_rec.cycle_count_entry_id,
341: p_export_flag => 1);
342:
343: if (x_return_status <> fnd_api.g_ret_sts_success) then
344: raise fnd_api.g_exc_unexpected_error;
345: end if;
346:
347: end if;
340: p_cycle_count_entry_id => x_iface_rec.cycle_count_entry_id,
341: p_export_flag => 1);
342:
343: if (x_return_status <> fnd_api.g_ret_sts_success) then
344: raise fnd_api.g_exc_unexpected_error;
345: end if;
346:
347: end if;
348:
354: if (counter = 0) then
355: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_NO_CCE_WITH_CCEID');
356: FND_MSG_PUB.Add;
357: x_errorcode := 203;
358: raise fnd_api.g_exc_error;
359: end if;
360:
361:
362: --
363: -- END of API body
364: --
365:
366: -- Standard check of p_commit
367: IF FND_API.to_Boolean(p_commit) THEN
368: COMMIT;
369: END IF;
370:
371: FND_MSG_PUB.Count_And_Get
372: (p_count => x_msg_count
373: , p_data => x_msg_data);
374:
375: EXCEPTION
376: WHEN FND_API.G_EXC_ERROR THEN
377: --
378: ROLLBACK TO Enforce_SKU_CountEntry_Match;
379:
380: --
377: --
378: ROLLBACK TO Enforce_SKU_CountEntry_Match;
379:
380: --
381: x_return_status := FND_API.G_RET_STS_ERROR;
382: --
383: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
384: , p_data => x_msg_data);
385: --
382: --
383: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
384: , p_data => x_msg_data);
385: --
386: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
387: --
388: ROLLBACK TO Enforce_SKU_CountEntry_Match;
389: --
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
386: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
387: --
388: ROLLBACK TO Enforce_SKU_CountEntry_Match;
389: --
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
391: x_errorcode := -1;
392: --
393: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
394: , p_data => x_msg_data);
396: WHEN OTHERS THEN
397: --
398: ROLLBACK TO Enforce_SKU_CountEntry_Match;
399: --
400: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
401: x_errorcode := -1;
402: --
403: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
404: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
411:
412:
413: PROCEDURE Initial_Insert
414: (p_api_version IN NUMBER,
415: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
416: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
418: x_return_status OUT NOCOPY VARCHAR2 ,
419: x_errorcode OUT NOCOPY NUMBER,
412:
413: PROCEDURE Initial_Insert
414: (p_api_version IN NUMBER,
415: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
416: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
418: x_return_status OUT NOCOPY VARCHAR2 ,
419: x_errorcode OUT NOCOPY NUMBER,
420: x_msg_count OUT NOCOPY NUMBER ,
413: PROCEDURE Initial_Insert
414: (p_api_version IN NUMBER,
415: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
416: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
417: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
418: x_return_status OUT NOCOPY VARCHAR2 ,
419: x_errorcode OUT NOCOPY NUMBER,
420: x_msg_count OUT NOCOPY NUMBER ,
421: x_msg_data OUT NOCOPY VARCHAR2 ,
429: -- Parameters:
430: -- IN : p_api_version IN NUMBER (required)
431: -- API Version of this procedure
432: -- p_init_msg_level IN VARCHAR2 (optional)
433: -- DEFAULT = FND_API.G_FALSE,
434: -- p_commit IN VARCHAR2 (optional)
435: -- DEFAULT = FND_API.G_FALSE,
436: -- p_validation_level IN NUMBER (optional)
437: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
431: -- API Version of this procedure
432: -- p_init_msg_level IN VARCHAR2 (optional)
433: -- DEFAULT = FND_API.G_FALSE,
434: -- p_commit IN VARCHAR2 (optional)
435: -- DEFAULT = FND_API.G_FALSE,
436: -- p_validation_level IN NUMBER (optional)
437: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
438: -- OUT : X_return_status OUT NUMBER
439: -- Result of all the operations
433: -- DEFAULT = FND_API.G_FALSE,
434: -- p_commit IN VARCHAR2 (optional)
435: -- DEFAULT = FND_API.G_FALSE,
436: -- p_validation_level IN NUMBER (optional)
437: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
438: -- OUT : X_return_status OUT NUMBER
439: -- Result of all the operations
440: -- x_msg_count OUT NUMBER,
441: -- x_msg_data OUT VARCHAR2,
474:
475: SAVEPOINT Initial_Insert;
476: --
477: -- Standard Call to check for call compatibility
478: IF NOT FND_API.Compatible_API_Call(l_api_version
479: , p_api_version
480: , l_api_name
481: , G_PKG_NAME) THEN
482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
478: IF NOT FND_API.Compatible_API_Call(l_api_version
479: , p_api_version
480: , l_api_name
481: , G_PKG_NAME) THEN
482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
483: END IF;
484:
485: --
486: -- Initialize message list if p_init_msg_list is set to true
483: END IF;
484:
485: --
486: -- Initialize message list if p_init_msg_list is set to true
487: IF FND_API.to_Boolean(p_init_msg_list) THEN
488: FND_MSG_PUB.initialize;
489: END IF;
490:
491: -- Initialize API return status to success
488: FND_MSG_PUB.initialize;
489: END IF;
490:
491: -- Initialize API return status to success
492: x_return_status := FND_API.G_RET_STS_SUCCESS;
493: x_errorcode := 0;
494: --
495: -- API body
496: --
509:
510: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_ROW_LOCKED');
511: FND_MSG_PUB.Add;
512: x_errorcode := 200;
513: RAISE FND_API.G_EXC_ERROR;
514:
515: end if;
516:
517: if (c_rec.delete_flag = 1) then
517: if (c_rec.delete_flag = 1) then
518: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_MARKED_DELETED');
519: FND_MSG_PUB.Add;
520: x_errorcode := 204;
521: RAISE FND_API.G_EXC_ERROR;
522: end if;
523:
524: if (c_rec.status_flag in (0, 1)) then
525: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_STATUS_DONE');
524: if (c_rec.status_flag in (0, 1)) then
525: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_STATUS_DONE');
526: FND_MSG_PUB.Add;
527: x_errorcode := 206;
528: RAISE FND_API.G_EXC_ERROR;
529: end if;
530:
531: if (nvl(c_rec.process_flag,1) = 2) then
532: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_NOT_READY');
531: if (nvl(c_rec.process_flag,1) = 2) then
532: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_IFACE_NOT_READY');
533: FND_MSG_PUB.Add;
534: x_errorcode := 207;
535: RAISE FND_API.G_EXC_ERROR;
536: end if;
537:
538: -- if interface record is already linked to mtl_cycle_count_entries
539: if (c_rec.cycle_count_entry_id is not null) then
543: x_iface_rec.lock_flag := 1;
544:
545: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
546:
547: if (x_return_status <> fnd_api.g_ret_sts_success) then
548: raise fnd_api.g_exc_unexpected_error;
549: end if;
550:
551: -- synchronize interface record in memory with interface record
544:
545: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
546:
547: if (x_return_status <> fnd_api.g_ret_sts_success) then
548: raise fnd_api.g_exc_unexpected_error;
549: end if;
550:
551: -- synchronize interface record in memory with interface record
552: -- in the table
574: x_errorcode => x_errorcode,
575: x_return_status => x_return_status,
576: x_iface_rec => x_iface_rec);
577:
578: if (x_return_status <> fnd_api.g_ret_sts_success) then
579: -- only raise exception and rollback if record cannot be
580: -- inserted into the interface (errors > 200)
581: if (x_errorcode < 0) then
582: raise fnd_api.g_exc_unexpected_error;
578: if (x_return_status <> fnd_api.g_ret_sts_success) then
579: -- only raise exception and rollback if record cannot be
580: -- inserted into the interface (errors > 200)
581: if (x_errorcode < 0) then
582: raise fnd_api.g_exc_unexpected_error;
583: elsif (x_errorcode >= 200) then
584: raise fnd_api.g_exc_error;
585: else
586: x_errorcode := 0;
580: -- inserted into the interface (errors > 200)
581: if (x_errorcode < 0) then
582: raise fnd_api.g_exc_unexpected_error;
583: elsif (x_errorcode >= 200) then
584: raise fnd_api.g_exc_error;
585: else
586: x_errorcode := 0;
587: x_return_status := fnd_api.g_ret_sts_success;
588: end if;
583: elsif (x_errorcode >= 200) then
584: raise fnd_api.g_exc_error;
585: else
586: x_errorcode := 0;
587: x_return_status := fnd_api.g_ret_sts_success;
588: end if;
589: end if;
590:
591:
596: x_iface_rec.cycle_count_header_id := mtl_cceoi_var_pvt.g_cc_header_id;
597:
598: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
599:
600: if (x_return_status <> fnd_api.g_ret_sts_success) then
601: raise fnd_api.g_exc_unexpected_error;
602: end if;
603: end if;
604:
597:
598: mtl_cceoi_process_pvt.Update_CCIEntry(x_iface_rec,x_return_status);
599:
600: if (x_return_status <> fnd_api.g_ret_sts_success) then
601: raise fnd_api.g_exc_unexpected_error;
602: end if;
603: end if;
604:
605:
625: x_errorcode => x_errorcode,
626: x_return_status => x_return_status,
627: x_iface_rec => x_iface_rec);
628:
629: if (x_return_status <> fnd_api.g_ret_sts_success) then
630: -- only raise exception and rollback if record cannot be
631: -- inserted into the interface (errors > 200)
632: -- otherwise just insert record in the interface and let
633: -- errors show up during processing
631: -- inserted into the interface (errors > 200)
632: -- otherwise just insert record in the interface and let
633: -- errors show up during processing
634: if (x_errorcode < 0) then
635: raise fnd_api.g_exc_unexpected_error;
636: elsif (x_errorcode >= 200) then
637: raise fnd_api.g_exc_error;
638: else
639: x_errorcode := 0;
633: -- errors show up during processing
634: if (x_errorcode < 0) then
635: raise fnd_api.g_exc_unexpected_error;
636: elsif (x_errorcode >= 200) then
637: raise fnd_api.g_exc_error;
638: else
639: x_errorcode := 0;
640: x_return_status := fnd_api.g_ret_sts_success;
641: end if;
636: elsif (x_errorcode >= 200) then
637: raise fnd_api.g_exc_error;
638: else
639: x_errorcode := 0;
640: x_return_status := fnd_api.g_ret_sts_success;
641: end if;
642: end if;
643:
644: -- mark record to be initially valid, unprocessed, no errors, locked
656: x_iface_rec.lock_flag := 1;
657:
658: mtl_cceoi_process_pvt.Insert_CCIEntry(x_iface_rec, x_return_status);
659:
660: if (x_return_status <> fnd_api.g_ret_sts_success) then
661: -- some exotic error or one of the non-null columns is missing
662: raise fnd_api.g_exc_unexpected_error;
663: end if;
664:
658: mtl_cceoi_process_pvt.Insert_CCIEntry(x_iface_rec, x_return_status);
659:
660: if (x_return_status <> fnd_api.g_ret_sts_success) then
661: -- some exotic error or one of the non-null columns is missing
662: raise fnd_api.g_exc_unexpected_error;
663: end if;
664:
665: else
666: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_INVALID_CEI_ID');
665: else
666: FND_MESSAGE.Set_Name('INV', 'INV_CCEOI_INVALID_CEI_ID');
667: FND_MSG_PUB.Add;
668: x_errorcode := 205;
669: raise fnd_api.g_exc_error;
670: end if;
671: end if;
672:
673: --
676: -- END of API body
677: --
678:
679: -- Standard check of p_commit
680: IF FND_API.to_Boolean(p_commit) THEN
681: COMMIT;
682: END IF;
683:
684: FND_MSG_PUB.Count_And_Get
685: (p_count => x_msg_count
686: , p_data => x_msg_data);
687:
688: EXCEPTION
689: WHEN FND_API.G_EXC_ERROR THEN
690: --
691: ROLLBACK TO Initial_Insert;
692:
693: --
690: --
691: ROLLBACK TO Initial_Insert;
692:
693: --
694: x_return_status := FND_API.G_RET_STS_ERROR;
695: --
696: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
697: , p_data => x_msg_data);
698: --
695: --
696: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
697: , p_data => x_msg_data);
698: --
699: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
700: --
701: ROLLBACK TO Initial_Insert;
702: --
703: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
699: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
700: --
701: ROLLBACK TO Initial_Insert;
702: --
703: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
704: x_errorcode := -1;
705: --
706: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
707: , p_data => x_msg_data);
709: WHEN OTHERS THEN
710: --
711: ROLLBACK TO Initial_Insert;
712: --
713: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
714: x_errorcode := -1;
715: --
716: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
717: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
726: --
727: -- Online processing for one record
728: PROCEDURE Import_CountRequest(
729: p_api_version IN NUMBER ,
730: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
731: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
732: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
733: X_return_status OUT NOCOPY VARCHAR2 ,
734: x_errorcode OUT NOCOPY NUMBER,
727: -- Online processing for one record
728: PROCEDURE Import_CountRequest(
729: p_api_version IN NUMBER ,
730: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
731: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
732: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
733: X_return_status OUT NOCOPY VARCHAR2 ,
734: x_errorcode OUT NOCOPY NUMBER,
735: x_msg_count OUT NOCOPY NUMBER ,
728: PROCEDURE Import_CountRequest(
729: p_api_version IN NUMBER ,
730: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
731: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
732: p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
733: X_return_status OUT NOCOPY VARCHAR2 ,
734: x_errorcode OUT NOCOPY NUMBER,
735: x_msg_count OUT NOCOPY NUMBER ,
736: x_msg_data OUT NOCOPY VARCHAR2 ,
751: -- Parameters:
752: -- IN : p_api_version IN NUMBER (required)
753: -- API Version of this procedure
754: -- p_init_msg_level IN VARCHAR2 (optional)
755: -- DEFAULT = FND_API.G_FALSE,
756: -- p_commit IN VARCHAR2 (optional)
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_validation_level IN NUMBER (optional)
759: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
753: -- API Version of this procedure
754: -- p_init_msg_level IN VARCHAR2 (optional)
755: -- DEFAULT = FND_API.G_FALSE,
756: -- p_commit IN VARCHAR2 (optional)
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_validation_level IN NUMBER (optional)
759: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
760: -- p_interface_rec IN CCEOI_Rec_Type (required)
761: -- complete interface RECORD
755: -- DEFAULT = FND_API.G_FALSE,
756: -- p_commit IN VARCHAR2 (optional)
757: -- DEFAULT = FND_API.G_FALSE,
758: -- p_validation_level IN NUMBER (optional)
759: -- DEFAULT = FND_API.G_VALID_LEVEL_FULL,
760: -- p_interface_rec IN CCEOI_Rec_Type (required)
761: -- complete interface RECORD
762: -- OUT : X_return_status OUT NUMBER
763: -- Result of all the operations
781: BEGIN
782: -- Standard start of API savepoint
783: SAVEPOINT Import_CountRequest_PUB;
784: -- Standard Call to check for call compatibility
785: IF NOT FND_API.Compatible_API_Call(l_api_version
786: , p_api_version
787: , l_api_name
788: , G_PKG_NAME) THEN
789: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
785: IF NOT FND_API.Compatible_API_Call(l_api_version
786: , p_api_version
787: , l_api_name
788: , G_PKG_NAME) THEN
789: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
790: END IF;
791: --
792: -- Initialize message list if p_init_msg_list is set to true
793: IF FND_API.to_Boolean(p_init_msg_list) THEN
789: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
790: END IF;
791: --
792: -- Initialize message list if p_init_msg_list is set to true
793: IF FND_API.to_Boolean(p_init_msg_list) THEN
794: FND_MSG_PUB.initialize;
795: END IF;
796: --
797: -- Initialisize API return status to access
794: FND_MSG_PUB.initialize;
795: END IF;
796: --
797: -- Initialisize API return status to access
798: x_return_status := FND_API.G_RET_STS_SUCCESS;
799: --
800: -- API body
801: IF (l_debug = 1) THEN
802: mdebug('Process: Import_CountRequest');
816: mdebug('invalid cost group id or cost group name');
817: END IF;
818: FND_MESSAGE.SET_NAME('INV', 'INV_INT_CSTEXT');
819: FND_MSG_PUB.ADD;
820: RAISE FND_API.G_EXC_ERROR;
821: END IF;
822: END IF;
823:
824: --Set Cost Group ID Global variable
849: x_msg_data => x_msg_data,
850: x_iface_rec => L_interface_rec );
851: end if;
852:
853: if (x_return_status <> fnd_api.g_ret_sts_success) then
854: IF (l_debug = 1) THEN
855: mdebug('initial_insert errocode='||x_errorcode);
856: END IF;
857: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
853: if (x_return_status <> fnd_api.g_ret_sts_success) then
854: IF (l_debug = 1) THEN
855: mdebug('initial_insert errocode='||x_errorcode);
856: END IF;
857: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
858: raise FND_API.g_exc_error;
859: else
860: raise fnd_api.g_exc_unexpected_error;
861: end if;
854: IF (l_debug = 1) THEN
855: mdebug('initial_insert errocode='||x_errorcode);
856: END IF;
857: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
858: raise FND_API.g_exc_error;
859: else
860: raise fnd_api.g_exc_unexpected_error;
861: end if;
862: end if;
856: END IF;
857: if (x_return_status = fnd_api.g_ret_sts_unexp_error) then
858: raise FND_API.g_exc_error;
859: else
860: raise fnd_api.g_exc_unexpected_error;
861: end if;
862: end if;
863:
864:
866: IF
867: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_VALIDATE THEN
868: MTL_CCEOI_ACTION_PVT.Validate_CountRequest(
869: p_api_version => 0.9
870: , p_init_msg_list => FND_API.G_TRUE
871: , x_return_status => x_return_status
872: , x_msg_count => x_msg_count
873: , x_msg_data => x_msg_data
874: , p_interface_rec => L_interface_rec);
875: ELSIF
876: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_CREATE THEN
877: MTL_CCEOI_ACTION_PVT.Create_CountRequest(
878: p_api_version => 0.9
879: , p_init_msg_list => FND_API.G_TRUE
880: , x_return_status => x_return_status
881: , x_msg_count => x_msg_count
882: , x_msg_data => x_msg_data
883: , p_interface_rec => L_interface_rec);
884: ELSIF
885: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_VALSIM THEN
886: MTL_CCEOI_ACTION_PVT.ValSim_CountRequest(
887: p_api_version => 0.9
888: , p_init_msg_list => FND_API.G_TRUE
889: , x_return_status => x_return_status
890: , x_msg_count => x_msg_count
891: , x_msg_data => x_msg_data
892: , p_interface_rec => L_interface_rec);
894: P_interface_rec.action_code = MTL_CCEOI_VAR_PVT.G_PROCESS THEN
895:
896: MTL_CCEOI_ACTION_PVT.Process_CountRequest(
897: p_api_version => 0.9
898: , p_init_msg_list => FND_API.G_TRUE
899: , x_return_status => x_return_status
900: , x_msg_count => x_msg_count
901: , x_msg_data => x_msg_data
902: , p_interface_rec => L_interface_rec);
926: p_error_column_name => 'ACTION_CODE'
927: , p_error_table_name => 'MTL_CC_ENTRIES_INTERFACE_ID'
928: , p_message_name => 'INV_CCEOI_UNKNOWN_ACTION_CODE');
929:
930: x_return_status := FND_API.G_RET_STS_ERROR;
931:
932: END IF;
933:
934:
940: --
941: -- If the record exists in database and the record is processed successful
942: -- mark it for deletion, and unexport the record from MCCE
943: -- if necessary
944: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
945: -- if (mtl_cceoi_var_pvt.g_rec_in_system) then
946: -- it is unnecessary to mark it for deletion since
947: -- it will be deleted by purge if status_flag in (0,1)
948: /* MTL_CCEOI_PROCESS_PVT.Set_CCEOIFlags(
946: -- it is unnecessary to mark it for deletion since
947: -- it will be deleted by purge if status_flag in (0,1)
948: /* MTL_CCEOI_PROCESS_PVT.Set_CCEOIFlags(
949: p_api_version => 0.9
950: , p_init_msg_list => FND_API.G_TRUE
951: , x_return_status => x_return_status
952: , x_msg_count => x_msg_count
953: , x_msg_data => x_msg_data
954: , p_cc_entry_interface_id => MTL_CCEOI_VAR_PVT.G_CC_ENTRY_INTERFACE_ID,
954: , p_cc_entry_interface_id => MTL_CCEOI_VAR_PVT.G_CC_ENTRY_INTERFACE_ID,
955: --=>L_interface_rec.cc_entry_interface_id,
956: p_flags => '$1$$');
957:
958: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
960: END IF;
961: -- end if;
962: */
955: --=>L_interface_rec.cc_entry_interface_id,
956: p_flags => '$1$$');
957:
958: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
960: END IF;
961: -- end if;
962: */
963:
978: x_msg_count => x_msg_count,
979: p_cycle_count_entry_id => mtl_cceoi_var_pvt.G_CYCLE_COUNT_ENTRY_REC.CYCLE_COUNT_ENTRY_ID,
980: p_export_flag => null);
981:
982: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
983: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
984: END IF;
985:
986: end if;
979: p_cycle_count_entry_id => mtl_cceoi_var_pvt.G_CYCLE_COUNT_ENTRY_REC.CYCLE_COUNT_ENTRY_ID,
980: p_export_flag => null);
981:
982: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
983: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
984: END IF;
985:
986: end if;
987:
1009: Unlock_CCI_Row(
1010: l_interface_rec.cc_entry_interface_id,
1011: l_return_status);
1012:
1013: if (l_return_status <> fnd_api.g_ret_sts_success) then
1014: raise fnd_api.g_exc_unexpected_error;
1015: end if;
1016:
1017: -- use a different x_return_status
1010: l_interface_rec.cc_entry_interface_id,
1011: l_return_status);
1012:
1013: if (l_return_status <> fnd_api.g_ret_sts_success) then
1014: raise fnd_api.g_exc_unexpected_error;
1015: end if;
1016:
1017: -- use a different x_return_status
1018:
1020: x_interface_id := mtl_cceoi_var_pvt.g_cc_entry_interface_id;
1021: --
1022: -- END of API body
1023: -- Standard check of p_commit
1024: IF FND_API.to_Boolean(p_commit) THEN
1025: COMMIT;
1026: END IF;
1027: -- Standard call to get message count and if count is 1, get message info
1028: FND_MSG_PUB.Count_And_Get
1030: , p_data => x_msg_data);
1031:
1032:
1033: EXCEPTION
1034: WHEN FND_API.G_EXC_ERROR THEN
1035: ROLLBACK TO Import_CountRequest_PUB;
1036: x_return_status := FND_API.G_RET_STS_ERROR;
1037: IF (l_debug = 1) THEN
1038: mdebug('Exception: ' || sqlerrm);
1032:
1033: EXCEPTION
1034: WHEN FND_API.G_EXC_ERROR THEN
1035: ROLLBACK TO Import_CountRequest_PUB;
1036: x_return_status := FND_API.G_RET_STS_ERROR;
1037: IF (l_debug = 1) THEN
1038: mdebug('Exception: ' || sqlerrm);
1039: END IF;
1040: FND_MSG_PUB.Count_And_Get(
1041: p_count => x_msg_count
1042: , p_data => x_msg_data);
1043:
1044:
1045: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1046: ROLLBACK TO Import_CountRequest_PUB;
1047: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1048: x_errorcode := -1;
1049: IF (l_debug = 1) THEN
1043:
1044:
1045: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1046: ROLLBACK TO Import_CountRequest_PUB;
1047: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1048: x_errorcode := -1;
1049: IF (l_debug = 1) THEN
1050: mdebug('Unexp-Exception: ' || sqlerrm);
1051: END IF;
1055:
1056:
1057: WHEN OTHERS THEN
1058: ROLLBACK TO Import_CountRequest_PUB;
1059: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1060:
1061: IF (l_debug = 1) THEN
1062: mdebug('Other-Exception: ' || sqlerrm);
1063: END IF;
1083:
1084: PROCEDURE Process_LPN_CountRequest
1085: (
1086: p_api_version IN NUMBER
1087: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1088: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1089: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1090: , x_return_status OUT NOCOPY VARCHAR2
1091: , x_errorcode OUT NOCOPY NUMBER
1084: PROCEDURE Process_LPN_CountRequest
1085: (
1086: p_api_version IN NUMBER
1087: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1088: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1089: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1090: , x_return_status OUT NOCOPY VARCHAR2
1091: , x_errorcode OUT NOCOPY NUMBER
1092: , x_msg_count OUT NOCOPY NUMBER
1085: (
1086: p_api_version IN NUMBER
1087: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
1088: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
1089: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
1090: , x_return_status OUT NOCOPY VARCHAR2
1091: , x_errorcode OUT NOCOPY NUMBER
1092: , x_msg_count OUT NOCOPY NUMBER
1093: , x_msg_data OUT NOCOPY VARCHAR2
1123: -- Standard start of API savepoint
1124: SAVEPOINT Process_LPN_CountRequest;
1125:
1126: -- Standard Call to check for call compatibility
1127: IF NOT FND_API.Compatible_API_Call(l_api_version
1128: , p_api_version
1129: , l_api_name
1130: , G_PKG_NAME) THEN
1131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1127: IF NOT FND_API.Compatible_API_Call(l_api_version
1128: , p_api_version
1129: , l_api_name
1130: , G_PKG_NAME) THEN
1131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1132: END IF;
1133:
1134: -- Initialize message list if p_init_msg_list is set to true
1135: IF FND_API.to_Boolean(p_init_msg_list) THEN
1131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1132: END IF;
1133:
1134: -- Initialize message list if p_init_msg_list is set to true
1135: IF FND_API.to_Boolean(p_init_msg_list) THEN
1136: FND_MSG_PUB.initialize;
1137: END IF;
1138: --
1139: -- Initialisize API return status to access
1136: FND_MSG_PUB.initialize;
1137: END IF;
1138: --
1139: -- Initialisize API return status to access
1140: x_return_status := FND_API.G_RET_STS_SUCCESS;
1141: x_errorcode := 0;
1142:
1143: IF (l_debug = 1) THEN
1144: mdebug('Process: Process_LPN_CountRequest ' || to_char(p_interface_rec.cycle_count_header_id));
1149: IF (l_debug = 1) THEN
1150: mdebug('wms not installed');
1151: END IF;
1152: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_NOT_INSTALLED_ERROR');
1153: RAISE fnd_api.g_exc_error;
1154: END IF;
1155:
1156: --No validation for performance reasons
1157: -- Except for header id and lpn id
1164: x_errorcode => x_errorcode,
1165: p_cycle_count_header_id => p_interface_rec.cycle_count_header_id,
1166: p_cycle_count_header_name => p_interface_rec.cycle_count_header_name
1167: );
1168: IF (x_return_status <> fnd_api.g_ret_sts_success) then
1169: IF (l_debug = 1) THEN
1170: mdebug('invalid header id');
1171: END IF;
1172: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_INVALID_HEADER');
1169: IF (l_debug = 1) THEN
1170: mdebug('invalid header id');
1171: END IF;
1172: FND_MESSAGE.SET_NAME('INV', 'INV_CCEOI_INVALID_HEADER');
1173: raise fnd_api.g_exc_error;
1174: end IF;
1175:
1176: -- Validate LPN ID and LPN
1177: IF p_interface_rec.parent_lpn_id IS NOT NULL OR p_interface_rec.parent_lpn IS NOT NULL THEN
1208: IF p_interface_rec.parent_lpn_id <> p_interface_rec.outermost_lpn_id THEN
1209: -- error out, this case not supported
1210: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_CC_NESTED_LPN_DISCR');
1211: FND_MSG_PUB.ADD;
1212: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1213: ELSE
1214: -- set lpn discrepancy flag to 1 (yes)
1215: l_lpn_discrepancy := 1;
1216: -- change subinventory and locator
1236: IF (l_item_rec.inventory_item_id IS NOT NULL) THEN -- record is not a container
1237:
1238: Import_CountRequest(
1239: p_api_version => 0.9,
1240: p_init_msg_list => FND_API.G_TRUE,
1241: p_commit => FND_API.G_TRUE,
1242: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1243: X_return_status => x_return_status,
1244: x_errorcode => x_errorcode,
1237:
1238: Import_CountRequest(
1239: p_api_version => 0.9,
1240: p_init_msg_list => FND_API.G_TRUE,
1241: p_commit => FND_API.G_TRUE,
1242: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1243: X_return_status => x_return_status,
1244: x_errorcode => x_errorcode,
1245: x_msg_count => x_msg_count,
1238: Import_CountRequest(
1239: p_api_version => 0.9,
1240: p_init_msg_list => FND_API.G_TRUE,
1241: p_commit => FND_API.G_TRUE,
1242: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1243: X_return_status => x_return_status,
1244: x_errorcode => x_errorcode,
1245: x_msg_count => x_msg_count,
1246: x_msg_data => x_msg_data,
1245: x_msg_count => x_msg_count,
1246: x_msg_data => x_msg_data,
1247: p_interface_rec => l_item_rec,
1248: x_interface_id => l_temp_int_id);
1249: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1250: IF (l_debug = 1) THEN
1251: mdebug('Import count request error');
1252: END IF;
1253: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1250: IF (l_debug = 1) THEN
1251: mdebug('Import count request error');
1252: END IF;
1253: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1254: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1255: END IF;
1256:
1257: -- insert interface id into table
1258: x_interface_id_list(l_counter) := l_temp_int_id;
1262: END IF;
1263: -- Record is a container, thus needs to be exploded
1264: WMS_CONTAINER_PUB.Explode_LPN(
1265: p_api_version => 1.0,
1266: p_init_msg_list => fnd_api.g_true,
1267: p_commit => fnd_api.g_true,
1268: x_return_status => x_return_status,
1269: x_msg_count => x_msg_count,
1270: x_msg_data => x_msg_data,
1263: -- Record is a container, thus needs to be exploded
1264: WMS_CONTAINER_PUB.Explode_LPN(
1265: p_api_version => 1.0,
1266: p_init_msg_list => fnd_api.g_true,
1267: p_commit => fnd_api.g_true,
1268: x_return_status => x_return_status,
1269: x_msg_count => x_msg_count,
1270: x_msg_data => x_msg_data,
1271: p_lpn_id => p_interface_rec.parent_lpn_id,
1269: x_msg_count => x_msg_count,
1270: x_msg_data => x_msg_data,
1271: p_lpn_id => p_interface_rec.parent_lpn_id,
1272: x_content_tbl => l_expl_tbl);
1273: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1274: IF (l_debug = 1) THEN
1275: mdebug('lpn exlpoder error');
1276: END IF;
1277: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1274: IF (l_debug = 1) THEN
1275: mdebug('lpn exlpoder error');
1276: END IF;
1277: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1278: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1279: END IF;
1280:
1281: -- Check if Unschedualed Entries are allowed.
1282: SELECT unscheduled_count_entry
1348: mdebug('invalid parent lpn id or parent lpn');
1349: END IF;
1350: FND_MESSAGE.SET_NAME('INV', 'INV_WMS_CONT_INVALID_LPN');
1351: FND_MSG_PUB.ADD;
1352: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1353: END IF;
1354:
1355: -- put new lpn in record
1356: l_item_rec.parent_lpn_id := l_lpn.lpn_id;
1384: MTL_CCEOI_VAR_PVT.G_LPN_ID := l_expl_tbl(v_index).parent_lpn_id;
1385:
1386: Import_CountRequest(
1387: p_api_version => 0.9,
1388: p_init_msg_list => FND_API.G_TRUE,
1389: p_commit => FND_API.G_TRUE,
1390: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1391: X_return_status => x_return_status,
1392: x_errorcode => x_errorcode,
1385:
1386: Import_CountRequest(
1387: p_api_version => 0.9,
1388: p_init_msg_list => FND_API.G_TRUE,
1389: p_commit => FND_API.G_TRUE,
1390: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1391: X_return_status => x_return_status,
1392: x_errorcode => x_errorcode,
1393: x_msg_count => x_msg_count,
1386: Import_CountRequest(
1387: p_api_version => 0.9,
1388: p_init_msg_list => FND_API.G_TRUE,
1389: p_commit => FND_API.G_TRUE,
1390: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
1391: X_return_status => x_return_status,
1392: x_errorcode => x_errorcode,
1393: x_msg_count => x_msg_count,
1394: x_msg_data => x_msg_data,
1393: x_msg_count => x_msg_count,
1394: x_msg_data => x_msg_data,
1395: p_interface_rec => l_item_rec,
1396: x_interface_id => l_temp_int_id);
1397: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1398: IF (l_debug = 1) THEN
1399: mdebug('LPN Import count request error');
1400: END IF;
1401: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1398: IF (l_debug = 1) THEN
1399: mdebug('LPN Import count request error');
1400: END IF;
1401: FND_FILE.PUT_LINE(FND_FILE.LOG, x_msg_data);
1402: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1403: END IF;
1404:
1405: -- insert interface id into table
1406: x_interface_id_list(l_counter) := l_temp_int_id;
1464:
1465: END IF;
1466:
1467: EXCEPTION
1468: WHEN FND_API.G_EXC_ERROR THEN
1469: ROLLBACK TO Process_LPN_CountRequest;
1470: x_return_status := FND_API.G_RET_STS_ERROR;
1471: IF (l_debug = 1) THEN
1472: mdebug('Exception: ' || sqlerrm);
1466:
1467: EXCEPTION
1468: WHEN FND_API.G_EXC_ERROR THEN
1469: ROLLBACK TO Process_LPN_CountRequest;
1470: x_return_status := FND_API.G_RET_STS_ERROR;
1471: IF (l_debug = 1) THEN
1472: mdebug('Exception: ' || sqlerrm);
1473: END IF;
1474: FND_MSG_PUB.Count_And_Get(
1475: p_count => x_msg_count
1476: , p_data => x_msg_data);
1477:
1478:
1479: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1480: ROLLBACK TO Process_LPN_CountRequest;
1481: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1482: x_errorcode := -1;
1483: IF (l_debug = 1) THEN
1477:
1478:
1479: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1480: ROLLBACK TO Process_LPN_CountRequest;
1481: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1482: x_errorcode := -1;
1483: IF (l_debug = 1) THEN
1484: mdebug('Unexp-Exception: ' || sqlerrm);
1485: END IF;
1488: , p_data => x_msg_data);
1489:
1490: WHEN e_Invalid_Inputs THEN
1491: ROLLBACK TO Process_LPN_CountRequest;
1492: x_return_status := FND_API.G_RET_STS_ERROR;
1493: FND_MSG_PUB.Count_And_Get
1494: ( p_count => x_msg_count,
1495: p_data => x_msg_data
1496: );
1496: );
1497:
1498: WHEN OTHERS THEN
1499: ROLLBACK TO Process_LPN_CountRequest;
1500: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1501: IF (l_debug = 1) THEN
1502: mdebug('Other-Exception: ' || sqlerrm);
1503: END IF;
1504: