DBA Data[Home] [Help]

APPS.FA_FAS445_XMLP_PKG SQL Statements

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

Line: 13

  SELECT cr.concurrent_program_id
  INTO l_conc_program_id
  FROM FND_CONCURRENT_REQUESTS cr
  WHERE cr.program_application_id = 140
  AND   cr.request_id = P_CONC_REQUEST_ID;
Line: 18

  SELECT cp.user_concurrent_program_name
  INTO   l_report_name
  FROM    FND_CONCURRENT_PROGRAMS_VL cp
  WHERE
      cp.concurrent_program_id= l_conc_program_id
  and cp.application_id = 140;
Line: 51

  SELECT period_counter,
         period_open_date,
         nvl(period_close_date, sysdate),
         fiscal_year
  INTO   l_period_PC,
         l_period_POD,
         l_period_PCD,
         l_period_FY
  FROM   FA_DEPRN_PERIODS
  WHERE  book_type_code = P_BOOK
  AND    period_name    = P_PERIOD1;
Line: 76

  SELECT period_counter,
         period_open_date,
         nvl(period_close_date, sysdate),
         fiscal_year
  INTO   l_period_PC,
         l_period_POD,
         l_period_PCD,
         l_period_FY
  FROM   FA_DEPRN_PERIODS
  WHERE  book_type_code = P_BOOK
  AND    period_name    = P_PERIOD2;
Line: 98

  SELECT
         cur.precision
  INTO
         l_precision
  FROM   FA_BOOK_CONTROLS bc,
         GL_SETS_OF_BOOKS sob,
         FND_CURRENCIES cur
  WHERE  bc.book_type_code = P_BOOK
  AND    sob.set_of_books_id = bc.set_of_books_id
  AND    sob.currency_code   = cur.currency_code;
Line: 118

    select MEANING
    into   l_meaning
    from   FA_LOOKUPS
    where  LOOKUP_TYPE = 'GAINLOSS'
    and    LOOKUP_CODE = 'GAIN';
Line: 134

    select MEANING
    into   l_meaning
    from   FA_LOOKUPS
    where  LOOKUP_TYPE = 'GAINLOSS'
    and    LOOKUP_CODE = 'LOSS';
Line: 193

  select rate_source_rule
  from fa_methods
  where method_code = l_method_code;
Line: 199

   	select period_num, cp.start_date, fiscal_year_name
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and  start_date  >=  previous_end_date
	order by start_date;
Line: 207

SELECT	decode (mt.rate_source_rule,
			'CALCULATED',	bk.prorate_date,
                        'FORMULA',      bk.prorate_date,
			'TABLE',	bk.deprn_start_date,
			'FLAT',		decode (mt.deprn_basis_rule,
						'COST',	bk.prorate_date,
						'NBV',	bk.deprn_start_date),
                        'PROD',         bk.date_placed_in_service),
                to_number (to_char (bk.prorate_date, 'J')),
		to_number (to_char (bk.date_placed_in_service, 'J')),
                to_number (to_char (bk.deprn_start_date, 'J')),
		nvl(bk.life_in_months, 0),
		bk.recoverable_cost,
		bk.adjusted_cost,
		bk.cost,
                nvl(bk.reval_amortization_basis, 0),
		bk.rate_adjustment_factor,
		nvl(bk.adjusted_rate, 0),
		bk.ceiling_name,
		bk.bonus_rule,
                nvl (bk.production_capacity, 0),
                nvl (bk.adjusted_capacity, 0),
		mt.method_code,
		ad.asset_number,
                nvl (bk.adjusted_recoverable_cost, bk.recoverable_cost),
                bk.salvage_value,
		bk.period_counter_life_complete,
		bk.annual_deprn_rounding_flag,
		bk.itc_amount_id,
		bk.itc_basis,
		ceilt.ceiling_type,
                nvl(bk.formula_factor, 1),
                nvl(bk.short_fiscal_year_flag, 'NO'),
                bk.conversion_date,
                bk.original_deprn_start_date,
                bk.prorate_date,
		to_number(to_char(bk.prorate_date,'YYYY')),
		bk.date_placed_in_service,
		ret.stl_method_code,
		ret.stl_life_in_months,
		ret.stl_deprn_amount,
		ret.date_retired,
		to_number(to_char(ret.date_retired,'YYYY')),
		th.transaction_type_code
 FROM	fa_ceiling_types ceilt,
		fa_methods mt,
		fa_category_books cb,
		fa_books bk,
		fa_transaction_headers th,
		fa_retirements ret,
		fa_additions ad
  WHERE	cb.book_type_code = X_book
	AND	ad.asset_category_id = cb.category_id
	AND	ceilt.ceiling_name(+) = bk.ceiling_name
	AND	mt.method_code = bk.deprn_method_code
	AND	bk.book_type_code = X_book
	AND	bk.asset_id = X_asset_id
	AND	bk.transaction_header_id_out = th.transaction_header_id
	AND  	th.transaction_type_code IN ('FULL RETIREMENT','PARTIAL RETIREMENT')
	AND	th.transaction_header_id = ret.transaction_header_id_in
	AND 	ret.status = 'PROCESSED'
	AND	nvl (mt.life_in_months, -9999) =
			nvl (bk.life_in_months, -9999)
	AND	ad.asset_id = bk.asset_id;
Line: 283

 select deprn_reserve, ytd_deprn, bk.date_placed_in_service,
		bk.deprn_method_code
  into dpr_in.deprn_rsv, dpr_in.ytd_deprn, l_main_dpis,
		l_method_code
  from fa_deprn_summary ds,
	fa_books bk,
	fa_transaction_headers th
  where ds.book_type_code = X_book
  and   ds.asset_id = X_asset_id
  and   ds.deprn_source_code = 'BOOKS'
  and 	th.transaction_header_id = bk.transaction_header_id_in
  and   th.transaction_header_id in (select max(transaction_header_id)
				from fa_transaction_headers thsub
				where transaction_type_code like '%RETIREMENT'
				and   book_type_code = x_book
				and   asset_id = x_asset_id)
;
Line: 312

  select 	bc.deprn_calendar,
		bc.fiscal_year_name,
		ct.number_per_fiscal_year
  into h_calendar_type, h_fy_name, h_num_per_fy
  from fa_book_controls bc, fa_calendar_types ct
  where bc.book_type_code = X_book
  and bc.deprn_calendar = ct.calendar_type;
Line: 376

      select period_num
      into dpr_in.p_cl_begin
      from fa_calendar_periods cp,
	   fa_book_controls bc
      where calendar_type = bc.deprn_calendar
      and bc.book_type_code = x_book
      and dpr_in.prorate_date
	between cp.start_date and cp.end_date;
Line: 386

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and to_date('19611231','YYYYMMDD')
	between cp.start_date and cp.end_date;
Line: 397

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and l_date_retired
	between cp.start_date and cp.end_date;
Line: 420

	select fiscal_year
	into dpr_in.y_begin
	from fa_fiscal_year
	where fiscal_year_name = l_fiscal_year_name
	and l_start_date between start_date and end_date;
Line: 427

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and to_date('19611231','YYYYMMDD')
	between cp.start_date and cp.end_date;
Line: 438

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and l_date_retired
	between cp.start_date and cp.end_date;
Line: 680

  select rate_source_rule
  from fa_methods
  where method_code = l_method_code;
Line: 686

   	select period_num, cp.start_date, fiscal_year_name
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and  start_date  >=  previous_end_date
	order by start_date;
Line: 694

 SELECT	decode (mt.rate_source_rule,
			'CALCULATED',	bk.prorate_date,
                        'FORMULA',      bk.prorate_date,
			'TABLE',	bk.deprn_start_date,
			'FLAT',		decode (mt.deprn_basis_rule,
						'COST',	bk.prorate_date,
						'NBV',	bk.deprn_start_date),
                        'PROD',         bk.date_placed_in_service),
                to_number (to_char (bk.prorate_date, 'J')),
		to_number (to_char (bk.date_placed_in_service, 'J')),
                to_number (to_char (bk.deprn_start_date, 'J')),
		nvl(bk.life_in_months, 0),
		bk.recoverable_cost,
		bk.adjusted_cost,
		bk.cost,
                nvl(bk.reval_amortization_basis, 0),
		bk.rate_adjustment_factor,
		nvl(bk.adjusted_rate, 0),
		bk.ceiling_name,
		bk.bonus_rule,
                nvl (bk.production_capacity, 0),
                nvl (bk.adjusted_capacity, 0),
		mt.method_code,
		ad.asset_number,
                nvl (bk.adjusted_recoverable_cost, bk.recoverable_cost),
                bk.salvage_value,
		bk.period_counter_life_complete,
		bk.annual_deprn_rounding_flag,
		bk.itc_amount_id,
		bk.itc_basis,
		ceilt.ceiling_type,
                nvl(bk.formula_factor, 1),
                nvl(bk.short_fiscal_year_flag, 'NO'),
                bk.conversion_date,
                bk.original_deprn_start_date,
                bk.prorate_date,
		to_number(to_char(bk.prorate_date,'YYYY')),
		bk.date_placed_in_service,
		ret.stl_method_code,
		ret.stl_life_in_months,
		ret.stl_deprn_amount,
		ret.date_retired,
		to_number(to_char(ret.date_retired,'YYYY')),
		th.transaction_type_code
  FROM	fa_ceiling_types ceilt,
		fa_methods mt,
		fa_category_books cb,
		fa_books bk,
		fa_transaction_headers th,
		fa_retirements ret,
		fa_additions ad
  WHERE	cb.book_type_code = X_book
	AND	ad.asset_category_id = cb.category_id
	AND	ceilt.ceiling_name(+) = bk.ceiling_name
	AND	mt.method_code = bk.deprn_method_code
	AND	bk.book_type_code = X_book
	AND	bk.asset_id = X_asset_id
	AND	bk.transaction_header_id_out = th.transaction_header_id
	AND  	th.transaction_type_code IN ('FULL RETIREMENT','PARTIAL RETIREMENT')
	AND	th.transaction_header_id = ret.transaction_header_id_in
	AND 	ret.status = 'PROCESSED'
	AND	nvl (mt.life_in_months, -9999) =
			nvl (bk.life_in_months, -9999)
	AND	ad.asset_id = bk.asset_id;
Line: 770

  select deprn_reserve, ytd_deprn, bk.date_placed_in_service,
		bk.deprn_method_code, ret.stl_deprn_amount, ret.stl_method_code
  into dpr_in.deprn_rsv, dpr_in.ytd_deprn, l_main_dpis,
		l_method_code, test_stl_deprn_amount, test_stl_method_code
  from fa_deprn_summary ds,
	fa_books bk,
	fa_retirements ret,
	fa_transaction_headers th
  where ds.book_type_code = X_book
  and   ds.asset_id = X_asset_id
  and   ds.deprn_source_code = 'BOOKS'
  and 	th.transaction_header_id = bk.transaction_header_id_in
  and   th.transaction_header_id = ret.transaction_header_id_in
  and   th.transaction_header_id in (select max(transaction_header_id)
				from fa_transaction_headers thsub
				where transaction_type_code like '%RETIREMENT'
				and   book_type_code = x_book
				and   asset_id = x_asset_id)
;
Line: 803

  select 	bc.deprn_calendar,
		bc.fiscal_year_name,
		ct.number_per_fiscal_year
  into h_calendar_type, h_fy_name, h_num_per_fy
  from fa_book_controls bc, fa_calendar_types ct
  where bc.book_type_code = X_book
  and bc.deprn_calendar = ct.calendar_type;
Line: 867

      select period_num
      into dpr_in.p_cl_begin
      from fa_calendar_periods cp,
	   fa_book_controls bc
      where calendar_type = bc.deprn_calendar
      and bc.book_type_code = x_book
      and dpr_in.prorate_date
	between cp.start_date and cp.end_date;
Line: 877

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and to_date('19691231','YYYYMMDD')
	between cp.start_date and cp.end_date;
Line: 888

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and l_date_retired
	between cp.start_date and cp.end_date;
Line: 905

	select fiscal_year
	into dpr_in.y_begin
	from fa_fiscal_year
	where fiscal_year_name = l_fiscal_year_name
	and l_start_date between start_date and end_date;
Line: 912

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and to_date('19691231','YYYYMMDD')
	between cp.start_date and cp.end_date;
Line: 923

   	select period_num
      	into dpr_in.p_cl_end
      	from fa_calendar_periods cp,
	   fa_book_controls bc
      	where calendar_type = bc.deprn_calendar
      	and bc.book_type_code = x_book
      	and l_date_retired
	between cp.start_date and cp.end_date;