DBA Data[Home] [Help]

APPS.FA_DET_ADD_PKG SQL Statements

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

Line: 15

 	SELECT BK.Period_Counter_Fully_Retired,BC.Book_Type_Code
	INTO X_PC_Fully_Ret, lv_corp_book
	FROM FA_BOOKS BK, FA_BOOK_CONTROLS BC
	WHERE BK.Asset_Id = X_Asset_Id
	AND BK.Date_Ineffective IS NULL
	AND BK.Book_Type_Code = BC.Book_Type_Code
	AND BC.Book_Class = 'CORPORATE';
Line: 23

	SELECT DP.Period_Counter
	into X_Current_PC
	FROM FA_DEPRN_PERIODS DP
	WHERE DP.Book_Type_Code = lv_corp_book
	AND DP.Period_Close_Date IS NULL;
Line: 29

	SELECT DP.Period_Counter
	INTO X_Transfer_In_PC
	FROM FA_DEPRN_PERIODS DP, FA_TRANSACTION_HEADERS TH
	WHERE DP.Book_Type_Code = lv_corp_book
	AND TH.Book_Type_Code = lv_corp_book
	AND TH.Asset_Id = X_Asset_Id
	AND TH.Transaction_Type_Code = 'TRANSFER IN'
	AND TH.Date_Effective between
		DP.Period_Open_Date and nvl(DP.Period_Close_Date,sysdate);
Line: 40

	   -- can't update asset type, so don't bother getting
	   -- costs for further validation
	   X_Books_Cost := 0;
Line: 45

           select deprn_reserve into X_deprn_reserve
           from fa_deprn_summary
           where asset_id = X_Asset_id
           and book_type_code = lv_corp_book
           and deprn_source_code = 'BOOKS';
Line: 51

	   select cost into X_Books_Cost
	   from fa_books
	   where asset_id = X_Asset_Id
	   and book_type_code = lv_corp_book
	   and date_ineffective is null;
Line: 58

	      select nvl(sum(fixed_assets_cost),0)
	      into X_Inv_Cost
	      from fa_asset_invoices ai
	      where asset_id = X_Asset_Id;
Line: 92

  select bc.book_type_code into lv_corp_book
  from fa_books bk, fa_book_controls bc
  where bc.book_class = 'CORPORATE'
  and bk.asset_id = X_Asset_Id
  and bk.book_type_code = bc.book_type_code
  and bk.date_ineffective is null;
Line: 126

  select capitalize_flag, category_type
  into lv_new_cap_flag, X_New_Cat_Type
  from fa_categories
  where category_id = X_New_Cat_Id;
Line: 147

     select count(*) into lv_count
     from   fa_additions_b ad
     where  ad.asset_id = X_Asset_Id
     and    ad.lease_id = X_Lease_Id
     and exists
     ( select 'X'
       from fa_categories_b cat
       where  cat.category_id = ad.asset_category_id
       and    cat.category_type = 'LEASEHOLD IMPROVEMENT');
Line: 158

	lv_mesg := 'FA_ADD_DELETE_LHOLD_BEFORE_RCL';
Line: 164

     select count(1) into lv_count
     from fa_leases
     where lease_id = X_Lease_Id
     and rownum < 2;
Line: 170

	lv_mesg := 'FA_ADD_DELETE_LEASE_BEFORE_RCL';
Line: 187

  	select count(1)
  	into lv_count
  	from fa_retirements fr,
	fa_book_controls fbc
  	where fr.book_type_code = fbc.book_type_code
	and fbc.date_ineffective is null
	and fr.asset_id = X_Asset_Id
  	and fr.status in ('PENDING', 'REINSTATE', 'PARTIAL')
	and rownum < 2;
Line: 234

PROCEDURE UPDATE_LEASE_DF(X_Lease_Id                       NUMBER,
                       X_Last_Update_Date               DATE,
                       X_Last_Updated_By                NUMBER,
                       X_Last_Update_Login              NUMBER,
                       X_Attribute1                     VARCHAR2,
                       X_Attribute2                     VARCHAR2,
                       X_Attribute3                     VARCHAR2,
                       X_Attribute4                     VARCHAR2,
                       X_Attribute5                     VARCHAR2,
                       X_Attribute6                     VARCHAR2,
                       X_Attribute7                     VARCHAR2,
                       X_Attribute8                     VARCHAR2,
                       X_Attribute9                     VARCHAR2,
                       X_Attribute10                    VARCHAR2,
                       X_Attribute11                    VARCHAR2,
                       X_Attribute12                    VARCHAR2,
                       X_Attribute13                    VARCHAR2,
                       X_Attribute14                    VARCHAR2,
                       X_Attribute15                    VARCHAR2,
                       X_Attribute_Category_Code        VARCHAR2,
                       X_Return_Status                  OUT NOCOPY BOOLEAN,
                       X_Calling_Fn                     VARCHAR2,
                 p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)
IS

  cursor LS_CUR is
        select ls.rowid row_id,
                lease_id,
                lease_number,
                lessor_id,
                description,
                last_update_date,
                last_updated_by,
                created_by,
                creation_date,
                last_update_login,
                attribute1,
                attribute2,
                attribute3,
                attribute4,
                attribute5,
                attribute6,
                attribute7,
                attribute8,
                attribute9,
                attribute10,
                attribute11,
                attribute12,
                attribute13,
                attribute14,
                attribute15,
                attribute_category_code,
                fasb_lease_type,
                cost_capitalized,
                transfer_ownership,
                bargain_purchase_option,
                payment_schedule_id,
                fair_value,
                present_value,
                lease_type,
                asset_life,
                lease_term,
                currency_code
        from fa_leases ls
        where ls.lease_id = X_Lease_Id;
Line: 301

  update_error  exception;
Line: 308

                FA_LEASES_PKG.UPDATE_ROW(
                   X_Rowid            => LS_ROW.Row_id,
                   X_Lease_Id         => LS_ROW.Lease_Id,
                   X_Lease_Number     => LS_ROW.Lease_Number,
                   X_Lessor_Id        => LS_ROW.Lessor_Id,
                   X_Description      => LS_ROW.Description,
                   X_Last_Update_Date => X_Last_Update_Date,
                   X_Last_Updated_By  => X_Last_Updated_By,
                   X_Last_Update_Login=> X_Last_Update_Login,
                   X_Attribute1       => X_Attribute1,
                   X_Attribute2       => X_Attribute2,
                   X_Attribute3       => X_Attribute3,
                   X_Attribute4       => X_Attribute4,
                   X_Attribute5       => X_Attribute5,
                   X_Attribute6       => X_Attribute6,
                   X_Attribute7       => X_Attribute7,
                   X_Attribute8       => X_Attribute8,
                   X_Attribute9       => X_Attribute9,
                   X_Attribute10      => X_Attribute10,
                   X_Attribute11      => X_Attribute11,
                   X_Attribute12      => X_Attribute12,
                   X_Attribute13      => X_Attribute13,
                   X_Attribute14      => X_Attribute14,
                   X_Attribute15      => X_Attribute15,
                   X_Attribute_Category_Code =>
                        X_Attribute_Category_Code,
                   X_Return_Status => h_status,
                   X_Calling_Fn       => 'FA_DET_ADD2_PKG.UPDATE_LEASE_DF'
                   , p_log_level_rec => p_log_level_rec);
Line: 339

            raise update_error;
Line: 345

    when update_error then
      FA_SRVR_MSG.Add_Message(
                CALLING_FN => 'FA_DET_ADD2_PKG.Update_Lease_DF'
                , p_log_level_rec => p_log_level_rec);
Line: 352

                CALLING_FN => 'FA_DET_ADD2_PKG.Update_Lease_DF'
                ,p_log_level_rec => p_log_level_rec);
Line: 355

END Update_Lease_DF;