DBA Data[Home] [Help]

APPS.FA_XLA_CMP_SOURCES_PKG dependencies on FA_CMP_STRING_PKG

Line 60: g_chr_newline CONSTANT VARCHAR2(10):= fa_cmp_string_pkg.g_chr_newline;

56: C_CREATED CONSTANT BOOLEAN := TRUE;
57:
58: g_Max_line CONSTANT NUMBER := 225;
59: g_chr_quote CONSTANT VARCHAR2(10):='''';
60: g_chr_newline CONSTANT VARCHAR2(10):= fa_cmp_string_pkg.g_chr_newline;
61:
62: g_log_level_rec fa_api_types.log_level_rec_type;
63:
64: G_CURRENT_RUNTIME_LEVEL NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;

Line 1652: l_array_body := fa_cmp_string_pkg.g_null_varchar2s;

1648: G_MODULE_NAME||l_procedure_name||'.begin',
1649: 'Beginning of procedure');
1650: END IF;
1651:
1652: l_array_body := fa_cmp_string_pkg.g_null_varchar2s;
1653: l_array_pkg := fa_cmp_string_pkg.g_null_varchar2s;
1654:
1655: l_known_tables := fa_char30_tbl_type();
1656: l_event_class_table := fa_char30_tbl_type();

Line 1653: l_array_pkg := fa_cmp_string_pkg.g_null_varchar2s;

1649: 'Beginning of procedure');
1650: END IF;
1651:
1652: l_array_body := fa_cmp_string_pkg.g_null_varchar2s;
1653: l_array_pkg := fa_cmp_string_pkg.g_null_varchar2s;
1654:
1655: l_known_tables := fa_char30_tbl_type();
1656: l_event_class_table := fa_char30_tbl_type();
1657:

Line 1707: l_from := l_from || ',' || fa_cmp_string_pkg.g_chr_newline ||

1703: l_event_class_table := G_def_event_class_table;
1704:
1705: elsif (p_extract_type = 'TRX1') then
1706: l_where := c_hdr_where_trx;
1707: l_from := l_from || ',' || fa_cmp_string_pkg.g_chr_newline ||
1708: ' FA_TRANSACTION_HEADERS th ';
1709:
1710: l_entity_code := 'TRANSACTIONS';
1711: l_known_tables := G_known_trx_hdr_tables;

Line 1716: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline ||

1712: l_event_class_table := G_trx1_hdr_event_class_table;
1713:
1714: elsif (p_extract_type = 'TRX2') then
1715: l_where := c_hdr_where_itrx;
1716: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline ||
1717: ' FA_TRX_REFERENCES trx ' ;
1718:
1719: l_entity_code := 'INTER_ASSET_TRANSACTIONS';
1720: l_known_tables := G_known_trx_hdr_tables;

Line 1965: fa_cmp_string_pkg.CreateString

1961: if (l_source_code.count = 0) then
1962:
1963: l_bodypkg := ' return; ';
1964:
1965: fa_cmp_string_pkg.CreateString
1966: (p_package_text => l_BodyPkg
1967: ,p_array_string => l_array_pkg);
1968:
1969: p_package_body := l_array_pkg;

Line 2049: l_insert := l_insert || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_source_code(i);

2045:
2046: -- build the insert/select clause by appending new aliases/columns
2047:
2048: for i in 1..l_source_code.count loop
2049: l_insert := l_insert || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_source_code(i);
2050: l_select := l_select || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_alias(i) || '.' || l_column_name(i) ;
2051: end loop;
2052:
2053: -- only line level can increase the from/to...

Line 2050: l_select := l_select || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_alias(i) || '.' || l_column_name(i) ;

2046: -- build the insert/select clause by appending new aliases/columns
2047:
2048: for i in 1..l_source_code.count loop
2049: l_insert := l_insert || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_source_code(i);
2050: l_select := l_select || ',' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_alias(i) || '.' || l_column_name(i) ;
2051: end loop;
2052:
2053: -- only line level can increase the from/to...
2054: -- for transactions where we break into staging vs lines,

Line 2073: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_table_name(i) || ' ' || l_alias(i);

2069: -- finally, if we add to staging, we must by nature add the columns to lines too
2070:
2071: if (instr(upper(l_from),l_table_name(i))) = 0 then
2072:
2073: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_table_name(i) || ' ' || l_alias(i);
2074:
2075: if (l_table_name(i) = 'FA_ASSET_KEYWORDS') then
2076: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2077: ' AND ad.asset_key_ccid = key.code_combination_id(+) ';

Line 2076: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2072:
2073: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || l_table_name(i) || ' ' || l_alias(i);
2074:
2075: if (l_table_name(i) = 'FA_ASSET_KEYWORDS') then
2076: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2077: ' AND ad.asset_key_ccid = key.code_combination_id(+) ';
2078: elsif (l_table_name(i) = 'FA_ASSET_INVOICES') then
2079: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2080: ' AND adj.source_line_id = ai.source_line_id(+) ';

Line 2079: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2075: if (l_table_name(i) = 'FA_ASSET_KEYWORDS') then
2076: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2077: ' AND ad.asset_key_ccid = key.code_combination_id(+) ';
2078: elsif (l_table_name(i) = 'FA_ASSET_INVOICES') then
2079: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2080: ' AND adj.source_line_id = ai.source_line_id(+) ';
2081: elsif (l_table_name(i) = 'FA_CATEGORIES_B') then
2082: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2083: ' AND cat.category_id = ah.category_id ';

Line 2082: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2078: elsif (l_table_name(i) = 'FA_ASSET_INVOICES') then
2079: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2080: ' AND adj.source_line_id = ai.source_line_id(+) ';
2081: elsif (l_table_name(i) = 'FA_CATEGORIES_B') then
2082: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2083: ' AND cat.category_id = ah.category_id ';
2084: elsif (l_table_name(i) = 'FA_LEASES') then
2085: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2086: ' AND ad.lease_id = ls.lease_id(+) ';

Line 2085: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2081: elsif (l_table_name(i) = 'FA_CATEGORIES_B') then
2082: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2083: ' AND cat.category_id = ah.category_id ';
2084: elsif (l_table_name(i) = 'FA_LEASES') then
2085: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2086: ' AND ad.lease_id = ls.lease_id(+) ';
2087: elsif (l_table_name(i) = 'FA_LOCATIONS') then
2088: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2089: ' AND dh.location_id = loc.location_id ';

Line 2088: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2084: elsif (l_table_name(i) = 'FA_LEASES') then
2085: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2086: ' AND ad.lease_id = ls.lease_id(+) ';
2087: elsif (l_table_name(i) = 'FA_LOCATIONS') then
2088: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2089: ' AND dh.location_id = loc.location_id ';
2090: elsif (l_table_name(i) = 'FA_BOOKS' or l_table_name(i) = 'FA_METHODS') then
2091: -- first, add to DP join to line level if needed
2092: if ((instr(upper(l_from),'FA_DEPRN_PERIODS') = 0 ) and

Line 2095: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_DEPRN_PERIODS' || ' ' || 'dp';

2091: -- first, add to DP join to line level if needed
2092: if ((instr(upper(l_from),'FA_DEPRN_PERIODS') = 0 ) and
2093: (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF'))) then
2094:
2095: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_DEPRN_PERIODS' || ' ' || 'dp';
2096: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.book_type_code = ctlgd.valuation_method';
2097:
2098: if (p_extract_type = 'DEPRN') then
2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';

Line 2096: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.book_type_code = ctlgd.valuation_method';

2092: if ((instr(upper(l_from),'FA_DEPRN_PERIODS') = 0 ) and
2093: (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF'))) then
2094:
2095: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_DEPRN_PERIODS' || ' ' || 'dp';
2096: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.book_type_code = ctlgd.valuation_method';
2097:
2098: if (p_extract_type = 'DEPRN') then
2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2100: elsif (p_extract_type = 'DEF') then

Line 2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';

2095: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_DEPRN_PERIODS' || ' ' || 'dp';
2096: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.book_type_code = ctlgd.valuation_method';
2097:
2098: if (p_extract_type = 'DEPRN') then
2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2100: elsif (p_extract_type = 'DEF') then
2101: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2102: else
2103: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND th.date_effective between dp.period_open_date and nvl(dp.period_close_date, sysdate) ';

Line 2101: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';

2097:
2098: if (p_extract_type = 'DEPRN') then
2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2100: elsif (p_extract_type = 'DEF') then
2101: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2102: else
2103: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND th.date_effective between dp.period_open_date and nvl(dp.period_close_date, sysdate) ';
2104: end if;
2105: end if;

Line 2103: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND th.date_effective between dp.period_open_date and nvl(dp.period_close_date, sysdate) ';

2099: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2100: elsif (p_extract_type = 'DEF') then
2101: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND dp.period_counter = ctlgd.source_id_int_2';
2102: else
2103: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND th.date_effective between dp.period_open_date and nvl(dp.period_close_date, sysdate) ';
2104: end if;
2105: end if;
2106:
2107: -- then add books (this must always be added in this block)

Line 2111: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = dd.asset_id ' ||

2107: -- then add books (this must always be added in this block)
2108: -- if (instr(upper(l_from),'FA_BOOKS') = 0 ) then
2109: if (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF')) then
2110: if (p_extract_type = 'DEPRN') then
2111: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = dd.asset_id ' ||
2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||
2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||

Line 2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||

2108: -- if (instr(upper(l_from),'FA_BOOKS') = 0 ) then
2109: if (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF')) then
2110: if (p_extract_type = 'DEPRN') then
2111: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = dd.asset_id ' ||
2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||
2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||

Line 2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';

2109: if (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF')) then
2110: if (p_extract_type = 'DEPRN') then
2111: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = dd.asset_id ' ||
2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||
2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';

Line 2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||

2111: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = dd.asset_id ' ||
2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||
2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||

Line 2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||

2112: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = dd.book_type_code ' ||
2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||
2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||

Line 2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';

2113: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2114: elsif (p_level = 'DEF') then -- deferred
2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||
2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||
2121: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';

Line 2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||

2115: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = df.asset_id' ||
2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||
2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||
2121: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2122: end if;
2123:

Line 2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||

2116: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = df.book_type_code' ||
2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||
2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||
2121: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2122: end if;
2123:
2124: -- need to add book if this is invoked from methods

Line 2121: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';

2117: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2118: else -- STG
2119: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.asset_id = th.asset_id ' ||
2120: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND bk.book_type_code = th.book_type_code ' ||
2121: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(dp.period_close_date, sysdate) between bk.date_effective and nvl(bk.date_ineffective, sysdate) ';
2122: end if;
2123:
2124: -- need to add book if this is invoked from methods
2125: if (instr(upper(l_from),'FA_BOOKS') = 0 and

Line 2127: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_BOOKS' || ' ' || 'bk';

2123:
2124: -- need to add book if this is invoked from methods
2125: if (instr(upper(l_from),'FA_BOOKS') = 0 and
2126: (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF'))) then
2127: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' ' || 'FA_BOOKS' || ' ' || 'bk';
2128: end if;
2129:
2130: end if;
2131:

Line 2136: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND mt.method_code = bk.deprn_method_code ';

2132: -- then methods
2133: if ((l_table_name(i) = 'FA_METHODS') and
2134: (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF'))) then
2135:
2136: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND mt.method_code = bk.deprn_method_code ';
2137: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(mt.life_in_months, -99) = nvl(bk.life_in_months, -99) ';
2138:
2139: end if;
2140:

Line 2137: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(mt.life_in_months, -99) = nvl(bk.life_in_months, -99) ';

2133: if ((l_table_name(i) = 'FA_METHODS') and
2134: (p_level= 'STG' or p_extract_type in ('DEPRN', 'DEF'))) then
2135:
2136: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND mt.method_code = bk.deprn_method_code ';
2137: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND nvl(mt.life_in_months, -99) = nvl(bk.life_in_months, -99) ';
2138:
2139: end if;
2140:
2141: elsif (l_table_name(i) = 'FA_DEPRN_SUMMARY') then

Line 2143: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.asset_id = ctlgd.source_id_int_1 ' ||

2139: end if;
2140:
2141: elsif (l_table_name(i) = 'FA_DEPRN_SUMMARY') then
2142: if (p_extract_type = 'DEPRN') then
2143: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.asset_id = ctlgd.source_id_int_1 ' ||
2144: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.book_type_code = ctlgd.source_id_char_1 ' ||
2145: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.period_counter = ctlgd.source_id_int_2 ' ||
2146: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.deprn_run_id = ctlgd.source_id_int_3 ';
2147:

Line 2144: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.book_type_code = ctlgd.source_id_char_1 ' ||

2140:
2141: elsif (l_table_name(i) = 'FA_DEPRN_SUMMARY') then
2142: if (p_extract_type = 'DEPRN') then
2143: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.asset_id = ctlgd.source_id_int_1 ' ||
2144: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.book_type_code = ctlgd.source_id_char_1 ' ||
2145: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.period_counter = ctlgd.source_id_int_2 ' ||
2146: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.deprn_run_id = ctlgd.source_id_int_3 ';
2147:
2148: else

Line 2145: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.period_counter = ctlgd.source_id_int_2 ' ||

2141: elsif (l_table_name(i) = 'FA_DEPRN_SUMMARY') then
2142: if (p_extract_type = 'DEPRN') then
2143: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.asset_id = ctlgd.source_id_int_1 ' ||
2144: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.book_type_code = ctlgd.source_id_char_1 ' ||
2145: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.period_counter = ctlgd.source_id_int_2 ' ||
2146: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.deprn_run_id = ctlgd.source_id_int_3 ';
2147:
2148: else
2149: raise table_not_found;

Line 2146: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.deprn_run_id = ctlgd.source_id_int_3 ';

2142: if (p_extract_type = 'DEPRN') then
2143: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.asset_id = ctlgd.source_id_int_1 ' ||
2144: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.book_type_code = ctlgd.source_id_char_1 ' ||
2145: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.period_counter = ctlgd.source_id_int_2 ' ||
2146: fa_cmp_string_pkg.g_chr_newline || ' ' || ' AND ds.deprn_run_id = ctlgd.source_id_int_3 ';
2147:
2148: else
2149: raise table_not_found;
2150: end if;

Line 2155: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2151: elsif (l_table_name(i) = 'FA_ADDITIONS_TL') then
2152:
2153: l_insert := l_insert || ', LANGUAGE ';
2154: l_select := l_select || ', adtl.language ';
2155: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2156: ' WHERE adtl.asset_id = xl.asset_id ' || ' ' ||
2157: ' AND xl.distribution_type_code = ''' || p_extract_type || ''' ';
2158: l_add_tl_in_use := TRUE;
2159: elsif (l_table_name(i) = 'FA_CATEGORIES_TL') then

Line 2161: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2157: ' AND xl.distribution_type_code = ''' || p_extract_type || ''' ';
2158: l_add_tl_in_use := TRUE;
2159: elsif (l_table_name(i) = 'FA_CATEGORIES_TL') then
2160:
2161: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2162: ' WHERE cattl.category_id = xl.cat_id ';
2163: if (l_add_tl_in_use) then
2164: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2165: ' AND cattl.language = adtl.language ';

Line 2164: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2160:
2161: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2162: ' WHERE cattl.category_id = xl.cat_id ';
2163: if (l_add_tl_in_use) then
2164: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2165: ' AND cattl.language = adtl.language ';
2166: l_where := replace(l_where, 'WHERE cattl', 'AND cattl');
2167:
2168: else

Line 2169: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||

2165: ' AND cattl.language = adtl.language ';
2166: l_where := replace(l_where, 'WHERE cattl', 'AND cattl');
2167:
2168: else
2169: l_where := l_where || fa_cmp_string_pkg.g_chr_newline || ' ' ||
2170: ' AND xl.distribution_type_code = ''' || p_extract_type || ''' '; -- bug 8580251
2171: l_insert := l_insert || ', LANGUAGE ';
2172: l_select := l_select || ', cattl.language ';
2173:

Line 2243: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2239: if (p_extract_type = 'DEPRN') then
2240: l_from := replace(l_from, 'fa_deprn_summary', 'fa_mc_deprn_summary');
2241: l_from := replace(l_from, 'fa_deprn_detail', 'fa_mc_deprn_detail');
2242:
2243: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2244: ' AND dd.set_of_books_id = bc.set_of_books_id';
2245: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2246: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2247: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||

Line 2245: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2241: l_from := replace(l_from, 'fa_deprn_detail', 'fa_mc_deprn_detail');
2242:
2243: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2244: ' AND dd.set_of_books_id = bc.set_of_books_id';
2245: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2246: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2247: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2248: ' ''SECONDARY'')';
2249:

Line 2246: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||

2242:
2243: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2244: ' AND dd.set_of_books_id = bc.set_of_books_id';
2245: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2246: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2247: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2248: ' ''SECONDARY'')';
2249:
2250: -- only apend the DS clause if it's used!!!!

Line 2247: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||

2243: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2244: ' AND dd.set_of_books_id = bc.set_of_books_id';
2245: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2246: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2247: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2248: ' ''SECONDARY'')';
2249:
2250: -- only apend the DS clause if it's used!!!!
2251: if (instr(l_from,'fa_mc_deprn_summary') > 0) then

Line 2252: l_where := l_where || ' and ds.set_of_books_id = bc.set_of_books_id' || fa_cmp_string_pkg.g_chr_newline ;

2248: ' ''SECONDARY'')';
2249:
2250: -- only apend the DS clause if it's used!!!!
2251: if (instr(l_from,'fa_mc_deprn_summary') > 0) then
2252: l_where := l_where || ' and ds.set_of_books_id = bc.set_of_books_id' || fa_cmp_string_pkg.g_chr_newline ;
2253: end if;
2254: elsif (p_extract_type = 'DEF') then
2255: l_from := replace(l_from, 'fa_deferred_deprn', 'fa_mc_deferred_deprn');
2256:

Line 2257: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2253: end if;
2254: elsif (p_extract_type = 'DEF') then
2255: l_from := replace(l_from, 'fa_deferred_deprn', 'fa_mc_deferred_deprn');
2256:
2257: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2258: ' AND df.set_of_books_id = bc.set_of_books_id';
2259: else
2260: if (instr(l_from,'fa_book_controls') = 0) then
2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';

Line 2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';

2257: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2258: ' AND df.set_of_books_id = bc.set_of_books_id';
2259: else
2260: if (instr(l_from,'fa_book_controls') = 0) then
2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';
2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||

Line 2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';

2258: ' AND df.set_of_books_id = bc.set_of_books_id';
2259: else
2260: if (instr(l_from,'fa_book_controls') = 0) then
2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';
2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||

Line 2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2260: if (instr(l_from,'fa_book_controls') = 0) then
2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';
2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||

Line 2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||

2261: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls bc ';
2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2269: ' ''SECONDARY'')';

Line 2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||

2262: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2269: ' ''SECONDARY'')';
2270:

Line 2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||

2263:
2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2269: ' ''SECONDARY'')';
2270:
2271: end if;

Line 2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||

2264: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2265: ' AND bc.book_type_code = stg.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2266: ' AND bc.set_of_books_id = le.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2267: ' AND le.ledger_category_code = decode(l_secondary,' || fa_cmp_string_pkg.g_chr_newline ||
2268: ' 0, ''ALC'', ' || fa_cmp_string_pkg.g_chr_newline ||
2269: ' ''SECONDARY'')';
2270:
2271: end if;
2272:

Line 2277: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2273: -- Bug 13895687 : Use mc_retirements for ALC
2274: if (instr(l_from,'fa_retirements') > 0) then
2275: l_from := replace(l_from, 'fa_retirements', 'fa_mc_retirements');
2276:
2277: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2278: ' AND ret.set_of_books_id = bc.set_of_books_id ' ;
2279: end if;
2280:
2281: l_select := replace(l_select, 'stg.ledger_id', 'bc.set_of_books_id');

Line 2289: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2285:
2286: -- Bug 5159010 changed fa_asset_invoices to upper case
2287: l_from := replace(l_from, 'FA_ASSET_INVOICES', 'fa_mc_asset_invoices');
2288:
2289: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2290: ' AND adj.set_of_books_id = bc.set_of_books_id ' ;
2291:
2292: -- only apend the AI clause if it's used!!!!
2293: if (instr(l_from,'fa_mc_asset_invoices') > 0) then

Line 2294: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2290: ' AND adj.set_of_books_id = bc.set_of_books_id ' ;
2291:
2292: -- only apend the AI clause if it's used!!!!
2293: if (instr(l_from,'fa_mc_asset_invoices') > 0) then
2294: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2295: ' AND adj.set_of_books_id = ai.set_of_books_id(+) ' ;
2296: end if;
2297:
2298: end if;

Line 2302: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls mcbc ';

2298: end if;
2299: elsif (l_loop_index = 2 and p_level = 'HEADER') then
2300:
2301: -- new logic to handle special secondary case
2302: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls mcbc ';
2303: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2304:
2305: l_select := replace(l_select, 'bc.GL_POSTING_ALLOWED_FLAG', 'mcbc.GL_POSTING_ALLOWED_FLAG');
2306:

Line 2303: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';

2299: elsif (l_loop_index = 2 and p_level = 'HEADER') then
2300:
2301: -- new logic to handle special secondary case
2302: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' fa_mc_book_controls mcbc ';
2303: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2304:
2305: l_select := replace(l_select, 'bc.GL_POSTING_ALLOWED_FLAG', 'mcbc.GL_POSTING_ALLOWED_FLAG');
2306:
2307: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

Line 2307: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2303: l_from := l_from || ', ' || fa_cmp_string_pkg.g_chr_newline || ' gl_ledgers le ';
2304:
2305: l_select := replace(l_select, 'bc.GL_POSTING_ALLOWED_FLAG', 'mcbc.GL_POSTING_ALLOWED_FLAG');
2306:
2307: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2308: ' AND mcbc.book_type_code = bc.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2309: ' AND mcbc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2310: ' AND le.ledger_id = mcbc.set_of_books_id ';
2311:

Line 2308: ' AND mcbc.book_type_code = bc.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||

2304:
2305: l_select := replace(l_select, 'bc.GL_POSTING_ALLOWED_FLAG', 'mcbc.GL_POSTING_ALLOWED_FLAG');
2306:
2307: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2308: ' AND mcbc.book_type_code = bc.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2309: ' AND mcbc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2310: ' AND le.ledger_id = mcbc.set_of_books_id ';
2311:
2312: -- remove the bc sob join from secondary statement

Line 2309: ' AND mcbc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||

2305: l_select := replace(l_select, 'bc.GL_POSTING_ALLOWED_FLAG', 'mcbc.GL_POSTING_ALLOWED_FLAG');
2306:
2307: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2308: ' AND mcbc.book_type_code = bc.book_type_code ' || fa_cmp_string_pkg.g_chr_newline ||
2309: ' AND mcbc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2310: ' AND le.ledger_id = mcbc.set_of_books_id ';
2311:
2312: -- remove the bc sob join from secondary statement
2313: l_where := replace(l_where, ' AND bc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline , '');

Line 2313: l_where := replace(l_where, ' AND bc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline , '');

2309: ' AND mcbc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline ||
2310: ' AND le.ledger_id = mcbc.set_of_books_id ';
2311:
2312: -- remove the bc sob join from secondary statement
2313: l_where := replace(l_where, ' AND bc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline , '');
2314:
2315: elsif (l_loop_index = 1 and p_level = 'HEADER') then
2316: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2317: ' AND bc.set_of_books_id = ctlgd.ledger_id ';

Line 2316: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||

2312: -- remove the bc sob join from secondary statement
2313: l_where := replace(l_where, ' AND bc.set_of_books_id = ctlgd.ledger_id ' || fa_cmp_string_pkg.g_chr_newline , '');
2314:
2315: elsif (l_loop_index = 1 and p_level = 'HEADER') then
2316: l_where := l_where || fa_cmp_string_pkg.g_chr_newline ||
2317: ' AND bc.set_of_books_id = ctlgd.ledger_id ';
2318: end if;
2319:
2320: -- concatonate all the clauses into a single statment

Line 2321: l_bodypkg := l_insert || l_select || l_from || l_where || ';' || fa_cmp_string_pkg.g_chr_newline || l_rowcount_debug || fa_cmp_string_pkg.g_chr_newline;

2317: ' AND bc.set_of_books_id = ctlgd.ledger_id ';
2318: end if;
2319:
2320: -- concatonate all the clauses into a single statment
2321: l_bodypkg := l_insert || l_select || l_from || l_where || ';' || fa_cmp_string_pkg.g_chr_newline || l_rowcount_debug || fa_cmp_string_pkg.g_chr_newline;
2322:
2323:
2324: -- add rowcount debug after the primary statement and before report select
2325: -- also add an if condition around the mrc so we don't needlessly execute statements when mrc is not enabled

Line 2329: l_bodypkg := c_mc_if_condition || fa_cmp_string_pkg.g_chr_newline ||

2325: -- also add an if condition around the mrc so we don't needlessly execute statements when mrc is not enabled
2326: if (l_loop_index <> 1) then
2327:
2328: if (p_level = 'LINE') then
2329: l_bodypkg := c_mc_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||

Line 2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||

2326: if (l_loop_index <> 1) then
2327:
2328: if (p_level = 'LINE') then
2329: l_bodypkg := c_mc_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||

Line 2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;

2327:
2328: if (p_level = 'LINE') then
2329: l_bodypkg := c_mc_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;

Line 2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||

2329: l_bodypkg := c_mc_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2336: end if;
2337:

Line 2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||

2330: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2336: end if;
2337:
2338: if (p_level = 'STG' and l_loop_index in (2,4)) then

Line 2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;

2331: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2332: elsif (p_level = 'HEADER') then
2333: l_bodypkg := c_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2334: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2336: end if;
2337:
2338: if (p_level = 'STG' and l_loop_index in (2,4)) then
2339: l_bodypkg := c_group_if_condition || fa_cmp_string_pkg.g_chr_newline ||

Line 2339: l_bodypkg := c_group_if_condition || fa_cmp_string_pkg.g_chr_newline ||

2335: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2336: end if;
2337:
2338: if (p_level = 'STG' and l_loop_index in (2,4)) then
2339: l_bodypkg := c_group_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2340: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2341: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2342: end if;
2343: elsif (l_loop_index = 1) then

Line 2340: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||

2336: end if;
2337:
2338: if (p_level = 'STG' and l_loop_index in (2,4)) then
2339: l_bodypkg := c_group_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2340: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2341: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2342: end if;
2343: elsif (l_loop_index = 1) then
2344: if (p_level = 'LINE' or p_level = 'HEADER') then

Line 2341: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;

2337:
2338: if (p_level = 'STG' and l_loop_index in (2,4)) then
2339: l_bodypkg := c_group_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2340: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2341: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2342: end if;
2343: elsif (l_loop_index = 1) then
2344: if (p_level = 'LINE' or p_level = 'HEADER') then
2345: l_bodypkg := c_non_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||

Line 2345: l_bodypkg := c_non_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||

2341: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2342: end if;
2343: elsif (l_loop_index = 1) then
2344: if (p_level = 'LINE' or p_level = 'HEADER') then
2345: l_bodypkg := c_non_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2346: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2347: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2348:
2349: end if;

Line 2346: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||

2342: end if;
2343: elsif (l_loop_index = 1) then
2344: if (p_level = 'LINE' or p_level = 'HEADER') then
2345: l_bodypkg := c_non_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2346: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2347: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2348:
2349: end if;
2350: end if;

Line 2347: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;

2343: elsif (l_loop_index = 1) then
2344: if (p_level = 'LINE' or p_level = 'HEADER') then
2345: l_bodypkg := c_non_sec_if_condition || fa_cmp_string_pkg.g_chr_newline ||
2346: l_bodypkg || fa_cmp_string_pkg.g_chr_newline ||
2347: ' end if; ' || fa_cmp_string_pkg.g_chr_newline ;
2348:
2349: end if;
2350: end if;
2351:

Line 2355: fa_cmp_string_pkg.CreateString

2351:
2352: -- build the package value to return
2353:
2354: if (l_loop_index = 1) then
2355: fa_cmp_string_pkg.CreateString
2356: (p_package_text => l_BodyPkg
2357: ,p_array_string => l_array_pkg);
2358: else
2359: fa_cmp_string_pkg.CreateString

Line 2359: fa_cmp_string_pkg.CreateString

2355: fa_cmp_string_pkg.CreateString
2356: (p_package_text => l_BodyPkg
2357: ,p_array_string => l_array_pkg);
2358: else
2359: fa_cmp_string_pkg.CreateString
2360: (p_package_text => l_BodyPkg
2361: ,p_array_string => l_array_body);
2362:
2363: l_array_pkg :=

Line 2364: fa_cmp_string_pkg.ConcatTwoStrings

2360: (p_package_text => l_BodyPkg
2361: ,p_array_string => l_array_body);
2362:
2363: l_array_pkg :=
2364: fa_cmp_string_pkg.ConcatTwoStrings
2365: (p_array_string_1 => l_array_pkg
2366: ,p_array_string_2 => l_array_body);
2367: end if;
2368: