DBA Data[Home] [Help]

APPS.FA_RECLASS_UTIL_PVT SQL Statements

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

Line: 18

     select count(1)
     into v_count
     from fa_category_books
     where category_id = p_category_id
     and book_type_code = p_book_type_code
     and cip_cost_acct is not null
     and cip_clearing_acct is not null
     and rownum < 2;
Line: 64

    SELECT count(*) INTO l_count1
    FROM FA_CATEGORY_BOOKS cb, FA_BOOKS bk, fa_book_controls bc
    WHERE bk.asset_id = p_asset_id
    AND bk.date_ineffective IS NULL
    AND bk.book_type_code = cb.book_type_code
    AND cb.category_id = p_new_category_id
    AND bc.book_type_code = bk.book_type_code
    AND nvl(bc.date_ineffective,sysdate) >= sysdate;
Line: 74

    SELECT count(*) INTO l_count2
    FROM FA_BOOKS bk, FA_BOOK_CONTROLS bc
    WHERE bk.asset_id = p_asset_id
    AND bk.date_ineffective IS NULL
    AND bk.book_type_code = bc.book_type_code
    AND nvl(bc.date_ineffective,sysdate) >= sysdate;
Line: 122

    select capitalize_flag, category_type
    into v_old_cap_flag, v_old_cat_type
    from fa_categories
    where category_id = p_old_cat_id;
Line: 128

    select capitalize_flag, category_type
    into v_new_cap_flag, v_new_cat_type
    from fa_categories
    where category_id = p_new_cat_id;
Line: 156

       select 1 into v_count
       from dual
       where exists ( select 'x'
                      from fa_additions a,
                           fa_categories b
                      where a.asset_id = p_asset_id
                      and a.lease_id = p_Lease_Id
                      and a.asset_category_id = b.category_id
     	                and b.category_type = 'LEASEHOLD IMPROVEMENT');
Line: 170

                     name       => 'FA_ADD_DELETE_LHOLD_BEFORE_RCL',
		     p_log_level_rec => p_log_level_rec);
Line: 177

       select 1 into v_count
       from dual
       where exists ( select 'x'
                      from fa_leases
                      where lease_id = p_lease_id );
Line: 186

                     name       => 'FA_ADD_DELETE_LEASE_BEFORE_RCL',
		     p_log_level_rec => p_log_level_rec);
Line: 213

	    SELECT units FROM FA_ASSET_HISTORY
	    WHERE asset_id = p_asset_id
	    AND date_ineffective IS NULL;
Line: 218

	    SELECT sum(units_assigned) FROM FA_DISTRIBUTION_HISTORY
	    WHERE asset_id = p_asset_id
	    AND date_ineffective is NULL;
Line: 265

  	select count(1)
  	into v_count
  	from fa_retirements
  	where asset_id = p_Asset_Id
  	and status in ('PENDING', 'REINSTATE', 'PARTIAL')
	and rownum < 2;
Line: 302

      SELECT count(1)
      INTO v_count
      FROM FA_BOOKS   BK,
           FA_BOOK_CONTROLS BC
      WHERE BK.ASSET_ID = p_asset_id AND
            BK.PERIOD_COUNTER_FULLY_RETIRED IS NOT NULL AND
            BK.DATE_INEFFECTIVE IS NULL AND
            BK.BOOK_TYPE_CODE = BC.BOOK_TYPE_CODE AND
            BC.DATE_INEFFECTIVE IS NULL AND
            rownum < 2;
Line: 349

        select count(1)
        into v_is_prior_period
	    FA_DEPRN_PERIODS DP_NOW,
	    FA_DEPRN_PERIODS DP,
	    FA_BOOK_CONTROLS BC,
            FA_TRANSACTION_HEADERS TH
        WHERE
            TH.ASSET_ID = p_asset_id AND
            TH.TRANSACTION_TYPE_CODE = DECODE(BC.BOOK_CLASS,'CORPORATE',
                                              'TRANSFER IN','ADDITION') AND
            TH.BOOK_TYPE_CODE = BC.BOOK_TYPE_CODE AND
            BC.BOOK_TYPE_CODE = nvl( p_book,BC.BOOK_TYPE_CODE ) AND
            TH.DATE_EFFECTIVE BETWEEN
                DP.PERIOD_OPEN_DATE AND
                NVL(DP.PERIOD_CLOSE_DATE, SYSDATE)
        AND
            DP.BOOK_TYPE_CODE = TH.BOOK_TYPE_CODE AND
            DP.PERIOD_COUNTER < DP_NOW.PERIOD_COUNTER AND
            DP_NOW.BOOK_TYPE_CODE = TH.BOOK_TYPE_CODE AND
            DP_NOW.PERIOD_CLOSE_DATE IS NULL );
Line: 409

	    SELECT 	max(transaction_date_entered)
            FROM 	FA_TRANSACTION_HEADERS
            WHERE 	asset_id = p_asset_id
            AND 	book_type_code = p_book
            AND         transaction_type_code not like '%/VOID';
Line: 416

	    SELECT 	max(date_effective)
            FROM 	FA_TRANSACTION_HEADERS
            WHERE 	asset_id = p_asset_id
            AND 	book_type_code = p_book;
Line: 439

    SELECT count(1) INTO l_check_another_trans
    FROM FA_DEPRN_PERIODS pdp, FA_DEPRN_PERIODS adp
    WHERE pdp.book_type_code = p_book
    AND pdp.book_type_code = adp.book_type_code
    AND pdp.period_counter > adp.period_counter
    AND l_prior_date_effective between pdp.period_open_date
            and nvl(pdp.period_close_date, to_date('31-12-4712','DD-MM-YYYY'))
    AND p_trans_rec.transaction_date_entered between
            adp.calendar_period_open_date and adp.calendar_period_close_date;
Line: 486

	    SELECT 'x' FROM FA_BOOK_CONTROLS
	    WHERE book_type_code = p_book_type_code AND allow_mass_changes = 'NO'
	    AND p_mr_req_id <> -1;
Line: 490

	    SELECT 'x' FROM FA_BOOKS
	    WHERE book_type_code = p_book_type_code AND asset_id = p_asset_id
	    AND rate_adjustment_factor <> 1;
Line: 494

	    SELECT 'x' FROM FA_ADDITIONS
	    WHERE asset_id = p_asset_id AND asset_type = 'CIP';
Line: 497

	    SELECT 'x' FROM FA_BOOK_CONTROLS
	    WHERE book_type_code = p_book_type_code AND amortize_flag = 'NO';
Line: 500

	    SELECT 'x' FROM FA_DEPRN_SUMMARY
	    WHERE book_type_code = p_book_type_code
            AND asset_id = p_asset_id
	    AND deprn_source_code = 'DEPRN';
Line: 661

      SELECT deprn_expense_acct,asset_cost_account_ccid
      INTO h_new_deprn_exp_acct,h_cost_acct_ccid
      FROM fa_category_books
      WHERE book_type_code = p_asset_hdr_rec.book_type_code
      AND category_id = p_asset_cat_rec_new.category_id;
Line: 670

	   Select  sob.chart_of_accounts_id
	   into    h_chart_of_accounts_id
	   From    fa_book_controls bc,
         	 gl_sets_of_books sob
	   Where   sob.set_of_books_id = bc.set_of_books_id
	   And 	  bc.book_type_code  = p_asset_hdr_rec.book_type_code;
Line: 798

   Select dh.distribution_id,
          dh.code_combination_id,
          dh.units_assigned,
          dh.location_id,
          dh.assigned_to,
          ad.asset_number
   from  fa_book_controls bc,
         fa_distribution_history dh,
         fa_additions ad
   where dh.asset_id = p_asset_hdr_rec.asset_id
   and   dh.book_type_code = bc.distribution_source_book
   and   bc.book_type_code = p_asset_hdr_rec.book_type_code
   and   dh.book_type_code = p_asset_hdr_rec.book_type_code
   and   dh.date_ineffective is null
   and   dh.retirement_id is null
   and   dh.asset_id = ad.asset_id;
Line: 816

     select deprn_expense_acct
     from   fa_category_books
     where  book_type_code = p_book
     and    category_id = p_cat_id;
Line: 823

            SELECT greatest(dp.calendar_period_open_date,
                   least(sysdate, dp.calendar_period_close_date))
            FROM fa_deprn_periods dp
            WHERE dp.book_type_code = p_book
                  AND dp.period_close_date IS NULL;
Line: 845

   px_asset_dist_tbl.delete;
Line: 1011

    select distinct g.application_column_name, g.segment_num
    from fnd_columns c, fnd_id_flex_segments g
	WHERE g.application_id = h_appl_id
	  AND g.id_flex_code = h_flex_code
	  AND g.id_flex_num = l_cat_struct
	  AND g.enabled_flag = 'Y'
	  AND g.display_flag = 'Y'
	  AND c.application_id = h_appl_id
	  AND c.table_id = h_table_id
	  AND c.column_name = g.application_column_name
	ORDER BY g.segment_num;
Line: 1027

   select category_flex_structure
   into l_cat_struct
   from fa_system_controls;
Line: 1043

  select table_id into h_table_id from fnd_tables
  where table_name = h_table_name
  and application_id = 140;
Line: 1049

  select s.concatenated_segment_delimiter into delim
      FROM fnd_id_flex_structures s, fnd_application a
     WHERE s.application_id = a.application_id
       AND s.id_flex_code = h_flex_code
       AND s.id_flex_num = l_cat_struct
       AND a.application_short_name = h_appl_short_name;
Line: 1059

  v_sqlstmt := 'select ';
Line: 1270

    SELECT category_flex_structure
    FROM FA_SYSTEM_CONTROLS;