DBA Data[Home] [Help]

APPS.XTR_ORACLE_FIN_INTERFACES_P SQL Statements

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

Line: 5

PROCEDURE UPDATE_DR(in_company_code	IN VARCHAR2,
		    in_batch_id         IN NUMBER,
                    in_jnl_date		IN DATE,
                    in_ccid		IN NUMBER,
                    in_gl_link_id	IN NUMBER,
                    in_ccy		IN VARCHAR2,
                    in_alt_jrnl_date	IN DATE) is

Begin

   /* Private procedure to update debit journal rows within the given batch id.      */
   /* Updated columns are the transferred date and the link id used by the drilldown */
   /* feature in GL which XTR does not have currently.                               */

   Update XTR_JOURNALS
      Set TRANSFER_TO_EXTERNAL_GL = trunc(sysdate),
          gl_sl_link_id = in_gl_link_id,
          alt_journal_date = in_alt_jrnl_date
    where batch_id = in_batch_id
      and journal_date = in_jnl_date
      and code_combination_id = in_ccid
      and currency = in_ccy
      and (nvl(debit_amount,0) <> 0 or nvl(accounted_dr,0) <> 0);
Line: 29

End UPDATE_DR;
Line: 31

PROCEDURE UPDATE_CR(in_company_code	IN VARCHAR2,
		    in_batch_id         IN NUMBER,
                    in_jnl_date		IN DATE,
                    in_ccid		IN NUMBER,
                    in_gl_link_id	IN NUMBER,
                    in_ccy		IN VARCHAR2,
                    in_alt_jrnl_date	IN VARCHAR2) is
Begin

   /* Private procedure to update credit journal rows within the given batch id. */

   Update XTR_JOURNALS
      Set TRANSFER_TO_EXTERNAL_GL = trunc(sysdate),
          gl_sl_link_id = in_gl_link_id,
          alt_journal_date = in_alt_jrnl_date
    where batch_id = in_batch_id
      and JOURNAL_DATE = in_jnl_date
      and code_combination_id = in_ccid
      and currency = in_ccy
      and (nvl(credit_amount,0) <> 0 or nvl(accounted_cr,0) <> 0);
Line: 52

End UPDATE_CR;
Line: 85

    Select min(start_date) into l_next_start
    from gl_period_statuses
    where application_id = 101
    and set_of_books_id = in_sob_id
    and closing_status in ('O','F')
    and adjustment_period_flag = 'N'
    and start_date >= in_jrnl_date;
Line: 134

   Select 1 into l_temp
     from gl_period_statuses
    where application_id = 101
      and set_of_books_id = in_sob_id
      and adjustment_period_flag = 'N'
      and closing_status in ('O','F')
      and in_jrnl_date between start_date and end_date;
Line: 194

   Select
   PARAMETER_VALUE_CODE
   FROM XTR_COMPANY_PARAMETERS WHERE
   COMPANY_CODE in (Select distinct company_code from xtr_journals
   where batch_id = in_batch_id)
   and parameter_code = 'ACCNT_UNBAL';
Line: 202

   Select rowid from xtr_journals
   Where batch_id = in_batch_id
   and journal_date = l_jrnl_date and nvl(accounted_cr,0) <> 0
   and accounted_cr = (Select min(accounted_cr) from xtr_journals
   Where batch_id = in_batch_id
   and journal_date = l_jrnl_date and nvl(accounted_cr,0) <> 0 );
Line: 211

   Select rowid from xtr_journals
   Where batch_id = in_batch_id
   and journal_date = l_jrnl_date and nvl(accounted_dr,0) <> 0
   and accounted_dr = (Select min(accounted_dr) from xtr_journals
   Where batch_id = in_batch_id
   and journal_date = l_jrnl_date and nvl(accounted_dr,0) <> 0 );
Line: 220

   Select journal_date,
   sum(nvl(accounted_dr,0)) - sum(nvl(accounted_cr,0)) difference
   From XTR_JOURNALS
   Where batch_id = in_batch_id
   Group By journal_date
   having sum(nvl(debit_amount,0)) = sum(nvl(credit_amount,0));
Line: 230

   Select null
     From DUAL
    Where exists
          (Select null
             From XTR_JOURNALS
            Where batch_id = in_batch_id
            Group By journal_date
            Having sum(nvl(accounted_dr,0)) <> sum(nvl(accounted_cr,0)));
Line: 254

     	 update xtr_journals set accounted_dr=accounted_dr+.01
         where rowid = l_rowid;
Line: 261

     	  update xtr_journals set accounted_cr=accounted_cr+.01
          where rowid = l_rowid;
Line: 316

   Select parameter_value_code
     from XTR_COMPANY_PARAMETERS
    where company_code = in_company
      and parameter_code = 'ACCNT_UNBAL';
Line: 390

	select PTY.set_of_books_id, SOB.name
	from  XTR_PARTIES_V     PTY,
	      GL_SETS_OF_BOOKS  SOB
	where PTY.set_of_books_id = SOB.set_of_books_id
	  and PTY.party_code = p_company_code;
Line: 397

	select parameter_value_code
        from XTR_COMPANY_PARAMETERS
	where company_code = p_company_code
        and parameter_code = 'ACCNT_JNTRM';-- determine the transfer method: SUMMARY or DETAIL
Line: 403

	select	null				row_id,
		batch_id			batch_id,
		journal_date			journal_date,
		code_combination_id		ccid,
		currency			currency,
		sum(nvl(debit_amount,0)) 	debit,
		0 				credit,
		sum(nvl(accounted_dr,0)) 	acct_dr,
		0 				acct_cr,
                to_number(null)			trans_number,
                null				date_type,
                to_number(null)			deal_number,
                null				amount_type,
                null				action_code,
                null				deal_type,
                null				deal_subtype,
                null				product_type,
                null				portfolio_code
	from  XTR_JOURNALS
	where batch_id = G_batch_id
	  and (nvl(debit_amount,0) <> 0 or nvl(accounted_dr,0) <> 0)
	group by batch_id, journal_date, code_combination_id, currency
	UNION
	select	null				row_id,
		batch_id			batch_id,
		journal_date			journal_date,
		code_combination_id		ccid,
		currency			currency,
		0 				debit,
		sum(nvl(credit_amount,0)) 	credit,
		0  				acct_dr,
		sum(nvl(accounted_cr,0))  	acct_cr,
                to_number(null)			trans_number,
                null				date_type,
                to_number(null)			deal_number,
                null				amount_type,
                null				action_code,
                null				deal_type,
                null				deal_subtype,
                null				product_type,
                null				portfolio_code
	from XTR_JOURNALS
	where batch_id = G_batch_id
	and (nvl(credit_amount,0) <> 0 or nvl(accounted_cr,0) <> 0)
	group by batch_id, journal_date, code_combination_id, currency;
Line: 450

        select  rowid			row_id,
		batch_id		batch_id,
                journal_date		journal_date,
                code_combination_id	ccid,
                currency		currency,
                (nvl(debit_amount,0))	debit,
                nvl(credit_amount,0)	credit,
                (nvl(accounted_dr,0))	acct_dr,
                nvl(accounted_cr,0)	acct_cr,
                transaction_number	trans_number,
                date_type		date_type,
                deal_number		deal_number,
                amount_type		amount_type,
                action_code		action_code,
                deal_type		deal_type,
                deal_subtype		deal_subtype,
                product_type		product_type,
                portfolio_code		portfolio_code
        from XTR_JOURNALS
        where batch_id = G_batch_id
        and (nvl(debit_amount,0) <> 0 or nvl(accounted_dr,0) <> 0 or nvl(credit_amount,0) <> 0 or nvl(accounted_cr,0) <> 0);
Line: 475

	SELECT user_je_source_name
	FROM gl_je_sources
	WHERE je_source_name = 'Treasury';
Line: 480

	select user_je_category_name
	from gl_je_categories
	where je_category_name = 'Treasury';
Line: 485

	select user_conversion_type
	from gl_daily_conversion_types
	where conversion_type = (select conversion_type
				 from xtr_parties_v
				 where party_code = p_company_code);
Line: 492

	select gl_interface_control_s.nextval
	  from dual;
Line: 595

         Select XTR_AE_LINK_ID_S.nextval
           into l_gl_link_id
           from dual;
Line: 655

            Insert into GL_INTERFACE(
         		status,
           		set_of_books_id,
           		code_combination_id,
           		user_je_source_name,
           		user_je_category_name,
			accounting_date,
			currency_code,
			date_created,
			created_by,
			actual_flag,
			entered_dr,
			entered_cr,
			currency_conversion_date,
			user_currency_conversion_type,
			accounted_dr,
			accounted_cr,
			gl_sl_link_id,
			group_id,
			reference21,
			reference22,
			reference23,
			reference24,
			reference25,
			reference26,
			reference27,
			reference28,
			reference29,
			reference30)
                Values ('NEW',
                        l_set_of_books,
                        JNL_REC.ccid,
                        l_source_name,
                        l_category_name,
                        l_journal_date,
		        JNL_REC.currency,
		        trunc(sysdate),
		        nvl(fnd_global.user_id,-1),
    		       'A',
		       JNL_REC.debit,
		       JNL_REC.credit,
		       JNL_REC.journal_date,
		       l_xchange_type,
		       JNL_REC.acct_dr,
		       JNL_REC.acct_cr,
		       l_gl_link_id,
		       l_gl_group_id,
		       JNL_REC.batch_id,
		       JNL_REC.trans_number,
		       JNL_REC.date_type,
		       JNL_REC.deal_number,
		       JNL_REC.amount_type,
		       JNL_REC.action_code,
		       JNL_REC.deal_type,
		       JNL_REC.deal_subtype,
		       JNL_REC.product_type,
		       JNL_REC.portfolio_code);
Line: 716

               Update XTR_JOURNALS
                  Set TRANSFER_TO_EXTERNAL_GL = trunc(sysdate),
                      gl_sl_link_id = l_gl_link_id,
		      alt_journal_date = l_journal_date		-- bug 3461138
                where rowid = JNL_REC.row_id;
Line: 727

                  UPDATE_DR (in_company_code,
                             JNL_REC.batch_id,
                             JNL_REC.journal_date,
                             JNL_REC.ccid,
                             l_gl_link_id,
                             JNL_REC.currency,
                             l_journal_date);
Line: 735

                  UPDATE_CR (in_company_code,
                             JNL_REC.batch_id,
                             JNL_REC.journal_date,
                             JNL_REC.ccid,
                             l_gl_link_id,
                             JNL_REC.currency,
                             l_journal_date);
Line: 757

         Update XTR_BATCHES
            Set GL_GROUP_ID =  l_gl_group_id
          Where BATCH_ID = in_batch_id;
Line: 763

         Update XTR_BATCH_EVENTS
            Set AUTHORIZED = 'Y',
                AUTHORIZED_BY = fnd_global.user_id,
                AUTHORIZED_ON = trunc(sysdate)
          Where batch_id = in_batch_id
            And event_code = 'JRNLGN';
Line: 771

      End If;     -- [l_ok_to_xfer... update batch tables after successful xfer]