10: | Main |
11: --------------------------------------------------------------------- */
12: PROCEDURE get_source_and_category IS
13: BEGIN
14: JG_UTILITY_PKG.log( '> JG_JOURNAL_ALLOCATIONS_PKG.get_source_and_category');
15: SELECT cat.user_je_category_name,
16: src.user_je_source_name,
17: usr.user_conversion_type
18: INTO JG_JOURNAL_ALLOCATIONS_PKG.G_user_je_category_name,
23: GL_DAILY_CONVERSION_TYPES usr
24: WHERE src.je_source_name = JG_JOURNAL_ALLOCATIONS_PKG.G_destn_journal_source AND
25: cat.je_category_name = JG_JOURNAL_ALLOCATIONS_PKG.G_destn_journal_category AND
26: usr.conversion_type = 'User';
27: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.get_source_and_category');
28: END get_source_and_category;
29:
30: /* ---------------------------------------------------------------------
31: | PRIVATE PROCEDURE |
36: | Main |
37: --------------------------------------------------------------------- */
38: PROCEDURE get_set_of_books_name IS
39: BEGIN
40: JG_UTILITY_PKG.log( '> JG_JOURNAL_ALLOCATIONS_PKG.get_set_of_books_name');
41: SELECT name
42: INTO JG_JOURNAL_ALLOCATIONS_PKG.G_set_of_books_name -- for report displaying purposes
43: FROM gl_sets_of_books
44: WHERE set_of_books_id = JG_JOURNAL_ALLOCATIONS_PKG.G_set_of_books_id;
41: SELECT name
42: INTO JG_JOURNAL_ALLOCATIONS_PKG.G_set_of_books_name -- for report displaying purposes
43: FROM gl_sets_of_books
44: WHERE set_of_books_id = JG_JOURNAL_ALLOCATIONS_PKG.G_set_of_books_id;
45: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.get_set_of_books_name');
46: END get_set_of_books_name;
47:
48: /* ---------------------------------------------------------------------
49: | PRIVATE PROCEDURE |
80: p_debug_flag IN VARCHAR2) IS
81: l_ext_precision NUMBER;
82: l_min_acct_unit NUMBER;
83: BEGIN
84: JG_UTILITY_PKG.log( '> JG_JOURNAL_ALLOCATIONS_PKG.set_parameters');
85: JG_JOURNAL_ALLOCATIONS_PKG.G_set_of_books_id := p_set_of_books_id;
86: JG_JOURNAL_ALLOCATIONS_PKG.G_chart_of_accounts_id := p_chart_of_accounts_id;
87: JG_JOURNAL_ALLOCATIONS_PKG.G_functional_currency := p_functional_currency;
88: JG_JOURNAL_ALLOCATIONS_PKG.G_period_set_name := p_period_set_name;
160: JG_CREATE_JOURNALS_PKG.G_Journal_Name := NULL;
161: JG_CREATE_JOURNALS_PKG.G_Journal_Description := NULL;
162: JG_CREATE_JOURNALS_PKG.G_Batch_Name := NULL;
163:
164: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.set_parameters');
165: END set_parameters;
166:
167: /* ---------------------------------------------------------------------
168: | PRIVATE FUNCTION |
227: TYPE ACCOUNT_RANGE_TABLE IS TABLE OF ACCOUNT_RANGE_LINE INDEX BY BINARY_INTEGER;
228: l_acct_range_arr ACCOUNT_RANGE_TABLE;
229: arr_count BINARY_INTEGER; --:= 0; Default values not allowed in Init. -- running count of number of account ranges
230: BEGIN
231: JG_UTILITY_PKG.log( '> JG_JOURNAL_ALLOCATIONS_PKG.valid_rule_set');
232: p_acct_rnge_offset := FALSE;
233: FOR c_rs_rec IN c_rule_set LOOP
234: --
235: -- No sum means that no allocation lines exist 2)
280: l_acct_range_arr(arr_count).account_range_low := c_rs_rec.account_range_low;
281: l_acct_range_arr(arr_count).account_range_high := c_rs_rec.account_range_high;
282: END LOOP;
283: p_err_msg_code := NULL;
284: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.valid_rule_set');
285: RETURN TRUE;
286: -- Bug 1064357: The following line should be at before the return line
287: -- JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.valid_rule_set');
288: END valid_rule_set;
283: p_err_msg_code := NULL;
284: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.valid_rule_set');
285: RETURN TRUE;
286: -- Bug 1064357: The following line should be at before the return line
287: -- JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.valid_rule_set');
288: END valid_rule_set;
289:
290: /* ---------------------------------------------------------------------
291: | PRIVATE PROCEDURE |
300: l_segment_type fnd_flex_key_api.segment_type;
301: l_vset fnd_vset.valueset_r;
302: l_fmt fnd_vset.valueset_dr;
303: BEGIN
304: JG_UTILITY_PKG.log( '> JG_JOURNAL_ALLOCATIONS_PKG.get_segments_info');
305: --
306: -- Below info required if the zero-fill option is used for the segment method
307: -- and we also need the value set id for the cost center and account number to determine
308: -- their format types: char, number etc. Value Set Id determined from the results below.
394: -- Need to store cc segment number string to substitute into the dynamic select string
395: --
396: IF j = JG_JOURNAL_ALLOCATIONS_PKG.G_cc_segment_num THEN
397: JG_JOURNAL_ALLOCATIONS_PKG.G_cc_seg_num_string := ', jlv.' || G_acct_flex_segmt_arr(j).segment_col_name || ' cost_center ';
398: JG_UTILITY_PKG.debug(JG_JOURNAL_ALLOCATIONS_PKG.G_cc_seg_num_string);
399: ELSIF j = JG_JOURNAL_ALLOCATIONS_PKG.G_acct_segment_num THEN
400: JG_JOURNAL_ALLOCATIONS_PKG.G_acc_seg_num_string :=
401: ', jlv.' || G_acct_flex_segmt_arr(j).segment_col_name || ' account_number ';
402: JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element :=
400: JG_JOURNAL_ALLOCATIONS_PKG.G_acc_seg_num_string :=
401: ', jlv.' || G_acct_flex_segmt_arr(j).segment_col_name || ' account_number ';
402: JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element :=
403: to_number( substr( G_acct_flex_segmt_arr(j).segment_col_name, 8));
404: JG_UTILITY_PKG.debug( 'acct_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element));
405: JG_UTILITY_PKG.debug(JG_JOURNAL_ALLOCATIONS_PKG.G_acc_seg_num_string);
406: ELSIF j = JG_JOURNAL_ALLOCATIONS_PKG.G_bal_segment_num THEN
407: JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element := to_number(substr(G_acct_flex_segmt_arr(j).segment_col_name,8));
408: JG_UTILITY_PKG.debug( 'l_bal_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element));
401: ', jlv.' || G_acct_flex_segmt_arr(j).segment_col_name || ' account_number ';
402: JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element :=
403: to_number( substr( G_acct_flex_segmt_arr(j).segment_col_name, 8));
404: JG_UTILITY_PKG.debug( 'acct_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element));
405: JG_UTILITY_PKG.debug(JG_JOURNAL_ALLOCATIONS_PKG.G_acc_seg_num_string);
406: ELSIF j = JG_JOURNAL_ALLOCATIONS_PKG.G_bal_segment_num THEN
407: JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element := to_number(substr(G_acct_flex_segmt_arr(j).segment_col_name,8));
408: JG_UTILITY_PKG.debug( 'l_bal_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element));
409: END IF;
404: JG_UTILITY_PKG.debug( 'acct_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_acct_key_element));
405: JG_UTILITY_PKG.debug(JG_JOURNAL_ALLOCATIONS_PKG.G_acc_seg_num_string);
406: ELSIF j = JG_JOURNAL_ALLOCATIONS_PKG.G_bal_segment_num THEN
407: JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element := to_number(substr(G_acct_flex_segmt_arr(j).segment_col_name,8));
408: JG_UTILITY_PKG.debug( 'l_bal_key_element = ' || to_char(JG_JOURNAL_ALLOCATIONS_PKG.G_bal_key_element));
409: END IF;
410:
411: END IF;
412:
411: END IF;
412:
413: END LOOP;
414:
415: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.get_segments_info');
416: END get_segments_info;
417:
418: /* ---------------------------------------------------------------------
419: | PRIVATE FUNCTION |
436: l_vset fnd_vset.valueset_r;
437: l_fmt fnd_vset.valueset_dr;
438: l_value fnd_vset.value_dr;
439: BEGIN
440: JG_UTILITY_PKG.log('> JG_JOURNAL_ALLOCATIONS_PKG.validate_have_zero_fills');
441: --
442: -- consider each segment separately
443: --
444: FOR j IN 1..JG_JOURNAL_ALLOCATIONS_PKG.G_num_of_segments LOOP
461: FND_VSET.get_valueset(G_acct_flex_segmt_arr(j).segment_vset_id,
462: l_vset,
463: l_fmt); -- format type stored in here
464:
465: JG_UTILITY_PKG.debug( 'segment position num = '||TO_CHAR(j));
466: JG_UTILITY_PKG.debug( 'max size = '||TO_CHAR(l_fmt.max_size));
467: FOR k IN REVERSE 1..l_fmt.max_size LOOP
468: l_zero_value := SUBSTR(RPAD('0', 25, '0'), 1, k); --l_zero_string replaced
469: FND_VSET.get_value_init(l_vset, TRUE);
462: l_vset,
463: l_fmt); -- format type stored in here
464:
465: JG_UTILITY_PKG.debug( 'segment position num = '||TO_CHAR(j));
466: JG_UTILITY_PKG.debug( 'max size = '||TO_CHAR(l_fmt.max_size));
467: FOR k IN REVERSE 1..l_fmt.max_size LOOP
468: l_zero_value := SUBSTR(RPAD('0', 25, '0'), 1, k); --l_zero_string replaced
469: FND_VSET.get_value_init(l_vset, TRUE);
470: FND_VSET.get_value(l_vset, l_row, l_found, l_value);
481: END LOOP;
482: FND_MESSAGE.SET_NAME(JG_JOURNAL_ALLOCATIONS_PKG.G_JG_appln_short_name, 'JG_ZZ_ZERO_FILL_INVALID');
483: RETURN FALSE;
484: <
485: JG_UTILITY_PKG.debug('value found for segment position num '|| TO_CHAR(j));
486:
487: END IF; -- Check for natural acct or balancing segment position
488: END LOOP; -- loop round for next segment
489: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.validate_have_zero_fills');
485: JG_UTILITY_PKG.debug('value found for segment position num '|| TO_CHAR(j));
486:
487: END IF; -- Check for natural acct or balancing segment position
488: END LOOP; -- loop round for next segment
489: JG_UTILITY_PKG.log( '< JG_JOURNAL_ALLOCATIONS_PKG.validate_have_zero_fills');
490: RETURN TRUE;
491: END validate_have_zero_fills;
492:
493: /* ---------------------------------------------------------------------
520: -- Kai 5.1.1999, we need to replace this mask with FND_DATE based dynamic mack for R115.
521: --
522: -- l_date_mask VARCHAR2(40) DEFAULT 'YYYY/MM/DD'; Default vlaues not allowed in Init.
523: BEGIN
524: JG_UTILITY_PKG.log('> JG_JOURNAL_ALLOCATIONS_PKG.run_journal_import');
525: --
526: -- Get print options from the original Allocation request
527: --
528: IF NOT FND_CONCURRENT.GET_REQUEST_PRINT_OPTIONS( JG_JOURNAL_ALLOCATIONS_PKG.G_request_id,
616: ,l_dev_phase
617: ,l_dev_status
618: ,l_message);
619: IF l_journal_import_finished THEN
620: JG_UTILITY_PKG.debug('journal import finished = true');
621: ELSE
622: JG_UTILITY_PKG.debug('journal import finished = false');
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
618: ,l_message);
619: IF l_journal_import_finished THEN
620: JG_UTILITY_PKG.debug('journal import finished = true');
621: ELSE
622: JG_UTILITY_PKG.debug('journal import finished = false');
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
620: JG_UTILITY_PKG.debug('journal import finished = true');
621: ELSE
622: JG_UTILITY_PKG.debug('journal import finished = false');
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
627: JG_UTILITY_PKG.debug('dev status = '||l_dev_status);
628: JG_UTILITY_PKG.debug('message = '||l_message);
621: ELSE
622: JG_UTILITY_PKG.debug('journal import finished = false');
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
627: JG_UTILITY_PKG.debug('dev status = '||l_dev_status);
628: JG_UTILITY_PKG.debug('message = '||l_message);
629: IF l_dev_phase = 'COMPLETE' AND l_dev_status = 'NORMAL' THEN
622: JG_UTILITY_PKG.debug('journal import finished = false');
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
627: JG_UTILITY_PKG.debug('dev status = '||l_dev_status);
628: JG_UTILITY_PKG.debug('message = '||l_message);
629: IF l_dev_phase = 'COMPLETE' AND l_dev_status = 'NORMAL' THEN
630: BEGIN
623: END IF;
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
627: JG_UTILITY_PKG.debug('dev status = '||l_dev_status);
628: JG_UTILITY_PKG.debug('message = '||l_message);
629: IF l_dev_phase = 'COMPLETE' AND l_dev_status = 'NORMAL' THEN
630: BEGIN
631: APPS_DDL.apps_ddl('UPDATE gl_je_lines l '||
624: JG_UTILITY_PKG.debug('phase = '||l_phase);
625: JG_UTILITY_PKG.debug('status = '||l_status);
626: JG_UTILITY_PKG.debug('dev phase = '||l_dev_phase);
627: JG_UTILITY_PKG.debug('dev status = '||l_dev_status);
628: JG_UTILITY_PKG.debug('message = '||l_message);
629: IF l_dev_phase = 'COMPLETE' AND l_dev_status = 'NORMAL' THEN
630: BEGIN
631: APPS_DDL.apps_ddl('UPDATE gl_je_lines l '||
632: 'SET l.description = (SELECT h.description '||
642: -- GC Ledger Architecture change
643: EXCEPTION
644: -- Do nothing if there is an error in updating the lines
645: WHEN OTHERS THEN
646: JG_UTILITY_PKG.debug('Error in Update statement after journal import run');
647: NULL;
648: END;
649: END IF;
650: END IF;
649: END IF;
650: END IF;
651:
652:
653: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.run_journal_import');
654: RETURN TRUE;
655: EXCEPTION WHEN OTHERS THEN
656: FND_MESSAGE.Set_Name(JG_JOURNAL_ALLOCATIONS_PKG.G_JG_appln_short_name,'JG_ZZ_JOURNAL_IMPORT_FAILED');
657: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.run_journal_import');
653: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.run_journal_import');
654: RETURN TRUE;
655: EXCEPTION WHEN OTHERS THEN
656: FND_MESSAGE.Set_Name(JG_JOURNAL_ALLOCATIONS_PKG.G_JG_appln_short_name,'JG_ZZ_JOURNAL_IMPORT_FAILED');
657: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.run_journal_import');
658: RETURN FALSE;
659: END run_journal_import;
660:
661: /* ------------------------------------------------------------------------------
728: l_err_msg_code VARCHAR2(50);
729: l_acct_rnge_offset BOOLEAN;
730:
731: BEGIN
732: JG_UTILITY_PKG.log('> JG_JOURNAL_ALLOCATIONS_PKG.main');
733:
734: -- Bug 1064357: Session mode must be set
735: FND_FLEX_KEY_API.set_session_mode('customer_data');
736:
733:
734: -- Bug 1064357: Session mode must be set
735: FND_FLEX_KEY_API.set_session_mode('customer_data');
736:
737: JG_UTILITY_PKG.debug(TO_CHAR(SYSDATE, 'HH24:MI:SS'));
738: --
739: -- Determine whether to output debug messages to log file
740: --
741: IF (p_debug_flag = 'Y') THEN
738: --
739: -- Determine whether to output debug messages to log file
740: --
741: IF (p_debug_flag = 'Y') THEN
742: JG_UTILITY_PKG.enable_debug;
743: -- APPS_DDL.apps_ddl('ALTER SESSION SET SQL_TRACE TRUE');
744: END IF;
745: --
746: -- Initialize the parameter globals
814: RAISE APP_EXCEPTION.application_exception;
815: END IF;
816: END IF;
817:
818: JG_UTILITY_PKG.debug(TO_CHAR(SYSDATE, 'HH24:MI:SS'));
819:
820: --
821: -- Call the next package, to allocate
822: --
823: JG_ALLOCATE_JOURNALS_PKG.allocate;
824: --
825: -- Submit the journal import if at least one allocation and not in validation mode
826: --
827: JG_UTILITY_PKG.debug(TO_CHAR(SYSDATE, 'HH24:MI:SS'));
828:
829: IF (JG_JOURNAL_ALLOCATIONS_PKG.G_run_journal_import = 'Y' AND
830: JG_CREATE_JOURNALS_PKG.i <> 0 AND
831: JG_JOURNAL_ALLOCATIONS_PKG.G_Validate_Only = 'N') THEN
833: RAISE APP_EXCEPTION.application_exception;
834: END IF;
835: END IF;
836: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
837: JG_UTILITY_PKG.debug( 'retcode = '||retcode);
838: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.main');
839: EXCEPTION
840: WHEN APP_EXCEPTION.application_exception THEN
841: JG_UTILITY_PKG.log('< Application_Exception clause');
834: END IF;
835: END IF;
836: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
837: JG_UTILITY_PKG.debug( 'retcode = '||retcode);
838: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.main');
839: EXCEPTION
840: WHEN APP_EXCEPTION.application_exception THEN
841: JG_UTILITY_PKG.log('< Application_Exception clause');
842: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
837: JG_UTILITY_PKG.debug( 'retcode = '||retcode);
838: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.main');
839: EXCEPTION
840: WHEN APP_EXCEPTION.application_exception THEN
841: JG_UTILITY_PKG.log('< Application_Exception clause');
842: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
843: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
844: IF JG_JOURNAL_ALLOCATIONS_PKG.G_errbuf IS NULL THEN
845: errbuf := FND_MESSAGE.get;
845: errbuf := FND_MESSAGE.get;
846: ELSIF retcode = '2' THEN -- error
847: errbuf := JG_JOURNAL_ALLOCATIONS_PKG.G_errbuf;
848: END IF;
849: JG_UTILITY_PKG.log(errbuf);
850: ROLLBACK;
851: WHEN OTHERS THEN
852: JG_UTILITY_PKG.log('< Others Exception clause');
853: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
848: END IF;
849: JG_UTILITY_PKG.log(errbuf);
850: ROLLBACK;
851: WHEN OTHERS THEN
852: JG_UTILITY_PKG.log('< Others Exception clause');
853: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
854: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
855: ROLLBACK;
856: RAISE;
870: p_debug_flag IN VARCHAR2) IS
871: l_ext_precision NUMBER;
872: l_min_acct_unit NUMBER;
873: BEGIN
874: JG_UTILITY_PKG.log('> JG_JOURNAL_ALLOCATIONS_PKG.main');
875:
876: -- Bug 1064357: Session mode must be set
877: FND_FLEX_KEY_API.set_session_mode('customer_data');
878:
879: --
880: -- Determine the debug
881: --
882: IF p_debug_flag = 'Y' THEN
883: JG_UTILITY_PKG.enable_debug;
884: END IF;
885: --
886: -- Set the Global variables
887: --
921: FND_CURRENCY.get_info(JG_JOURNAL_ALLOCATIONS_PKG.G_functional_currency,
922: JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_precision,
923: l_ext_precision,
924: l_min_acct_unit);
925: JG_UTILITY_PKG.debug( 'func curr format mask = '||JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_format_mask);
926: JG_UTILITY_PKG.debug( 'func curr precision = '||JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_precision);
927: --
928: -- Initialize the parameter globals
929: --
922: JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_precision,
923: l_ext_precision,
924: l_min_acct_unit);
925: JG_UTILITY_PKG.debug( 'func curr format mask = '||JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_format_mask);
926: JG_UTILITY_PKG.debug( 'func curr precision = '||JG_JOURNAL_ALLOCATIONS_PKG.G_func_currency_precision);
927: --
928: -- Initialize the parameter globals
929: --
930: JG_JOURNAL_ALLOCATIONS_PKG.G_unalloc_request_id := p_request_id;
934: JG_ALLOCATE_JOURNALS_PKG.allocate;
935:
936: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
937:
938: JG_UTILITY_PKG.debug('retcode = '||retcode);
939: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.main');
940: EXCEPTION
941: WHEN APP_EXCEPTION.application_exception THEN
942: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
935:
936: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
937:
938: JG_UTILITY_PKG.debug('retcode = '||retcode);
939: JG_UTILITY_PKG.log('< JG_JOURNAL_ALLOCATIONS_PKG.main');
940: EXCEPTION
941: WHEN APP_EXCEPTION.application_exception THEN
942: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
943: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;
945: errbuf := FND_MESSAGE.get;
946: ELSIF retcode = '2' THEN -- error
947: errbuf := JG_JOURNAL_ALLOCATIONS_PKG.G_errbuf;
948: END IF;
949: JG_UTILITY_PKG.log(errbuf);
950: ROLLBACK;
951: WHEN OTHERS THEN
952: JG_JOURNAL_ALLOCATIONS_PKG.G_retcode := '2';
953: retcode := JG_JOURNAL_ALLOCATIONS_PKG.G_retcode;