DBA Data[Home] [Help]

APPS.IGI_IGIIARPR_XMLP_PKG SQL Statements

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

Line: 5

    SELECT
      PERIOD_NAME
    INTO CP_PERIOD_NAME
    FROM
      FA_DEPRN_PERIODS
    WHERE PERIOD_COUNTER = P_PERIOD_COUNTER
      AND BOOK_TYPE_CODE = P_BOOK_TYPE_CODE;
Line: 20

INSERT_INFO_VAR := IGI_IGIIARPR_XMLP_PKG.do_insertformula;
Line: 22

select SUBSTR(argument1,INSTR(argument1,'=',1)+1,LENGTH(argument1)),
SUBSTR(argument2,INSTR(argument2,'=',1)+1,LENGTH(argument2)),
SUBSTR(argument3,INSTR(argument3,'=',1)+1,LENGTH(argument3))

into P_BOOK_TYPE_CODE,P_REVALUATION_ID,P_PERIOD_COUNTER
from FND_CONCURRENT_REQUESTS
where request_id=P_CONC_REQUEST_ID;
Line: 30

SELECT accounting_flex_structure
INTO  accounting_Flex_structure
FROM   fa_book_controls
WHERE  book_Type_code = p_book_type_code;
Line: 61

    SELECT
      A.CURRENCY_CODE
    INTO L_CURR_CODE
    FROM
      GL_SETS_OF_BOOKS A,
      FA_BOOK_CONTROLS B
    WHERE A.SET_OF_BOOKS_ID = B.SET_OF_BOOKS_ID
      AND B.BOOK_TYPE_CODE = P_BOOK_TYPE_CODE;
Line: 84

    SELECT
      CP.USER_CONCURRENT_PROGRAM_NAME
    INTO L_REPORT_NAME
    FROM
      FND_CONCURRENT_PROGRAMS_TL CP,
      FND_CONCURRENT_REQUESTS CR
    WHERE CR.REQUEST_ID = P_CONC_REQUEST_ID
      AND CP.LANGUAGE = USERENV('LANG')
      AND CP.APPLICATION_ID = CR.PROGRAM_APPLICATION_ID
      AND CP.CONCURRENT_PROGRAM_ID = CR.CONCURRENT_PROGRAM_ID;
Line: 107

    SELECT
      PERIOD_NAME
    INTO CP_PERIOD_NAME
    FROM
      FA_DEPRN_PERIODS
    WHERE PERIOD_COUNTER = P_PERIOD_COUNTER
      AND BOOK_TYPE_CODE = P_BOOK_TYPE_CODE;
Line: 114

    SELECT
      CT.FISCAL_YEAR_NAME FISCAL_YEAR_NAME
    INTO P_FISCAL_YEAR
    FROM
      FA_BOOK_CONTROLS BC,
      FA_CALENDAR_TYPES CT
    WHERE BC.BOOK_TYPE_CODE = P_BOOK_TYPE_CODE
      AND BC.DEPRN_CALENDAR = CT.CALENDAR_TYPE;
Line: 262

  PROCEDURE INSERT_INFO IS
    L_SOURCE_TYPE_CODE VARCHAR2(50);
Line: 308

    l_sql := 'INSERT INTO igi_iac_balances_report(
                 asset_id,
       distribution_ccid,
       source_type_code,
       amount,
       data_source,
       display_order )
       SELECT ad.asset_id
                 ,dh.code_combination_id distribution_ccid
                 ,'''||l_source_type_code||''' source_type_code
                 ,'||l_amount1||' amount
                 ,''Before'' data_source
                 ,''1'' display_order
           FROM fa_deprn_detail dd,
                fa_books bk,
                gl_code_combinations cc,
                fa_additions ad,
                fa_distribution_history dh,
                fa_categories fc,
                igi_iac_reval_asset_rules irar,
                igi_iac_reval_categories irc
     WHERE irc.revaluation_id = '||p_revaluation_id||
     ' AND irar.asset_id = bk.asset_id
     AND irar.revaluation_id = irc.revaluation_id
     AND irar.category_id = irc.category_id
     AND irc.select_category = ''Y''
     AND irar.selected_for_reval_flag = ''Y''
     AND irar.book_type_code = '''||p_book_type_code||'''
     AND bk.book_type_code = irar.book_type_code
     AND bk.asset_id = ad.asset_id
     AND dd.period_counter = (SELECT MAX(period_counter)
                              FROM fa_deprn_summary ds
	                          WHERE ds.asset_id =bk.asset_id
	                          AND ds.book_type_code= '''||p_book_type_code||'''
	                          AND ds.period_counter<= '||p_period_counter||')
     AND EXISTS (SELECT MAX(ith.adjustment_id)
                 FROM igi_iac_transaction_headers ith
                 WHERE   ith.asset_id = bk.asset_id
                 AND ith.book_type_code = '''||p_book_type_code||'''
                 AND ith.adjustment_status NOT IN (''PREVIEW'',''OBSOLETE''))
     AND bk.date_ineffective IS NULL
     AND dh.book_type_code = bk.book_type_code
     AND dd.asset_id= bk.asset_id
     AND dh.asset_id = dd.asset_id
     AND dh.distribution_id = dd.distribution_id
     AND dh.transaction_header_id_out IS NULL
     AND dh.code_combination_id = cc.code_combination_id
     AND fc.category_id=ad.asset_category_id
     AND bk.asset_id NOT IN
            (SELECT asset_id
             FROM igi_iac_asset_balances
             WHERE book_type_code = bk.book_type_code
             AND asset_id = bk.asset_id)
     AND bk.asset_id NOT IN (SELECT asset_id
                             FROM igi_iac_exceptions
                             WHERE revaluation_id = irc.revaluation_id)
     UNION
     SELECT ad.asset_id
      ,dh.code_combination_id distribution_ccid
      ,'''||l_source_type_code||''' source_type_code
      ,'||l_amount2||' amount
      ,''Before'' data_source
      ,''1'' display_order
     FROM igi_iac_det_balances idb,
        fa_deprn_detail dd,
        fa_books bk,
        gl_code_combinations cc,
        fa_additions ad,
        fa_categories fc,
        fa_distribution_history dh ,
        igi_iac_reval_asset_rules irar,
        igi_iac_reval_categories irc
     WHERE irc.revaluation_id = '||p_revaluation_id||'
      AND irar.asset_id = bk.asset_id
     AND irar.selected_for_reval_flag = ''Y''
     AND irar.revaluation_id = irc.revaluation_id
     AND irar.category_id = irc.category_id
     AND irc.select_category = ''Y''
     AND irar.book_type_code = '''||p_book_type_code||'''
     AND bk.book_type_code = irar.book_type_code
     AND bk.asset_id = ad.asset_id
     AND dd.asset_id=bk.asset_id
     AND dd.period_counter =(SELECT max(period_counter)
                           FROM fa_deprn_summary ds
		                   WHERE ds.asset_id =bk.asset_id
                           AND ds.book_type_code='''||p_book_type_code||'''
                           AND ds.period_counter<='||p_period_counter||')
     AND idb.adjustment_id =(SELECT max(ith.adjustment_id)
                           FROM igi_iac_transaction_headers ith
               	           WHERE ith.asset_id = bk.asset_id
                           AND ith.book_type_code ='''||p_book_type_code||'''
                           AND ith.adjustment_status NOT IN (''PREVIEW'', ''OBSOLETE''))
     AND bk.date_ineffective IS NULL
     AND dh.book_type_code = bk.book_type_code
     AND dh.asset_id = dd.asset_id
     AND dh.distribution_id = dd.distribution_id
     AND dh.transaction_header_id_out is NULL
     AND dh.distribution_id = idb.distribution_id
     AND dh.asset_id = idb.asset_id
     AND dh.book_type_code = idb.book_type_code
     AND dh.code_combination_id = cc.code_combination_id
     AND fc.category_id= ad.asset_category_id
     AND bk.asset_id NOT IN (SELECT asset_id
                             FROM igi_iac_exceptions
                             WHERE revaluation_id = irc.revaluation_id)
     UNION
     SELECT ad.asset_id
           ,dh.code_combination_id distribution_ccid
           ,'''||l_source_type_code||''' source_type_code
           ,'||l_amount3||' amount
           ,''After'' data_source
           ,''2'' display_order
     FROM igi_iac_det_balances idb,
          fa_deprn_detail dd,
          fa_books bk,
          gl_code_combinations cc,
          fa_additions ad,
          fa_categories fc,
          fa_distribution_history dh,
          igi_iac_reval_asset_rules irar,
          igi_iac_reval_categories irc
     WHERE irc.revaluation_id = '||p_revaluation_id||'
     and irar.asset_id = bk.asset_id
     and irar.selected_for_reval_flag = ''Y''
     AND irar.revaluation_id = irc.revaluation_id
     AND irar.category_id = irc.category_id
     AND irc.select_category = ''Y''
     and irar.book_type_code = '''||p_book_type_code||'''
     and bk.book_type_code= irar.book_type_code
     and bk.asset_id = ad.asset_id
     and idb.adjustment_id=(select max(ith.adjustment_id)
                       from igi_iac_transaction_headers ith
                       where ith.asset_id = bk.asset_id
                       and ith.book_type_code ='''||p_book_type_code||'''
                       and ith.period_counter <='||p_period_counter||'
                       and ith.adjustment_status=''PREVIEW'')
     and dd.period_counter=(select max(period_counter)
                       from fa_deprn_summary ds
                       where ds.asset_id =bk.asset_id
                       and ds.book_type_code='''||p_book_type_code||'''
                       and ds.period_counter<='||p_period_counter||')
     and bk.date_ineffective is NULL
     and dh.book_type_code = bk.book_type_code
     and dh.asset_id = dd.asset_id
     and dd.asset_id=bk.asset_id
     and dh.distribution_id = dd.distribution_id
     and dh.transaction_header_id_out is NULL
     and dh.distribution_id = idb.distribution_id
     and dh.code_combination_id = cc.code_combination_id
     and fc.category_id=ad.asset_category_id
     AND bk.asset_id NOT IN (SELECT asset_id
                             FROM igi_iac_exceptions
                             WHERE revaluation_id = irc.revaluation_id)
     ';
Line: 468

  END INSERT_INFO;
Line: 470

  FUNCTION DO_INSERTFORMULA RETURN NUMBER IS
  BEGIN
    INSERT_INFO;
Line: 477

  END DO_INSERTFORMULA;
Line: 751

   Select asset_cost_acct,deprn_reserve_acct into
    cp_cost_acct,cp_acc_deprn_acct
    from  fa_category_books
    where book_type_code = p_book_type_code and
    category_id = asset_category_id;
Line: 761

  select operating_expense_ccid,backlog_deprn_rsv_ccid,reval_rsv_ccid
   into  oper_exp, bk_rsv,reval_rsv
   from igi_iac_category_books where
   book_type_code = p_book_type_code and
   category_id = asset_category_id;
Line: 768

   execute immediate('select ' || cp_account_segment ||'  from  gl_code_combinations cc where
              chart_of_accounts_id= ' || accounting_flex_structure || ' and
	      code_combination_id = '|| oper_exp) into
              cp_operating_acct;
Line: 773

   execute immediate('select ' || cp_account_segment ||'  from  gl_code_combinations cc where
              chart_of_accounts_id= ' || accounting_flex_structure || ' and
	      code_combination_id = '|| bk_rsv) into
              cp_backlog_acct;
Line: 779

   execute immediate('select ' || cp_account_segment ||'  from  gl_code_combinations cc where
              chart_of_accounts_id= ' || accounting_flex_structure || ' and
	      code_combination_id = '|| reval_rsv) into
              cp_reval_res_acct;