92: BEGIN
93: --
94: -- Debug Information
95: --
96: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
97: FND_LOG.STRING(
98: FND_LOG.LEVEL_PROCEDURE,
99: 'fun.plsql.fun_seq.get_sequence_number.begin',
100: 'p_context_type: ' || p_context_type ||', '||
93: --
94: -- Debug Information
95: --
96: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
97: FND_LOG.STRING(
98: FND_LOG.LEVEL_PROCEDURE,
99: 'fun.plsql.fun_seq.get_sequence_number.begin',
100: 'p_context_type: ' || p_context_type ||', '||
101: 'p_context_value: ' || p_context_value ||', '||
94: -- Debug Information
95: --
96: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
97: FND_LOG.STRING(
98: FND_LOG.LEVEL_PROCEDURE,
99: 'fun.plsql.fun_seq.get_sequence_number.begin',
100: 'p_context_type: ' || p_context_type ||', '||
101: 'p_context_value: ' || p_context_value ||', '||
102: 'p_application_id: ' || p_application_id ||', '||
153:
154: --
155: -- Debug Information
156: --
157: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
158: FND_LOG.STRING(
159: FND_LOG.LEVEL_PROCEDURE,
160: 'fun.plsql.fun_seq.get_sequence_number.end',
161: 'p_context_type: ' || p_context_type ||', '||
154: --
155: -- Debug Information
156: --
157: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
158: FND_LOG.STRING(
159: FND_LOG.LEVEL_PROCEDURE,
160: 'fun.plsql.fun_seq.get_sequence_number.end',
161: 'p_context_type: ' || p_context_type ||', '||
162: 'p_context_value: ' || p_context_value ||', '||
155: -- Debug Information
156: --
157: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
158: FND_LOG.STRING(
159: FND_LOG.LEVEL_PROCEDURE,
160: 'fun.plsql.fun_seq.get_sequence_number.end',
161: 'p_context_type: ' || p_context_type ||', '||
162: 'p_context_value: ' || p_context_value ||', '||
163: 'p_application_id: ' || p_application_id ||', '||
170: WHEN OTHERS THEN
171: --
172: -- Debug Information
173: --
174: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
175: fnd_log.string(
176: fnd_log.level_exception,
177: 'fun.plsql.fun_seq.get_sequence_Number.exception',
178: 'p_context_type: ' || p_context_type ||', '||
171: --
172: -- Debug Information
173: --
174: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
175: fnd_log.string(
176: fnd_log.level_exception,
177: 'fun.plsql.fun_seq.get_sequence_Number.exception',
178: 'p_context_type: ' || p_context_type ||', '||
179: 'p_context_value: ' || p_context_value ||', '||
172: -- Debug Information
173: --
174: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
175: fnd_log.string(
176: fnd_log.level_exception,
177: 'fun.plsql.fun_seq.get_sequence_Number.exception',
178: 'p_context_type: ' || p_context_type ||', '||
179: 'p_context_value: ' || p_context_value ||', '||
180: 'p_application_id: ' || p_application_id ||', '||
254: BEGIN
255: --
256: -- Debug Information
257: --
258: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
259: FND_LOG.STRING(
260: FND_LOG.LEVEL_PROCEDURE,
261: 'fun.plsql.fun_seq.get_assigned_sequence_info.begin',
262: 'p_context_type: ' || p_context_type ||', '||
255: --
256: -- Debug Information
257: --
258: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
259: FND_LOG.STRING(
260: FND_LOG.LEVEL_PROCEDURE,
261: 'fun.plsql.fun_seq.get_assigned_sequence_info.begin',
262: 'p_context_type: ' || p_context_type ||', '||
263: 'p_context_value: ' || p_context_value ||', '||
256: -- Debug Information
257: --
258: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
259: FND_LOG.STRING(
260: FND_LOG.LEVEL_PROCEDURE,
261: 'fun.plsql.fun_seq.get_assigned_sequence_info.begin',
262: 'p_context_type: ' || p_context_type ||', '||
263: 'p_context_value: ' || p_context_value ||', '||
264: 'p_application_id: ' || p_application_id ||', '||
375: x_seq_version_id := l_seq_version_id;
376: --
377: -- Debug Information
378: --
379: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
380: FND_LOG.STRING(
381: FND_LOG.LEVEL_PROCEDURE,
382: 'fun.plsql.fun_seq.get_assigned_sequence_info.end',
383: 'x_sequence_type: ' || x_sequence_type || ', ' ||
376: --
377: -- Debug Information
378: --
379: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
380: FND_LOG.STRING(
381: FND_LOG.LEVEL_PROCEDURE,
382: 'fun.plsql.fun_seq.get_assigned_sequence_info.end',
383: 'x_sequence_type: ' || x_sequence_type || ', ' ||
384: 'x_assignment_id: ' || x_assignment_id || ', ' ||
377: -- Debug Information
378: --
379: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
380: FND_LOG.STRING(
381: FND_LOG.LEVEL_PROCEDURE,
382: 'fun.plsql.fun_seq.get_assigned_sequence_info.end',
383: 'x_sequence_type: ' || x_sequence_type || ', ' ||
384: 'x_assignment_id: ' || x_assignment_id || ', ' ||
385: 'x_control_date_value: '|| x_control_date_value ||', '||
389: WHEN no_assignment_found THEN
390: --
391: -- Debug Information
392: --
393: IF (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
394: FND_LOG.STRING(
395: FND_LOG.LEVEL_EXCEPTION,
396: 'fun.plsql.fun_seq.get_assigned_sequence_info.no_assign',
397: 'No Assignment Found (Require Assignment = Y)' ||', '||
390: --
391: -- Debug Information
392: --
393: IF (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
394: FND_LOG.STRING(
395: FND_LOG.LEVEL_EXCEPTION,
396: 'fun.plsql.fun_seq.get_assigned_sequence_info.no_assign',
397: 'No Assignment Found (Require Assignment = Y)' ||', '||
398: 'l_seq_context_id :' || l_seq_context_id);
391: -- Debug Information
392: --
393: IF (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
394: FND_LOG.STRING(
395: FND_LOG.LEVEL_EXCEPTION,
396: 'fun.plsql.fun_seq.get_assigned_sequence_info.no_assign',
397: 'No Assignment Found (Require Assignment = Y)' ||', '||
398: 'l_seq_context_id :' || l_seq_context_id);
399: END IF;
405: IF p_suppress_error = 'N' THEN
406: app_exception.raise_exception;
407: END IF;
408: WHEN OTHERS THEN
409: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
410: fnd_log.string(
411: fnd_log.level_exception,
412: 'fun.plsql.fun_seq.get_assigned_sequence_info.exception',
413: 'l_seq_context_id :' || l_seq_context_id ||', ' ||
406: app_exception.raise_exception;
407: END IF;
408: WHEN OTHERS THEN
409: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
410: fnd_log.string(
411: fnd_log.level_exception,
412: 'fun.plsql.fun_seq.get_assigned_sequence_info.exception',
413: 'l_seq_context_id :' || l_seq_context_id ||', ' ||
414: 'SQLERRM: ' || SQLERRM);
407: END IF;
408: WHEN OTHERS THEN
409: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
410: fnd_log.string(
411: fnd_log.level_exception,
412: 'fun.plsql.fun_seq.get_assigned_sequence_info.exception',
413: 'l_seq_context_id :' || l_seq_context_id ||', ' ||
414: 'SQLERRM: ' || SQLERRM);
415: END IF;
489: -- Invalid_Seq_Type is a critical programming error.
490: -- So, you cannot suppress this.
491: --
492: WHEN invalid_seq_type THEN
493: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
494: fnd_log.string(
495: log_level => fnd_log.level_exception,
496: module => 'fun.plsql.fun_seq.generate_sequence_number',
497: message => 'Invalid Sequence Type: ' || ', ' ||
490: -- So, you cannot suppress this.
491: --
492: WHEN invalid_seq_type THEN
493: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
494: fnd_log.string(
495: log_level => fnd_log.level_exception,
496: module => 'fun.plsql.fun_seq.generate_sequence_number',
497: message => 'Invalid Sequence Type: ' || ', ' ||
498: 'SQLERRM: ' || SQLERRM);
491: --
492: WHEN invalid_seq_type THEN
493: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
494: fnd_log.string(
495: log_level => fnd_log.level_exception,
496: module => 'fun.plsql.fun_seq.generate_sequence_number',
497: message => 'Invalid Sequence Type: ' || ', ' ||
498: 'SQLERRM: ' || SQLERRM);
499: END IF;
498: 'SQLERRM: ' || SQLERRM);
499: END IF;
500: app_exception.raise_exception;
501: WHEN OTHERS THEN
502: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
503: fnd_log.string(
504: log_level => fnd_log.level_exception,
505: module => 'fun.plsql.fun_seq.generate_sequence_number',
506: message =>
499: END IF;
500: app_exception.raise_exception;
501: WHEN OTHERS THEN
502: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
503: fnd_log.string(
504: log_level => fnd_log.level_exception,
505: module => 'fun.plsql.fun_seq.generate_sequence_number',
506: message =>
507: 'SQLERRM: ' || SQLERRM);
500: app_exception.raise_exception;
501: WHEN OTHERS THEN
502: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
503: fnd_log.string(
504: log_level => fnd_log.level_exception,
505: module => 'fun.plsql.fun_seq.generate_sequence_number',
506: message =>
507: 'SQLERRM: ' || SQLERRM);
508: END IF;
527: SET sv.current_value = p_sequence_number
528: WHERE sv.seq_version_id = p_seq_version_id;
529: EXCEPTION
530: WHEN OTHERS THEN
531: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
532: fnd_log.string(
533: log_level => fnd_log.level_exception,
534: module => 'fun.plsql.fun_seq.reset',
535: message =>
528: WHERE sv.seq_version_id = p_seq_version_id;
529: EXCEPTION
530: WHEN OTHERS THEN
531: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
532: fnd_log.string(
533: log_level => fnd_log.level_exception,
534: module => 'fun.plsql.fun_seq.reset',
535: message =>
536: 'SQLERRM: ' || SQLERRM);
529: EXCEPTION
530: WHEN OTHERS THEN
531: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
532: fnd_log.string(
533: log_level => fnd_log.level_exception,
534: module => 'fun.plsql.fun_seq.reset',
535: message =>
536: 'SQLERRM: ' || SQLERRM);
537: END IF;
563: BEGIN
564: --
565: -- Debug Information
566: --
567: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
568: FND_LOG.STRING(
569: FND_LOG.LEVEL_PROCEDURE,
570: 'fun.plsql.fun_seq.get_assign_context_info.begin',
571: 'Beginning of get_assign_context_info');
564: --
565: -- Debug Information
566: --
567: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
568: FND_LOG.STRING(
569: FND_LOG.LEVEL_PROCEDURE,
570: 'fun.plsql.fun_seq.get_assign_context_info.begin',
571: 'Beginning of get_assign_context_info');
572: END IF;
565: -- Debug Information
566: --
567: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
568: FND_LOG.STRING(
569: FND_LOG.LEVEL_PROCEDURE,
570: 'fun.plsql.fun_seq.get_assign_context_info.begin',
571: 'Beginning of get_assign_context_info');
572: END IF;
573: --
621: END IF;
622: --
623: -- Debug Information
624: --
625: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
626: FND_LOG.STRING(
627: FND_LOG.LEVEL_PROCEDURE,
628: 'fun.plsql.fun_seq.get_assign_context_info.end',
629: 'Get_assign_context_info completes successfully.' ||', ' ||
622: --
623: -- Debug Information
624: --
625: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
626: FND_LOG.STRING(
627: FND_LOG.LEVEL_PROCEDURE,
628: 'fun.plsql.fun_seq.get_assign_context_info.end',
629: 'Get_assign_context_info completes successfully.' ||', ' ||
630: 'x_seq_context_id: ' || x_seq_context_id || ', ' ||
623: -- Debug Information
624: --
625: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
626: FND_LOG.STRING(
627: FND_LOG.LEVEL_PROCEDURE,
628: 'fun.plsql.fun_seq.get_assign_context_info.end',
629: 'Get_assign_context_info completes successfully.' ||', ' ||
630: 'x_seq_context_id: ' || x_seq_context_id || ', ' ||
631: 'x_control_date_type: ' || x_control_date_type || ', ' ||
635: EXCEPTION
636: WHEN NO_DATA_FOUND THEN
637: x_seq_context_id := NULL;
638: WHEN OTHERS THEN
639: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
640: fnd_log.string(
641: log_level => fnd_log.level_exception,
642: module => 'fun.plsql.get_assign_context_info',
643: message =>
636: WHEN NO_DATA_FOUND THEN
637: x_seq_context_id := NULL;
638: WHEN OTHERS THEN
639: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
640: fnd_log.string(
641: log_level => fnd_log.level_exception,
642: module => 'fun.plsql.get_assign_context_info',
643: message =>
644: 'SQLERRM: ' || SQLERRM);
637: x_seq_context_id := NULL;
638: WHEN OTHERS THEN
639: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
640: fnd_log.string(
641: log_level => fnd_log.level_exception,
642: module => 'fun.plsql.get_assign_context_info',
643: message =>
644: 'SQLERRM: ' || SQLERRM);
645: END IF;
798: WHEN no_assigned_seq_info THEN
799: --
800: -- Logging
801: --
802: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
803: fnd_log.string(
804: log_level => fnd_log.level_exception,
805: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
806: message =>
799: --
800: -- Logging
801: --
802: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
803: fnd_log.string(
804: log_level => fnd_log.level_exception,
805: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
806: message =>
807: 'l_debug_loc: ' || l_debug_loc ||', '||
800: -- Logging
801: --
802: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
803: fnd_log.string(
804: log_level => fnd_log.level_exception,
805: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
806: message =>
807: 'l_debug_loc: ' || l_debug_loc ||', '||
808: 'p_context_type: ' || p_context_type ||', '||
835: WHEN OTHERS THEN
836: --
837: -- Logging
838: --
839: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
840: fnd_log.string(
841: log_level => fnd_log.level_exception,
842: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
843: message =>
836: --
837: -- Logging
838: --
839: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
840: fnd_log.string(
841: log_level => fnd_log.level_exception,
842: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
843: message =>
844: 'l_debug_loc: ' || l_debug_loc ||', '||
837: -- Logging
838: --
839: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
840: fnd_log.string(
841: log_level => fnd_log.level_exception,
842: module => 'fun.plsql.fun_seq.get_sequence_number_no_commit',
843: message =>
844: 'l_debug_loc: ' || l_debug_loc ||', '||
845: 'p_context_type: ' || p_context_type ||', '||
1730:
1731: RETURN l_as_index;
1732: EXCEPTION
1733: WHEN OTHERS THEN
1734: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1735: fnd_log.string(
1736: log_level => fnd_log.level_exception,
1737: module => 'fun.plsql.fun_seq.find_seq_head_assign_in_cache',
1738: message => 'SQLERRM: ' || SQLERRM);
1731: RETURN l_as_index;
1732: EXCEPTION
1733: WHEN OTHERS THEN
1734: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1735: fnd_log.string(
1736: log_level => fnd_log.level_exception,
1737: module => 'fun.plsql.fun_seq.find_seq_head_assign_in_cache',
1738: message => 'SQLERRM: ' || SQLERRM);
1739: END IF;
1732: EXCEPTION
1733: WHEN OTHERS THEN
1734: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1735: fnd_log.string(
1736: log_level => fnd_log.level_exception,
1737: module => 'fun.plsql.fun_seq.find_seq_head_assign_in_cache',
1738: message => 'SQLERRM: ' || SQLERRM);
1739: END IF;
1740: END find_seq_head_assign_in_cache;