DBA Data[Home] [Help]

APPS.FARX_RT SQL Statements

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

Line: 101

  maj_select_statement	varchar2(50);
Line: 102

  min_select_statement  varchar2(50);
Line: 103

  spec_select_statement varchar2(50);
Line: 108

  select_statement	varchar2(15000);
Line: 124

  select fcr.last_update_login into h_login_id
  from fnd_concurrent_requests fcr
  where fcr.request_id = h_request_id;
Line: 135

   select category_flex_structure, location_flex_structure,asset_key_flex_structure
   into h_cat_struct, h_loc_struct, h_assetkey_flex_structure
   from fa_system_controls;
Line: 141

  select period_open_date          --Bug#9491496
  into h_period1_pod
  from fa_deprn_periods
  where book_type_code = h_book and period_name = begin_period;
Line: 151

  select count(*) into h_count
  from fa_deprn_periods where period_name = end_period
  and book_type_code = h_book;
Line: 156

    select period_close_date       --Bug#9491496
    into h_period2_pcd
    from fa_deprn_periods
    where book_type_code = h_book and period_name = end_period;
Line: 179

  select accounting_flex_structure, distribution_source_book
  into h_acct_struct, h_dist_source_book
  from fa_book_controls
  where book_type_code = h_book;
Line: 187

  select cur.precision into h_precision
  from fa_book_controls bc, gl_sets_of_books sob, fnd_currencies cur
  where bc.book_type_code = h_book
  and sob.set_of_books_id = bc.set_of_books_id
  and sob.currency_code = cur.currency_code;
Line: 204

   select sob.chart_of_accounts_id,
	  sob.set_of_books_id,
	  substr(sob.currency_code,1,15),
	  substr(sob.name,1 ,80)
   into	  h_chart_of_accounts_id,
	  h_set_of_books_id,
	  h_currency_code,
	  h_organization_name
   from   fa_book_controls bc, gl_sets_of_books sob, fnd_currencies cur
   WHERE  bc.book_type_code = h_book
   AND    sob.set_of_books_id = bc.set_of_books_id
   AND	  sob.currency_code = cur.currency_code; -- Added set_of_books_id and currency_code to display those on report
Line: 226

    maj_select_statement := fa_rx_flex_pkg.flex_sql(140,'CAT#', h_assetkey_flex_structure,'CAT','SELECT', 'BASED_CATEGORY');
Line: 229

    min_select_statement := fa_rx_flex_pkg.flex_sql(140,'CAT#', h_assetkey_flex_structure,'CAT','SELECT', 'MINOR_CATEGORY');
Line: 232

       min_select_statement := 'null';
Line: 236

     spec_select_statement := fa_rx_flex_pkg.flex_sql(140,'CAT#', h_assetkey_flex_structure,'CAT','SELECT', cat_seg_num);
Line: 239

       spec_select_statement := 'null';
Line: 271

        'SELECT', 'BASED_CATEGORY') ||' >= :from_maj_cat or :from_maj_cat is NULL)';
Line: 275

        'SELECT', 'BASED_CATEGORY') ||' <= :to_maj_cat or :to_maj_cat is NULL)';
Line: 281

        'SELECT', 'MINOR_CATEGORY') ||' >= :from_min_cat or :from_min_cat is NULL)';
Line: 285

        'SELECT', 'MINOR_CATEGORY') ||' <= :to_min_cat or :to_min_cat is NULL)';
Line: 294

        'SELECT', 'MINOR_CATEGORY') ||' >= :from_min_cat or :from_min_cat is NULL)';
Line: 303

        'SELECT', 'MINOR_CATEGORY') ||' <= :to_min_cat or :to_min_cat is NULL)';
Line: 316

        'SELECT', cat_seg_num) ||' >= :from_cat_seg_val or :from_cat_seg_val is NULL)';
Line: 320

        'SELECT', cat_seg_num) ||' <= :to_cat_seg_val or :to_cat_seg_val is NULL)';
Line: 338

        'SELECT', 'FA_COST_CTR') ||' >= :from_cc or :from_cc is NULL)';
Line: 342

        'SELECT', 'FA_COST_CTR') ||' <= :to_cc or :to_cc is NULL)';
Line: 426

    select_statement := '
SELECT  /*+ leading(th ad) use_nl(ad) index(FA_ADDITIONS_B_U1 )*/ --Bug# 7587861
        dhcc.code_combination_id,
        emp.full_name,
	emp.employee_number,
        loc.location_id,
	cb.category_id,
        decode(ah.asset_type,''CIP'',cb.cip_cost_acct,cb.asset_cost_acct),
	cb.deprn_reserve_acct,
	ad.inventorial,
        ad.asset_number,
	ad.description,
	ad.serial_number,
	ad.tag_number,
        ret.date_retired,
	decode(sign(dh.transaction_units),-1,-dh.transaction_units,dh.transaction_units),
	th.transaction_header_id,
	ROUND(decode(ret.units, NULL,
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.cost_retired,  ret.cost_retired)
					* (dh.units_assigned /ah.units)),
       	 	(decode(th.transaction_type_code, ''REINSTATEMENT'',
         	  -ret.cost_retired,  ret.cost_retired)
					* -dh.transaction_units / ret.units)) ,:h_precision),
	ROUND(decode(ret.units, NULL,
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.nbv_retired,  ret.nbv_retired)
 					* (dh.units_assigned /ah.units)),
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
         	   -ret.nbv_retired,  ret.nbv_retired)
           				* -dh.transaction_units / ret.units)),:h_precision),
	ROUND(decode(ret.units, NULL,
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.proceeds_of_sale,  ret.proceeds_of_sale)
	 				* (dh.units_assigned /ah.units)),
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.proceeds_of_sale,  ret.proceeds_of_sale)
           				* -dh.transaction_units / ret.units)),:h_precision),
	ROUND(decode(ret.units, NULL,
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.gain_loss_amount,  ret.gain_loss_amount)
	 				* (dh.units_assigned /ah.units)),
        	(decode(th.transaction_type_code, ''REINSTATEMENT'',
          	  -ret.gain_loss_amount,  ret.gain_loss_amount)
           				* -dh.transaction_units / ret.units)),:h_precision),
	round(decode(ret.units, NULL,
		(decode(th.transaction_type_code,''REINSTATEMENT'',
	  	  -ret.cost_of_removal, ret.cost_of_removal)
  					* (dh.units_assigned / ah.units)),
		(decode(th.transaction_type_code, ''REINSTATEMENT'',
	  	  -ret.cost_of_removal, ret.cost_of_removal)
	  				* -dh.transaction_units / ret.units)),:h_precision),
	round(decode(ret.units, NULL,
		(decode(th.transaction_type_code,''REINSTATEMENT'',
	  	  -ret.itc_recaptured, ret.itc_recaptured)
  					* (dh.units_assigned / ah.units)),
		(decode(th.transaction_type_code, ''REINSTATEMENT'',
	  	  -ret.itc_recaptured, ret.itc_recaptured)
	  				* -dh.transaction_units / ret.units)),:h_precision),
	decode(th.transaction_type_code, ''REINSTATEMENT'', ''*'', ''PARTIAL RETIREMENT'',''P'',NULL),
	books.date_placed_in_service,
	dd.ytd_deprn,'||
	maj_select_statement ||','||
	min_select_statement ||','||
	spec_select_statement ||'
FROM    ' || from_clause || '
WHERE   ' || where_clause;
Line: 495

       	fa_rx_util_pkg.debug('ret: ' || 'select_statement:' || select_statement);
Line: 499

  open ret_lines for select_statement ;
Line: 501

  open ret_lines for select_statement using
          h_precision, -- select
          h_precision,
          h_precision,
          h_precision,
          h_precision,
          h_precision,
          h_period1_pod, -- where_clause
          h_period2_pcd,
          h_book,
          h_book,
          h_book,
          h_dist_source_book,
          h_book,
          from_maj_cat, -- l_param_where
          from_maj_cat,
          to_maj_cat,
          to_maj_cat,
          from_min_cat,
          from_min_cat,
          to_min_cat,
          to_min_cat,
          from_cat_seg_val,
          from_cat_seg_val,
          to_cat_seg_val,
          to_cat_seg_val,
          from_cc,
          from_cc,
          to_cc,
          to_cc,
          from_asset_num,
          from_asset_num,
          to_asset_num,
          to_asset_num;
Line: 708

    h_mesg_name := 'FA_SHARED_INSERT_FAILED';
Line: 710

    insert into fa_retire_rep_itf (
	request_id, company, cost_Center, expense_acct,
	location, category, cost_acct, reserve_acct,
	asset_number, description, serial_number, tag_number,
	date_retired, units_retired, cost_retired, nbv_retired,
	proceeds_of_sale, gain_loss_amount, removal_cost,
	itc_captured, flag, date_placed_in_service, inventorial,
	employee_name, employee_number, transaction_header_id,
	created_by, creation_date, last_updated_by,
	last_update_date, last_update_login,
	set_of_books_id, functional_currency_code,organization_name,
	book_type_code,period_name,period_name_to,account_description,
	cost_center_description,
	deprn_reserve,
	major_category,
	major_category_desc,minor_category,minor_category_desc,
	specified_category_seg,specified_cat_seg_desc) values (
	request_id, h_acct_segs(h_bal_seg),
	h_acct_segs(h_cc_seg), h_acct_segs(h_acct_seg),
	h_concat_loc, h_concat_cat, h_cost_acct, h_reserve_acct,
	h_asset_number, h_description, h_serial_number,
	h_tag_number, 	h_date_retired, h_units,
	h_cost_retired, h_nbv_retired, h_proceeds_of_sale,
	h_gain_loss_amount, h_removal_cost, h_itc_captured,
	h_flag, h_dpis, h_inventorial, h_emp_name, h_emp_number, h_trx_id,
	user_id, sysdate, user_id, sysdate, h_login_id,
	h_set_of_books_id, h_currency_code, h_organization_name,
	h_book,h_period_name,h_period_name_to,h_account_desc,
	h_cost_center_desc,
	h_deprn_reserve,
	h_maj_cat,h_maj_cat_desc,h_min_cat,
	h_min_cat_desc,h_specified_cat,h_specified_cat_desc);
Line: 760

  if h_mesg_name = 'FA_SHARED_INSERT_FAIL' then
	fnd_message.set_token('TABLE','FA_RETIRE_REP_ITF',FALSE);