FA Asset Additions

Description

Categories
Enginatics
Application
Assets
Source
Asset Additions Report (XML)
Short Name
FAS420_XML
DB package
FA_FAS420_XMLP_PKG
Repository
GitHub
Imported from BI Publisher
Asset Additions Report

SQL 260 lines

Parameters 10

ParameterTypeList of values SQL
LedgerLOV
BookLOV
fth.book_type_code = :p_book
From Period EnteredLOV
fth.date_effective >= 
(
select 
min(fdp.period_open_date)
from   
fa_deprn_periods fdp
where  
fdp.book_type_code = fbc.book_type_code and 
fdp.calendar_period_open_date >= (select fcp.start_date from fa_calendar_periods fcp where fcp.calendar_type = fbc.deprn_calendar and fcp.period_name = :p_from_period) and
nvl(:p_mrcsobtype,'P') != 'R'
having min(fdp.period_open_date) is not null
union
select 
min(fdpmv.period_open_date)
from   
fa_deprn_periods_mrc_v fdpmv
where  
fdpmv.book_type_code = fbc.book_type_code and
fdpmv.calendar_period_open_date >= (select fcp.start_date from fa_calendar_periods fcp where fcp.calendar_type = fbc.deprn_calendar and fcp.period_name = :p_from_period) and
:p_mrcsobtype = 'R'
having min(fdpmv.period_open_date) is not null
)
To Period EnteredLOV
fth.date_effective <=
(
select 
max(nvl(fdp.period_close_date, sysdate))
from   
fa_deprn_periods fdp
where  
fdp.book_type_code = fth.book_type_code and 
fdp.calendar_period_open_date <= (select fcp.start_date from fa_calendar_periods fcp where fcp.calendar_type = fbc.deprn_calendar and fcp.period_name = :p_to_period) and
nvl(:p_mrcsobtype,'P') != 'R'
having max(nvl(fdp.period_close_date, sysdate)) is not null
union
select 
max(nvl(fdpmv.period_close_date, sysdate))
from   
fa_deprn_periods_mrc_v fdpmv
where  
fdpmv.book_type_code = fth.book_type_code and
fdpmv.calendar_period_open_date <= (select fcp.start_date from fa_calendar_periods fcp where fcp.calendar_type = fbc.deprn_calendar and fcp.period_name = :p_to_period) and
:p_mrcsobtype = 'R'
having max(nvl(fdpmv.period_close_date, sysdate)) is not null
)
From Period EffectiveLOV
fth.transaction_date_entered >=
(
select
min(fcp.start_date)
from
fa_calendar_periods fcp
where
fcp.calendar_type = fbc.deprn_calendar and
fcp.start_date >= (select fcp2.start_date from fa_calendar_periods fcp2 where fcp2.calendar_type = fbc.deprn_calendar and fcp2.period_name = :p_from_period_effective)
)
To Period EffectiveLOV
fth.transaction_date_entered <=
(
select
max(fcp.end_date)
from
fa_calendar_periods fcp
where
fcp.calendar_type = fbc.deprn_calendar and
fcp.start_date <= (select fcp2.start_date from fa_calendar_periods fcp2 where fcp2.calendar_type = fbc.deprn_calendar and fcp2.period_name = :p_to_period_effective)
)
Category FromLOV
x.asset_category >= :p_category_from
Category ToLOV
x.asset_category <= :p_category_to
Asset NumberLOV
x.asset_number=:p_asset_number
Asset KeyLOV
x.asset_key=:p_asset_key