DBA Data[Home] [Help]

APPS.FA_DISTRIBUTION_PVT SQL Statements

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

Line: 54

      SELECT bc.book_type_code
        FROM fa_books         bk,
             fa_book_controls bc
       WHERE bc.distribution_source_book  = l_book_type_code
         AND bk.book_type_code            = bc.book_type_code
         AND bk.asset_id                  = l_asset_id
         AND bk.transaction_header_id_out is null
         AND bc.date_ineffective is null
       ORDER BY bc.book_class,
                bc.book_type_code;
Line: 67

    SELECT p_psob_id AS sob_id,
           1 AS index_id
    FROM dual
    UNION
    SELECT set_of_books_id AS sob_id,
           2 AS index_id
    FROM fa_mc_book_controls
    WHERE book_type_code = p_book_type_code
    AND primary_set_of_books_id = p_psob_id
    AND enabled_flag = 'Y'
    ORDER BY 2;
Line: 81

SELECT NULL distribution_id,units_assigned,units_assigned transaction_units,
       code_combination_id expense_ccid,location_id location_ccid,assigned_to
  FROM fa_distribution_history
 WHERE asset_id = c_asset_id
   AND transaction_header_id_in = c_transaction_id
   AND book_type_code = c_book
UNION ALL
SELECT distribution_id,units_assigned,transaction_units,
       code_combination_id expense_ccid,location_id location_ccid,assigned_to
  FROM fa_distribution_history
 WHERE asset_id = c_asset_id
   AND transaction_header_id_out = c_transaction_id
   AND book_type_code = c_book
ORDER BY distribution_id;
Line: 133

   select sum(units_assigned - nvl(transaction_units, 0))
     into l_old_units
     from fa_distribution_history
    where asset_id = px_asset_hdr_rec.asset_id
      and book_type_code = px_asset_hdr_rec.book_type_code
      and date_ineffective IS NULL;
Line: 291

         if not insert_txn_headers(l_trans_rec,
                                   l_asset_hdr_rec
                                   ,p_log_level_rec => p_log_level_rec) then
            raise error_found;
Line: 299

            if not update_asset_history(l_trans_rec,
                                        l_asset_hdr_rec,
                                        px_asset_cat_rec_new,
                                        l_asset_desc_rec_new
                                        ,p_log_level_rec => p_log_level_rec) then
               raise error_found;
Line: 310

         if not update_additions(l_trans_rec,
                                 l_asset_hdr_rec,
                                 px_asset_cat_rec_new,
                                 l_asset_desc_rec_new
                                 ,p_log_level_rec => p_log_level_rec) then
            raise error_found;
Line: 323

         if not update_books(l_trans_rec,
                             l_asset_hdr_rec,
                             l_period_rec
                             ,p_log_level_rec => p_log_level_rec) then
            raise error_found;
Line: 334

         if not update_dist_history(l_trans_rec,
                                    l_asset_hdr_rec,
                                    px_asset_dist_tbl
                                    ,p_log_level_rec => p_log_level_rec) then
            raise error_found;
Line: 394

                        X_today             => l_trans_rec.who_info.last_update_date,
                        X_old_cat_id        => l_asset_cat_rec_old.category_id,
                        X_new_cat_id        => px_asset_cat_rec_new.category_id,
                        X_asset_type        => l_asset_type_rec_old.asset_type,
                        X_last_update_date  => l_trans_rec.who_info.last_update_date,
                        X_last_updated_by   => l_trans_rec.who_info.last_updated_by,
                        X_last_update_login =>l_trans_rec.who_info.last_update_login,
                        X_init_message_flag => 'NO'
                        ,p_log_level_rec => p_log_level_rec) then
         raise error_found;
Line: 521

   select distribution_id,
          units_assigned
   from fa_distribution_history
   where asset_id = l_asset_id
   and  nvl(assigned_to,-9999) = nvl(d_assigned_to,-9999)
   and  code_combination_id = d_expense_ccid
   and  location_id = d_location_ccid
   and  date_ineffective is null;
Line: 531

   select units_assigned
   from fa_distribution_history
   where asset_id = l_asset_id
   and  distribution_id = d_distribution_id;
Line: 757

           select group_asset_id
             into l_group_asset_id
             from fa_books
            where asset_id         = p_asset_hdr_rec.asset_id
              and book_type_code   = p_asset_hdr_rec.book_type_code
              and date_ineffective is null;
Line: 824

        select count(*)
        into l_count
        from per_periods_of_service s, per_people_f p
        where p.person_id = s.person_id
        and trunc(sysdate) between
             p.effective_start_date and p.effective_end_date
        and nvl(s.actual_termination_date,sysdate) >= sysdate
        and p.person_id = p_asset_dist_tbl(p_curr_index).assigned_to;
Line: 907

      select current_units
      into   l_ad_units
      from   fa_additions
      where  asset_id = p_asset_hdr_rec.asset_id;
Line: 912

      select  units
      into    l_ah_units
      from    fa_asset_history
      where   asset_id = p_asset_hdr_rec.asset_id
      and     date_ineffective IS NULL;
Line: 918

      select  sum(units_assigned - nvl(transaction_units, 0))
      into    l_dh_units
      from    fa_distribution_history
      where   asset_id = p_asset_hdr_rec.asset_id
      and     book_type_code = p_asset_hdr_rec.book_type_code
      and     date_ineffective IS NULL;
Line: 948

FUNCTION insert_txn_headers(px_trans_rec     IN OUT NOCOPY FA_API_TYPES.trans_rec_type,
                            p_asset_hdr_rec  IN     FA_API_TYPES.asset_hdr_rec_type, p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)
RETURN BOOLEAN IS

   l_transaction_type_code px_trans_rec.transaction_type_code%TYPE;
Line: 968

        update fa_transaction_headers
        set transaction_type_code = 'TRANSFER IN/VOID',
            transaction_subtype = decode(l_transaction_type_code,
                                         'RECLASS',l_transaction_subtype,
                                         transaction_subtype)
        where asset_id = p_asset_hdr_rec.asset_id
        and book_type_code = p_asset_hdr_rec.book_type_code
        and transaction_type_code = 'TRANSFER IN';
Line: 981

   FA_TRANSACTION_HEADERS_PKG.INSERT_ROW(
                 X_Rowid => l_rowid,
                 X_Transaction_Header_Id => l_txn_head_id,
                 X_Book_Type_Code => p_asset_hdr_rec.book_type_code,
                 X_Asset_Id => p_asset_hdr_rec.asset_id,
                 X_Transaction_Type_Code => l_transaction_type_code,
                 X_Transaction_Date_Entered => px_trans_rec.transaction_date_entered,
                 X_Date_Effective => px_trans_rec.who_info.last_update_date,
                 X_Last_Update_Date => px_trans_rec.who_info.last_update_date,
                 X_Last_Updated_By => px_trans_rec.who_info.last_updated_by,
                 X_Transaction_Name => px_trans_rec.transaction_name,
                 X_Invoice_Transaction_Id => NULL,
                 X_Source_Transaction_Header_Id => px_trans_rec.source_transaction_header_id,
                 X_Mass_Reference_Id => px_trans_rec.mass_reference_id,
                 X_Last_Update_Login => px_trans_rec.who_info.last_update_login,
                 X_Transaction_Subtype => px_trans_rec.transaction_subtype,
                 X_Attribute1          => px_trans_rec.desc_flex.attribute1,
                 X_Attribute2          => px_trans_rec.desc_flex.attribute2,
                 X_Attribute3          => px_trans_rec.desc_flex.attribute3,
                 X_Attribute4          => px_trans_rec.desc_flex.attribute4,
                 X_Attribute5          => px_trans_rec.desc_flex.attribute5,
                 X_Attribute6          => px_trans_rec.desc_flex.attribute6,
                 X_Attribute7          => px_trans_rec.desc_flex.attribute7,
                 X_Attribute8          => px_trans_rec.desc_flex.attribute8,
                 X_Attribute9          => px_trans_rec.desc_flex.attribute9,
                 X_Attribute10         => px_trans_rec.desc_flex.attribute10,
                 X_Attribute11         => px_trans_rec.desc_flex.attribute11,
                 X_Attribute12         => px_trans_rec.desc_flex.attribute12,
                 X_Attribute13         => px_trans_rec.desc_flex.attribute13,
                 X_Attribute14         => px_trans_rec.desc_flex.attribute14,
                 X_Attribute15         => px_trans_rec.desc_flex.attribute15,
                 X_Attribute_Category_Code=> px_trans_rec.desc_flex.attribute_category_code,
                 X_Transaction_Key     => px_trans_rec.transaction_key,
                 X_Amortization_Start_Date
                                       => NULL,
                 X_Calling_Interface   => px_trans_rec.calling_interface,
                 X_Mass_Transaction_ID => px_trans_rec.mass_transaction_id,
                 X_Event_ID            => px_trans_rec.event_id,
                 X_Return_status       => l_success,
                 X_calling_FN          =>'FA_DISTRIBUTION_PVT.insert_txn_headers',  p_log_level_rec => p_log_level_rec);
Line: 1032

                calling_fn => 'FA_DISTRIBUTION_PVT.insert_txn_headers',  p_log_level_rec => p_log_level_rec);
Line: 1035

END insert_txn_headers;
Line: 1039

FUNCTION update_asset_history(p_trans_rec          IN FA_API_TYPES.trans_rec_type,
                               p_asset_hdr_rec     IN FA_API_TYPES.asset_hdr_rec_type,
                               p_asset_cat_rec_new IN FA_API_TYPES.asset_cat_rec_type,
                               p_asset_desc_rec_new IN FA_API_TYPES.asset_desc_rec_type, p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)

RETURN BOOLEAN IS

  CURSOR ah_cur (l_asset_id in NUMBER) IS
        select ah.rowid row_id,
                asset_id,
                category_id,
                asset_type,
                units,
                date_effective,
                date_ineffective,
                transaction_header_id_in,
                transaction_header_id_out,
                last_update_date,
                last_updated_by,
                last_update_login
        from fa_asset_history ah
        where asset_id = l_asset_id
        and date_ineffective is null;
Line: 1072

         select transaction_header_id_in
         into l_txn_id
         from fa_retirements
         where asset_id = p_asset_hdr_rec.asset_id
         and   book_type_code = p_asset_hdr_rec.book_type_code
         and   status = 'PENDING';
Line: 1090

        FA_ASSET_HISTORY_PKG.Update_Row
                (X_Rowid                  => ah_rec.Row_Id,
                 X_Asset_Id               => ah_rec.Asset_Id,
                 X_Category_Id            => p_asset_cat_rec_new.category_id,
                 X_Asset_Type             => ah_rec.Asset_Type,
                 X_Units                  => p_asset_desc_rec_new.current_units,
                 X_Date_Effective         => ah_rec.Date_Effective,
                 X_Date_Ineffective       => ah_rec.date_ineffective,
                 X_Transaction_Header_Id_In =>
                                ah_rec.Transaction_Header_Id_In,
                 X_Transaction_Header_Id_Out=> ah_rec.transaction_header_id_out,
                 X_Last_Update_Date       => p_trans_rec.who_info.last_update_date,
                 X_Last_Updated_By        => p_trans_rec.who_info.last_updated_by,
                 X_Last_Update_Login      => p_trans_rec.who_info.last_update_login,
                 X_Return_Status          => l_success,
                 X_Calling_Fn             => 'FA_DISTRIBUTION_PVT.update_asset_history',  p_log_level_rec => p_log_level_rec);
Line: 1113

        FA_ASSET_HISTORY_PKG.Update_Row
                (X_Rowid                  => ah_rec.Row_Id,
                 X_Asset_Id               => ah_rec.Asset_Id,
                 X_Category_Id            => ah_rec.Category_Id,
                 X_Asset_Type             => ah_rec.Asset_Type,
                 X_Units                  => ah_rec.Units,
                 X_Date_Effective         => ah_rec.Date_Effective,
                 X_Date_Ineffective       => p_trans_rec.who_info.last_update_date,
                 X_Transaction_Header_Id_In =>
                                ah_rec.Transaction_Header_Id_In,
                 X_Transaction_Header_Id_Out=> l_txn_id,
                 X_Last_Update_Date       => p_trans_rec.who_info.last_update_date,
                 X_Last_Updated_By        => p_trans_rec.who_info.last_updated_by,
                 X_Last_Update_Login      => p_trans_rec.who_info.last_update_login,
                 X_Return_Status          => l_success,
                 X_Calling_Fn             => 'FA_DISTRIBUTION_PVT.update_asset_history',  p_log_level_rec => p_log_level_rec);
Line: 1135

        FA_ASSET_HISTORY_PKG.Insert_Row
                (X_Rowid                  => l_rowid,
                 X_Asset_Id               => p_asset_hdr_rec.asset_id,
                 X_Category_Id            => p_asset_cat_rec_new.category_id,
                 X_Asset_Type             => ah_rec.asset_type,
                 X_Units                  => p_asset_desc_rec_new.current_units,
                 X_Date_Effective         => p_trans_rec.who_info.last_update_date,
                 X_Date_Ineffective       => NULL,
                 X_Transaction_Header_Id_In=> l_txn_id,
                 X_Transaction_Header_Id_Out=> NULL,
                 X_Last_Update_Date       => p_trans_rec.who_info.last_update_date,
                 X_Last_Updated_By        => p_trans_rec.who_info.last_updated_by,
                 X_Last_Update_Login      => p_trans_rec.who_info.last_update_login,
                 X_Return_Status          => l_success,
                 X_Calling_Fn             => 'FA_DISTRIBUTION_PVT.update_asset_history',  p_log_level_rec => p_log_level_rec);
Line: 1160

                        calling_fn => 'FA_DISTRIBUTION_PVT.update_asset_history',  p_log_level_rec => p_log_level_rec);
Line: 1162

  END update_asset_history;
Line: 1165

FUNCTION update_additions(p_trans_rec         IN  FA_API_TYPES.trans_rec_type,
                          p_asset_hdr_rec     IN  FA_API_TYPES.asset_hdr_rec_type,
                          p_asset_cat_rec_new IN  FA_API_TYPES.asset_cat_rec_type,
                          p_asset_desc_rec_new IN FA_API_TYPES.asset_desc_rec_type, p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)
RETURN BOOLEAN IS

BEGIN
     if (p_trans_rec.transaction_type_code in ('UNIT ADJUSTMENT','TRANSFER OUT')) then
         update fa_additions_b
         set current_units = p_asset_desc_rec_new.current_units,
             last_update_date = p_trans_rec.who_info.last_update_date,
             last_update_login = p_trans_rec.who_info.last_update_login,
             last_updated_by   = p_trans_rec.who_info.last_updated_by
        where asset_id = p_asset_hdr_rec.asset_id;
Line: 1187

        update fa_additions_b
        set asset_category_id = p_asset_cat_rec_new.category_id,
            property_type_code = fa_cache_pkg.fazcat_record.property_type_code,
            property_1245_1250_code = fa_cache_pkg.fazcat_record.property_1245_1250_code,
            owned_leased = fa_cache_pkg.fazcat_record.owned_leased,
            attribute1 = p_asset_cat_rec_new.desc_flex.attribute1,
            attribute2 = p_asset_cat_rec_new.desc_flex.attribute2,
            attribute3 = p_asset_cat_rec_new.desc_flex.attribute3,
            attribute4 = p_asset_cat_rec_new.desc_flex.attribute4,
            attribute5 = p_asset_cat_rec_new.desc_flex.attribute5,
            attribute6 = p_asset_cat_rec_new.desc_flex.attribute6,
            attribute7 = p_asset_cat_rec_new.desc_flex.attribute7,
            attribute8 = p_asset_cat_rec_new.desc_flex.attribute8,
            attribute9 = p_asset_cat_rec_new.desc_flex.attribute9,
            attribute10 = p_asset_cat_rec_new.desc_flex.attribute10,
            attribute11 = p_asset_cat_rec_new.desc_flex.attribute11,
            attribute12 = p_asset_cat_rec_new.desc_flex.attribute12,
            attribute13 = p_asset_cat_rec_new.desc_flex.attribute13,
            attribute14 = p_asset_cat_rec_new.desc_flex.attribute14,
            attribute15 = p_asset_cat_rec_new.desc_flex.attribute15,
            attribute16 = p_asset_cat_rec_new.desc_flex.attribute16,
            attribute17 = p_asset_cat_rec_new.desc_flex.attribute17,
            attribute18 = p_asset_cat_rec_new.desc_flex.attribute18,
            attribute19 = p_asset_cat_rec_new.desc_flex.attribute19,
            attribute20 = p_asset_cat_rec_new.desc_flex.attribute20,
            attribute21 = p_asset_cat_rec_new.desc_flex.attribute21,
            attribute22 = p_asset_cat_rec_new.desc_flex.attribute22,
            attribute23 = p_asset_cat_rec_new.desc_flex.attribute23,
            attribute24 = p_asset_cat_rec_new.desc_flex.attribute24,
            attribute25 = p_asset_cat_rec_new.desc_flex.attribute25,
            attribute26 = p_asset_cat_rec_new.desc_flex.attribute26,
            attribute27 = p_asset_cat_rec_new.desc_flex.attribute27,
            attribute28 = p_asset_cat_rec_new.desc_flex.attribute28,
            attribute29 = p_asset_cat_rec_new.desc_flex.attribute29,
            attribute30 = p_asset_cat_rec_new.desc_flex.attribute30,
            attribute_category_code =
                p_asset_cat_rec_new.desc_flex.attribute_category_code,
            context     = p_asset_cat_rec_new.desc_flex.context,
            last_update_date = p_trans_rec.who_info.last_update_date,
            last_update_login = p_trans_rec.who_info.last_update_login,
            last_updated_by   = p_trans_rec.who_info.last_updated_by
        where asset_id = p_asset_hdr_rec.asset_id;
Line: 1232

         update fa_additions_b
         set unit_adjustment_flag = 'NO'
         where asset_id = p_asset_hdr_rec.asset_id
         and unit_adjustment_flag = 'YES';
Line: 1242

                calling_fn => 'FA_DISTRIBUTION_PVT.update_additions',  p_log_level_rec => p_log_level_rec);
Line: 1244

END update_additions;
Line: 1247

FUNCTION update_books(p_trans_rec      IN   FA_API_TYPES.trans_rec_type,
                      p_asset_hdr_rec  IN   FA_API_TYPES.asset_hdr_rec_type,
                      p_period_rec     IN   FA_API_TYPES.period_rec_type, p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)
RETURN BOOLEAN IS

   cursor prior_period_tax_books(l_asset_id in number,
                                 l_book_type_code in varchar2) is
          select bc.book_type_code,nvl(bc.allow_backdated_transfers_flag,'Y')
          from fa_book_controls bc,
               fa_books bk,
               fa_deprn_summary ds
          where bk.asset_id = l_asset_id
          and   bk.book_type_code = bc.book_type_code
          and   bk.date_ineffective is null
          and   nvl(bc.date_ineffective, sysdate+1) > sysdate
          and   bc.distribution_source_book = l_book_type_code
          and   bc.book_class = 'TAX'
          -- bug# 2152033 only updates assets which have been depreciated
          and   ds.asset_id       = bk.asset_id
          and   ds.book_type_code = bc.book_type_code
          and   ds.period_counter < bc.last_period_counter
          and   ds.deprn_source_code = 'BOOKS';
Line: 1272

     select distinct transaction_header_id
     from fa_adjustments adj
     where adj.asset_id = l_asset_id
     and adj.book_type_code = l_book_type_code
     and source_type_code = 'TRANSFER'
     and adj.period_counter_created =
     (select period_counter from fa_deprn_periods where book_type_code =
      l_book_type_code and period_close_date is null);
Line: 1301

        update fa_books fabk
        set adjustment_required_status = 'TFR',
            annual_deprn_rounding_flag = 'TFR'
        where fabk.asset_id = p_asset_hdr_rec.asset_id
        and fabk.book_type_code = p_asset_hdr_rec.book_type_code
        and fabk.date_ineffective is NULL;
Line: 1308

        update fa_mc_books fabk
        set adjustment_required_status = 'TFR',
            annual_deprn_rounding_flag = 'TFR'
        where fabk.asset_id = p_asset_hdr_rec.asset_id
        and fabk.book_type_code = p_asset_hdr_rec.book_type_code
        and fabk.date_ineffective is NULL;
Line: 1330

       select calendar_period_open_date
       into   l_tax_cal_period_open_date
       from   fa_deprn_periods
       where  book_type_code = l_tax_book_type_code
       and    period_close_date is null;
Line: 1347

            select TRANSACTION_DATE_ENTERED into trx_date_entered from
                   fa_transaction_headers where transaction_header_id = l_trx_id;
Line: 1353

               update fa_books fabk
                set
               adjustment_required_status = 'NONE',
               annual_deprn_rounding_flag = NULL
               where  fabk.asset_id = p_asset_hdr_rec.asset_id
               and fabk.book_type_code = l_tax_book_type_code
               and fabk.date_ineffective is  NULL;
Line: 1361

                update fa_mc_books fabk
                 set
                 adjustment_required_status = 'NONE',
                 annual_deprn_rounding_flag = NULL
                 where fabk.asset_id = p_asset_hdr_rec.asset_id
                 and fabk.book_type_code = l_tax_book_type_code
                 and fabk.date_ineffective is NULL;
Line: 1385

           update fa_books fabk
           set adjustment_required_status = decode(l_allow_backdated_transfers,'N','NONE','TFR'),
               annual_deprn_rounding_flag = decode(l_allow_backdated_transfers,'N',NULL,'TFR')
           where fabk.asset_id = p_asset_hdr_rec.asset_id
           and fabk.book_type_code = l_tax_book_type_code
           and fabk.date_ineffective is NULL;
Line: 1392

           update fa_mc_books fabk
           set adjustment_required_status = decode(l_allow_backdated_transfers,'N','NONE','TFR'),
               annual_deprn_rounding_flag = decode(l_allow_backdated_transfers,'N',NULL,'TFR')
           where fabk.asset_id = p_asset_hdr_rec.asset_id
           and fabk.book_type_code = l_tax_book_type_code
           and fabk.date_ineffective is NULL;
Line: 1409

                calling_fn => 'FA_DISTRIBUTION_PVT.update_books',  p_log_level_rec => p_log_level_rec);
Line: 1412

END update_books;
Line: 1414

FUNCTION update_dist_history(p_trans_rec      IN     FA_API_TYPES.trans_rec_type,
                             p_asset_hdr_rec  IN   FA_API_TYPES.asset_hdr_rec_type,
                             p_asset_dist_tbl IN   FA_API_TYPES.asset_dist_tbl_type, p_log_level_rec        IN     FA_API_TYPES.log_level_rec_type)
RETURN BOOLEAN IS

  CURSOR dh_cur (l_asset_id IN NUMBER, l_distribution_id IN NUMBER) IS
        select dh.rowid row_id, dh.*
        from fa_distribution_history dh
        where asset_id = l_asset_id
        and   distribution_id = l_distribution_id
        and date_ineffective is null;
Line: 1437

   select transaction_header_id_in
   into l_Book_Header_Id
   from fa_books
   where asset_id = p_asset_hdr_rec.asset_id
   and book_type_code = p_asset_hdr_rec.book_type_code
   and date_ineffective is null;
Line: 1445

      select retirement_id
      into l_retirement_id
      from fa_retirements
      where asset_id = p_asset_hdr_rec.asset_id
      and book_type_code = p_asset_hdr_rec.book_type_code
      and status = 'PENDING';
Line: 1477

               FA_DISTRIBUTION_HISTORY_PKG.UPDATE_ROW
                       (X_Rowid                    => dh_rec.row_id,
                        X_Distribution_Id          => dh_rec.distribution_id,
                        X_Book_Type_Code           => dh_rec.book_type_code,
                        X_Asset_Id                 => dh_rec.asset_id,
                        X_Units_Assigned           => dh_rec.units_assigned,
                        X_Date_Effective           => dh_rec.date_effective,
                        X_Code_Combination_Id      => dh_rec.code_combination_id,
                        X_Location_Id              => dh_rec.location_id,
                        X_Transaction_Header_Id_In => dh_rec.transaction_header_id_in,
                        X_Last_Update_Date         => p_trans_rec.who_info.last_update_date,
                        X_Last_Updated_By          => p_trans_rec.who_info.last_updated_by,
                        X_Date_Ineffective         => p_trans_rec.who_info.last_update_date,
                        X_Assigned_To              => dh_rec.assigned_to,
                        X_Transaction_Header_Id_Out =>p_trans_rec.transaction_header_id,
                        X_Transaction_Units        => p_asset_dist_tbl(i).transaction_units,
                        X_Retirement_Id            => l_ret_id,
                        X_Last_Update_Login        => p_trans_rec.who_info.last_update_login,
                        X_Calling_Fn   => 'FA_DISTRIBUTION_PVT.update_dist_history', p_log_level_rec => p_log_level_rec);
Line: 1498

               FA_DISTRIBUTION_HISTORY_PKG.INSERT_ROW
                       (X_Rowid                    => l_rowid,
                        X_Distribution_Id          => l_distribution_id,
                        X_Book_Type_Code           => dh_rec.book_type_code,
                        X_Asset_Id                 => dh_rec.asset_id,
                        X_Units_Assigned           => p_asset_dist_tbl(i).units_assigned +
                                                      p_asset_dist_tbl(i).transaction_units,
                        X_Date_Effective           => p_trans_rec.who_info.last_update_date,
                        X_Code_Combination_Id      => dh_rec.code_combination_id,
                        X_Location_Id              => dh_rec.location_id,
                        X_Transaction_Header_Id_In => p_trans_rec.transaction_header_id,
                        X_Last_Update_Date         => p_trans_rec.who_info.last_update_date,
                        X_Last_Updated_By          => p_trans_rec.who_info.last_updated_by,
                        X_Date_Ineffective         => NULL,
                        X_Assigned_To              => dh_rec.assigned_to,
                        X_Transaction_Header_Id_Out => NULL,
                        X_Transaction_Units        => NULL,
                        X_Retirement_Id            => NULL,
                        X_Last_Update_Login        => p_trans_rec.who_info.last_update_login,
                        X_Calling_Fn   => 'FA_DISTRIBUTION_PVT.update_dist_history', p_log_level_rec => p_log_level_rec);
Line: 1521

               FA_DISTRIBUTION_HISTORY_PKG.UPDATE_ROW
                       (X_Rowid                    => dh_rec.row_id,
                        X_Distribution_Id          => dh_rec.distribution_id,
                        X_Book_Type_Code           => dh_rec.book_type_code,
                        X_Asset_Id                 => dh_rec.asset_id,
                        X_Units_Assigned           => dh_rec.units_assigned,
                        X_Date_Effective           => dh_rec.date_effective,
                        X_Code_Combination_id      => dh_rec.code_combination_id,
                        X_Location_Id              => dh_rec.location_id,
                        X_Transaction_Header_Id_In => dh_rec.transaction_header_id_in,
                        X_Last_Update_Date         => p_trans_rec.who_info.last_update_date,
                        X_Last_Updated_By          => p_trans_rec.who_info.last_updated_by,
                        X_Date_Ineffective         => p_trans_rec.who_info.last_update_date,
                        X_Assigned_To              => dh_rec.assigned_to,
                        X_Transaction_Header_Id_Out =>p_trans_rec.transaction_header_id,
                        X_Transaction_Units        => p_asset_dist_tbl(i).transaction_units,
                        X_Retirement_Id            => l_ret_id,
                        X_Last_Update_Login        => p_trans_rec.who_info.last_update_login,
                        X_Calling_Fn   => 'FA_DISTRIBUTION_PVT.update_dist_history', p_log_level_rec => p_log_level_rec);
Line: 1545

           FA_DISTRIBUTION_HISTORY_PKG.INSERT_ROW
                       (X_Rowid                    => l_rowid,
                        X_Distribution_Id          => l_distribution_id,
                        X_Book_Type_Code           => p_asset_hdr_rec.book_type_code,
                        X_Asset_Id                 => p_asset_hdr_rec.asset_id,
                        X_Units_Assigned           => p_asset_dist_tbl(i).transaction_units,
                        X_Date_Effective           => p_trans_rec.who_info.last_update_date,
                        X_Code_Combination_Id      => p_asset_dist_tbl(i).expense_ccid,
                        X_Location_Id              => p_asset_dist_tbl(i).location_ccid,
                        X_Transaction_Header_Id_In => p_trans_rec.transaction_header_id,
                        X_Last_Update_Date         => p_trans_rec.who_info.last_update_date,
                        X_Last_Updated_By          => p_trans_rec.who_info.last_updated_by,
                        X_Date_Ineffective         => NULL,
                        X_Assigned_To              => p_asset_dist_tbl(i).assigned_to,
                        X_Transaction_Header_Id_Out => NULL,
                        X_Transaction_Units        => NULL,
                        X_Retirement_Id            => NULL,
                        X_Last_Update_Login        => p_trans_rec.who_info.last_update_login,
                        X_Calling_Fn   => 'FA_DISTRIBUTION_PVT.update_dist_history', p_log_level_rec => p_log_level_rec);
Line: 1569

           FA_TRANSFER_DETAILS_PKG.INSERT_ROW
                (X_Rowid              => l_rowid,
                 X_Transfer_Header_Id => p_trans_rec.transaction_header_id,
                 X_Distribution_Id    => l_tfr_det_dist_id,
                 X_Book_Header_Id     => l_book_header_id,
                 X_Calling_Fn         => 'FA_DISTRIBUTION_PVT.update_dist_history',  p_log_level_rec => p_log_level_rec);
Line: 1584

                calling_fn => 'FA_DISTRIBUTION_PVT.update_dist_history',  p_log_level_rec => p_log_level_rec);
Line: 1586

END update_dist_history;