DBA Data[Home] [Help]

APPS.FA_SUPER_GROUP_CHANGE_PKG SQL Statements

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

Line: 30

      SELECT super_group_id
           , book_type_code
           , start_period_counter
           , end_period_counter
      FROM   fa_super_group_rules
      WHERE  adjustment_required_flag = 'Y'
      AND    date_ineffective is null
      ORDER BY book_type_code, start_period_counter;
Line: 41

      SELECT asset_id
           , date_placed_in_service
      FROM   fa_books
      WHERE  book_type_code = c_book_type_code
      AND    super_group_id = c_super_group_id
      AND    transaction_header_id_out is null;
Line: 50

      SELECT cp.start_date
      FROM   fa_calendar_periods cp
           , fa_calendar_types ct
           , fa_fiscal_year fy
           , fa_book_controls bc
      WHERE  bc.book_type_code = c_book_type_code
      AND    ct.calendar_type = bc.deprn_calendar
      AND    ct.calendar_type = cp.calendar_type
      AND    ct.fiscal_year_name = fy.fiscal_year_name
      AND    fy.fiscal_year = trunc(c_period_counter/ct.number_per_fiscal_year)
      AND    cp.period_num = round(((c_period_counter/ct.number_per_fiscal_year)
                                    - fy.fiscal_year)*ct.number_per_fiscal_year)
      AND    cp.start_date between fy.start_date and fy.end_date;
Line: 133

 1. Fetch all updated super group rules.
    take the earliest one and process adjustment for all groups
    which has this super group assigned.
 2. When going to next record, if it is the same as precious
    super group, skip and fetch next.  If it has difference super group
    id, process as 1.
 3. when processing, follow program flow as default one (rollback deprn).


Processing super group change.
 1.  Create super_group_id in dpr struct in pro*c and pl/sql
 2.  Modify G1 cursor to make not to join fa_super_group_rules.
 3.  populate super_group_id in G1.
 4.  Create cache program for super group rules.
 5.  in faxcde, in the early stage, get super group rules info if super_group_id is populated
 6.  replace with super group info (deprn rate) etc...


Deprn
 1. if possible, create array to store super group id and it's rec cost, reserve and deprn expense
 2. check to see if it is fully reserved at super gorup level.
 3.  If rec cost < reserve, then either redistribute recalculated (use subtraction) amount
     or take out excess amounts evenly.
 4. set period counter fully reserved for all suepr group assigned group.
*5. create function to unset period counter fully reserved if super group id
    is not null and which result in increase of nbv for the group asset.
    Also if the super group is assigned to a group, unset period counter fully
    reserved for all groups which has the super group assigned.
 6. If super group id is changed to different one, need to check as well.

 */

   if (g_log_level_rec.statement_level) then
      fa_debug_pkg.add(l_calling_fn2,'Start Processing', 'Main',
                       p_log_level_rec => g_log_level_rec);
Line: 173

      t_super_group_id.delete;
Line: 293

               l_trans_rec.who_info.last_update_date := l_temp_sysdate;
Line: 294

               l_trans_rec.who_info.last_updated_by := FND_GLOBAL.USER_ID;
Line: 295

               l_trans_rec.who_info.last_update_login := FND_GLOBAL.USER_ID;
Line: 397

            update fa_super_group_rules
            set    adjustment_required_flag = 'N'
            where  super_group_id = t_super_group_id(i)
            and    book_type_code = t_book_type_code(i)
            and    adjustment_required_flag = 'Y';