41: log(l_module, 'Begin');
42: g_fiscal_year := p_fiscal_year;
43: log(l_module, 'g_fiscal_year: ' || g_fiscal_year);
44: --Deleting any existing rows in gtas ending bal table
45: fnd_file.put_line(fnd_file.log,
46: 'Deleting from fv_gtas_ending_balances table.');
47:
48: --IF there are no rows in facts 1 and facts 2 ending
49: --balances table, then error and return
85:
86: COMMIT;
87:
88: --Output comma delimited values for user verification
89: fnd_file.put_line(fnd_file.output, ' ');
90: fnd_file.put_line(fnd_file.output, ' ');
91: fnd_file.put_line(fnd_file.output, ' ');
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
86: COMMIT;
87:
88: --Output comma delimited values for user verification
89: fnd_file.put_line(fnd_file.output, ' ');
90: fnd_file.put_line(fnd_file.output, ' ');
91: fnd_file.put_line(fnd_file.output, ' ');
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
94: fnd_file.put_line(fnd_file.output,
87:
88: --Output comma delimited values for user verification
89: fnd_file.put_line(fnd_file.output, ' ');
90: fnd_file.put_line(fnd_file.output, ' ');
91: fnd_file.put_line(fnd_file.output, ' ');
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
94: fnd_file.put_line(fnd_file.output,
95: '**********************************Migrated Data*********************************');
88: --Output comma delimited values for user verification
89: fnd_file.put_line(fnd_file.output, ' ');
90: fnd_file.put_line(fnd_file.output, ' ');
91: fnd_file.put_line(fnd_file.output, ' ');
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
94: fnd_file.put_line(fnd_file.output,
95: '**********************************Migrated Data*********************************');
96: fnd_file.put_line(fnd_file.output,
90: fnd_file.put_line(fnd_file.output, ' ');
91: fnd_file.put_line(fnd_file.output, ' ');
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
94: fnd_file.put_line(fnd_file.output,
95: '**********************************Migrated Data*********************************');
96: fnd_file.put_line(fnd_file.output,
97: '================================================================================');
98:
92: fnd_file.put_line(fnd_file.output,
93: '================================================================================');
94: fnd_file.put_line(fnd_file.output,
95: '**********************************Migrated Data*********************************');
96: fnd_file.put_line(fnd_file.output,
97: '================================================================================');
98:
99: l_statement := 'select
100: ''SET_OF_BOOKS_ID, FISCAL_YEAR, CCID,FUND_VALUE, ACCOUNT_NUMBER,
114: order by 1';
115: fv_flatfiles.create_flat_file(l_statement);
116:
117: log(l_module, 'End');
118: fnd_file.put_line(fnd_file.log,
119: 'Migrate Facts End Bal to GTAS End Bal
120: completed.');
121:
122: EXCEPTION
120: completed.');
121:
122: EXCEPTION
123: WHEN OTHERS THEN
124: fnd_file.put_line(fnd_file.log,
125: l_module || ' :When others error: ' || sqlerrm);
126: p_err_code := -1;
127: p_err_buff := l_module || ' :When others error: ' || sqlerrm;
128: END MAIN;
155: log(l_module, 'gtas_sgl_acct_number: ' || p_gtas_sgl_acct_num);
156:
157: EXCEPTION
158: WHEN NO_DATA_FOUND THEN
159: fnd_file.put_line(fnd_file.log, l_module || ':' || sqlerrm);
160: g_err_code := -1;
161: g_err_buff := l_module || ':' || sqlerrm;
162: WHEN TOO_MANY_ROWS THEN
163: fnd_file.put_line(fnd_file.log,
159: fnd_file.put_line(fnd_file.log, l_module || ':' || sqlerrm);
160: g_err_code := -1;
161: g_err_buff := l_module || ':' || sqlerrm;
162: WHEN TOO_MANY_ROWS THEN
163: fnd_file.put_line(fnd_file.log,
164: l_module || ':' || 'Too many parents for: ' ||
165: p_acct_num);
166: g_err_code := -1;
167: g_err_buff := l_module || ':' || 'Too many parents for: ' ||
166: g_err_code := -1;
167: g_err_buff := l_module || ':' || 'Too many parents for: ' ||
168: p_acct_num;
169: WHEN OTHERS THEN
170: fnd_file.put_line(fnd_file.log,
171: l_module || ' :When others error: ' || sqlerrm);
172: g_err_code := -1;
173: g_err_buff := l_module || ' :When others error: ' || sqlerrm;
174: END get_ussgl_acct_num;
414: l_module VARCHAR2(200) := g_module || 'print_header.';
415: BEGIN
416:
417: IF p_hdr_num = 1 AND NOT g_hdr1_printed THEN
418: fnd_file.put_line(fnd_file.output,
419: 'Agency ID not found for the following Eliminations Dept');
420: fnd_file.put_line(fnd_file.output,
421: '=======================================================');
422: fnd_file.put_line(fnd_file.output,
416:
417: IF p_hdr_num = 1 AND NOT g_hdr1_printed THEN
418: fnd_file.put_line(fnd_file.output,
419: 'Agency ID not found for the following Eliminations Dept');
420: fnd_file.put_line(fnd_file.output,
421: '=======================================================');
422: fnd_file.put_line(fnd_file.output,
423: 'Account Number Eliminations Dept');
424: fnd_file.put_line(fnd_file.output,
418: fnd_file.put_line(fnd_file.output,
419: 'Agency ID not found for the following Eliminations Dept');
420: fnd_file.put_line(fnd_file.output,
421: '=======================================================');
422: fnd_file.put_line(fnd_file.output,
423: 'Account Number Eliminations Dept');
424: fnd_file.put_line(fnd_file.output,
425: '-------------- -----------------');
426: g_hdr1_printed := TRUE;
420: fnd_file.put_line(fnd_file.output,
421: '=======================================================');
422: fnd_file.put_line(fnd_file.output,
423: 'Account Number Eliminations Dept');
424: fnd_file.put_line(fnd_file.output,
425: '-------------- -----------------');
426: g_hdr1_printed := TRUE;
427:
428: ELSIF p_hdr_num = 21 AND NOT g_hdr2_printed THEN
425: '-------------- -----------------');
426: g_hdr1_printed := TRUE;
427:
428: ELSIF p_hdr_num = 21 AND NOT g_hdr2_printed THEN
429: fnd_file.put_line(fnd_file.output, ' ');
430: fnd_file.put_line(fnd_file.output, ' ');
431: fnd_file.put_line(fnd_file.output, ' ');
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
426: g_hdr1_printed := TRUE;
427:
428: ELSIF p_hdr_num = 21 AND NOT g_hdr2_printed THEN
429: fnd_file.put_line(fnd_file.output, ' ');
430: fnd_file.put_line(fnd_file.output, ' ');
431: fnd_file.put_line(fnd_file.output, ' ');
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
434: fnd_file.put_line(fnd_file.output,
427:
428: ELSIF p_hdr_num = 21 AND NOT g_hdr2_printed THEN
429: fnd_file.put_line(fnd_file.output, ' ');
430: fnd_file.put_line(fnd_file.output, ' ');
431: fnd_file.put_line(fnd_file.output, ' ');
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
434: fnd_file.put_line(fnd_file.output,
435: '=======================================================');
428: ELSIF p_hdr_num = 21 AND NOT g_hdr2_printed THEN
429: fnd_file.put_line(fnd_file.output, ' ');
430: fnd_file.put_line(fnd_file.output, ' ');
431: fnd_file.put_line(fnd_file.output, ' ');
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
434: fnd_file.put_line(fnd_file.output,
435: '=======================================================');
436: fnd_file.put_line(fnd_file.output,
430: fnd_file.put_line(fnd_file.output, ' ');
431: fnd_file.put_line(fnd_file.output, ' ');
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
434: fnd_file.put_line(fnd_file.output,
435: '=======================================================');
436: fnd_file.put_line(fnd_file.output,
437: 'Account Number Transfer Dept ID');
438: fnd_file.put_line(fnd_file.output,
432: fnd_file.put_line(fnd_file.output,
433: 'Agency ID not found for the following Transfer Dept ID');
434: fnd_file.put_line(fnd_file.output,
435: '=======================================================');
436: fnd_file.put_line(fnd_file.output,
437: 'Account Number Transfer Dept ID');
438: fnd_file.put_line(fnd_file.output,
439: '-------------- -----------------');
440: g_hdr2_printed := TRUE;
434: fnd_file.put_line(fnd_file.output,
435: '=======================================================');
436: fnd_file.put_line(fnd_file.output,
437: 'Account Number Transfer Dept ID');
438: fnd_file.put_line(fnd_file.output,
439: '-------------- -----------------');
440: g_hdr2_printed := TRUE;
441: END IF;
442:
575:
576: EXCEPTION
577: WHEN NO_DATA_FOUND THEN
578: print_header(1);
579: fnd_file.put_line(fnd_file.output,
580: RPAD(f1_eb_rec.account_number, 38, ' ') ||
581: NVL(f1_eb_rec.eliminations_dept, 'BLANK'));
582: END;
583: END IF;
704:
705: EXCEPTION
706: WHEN NO_DATA_FOUND THEN
707: print_header(2);
708: fnd_file.put_line(fnd_file.output,
709: RPAD(f2_eb_rec.account, 38, ' ') ||
710: NVL(f2_eb_rec.transfer_dept_id, 'BLANK'));
711: END;
712:
814: AND rownum = 1;
815:
816: EXCEPTION
817: WHEN NO_DATA_FOUND THEN
818: fnd_file.put_line(fnd_file.output,
819: RPAD(f2_eb_rec.account, 38, ' ') ||
820: NVL(f2_eb_rec.transfer_dept_id, 'BLANK'));
821: END;
822: ELSIF l_fed_non_fed = 'G' THEN