DBA Data[Home] [Help]

APPS.FA_GAINLOSS_DPR_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 119

	select	transaction_header_id_in,transaction_header_id_out
	from	fa_retirements
	where	book_type_code=dpr.book
	and	asset_id=dpr.asset_id
	and	retirement_id=retirement_id;
Line: 128

	select 'Y'
	from	fa_books fbks1,
		fa_books fbks2
	where	fbks1.book_type_code = dpr.book
	and	fbks1.asset_id = dpr.asset_id
	and	fbks2.book_type_code = fbks1.book_type_code
	and	fbks2.asset_id = fbks2.asset_id
	and	fbks1.transaction_header_id_in between l_transaction_header_id_in and nvl(l_transaction_header_id_out,l_transaction_header_id_in)
	and	fbks2.transaction_header_id_in between l_transaction_header_id_in and nvl(l_transaction_header_id_out,l_transaction_header_id_in)
	and	fbks2.transaction_header_id_in = fbks1.transaction_header_id_out
	and	fbks2.adjusted_rate <> fbks1.adjusted_rate ;
Line: 147

	select	fbks1.adjusted_rate,fbks1.transaction_header_id_in,fbks1.deprn_method_code,
		fbks2.adjusted_rate,fbks2.transaction_header_id_in,fbks2.deprn_method_code
	from	fa_books fbks1,
		fa_books fbks2
	where	fbks1.book_type_code=dpr.book
	and	fbks1.asset_id=dpr.asset_id
	and	fbks2.book_type_code =fbks1.book_type_code
	and	fbks2.asset_id =fbks2.asset_id
	and	fbks1.transaction_header_id_in between l_transaction_header_id_in and l_transaction_header_id_out
	and	fbks2.transaction_header_id_in between l_transaction_header_id_in and l_transaction_header_id_out
	and	fbks2.transaction_header_id_in = fbks1.transaction_header_id_out
	and	fbks2.adjusted_rate <> fbks1.adjusted_rate;
Line: 167

	select fdp.period_num
	from	fa_transaction_headers fth,
		fa_deprn_periods fdp
	where	fth.transaction_header_id= x_transaction_id
	and	fdp.book_type_code = dpr.book
	and	fth.transaction_date_entered
		between fdp.calendar_period_open_date and nvl(fdp.calendar_period_close_date,sysdate);
Line: 349

               select end_date
               into l_pcal_life_end_date
               from fa_calendar_periods
               where calendar_type = p_cal
               and l_life_end_date between start_date and end_date;
Line: 355

               select end_date
               into l_pcal_ret_end_date
               from fa_calendar_periods
               where calendar_type = p_cal
               and to_date(dpr.ret_prorate_jdate,'j') between start_date and end_date;
Line: 411

      select nvl(transaction_header_id_out, transaction_header_id_in) -- Bug# 5074257
      from   fa_retirements
      where  retirement_id = ret.retirement_id;
Line: 417

      select transaction_type_code
           , transaction_date_entered
           , transaction_name
           , source_transaction_header_id
           , mass_reference_id
           , transaction_subtype
           , transaction_key
           , amortization_start_date
           , calling_interface
           , mass_transaction_id
           , fa_std_types.FA_NO_OVERRIDE
           , member_transaction_header_id
           , trx_reference_id
      from fa_transaction_headers
      where transaction_header_id = c_thid;
Line: 434

      select outbk.salvage_value - inbk.salvage_value
           , nvl(outbk.allowed_deprn_limit_amount, 0) -
             nvl(inbk.allowed_deprn_limit_amount, 0),
             outbk.unrevalued_cost - inbk.unrevalued_cost
      from   fa_books inbk
           , fa_books outbk
      where  inbk.transaction_header_id_in = ret.th_id_in
      and    outbk.asset_id = ret.asset_id
      and    outbk.book_type_code = ret.book
      and    outbk.transaction_header_id_out = ret.th_id_in;
Line: 446

      select outbk.salvage_value - inbk.salvage_value
           , nvl(outbk.allowed_deprn_limit_amount, 0) -
             nvl(inbk.allowed_deprn_limit_amount, 0),
             outbk.unrevalued_cost - inbk.unrevalued_cost
      from   fa_books_mrc_v inbk
           , fa_books_mrc_v outbk
      where  inbk.transaction_header_id_in = ret.th_id_in
      and    outbk.asset_id = ret.asset_id
      and    outbk.book_type_code = ret.book
      and    outbk.transaction_header_id_out = ret.th_id_in;
Line: 458

      select sum(decode(debit_credit_flag, 'CR', -1, 1) * adjustment_amount)
      from   fa_adjustments
      where  asset_id = ret.asset_id
      and    book_type_code = ret.book
      and    source_type_code = 'RETIREMENT'
      and    adjustment_type = 'RESERVE'
      and    transaction_header_id = ret.th_id_in;
Line: 467

      select sum(decode(debit_credit_flag, 'CR', -1, 1) * adjustment_amount)
      from   fa_adjustments_mrc_v
      where  asset_id = ret.asset_id
      and    book_type_code = ret.book
      and    source_type_code = 'RETIREMENT'
      and    adjustment_type = 'RESERVE'
      and    transaction_header_id = ret.th_id_in;
Line: 479

     select con.prorate_date
     from fa_retirements ret,
          fa_conventions con
     where ret.transaction_header_id_in   = c_thid
     and   con.prorate_convention_code    = ret.RETIREMENT_PRORATE_CONVENTION
     and   c_trx_date between con.start_date and con.end_date ;
Line: 488

     select con.prorate_date
     from fa_retirements_mrc_v ret,
          fa_conventions       con
     where ret.transaction_header_id_in   = c_thid
     and   con.prorate_convention_code    = ret.RETIREMENT_PRORATE_CONVENTION
     and   c_trx_date between con.start_date and con.end_date ;