114: END IF;
115:
116: -- start_date_active default to sysdate
117: IF p_style_fmt_layout_rec.start_date_active is null OR
118: p_style_fmt_layout_rec.start_date_active = FND_API.G_MISS_DATE
119: THEN
120: p_style_fmt_layout_rec.start_date_active := sysdate;
121: END IF;
122:
127: l_rowid,
128: x_return_status
129: );
130:
131: IF x_return_status = fnd_api.g_ret_sts_error THEN
132: RAISE fnd_api.g_exc_error;
133: END IF;
134:
135: -- Debug info.
128: x_return_status
129: );
130:
131: IF x_return_status = fnd_api.g_ret_sts_error THEN
132: RAISE fnd_api.g_exc_error;
133: END IF;
134:
135: -- Debug info.
136: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
221: THEN
222: FND_MESSAGE.SET_NAME('AR', 'HZ_API_RECORD_CHANGED');
223: FND_MESSAGE.SET_TOKEN('TABLE', 'hz_style_fmt_layouts');
224: FND_MSG_PUB.ADD;
225: RAISE FND_API.G_EXC_ERROR;
226: END IF;
227:
228: p_object_version_number := nvl(l_object_version_number, 1) + 1;
229:
231: FND_MESSAGE.SET_NAME('AR', 'HZ_API_NO_RECORD');
232: FND_MESSAGE.SET_TOKEN('RECORD', 'style format layout');
233: FND_MESSAGE.SET_TOKEN('VALUE', NVL(to_char( p_style_fmt_layout_rec.style_fmt_layout_id), 'null'));
234: FND_MSG_PUB.ADD;
235: RAISE FND_API.G_EXC_ERROR;
236: END;
237:
238: -- validate style format layout record
239: HZ_NAME_ADDRESS_FMT_VALIDATE.validate_style_fmt_layout(
241: p_style_fmt_layout_rec,
242: l_rowid,
243: x_return_status);
244:
245: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
246: RAISE FND_API.G_EXC_ERROR;
247: END IF;
248:
249: -- Debug info.
242: l_rowid,
243: x_return_status);
244:
245: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
246: RAISE FND_API.G_EXC_ERROR;
247: END IF;
248:
249: -- Debug info.
250: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
307: *
308: * ARGUMENTS
309: * IN:
310: * p_init_msg_list Initialize message stack if it is set to
311: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
312: * p_style_fmt_layout_rec Style format layout record.
313: * IN/OUT:
314: * OUT:
315: * p_style_fmt_layout_id style_fmt_layout id
313: * IN/OUT:
314: * OUT:
315: * p_style_fmt_layout_id style_fmt_layout id
316: * x_return_status Return status after the call. The status can
317: * be FND_API.G_RET_STS_SUCCESS (success),
318: * FND_API.G_RET_STS_ERROR (error),
319: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
320: * x_msg_count Number of messages in message stack.
321: * x_msg_data Message text if x_msg_count is 1.
314: * OUT:
315: * p_style_fmt_layout_id style_fmt_layout id
316: * x_return_status Return status after the call. The status can
317: * be FND_API.G_RET_STS_SUCCESS (success),
318: * FND_API.G_RET_STS_ERROR (error),
319: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
320: * x_msg_count Number of messages in message stack.
321: * x_msg_data Message text if x_msg_count is 1.
322: *
315: * p_style_fmt_layout_id style_fmt_layout id
316: * x_return_status Return status after the call. The status can
317: * be FND_API.G_RET_STS_SUCCESS (success),
318: * FND_API.G_RET_STS_ERROR (error),
319: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
320: * x_msg_count Number of messages in message stack.
321: * x_msg_data Message text if x_msg_count is 1.
322: *
323: * NOTES
328: *
329: */
330:
331: PROCEDURE create_style_fmt_layout (
332: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
333: p_style_fmt_layout_rec IN STYLE_FMT_LAYOUT_REC_TYPE,
334: x_style_fmt_layout_id OUT NOCOPY NUMBER,
335: x_return_status OUT NOCOPY VARCHAR2,
336: x_msg_count OUT NOCOPY NUMBER,
354: p_msg_level=>fnd_log.level_procedure);
355: END IF;
356:
357: -- initialize message list if p_init_msg_list is set to TRUE.
358: IF FND_API.to_Boolean(p_init_msg_list) THEN
359: FND_MSG_PUB.initialize;
360: END IF;
361:
362: -- initialize API return status to success.
359: FND_MSG_PUB.initialize;
360: END IF;
361:
362: -- initialize API return status to success.
363: x_return_status := FND_API.G_RET_STS_SUCCESS;
364:
365: -- call to business logic.
366: do_create_style_fmt_layout(
367: l_style_fmt_layout_rec,
370: x_style_fmt_layout_id := l_style_fmt_layout_rec.style_fmt_layout_id;
371:
372: -- standard call to get message count and if count is 1, get message info.
373: FND_MSG_PUB.Count_And_Get(
374: p_encoded => FND_API.G_FALSE,
375: p_count => x_msg_count,
376: p_data => x_msg_data);
377: -- Debug info.
378: IF fnd_log.level_exception>=fnd_log.g_current_runtime_level THEN
390: -- Check if API is called in debug mode. If yes, disable debug.
391: --disable_debug;
392:
393: EXCEPTION
394: WHEN FND_API.G_EXC_ERROR THEN
395: ROLLBACK TO create_style_fmt_layout;
396: x_return_status := FND_API.G_RET_STS_ERROR;
397: FND_MSG_PUB.Count_And_Get(
398: p_encoded => FND_API.G_FALSE,
392:
393: EXCEPTION
394: WHEN FND_API.G_EXC_ERROR THEN
395: ROLLBACK TO create_style_fmt_layout;
396: x_return_status := FND_API.G_RET_STS_ERROR;
397: FND_MSG_PUB.Count_And_Get(
398: p_encoded => FND_API.G_FALSE,
399: p_count => x_msg_count,
400: p_data => x_msg_data);
394: WHEN FND_API.G_EXC_ERROR THEN
395: ROLLBACK TO create_style_fmt_layout;
396: x_return_status := FND_API.G_RET_STS_ERROR;
397: FND_MSG_PUB.Count_And_Get(
398: p_encoded => FND_API.G_FALSE,
399: p_count => x_msg_count,
400: p_data => x_msg_data);
401:
402: -- Debug info.
414:
415: -- Check if API is called in debug mode. If yes, disable debug.
416: --disable_debug;
417:
418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
419: ROLLBACK TO create_style_fmt_layout;
420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
421: FND_MSG_PUB.Count_And_Get(
422: p_encoded => FND_API.G_FALSE,
416: --disable_debug;
417:
418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
419: ROLLBACK TO create_style_fmt_layout;
420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
421: FND_MSG_PUB.Count_And_Get(
422: p_encoded => FND_API.G_FALSE,
423: p_count => x_msg_count,
424: p_data => x_msg_data);
418: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
419: ROLLBACK TO create_style_fmt_layout;
420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
421: FND_MSG_PUB.Count_And_Get(
422: p_encoded => FND_API.G_FALSE,
423: p_count => x_msg_count,
424: p_data => x_msg_data);
425:
426: -- Debug info.
440: --disable_debug;
441:
442: WHEN OTHERS THEN
443: ROLLBACK TO create_style_fmt_layout;
444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
445:
446: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OTHERS_EXCEP');
447: FND_MESSAGE.SET_TOKEN('ERROR' ,SQLERRM);
448: FND_MSG_PUB.ADD;
447: FND_MESSAGE.SET_TOKEN('ERROR' ,SQLERRM);
448: FND_MSG_PUB.ADD;
449:
450: FND_MSG_PUB.Count_And_Get(
451: p_encoded => FND_API.G_FALSE,
452: p_count => x_msg_count,
453: p_data => x_msg_data);
454:
455: -- Debug info.
481: *
482: * ARGUMENTS
483: * IN:
484: * p_init_msg_list Initialize message stack if it is set to
485: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
486: * p_style_fmt_layout_rec Style format layout record.
487: * IN/OUT:
488: * p_object_version_number Used for locking the being updated record.
489: * OUT:
487: * IN/OUT:
488: * p_object_version_number Used for locking the being updated record.
489: * OUT:
490: * x_return_status Return status after the call. The status can
491: * be FND_API.G_RET_STS_SUCCESS (success),
492: * FND_API.G_RET_STS_ERROR (error),
493: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
494: * x_msg_count Number of messages in message stack.
495: * x_msg_data Message text if x_msg_count is 1.
488: * p_object_version_number Used for locking the being updated record.
489: * OUT:
490: * x_return_status Return status after the call. The status can
491: * be FND_API.G_RET_STS_SUCCESS (success),
492: * FND_API.G_RET_STS_ERROR (error),
493: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
494: * x_msg_count Number of messages in message stack.
495: * x_msg_data Message text if x_msg_count is 1.
496: *
489: * OUT:
490: * x_return_status Return status after the call. The status can
491: * be FND_API.G_RET_STS_SUCCESS (success),
492: * FND_API.G_RET_STS_ERROR (error),
493: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
494: * x_msg_count Number of messages in message stack.
495: * x_msg_data Message text if x_msg_count is 1.
496: *
497: * NOTES
502: *
503: */
504:
505: PROCEDURE update_style_fmt_layout (
506: p_init_msg_list IN VARCHAR2 :=FND_API.G_FALSE,
507: p_style_fmt_layout_rec IN STYLE_FMT_LAYOUT_REC_TYPE,
508: p_object_version_number IN OUT NOCOPY NUMBER,
509: x_return_status OUT NOCOPY VARCHAR2,
510: x_msg_count OUT NOCOPY NUMBER,
530: p_msg_level=>fnd_log.level_procedure);
531: END IF;
532:
533: -- initialize message list if p_init_msg_list is set to TRUE.
534: IF FND_API.to_Boolean(p_init_msg_list) THEN
535: FND_MSG_PUB.initialize;
536: END IF;
537:
538: -- initialize API return status to success.
535: FND_MSG_PUB.initialize;
536: END IF;
537:
538: -- initialize API return status to success.
539: x_return_status := FND_API.G_RET_STS_SUCCESS;
540:
541: -- call to business logic.
542: do_update_style_fmt_layout(
543: l_style_fmt_layout_rec,
545: x_return_status);
546:
547: -- standard call to get message count and if count is 1, get message info.
548: FND_MSG_PUB.Count_And_Get(
549: p_encoded => FND_API.G_FALSE,
550: p_count => x_msg_count,
551: p_data => x_msg_data);
552:
553: -- Debug info.
566: -- Check if API is called in debug mode. If yes, disable debug.
567: --disable_debug;
568:
569: EXCEPTION
570: WHEN FND_API.G_EXC_ERROR THEN
571: ROLLBACK TO update_style_fmt_layout;
572: x_return_status := FND_API.G_RET_STS_ERROR;
573: FND_MSG_PUB.Count_And_Get(
574: p_encoded => FND_API.G_FALSE,
568:
569: EXCEPTION
570: WHEN FND_API.G_EXC_ERROR THEN
571: ROLLBACK TO update_style_fmt_layout;
572: x_return_status := FND_API.G_RET_STS_ERROR;
573: FND_MSG_PUB.Count_And_Get(
574: p_encoded => FND_API.G_FALSE,
575: p_count => x_msg_count,
576: p_data => x_msg_data);
570: WHEN FND_API.G_EXC_ERROR THEN
571: ROLLBACK TO update_style_fmt_layout;
572: x_return_status := FND_API.G_RET_STS_ERROR;
573: FND_MSG_PUB.Count_And_Get(
574: p_encoded => FND_API.G_FALSE,
575: p_count => x_msg_count,
576: p_data => x_msg_data);
577:
578: -- Debug info.
590:
591: -- Check if API is called in debug mode. If yes, disable debug.
592: --disable_debug;
593:
594: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
595: ROLLBACK TO update_style_fmt_layout;
596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
597: FND_MSG_PUB.Count_And_Get(
598: p_encoded => FND_API.G_FALSE,
592: --disable_debug;
593:
594: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
595: ROLLBACK TO update_style_fmt_layout;
596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
597: FND_MSG_PUB.Count_And_Get(
598: p_encoded => FND_API.G_FALSE,
599: p_count => x_msg_count,
600: p_data => x_msg_data);
594: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
595: ROLLBACK TO update_style_fmt_layout;
596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
597: FND_MSG_PUB.Count_And_Get(
598: p_encoded => FND_API.G_FALSE,
599: p_count => x_msg_count,
600: p_data => x_msg_data);
601:
602: -- Debug info.
616: --disable_debug;
617:
618: WHEN OTHERS THEN
619: ROLLBACK TO update_style_fmt_layout;
620: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
621:
622: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OTHERS_EXCEP');
623: FND_MESSAGE.SET_TOKEN('ERROR' ,SQLERRM);
624: FND_MSG_PUB.ADD;
623: FND_MESSAGE.SET_TOKEN('ERROR' ,SQLERRM);
624: FND_MSG_PUB.ADD;
625:
626: FND_MSG_PUB.Count_And_Get(
627: p_encoded => FND_API.G_FALSE,
628: p_count => x_msg_count,
629: p_data => x_msg_data);
630:
631: -- Debug info.
659: *
660: * ARGUMENTS
661: * IN:
662: * p_init_msg_list Initialize message stack if it is set to
663: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
664: * p_style_fmt_layout_code Style format layout Code.
665: * IN/OUT:
666: * OUT:
667: * x_style_fmt_layout_rec Style format layout record.
665: * IN/OUT:
666: * OUT:
667: * x_style_fmt_layout_rec Style format layout record.
668: * x_return_status Return status after the call. The status can
669: * be FND_API.G_RET_STS_SUCCESS (success),
670: * FND_API.G_RET_STS_ERROR (error),
671: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
672: * x_msg_count Number of messages in message stack.
673: * x_msg_data Message text if x_msg_count is 1.
666: * OUT:
667: * x_style_fmt_layout_rec Style format layout record.
668: * x_return_status Return status after the call. The status can
669: * be FND_API.G_RET_STS_SUCCESS (success),
670: * FND_API.G_RET_STS_ERROR (error),
671: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
672: * x_msg_count Number of messages in message stack.
673: * x_msg_data Message text if x_msg_count is 1.
674: *
667: * x_style_fmt_layout_rec Style format layout record.
668: * x_return_status Return status after the call. The status can
669: * be FND_API.G_RET_STS_SUCCESS (success),
670: * FND_API.G_RET_STS_ERROR (error),
671: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
672: * x_msg_count Number of messages in message stack.
673: * x_msg_data Message text if x_msg_count is 1.
674: *
675: * NOTES
680: *
681: */
682:
683: PROCEDURE get_style_fmt_layout_rec (
684: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
685: p_style_fmt_layout_id IN NUMBER,
686: x_style_fmt_layout_rec OUT NOCOPY STYLE_FMT_LAYOUT_REC_TYPE,
687: x_return_status OUT NOCOPY VARCHAR2,
688: x_msg_count OUT NOCOPY NUMBER,
700: p_msg_level=>fnd_log.level_procedure);
701: END IF;
702:
703: -- Initialize message list if p_init_msg_list is set to TRUE.
704: IF fnd_api.to_boolean(p_init_msg_list) THEN
705: fnd_msg_pub.initialize;
706: END IF;
707:
708: -- Initialize API return status to success.
705: fnd_msg_pub.initialize;
706: END IF;
707:
708: -- Initialize API return status to success.
709: x_return_status := fnd_api.g_ret_sts_success;
710:
711: -- Check whether primary key has been passed in.
712: IF p_style_fmt_layout_id IS NULL OR
713: p_style_fmt_layout_id = fnd_api.g_miss_num THEN
709: x_return_status := fnd_api.g_ret_sts_success;
710:
711: -- Check whether primary key has been passed in.
712: IF p_style_fmt_layout_id IS NULL OR
713: p_style_fmt_layout_id = fnd_api.g_miss_num THEN
714: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
715: fnd_message.set_token('COLUMN', 'style_fmt_layout_id');
716: fnd_msg_pub.add;
717: RAISE fnd_api.g_exc_error;
713: p_style_fmt_layout_id = fnd_api.g_miss_num THEN
714: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
715: fnd_message.set_token('COLUMN', 'style_fmt_layout_id');
716: fnd_msg_pub.add;
717: RAISE fnd_api.g_exc_error;
718: END IF;
719:
720: x_style_fmt_layout_rec.style_fmt_layout_id := p_style_fmt_layout_id;
721:
755: END IF;
756:
757: --Standard call to get message count and if count is 1, get message info.
758: fnd_msg_pub.count_and_get(
759: p_encoded => fnd_api.g_false,
760: p_count => x_msg_count,
761: p_data => x_msg_data
762: );
763:
776:
777: -- Check if API is called in debug mode. If yes, disable debug.
778: --disable_debug;
779: EXCEPTION
780: WHEN fnd_api.g_exc_error THEN
781: x_return_status := fnd_api.g_ret_sts_error;
782: fnd_msg_pub.count_and_get(
783: p_encoded => fnd_api.g_false,
784: p_count => x_msg_count,
777: -- Check if API is called in debug mode. If yes, disable debug.
778: --disable_debug;
779: EXCEPTION
780: WHEN fnd_api.g_exc_error THEN
781: x_return_status := fnd_api.g_ret_sts_error;
782: fnd_msg_pub.count_and_get(
783: p_encoded => fnd_api.g_false,
784: p_count => x_msg_count,
785: p_data => x_msg_data
779: EXCEPTION
780: WHEN fnd_api.g_exc_error THEN
781: x_return_status := fnd_api.g_ret_sts_error;
782: fnd_msg_pub.count_and_get(
783: p_encoded => fnd_api.g_false,
784: p_count => x_msg_count,
785: p_data => x_msg_data
786: );
787:
801:
802: -- Check if API is called in debug mode. If yes, disable debug.
803: --disable_debug;
804:
805: WHEN fnd_api.g_exc_unexpected_error THEN
806: x_return_status := fnd_api.g_ret_sts_unexp_error;
807:
808: fnd_msg_pub.count_and_get(
809: p_encoded => fnd_api.g_false,
802: -- Check if API is called in debug mode. If yes, disable debug.
803: --disable_debug;
804:
805: WHEN fnd_api.g_exc_unexpected_error THEN
806: x_return_status := fnd_api.g_ret_sts_unexp_error;
807:
808: fnd_msg_pub.count_and_get(
809: p_encoded => fnd_api.g_false,
810: p_count => x_msg_count,
805: WHEN fnd_api.g_exc_unexpected_error THEN
806: x_return_status := fnd_api.g_ret_sts_unexp_error;
807:
808: fnd_msg_pub.count_and_get(
809: p_encoded => fnd_api.g_false,
810: p_count => x_msg_count,
811: p_data => x_msg_data
812: );
813:
827: -- Check if API is called in debug mode. If yes, disable debug.
828: --disable_debug;
829:
830: WHEN OTHERS THEN
831: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
832:
833: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
834: fnd_message.set_token('ERROR' ,SQLERRM);
835: fnd_msg_pub.add;
834: fnd_message.set_token('ERROR' ,SQLERRM);
835: fnd_msg_pub.add;
836:
837: fnd_msg_pub.count_and_get(
838: p_encoded => fnd_api.g_false,
839: p_count => x_msg_count,
840: p_data => x_msg_data
841: );
842: