DBA Data[Home] [Help]

APPS.XTR_WRAPPER_API_P SQL Statements

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

Line: 74

         Select *
         From Xtr_Deal_Date_Amounts
         Where settlement_number in
               (Select settlement_number
                From Xtr_Settlement_Summary
                Where net_ID = p_settlement_summary_ID)
         For update of reconciled_reference;
Line: 82

/* After CE is done with Reconciliation this procedure updates the necessary records in XTR tables to denote the completion
   of Reconciliation */
         If p_task = 'REC' then
/* This is to update Xtr_Settlement_Summary about the successful completion of Reconciliation */
            Update xtr_settlement_summary
            set status = 'R'
            Where settlement_summary_id = p_settlement_summary_ID;
Line: 96

            Select settlement_number
            Into v_settlement_number
            From Xtr_Settlement_Summary
            Where settlement_summary_id = p_settlement_summary_ID;
Line: 101

            Select Xtr_Deal_Date_Amounts_S.Nextval
            Into v_reconciled_reference
            From dual;
Line: 105

/* This is to update DDA about the successful completion of Reconciliation */
            Update Xtr_Deal_Date_Amounts
            Set Reconciled_Reference = v_reconciled_reference,
                Reconciled_Pass_Code = p_reconciled_method
            Where settlement_number = v_settlement_number;
Line: 114

                    Update Xtr_Deal_Date_Amounts
                    Set reconciled_reference = v_reconciled_reference,
                    reconciled_pass_code = p_reconciled_method
                    Where current of C1;
Line: 121

/* After successful Un-Reconciliation, Xtr_Settlement_Summary is updated for availability of record for future reconciliation */
            Update xtr_settlement_summary
            set status = 'A'
            Where settlement_summary_id = p_settlement_summary_ID;
Line: 131

            Select settlement_number
            Into v_settlement_number
            From Xtr_Settlement_Summary
            Where settlement_summary_id = p_settlement_summary_ID;
Line: 136

            Update Xtr_Deal_Date_Amounts
            Set Reconciled_Reference = null,
                Reconciled_Pass_Code = null
            Where settlement_number = v_settlement_number;
Line: 144

/* After successful un-reconciliation, DDA is updated such that the records are available for future reconciliation */
                    Update Xtr_Deal_Date_Amounts
                    Set reconciled_reference = null,
                    reconciled_pass_code = null
                    Where current of C1;
Line: 169

      select xp.PARTY_CODE COMPANY_CODE
      from XTR_PARTY_INFO xp  -- BUG 2811315
       where xp.legal_entity_id = P_ORG_ID    -- bug 3862743
       and xp.authorised = 'Y';
Line: 176

      select xp.PARTY_CODE COMPANY_CODE
      from XTR_PARTY_INFO xp
       where xp.legal_entity_id = P_ORG_ID;    -- bug 3862743
Line: 181

      select ce_bank_account_id from
      xtr_bank_accounts
      where ce_bank_account_id = P_ce_bank_account_id
      and   ce_bank_account_id is not null;
Line: 187

      select ce_bank_account_id from
             xtr_bank_accounts b,
	     xtr_party_info p
      where  b.ce_bank_account_id is not null
      and    ce_bank_account_id  = P_ce_bank_account_id
      and    p.party_code = b.party_code
      and    p.party_type = b.party_type
      and    p.legal_entity_id = P_ORG_ID    -- bug 3862743
      and    currency = P_CURRENCY_CODE
      and    b.authorised = 'Y';
Line: 199

      select ce_bank_account_id,account_number from
             xtr_bank_accounts b,
	     xtr_party_info p
      where  b.ce_bank_account_id is not null
      and    ce_bank_account_id  = P_ce_bank_account_id
      and    p.party_code = b.party_code
      and    p.party_type = b.party_type
      and    p.legal_entity_id = P_ORG_ID    -- bug 3862743
      and    currency = P_CURRENCY_CODE;
Line: 340

   select ROUNDING_FACTOR,YEAR_BASIS,HCE_RATE
    from  XTR_MASTER_CURRENCIES_V
    where CURRENCY = l_ccy;
Line: 346

  select account_number from
         xtr_bank_accounts b,
         xtr_party_info p
  where  b.ce_bank_account_id is not null
  and    ce_bank_account_id  = P_ce_bank_account_id
  and    p.party_code = b.party_code
  and    p.party_type = b.party_type
  and    p.legal_entity_id = P_ORG_ID        -- bug 3862743
  and    currency = P_CURRENCY_CODE
  and    b.authorised = 'Y';
Line: 359

   select
  PARTY_CODE,CURRENCY,SETOFF,PORTFOLIO_CODE,BANK_CODE,nvl(YEAR_CALC_TYPE,'ACTUAL/ACTUAL')
  YEAR_CALC_TYPE
  ,rounding_type, day_count_type  -- Added for Interest Override
    from XTR_BANK_ACCOUNTS
    where ACCOUNT_NUMBER = acct_no
    and   PARTY_CODE     = new_company;
Line: 368

   select
     a.BALANCE_DATE,a.BALANCE_CFLOW,a.ACCUM_INT_CFWD,a.INTEREST_RATE,A.ACCRUAL_INTEREST,
     a.rounding_type, a.day_count_type -- Added for Interest Override
     from XTR_BANK_BALANCES a
    where a.ACCOUNT_NUMBER = acct_no
    and   a.COMPANY_CODE = new_company
    and   a.BALANCE_DATE = (select max(b.BALANCE_DATE)
                             from XTR_BANK_BALANCES b
                             where b.ACCOUNT_NUMBER = acct_no
                             and   b.COMPANY_CODE   = new_company);
Line: 380

   select 'x'
    from XTR_BANK_BALANCES
    where ACCOUNT_NUMBER = acct_no
    and   COMPANY_CODE   = new_company
    and   TRUNC(BALANCE_DATE)  = TRUNC(new_date);
Line: 387

   select LIMIT_CODE
    from XTR_BANK_BALANCES
    where ACCOUNT_NUMBER = acct_no
    and   COMPANY_CODE   = new_company
    and   BALANCE_DATE   < new_date
    and ((new_bal_ledger >= 0 and BALANCE_CFLOW >= 0)
      or (new_bal_ledger <= 0 and BALANCE_CFLOW <= 0))
    order by BALANCE_DATE;
Line: 397

   select cl.LIMIT_CODE
     from  XTR_COUNTERPARTY_LIMITS cl, XTR_LIMIT_TYPES lt
    where cl.COMPANY_CODE = new_company
    and   cl.CPARTY_CODE  = l_bank_code
    and   cl.LIMIT_TYPE   = lt.LIMIT_TYPE
    and   ((new_bal_ledger >= 0 and lt.FX_INVEST_FUND_TYPE = 'I')
        or (new_bal_ledger <= 0 and lt.FX_INVEST_FUND_TYPE = 'OD'));
Line: 406

     select CROSS_REF_TO_OTHER_PARTY
     from   XTR_PARTIES_V
     where  PARTY_CODE = l_comp;
Line: 411

  select xp.PARTY_CODE COMPANY_CODE
    from XTR_PARTY_INFO xp
   where xp.legal_entity_id = P_ORG_ID;        -- bug 3862743
Line: 418

   SELECT MIN(a.balance_date)
     FROM   xtr_bank_balances a
     WHERE a.account_number = acct_no
     AND a.COMPANY_CODE = new_company;
Line: 424

   SELECT a.day_count_type
     FROM xtr_bank_balances a
     WHERE  a.account_number = acct_no
     AND a.COMPANY_CODE = new_company
     AND a.balance_date = (select max(b.BALANCE_DATE)
                           from XTR_BANK_BALANCES b
                           where b.ACCOUNT_NUMBER = acct_no
			   and   b.COMPANY_CODE   = new_company
			   AND   b.balance_date < l_prv_date);
Line: 570

           bank_balance_validate(new_company,acct_no,p_currency_code,new_date,'REVAL','INSERT',p_result,p_error_msg);
Line: 572

              bank_balance_validate(new_company,acct_no,p_currency_code,new_date,'ACCRUAL','INSERT',p_result,p_error_msg);
Line: 578

              insert into XTR_BANK_BALANCES
                (company_code,account_number,balance_date,no_of_days,
                 statement_balance,balance_adjustment,balance_cflow,
                 accum_int_bfwd,interest,interest_rate,interest_settled,
                 interest_settled_hce,accum_int_cfwd,setoff,limit_code,
                 created_on,created_by,accrual_interest,
		 original_amount, rounding_type, day_count_type,  -- Added for Interest Override
		 one_day_float, two_day_float)
             values
                (l_comp,acct_no,new_date,l_no_days,
                 new_bal_ledger,new_bal_intcalc,new_bal_cashflow,
                 l_int_bf,l_interest,l_new_rate,0,
                 0,l_int_cf,l_setoff,l_limit_code,
                 sysdate, fnd_global.user_id,l_accrual_int,
		 l_original_amount, l_rounding_type, l_day_count_type,   -- Added for Interest Override
		 P_ONE_DAY_FLOAT, P_TWO_DAY_FLOAT);
Line: 598

             insert into XTR_BANK_BALANCES
                (company_code,account_number,balance_date,no_of_days,
                 statement_balance,balance_adjustment,balance_cflow,
                 accum_int_bfwd,interest,interest_rate,interest_settled,
                 interest_settled_hce,accum_int_cfwd,setoff,limit_code,
                 created_on,created_by,accrual_interest,
		 original_amount, rounding_type, day_count_type,  -- Added for Interest Override
		 one_day_float, two_day_float)
             values
                (l_comp,acct_no,new_date,l_no_days,
                 new_bal_ledger,new_bal_intcalc,new_bal_cashflow,
                 l_int_bf,l_interest,l_new_rate,0,
                 0,l_int_cf,l_setoff,l_limit_code,
                 sysdate, fnd_global.user_id,l_accrual_int,
		 l_original_amount, l_rounding_type, l_day_count_type,  -- Added for Interest Override
		 P_ONE_DAY_FLOAT, P_TWO_DAY_FLOAT);
Line: 620

           bank_balance_validate(new_company,acct_no,p_currency_code,new_date,'REVAL','UPDATE',P_RESULT,P_ERROR_MSG);
Line: 622

              bank_balance_validate(new_company,acct_no,p_currency_code,new_date,'ACCRUAL','UPDATE',P_RESULT,P_ERROR_MSG);
Line: 628

              update XTR_BANK_BALANCES
              set    statement_balance=new_bal_ledger,
                     balance_adjustment=new_bal_intcalc,
                     balance_cflow=new_bal_cashflow,
                     accum_int_bfwd=l_int_bf,
                     interest=l_interest,
                     interest_rate=l_new_rate,
                     interest_settled=0,
                     interest_settled_hce=0,
                     accum_int_cfwd=l_int_cf,
                     setoff=l_setoff,
                     limit_code=l_limit_code,
                     updated_on=sysdate,
                     updated_by=fnd_global.user_id,
		     accrual_interest=l_accrual_int,
		     original_amount = l_original_amount, -- Added for Interest Override
		     rounding_type = l_rounding_type,
		     day_count_type = l_day_count_type,
		     one_day_float = P_ONE_DAY_FLOAT,
		     two_day_float = P_TWO_DAY_FLOAT
              where ACCOUNT_NUMBER = acct_no
              and   COMPANY_CODE   = new_company
              and   TRUNC(BALANCE_DATE)  = TRUNC(new_date);
Line: 653

              update XTR_BANK_BALANCES
              set    statement_balance=new_bal_ledger,
                     balance_adjustment=new_bal_intcalc,
                     balance_cflow=new_bal_cashflow,
                     accum_int_bfwd=l_int_bf,
                     interest=l_interest,
                     interest_rate=l_new_rate,
                     interest_settled=0,
                     interest_settled_hce=0,
                     accum_int_cfwd=l_int_cf,
                     setoff=l_setoff,
                     limit_code=l_limit_code,
                     updated_on=sysdate,
                     updated_by=fnd_global.user_id,
                     accrual_interest=l_accrual_int,
		     original_amount = l_original_amount, -- Added for Interest Override
		     rounding_type = l_rounding_type,
		     day_count_type = l_day_count_type,
		     one_day_float = P_ONE_DAY_FLOAT,
		     two_day_float = P_TWO_DAY_FLOAT
              where ACCOUNT_NUMBER = acct_no
              and   COMPANY_CODE   = new_company
              and   TRUNC(BALANCE_DATE)  = TRUNC(new_date);
Line: 693

          XTR_ACCOUNT_BAL_MAINT_P.UPDATE_BANK_ACCTS(acct_no,
                              l_ccy,
                              l_bank_code,
                              l_portfolio_code,
                              v_cross_ref,
                              l_comp,
                              new_date,
                              v_dummy_num,-- for bug 6247219
                              l_setoff);-- for bug 6247219
Line: 736

   SELECT max(period_end)
   FROM
         xtr_batches b,xtr_batch_events e
   WHERE
         b.company_code = p_company_code
   AND   b.batch_id     = e.batch_id
   AND   e.event_code   = p_event_code;
Line: 746

   SELECT max(period_to)
   FROM
         xtr_bank_balances bb,xtr_bank_accounts ba,
         xtr_deal_date_amounts dd,xtr_revaluation_details rd
   WHERE
     	 bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency_code
   AND 	 bb.company_code   = dd.company_code
   AND   bb.account_number = dd.account_no
   AND   ba.currency       = dd.currency
   AND   dd.deal_number    = rd.deal_no;
Line: 762

   SELECT max(period_to)
   FROM
          xtr_bank_balances bb,xtr_bank_accounts ba,
          xtr_deal_date_amounts dd,xtr_accrls_amort aa
   WHERE
    	 bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency_code
   AND 	 bb.company_code   = dd.company_code
   AND   bb.account_number = dd.account_no
   AND   ba.currency       = dd.currency
   AND   dd.deal_number    = aa.deal_no;
Line: 792

   If P_ACTION = 'UPDATE' then
      If l_rdate is NOT NULL and l_rdate > p_balance_date then
         P_RESULT := 'XTR3_BU_VAL_ERROR';
Line: 797

   Elsif P_ACTION = 'INSERT' then
      If l_rdate is NULL then
         Open  cur_reval_comp;
Line: 857

      select 1
      from   xtr_bank_accounts
      where  ce_bank_account_id = P_ce_bank_account_id
      and    ce_bank_account_id is not null;
Line: 863

      select xp.PARTY_CODE COMPANY_CODE
      from   XTR_PARTY_INFO xp
      where xp.legal_entity_id = P_ORG_ID;       -- bug 3862743
Line: 869

      select 1
      from   XTR_PARTIES_V
      where  party_code = l_company;
Line: 874

      select b.authorised,              -- (5) To check for Authorised Account
             b.account_number
      from   xtr_bank_accounts  b,
	     xtr_party_info     p
      where  b.ce_bank_account_id  = P_ce_bank_account_id
      and    b.ce_bank_account_id is not null
      and    b.currency            = P_CURRENCY
      and    p.party_code          = b.party_code
      and    p.party_type          = b.party_type
      and    p.legal_entity_id     = P_ORG_ID;       -- bug 3862743
Line: 889

      select authorised,
             party_code,
             ce_bank_account_id
      from   xtr_bank_accounts
      where  account_number      = P_ACCOUNT_NUMBER
      and    currency            = P_CURRENCY
      order by authorised desc;   -- so 'Y' comes before 'N'
Line: 1088

   select INTEREST_RATE
     from xtr_INTEREST_RATE_RANGES_v
    where PARTY_CODE = p_party_code
      and CURRENCY   = nvl(p_currency,CURRENCY)
      and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
      and MIN_AMT    < to_number(p_balance_out)
      and MAX_AMT   >= to_number(p_balance_out)
      and EFFECTIVE_FROM_DATE = (select max(EFFECTIVE_FROM_DATE)
                                   from xtr_INTEREST_RATE_RANGES_v
                                  where PARTY_CODE  = p_PARTY_CODE
                                    and CURRENCY    = nvl(p_CURRENCY,CURRENCY)
                                    and REF_CODE    = p_ref_code  -- 'IG_PRO1075'
                                    and MIN_AMT     < to_number(p_BALANCE_OUT)
                                    and MAX_AMT    >= to_number(p_BALANCE_OUT)
                                    and EFFECTIVE_FROM_DATE <= p_TRANSFER_DATE );
Line: 1105

   select INTEREST_RATE
     from xtr_INTEREST_RATE_RANGES_v
    where PARTY_CODE = p_COMPANY_CODE
      and CURRENCY   = nvl(p_CURRENCY,CURRENCY)
      and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
      and MIN_AMT    < p_BALANCE_OUT
      and MAX_AMT   >= p_BALANCE_OUT
      and EFFECTIVE_FROM_DATE = (select max(EFFECTIVE_FROM_DATE)
                                   from xtr_INTEREST_RATE_RANGES_v
                                  where EFFECTIVE_FROM_DATE <= p_TRANSFER_DATE
                                    and PARTY_CODE = p_COMPANY_CODE
                                    and CURRENCY   = nvl(p_CURRENCY,CURRENCY)
                                    and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
                                    and MIN_AMT    < p_BALANCE_OUT
                                    and MAX_AMT   >= p_BALANCE_OUT);
Line: 1123

   select nvl(INTEREST_RATE,0)
     from xtr_INTEREST_RATE_RANGES_v
    where PARTY_CODE = p_party
      and CURRENCY   = nvl(p_CURRENCY,CURRENCY)
      and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
      and MAX_AMT   >= p_BALANCE_OUT
      and MIN_AMT   <= 0
      and MIN_AMT    < 0
      and EFFECTIVE_FROM_DATE = (select max(EFFECTIVE_FROM_DATE)
                                   from xtr_INTEREST_RATE_RANGES_v
                                  where EFFECTIVE_FROM_DATE <= p_TRANSFER_DATE
                                    and PARTY_CODE = p_party
                                    and CURRENCY   = nvl(p_CURRENCY,CURRENCY)
                                    and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
                                    and MAX_AMT   >= p_BALANCE_OUT
                                    and MIN_AMT   <= 0
                                    and MIN_AMT    < 0 )
   order by MAX_AMT asc;
Line: 1144

   select nvl(INTEREST_RATE,0)
     from xtr_INTEREST_RATE_RANGES_v
    where PARTY_CODE = p_party
      and CURRENCY   = nvl(p_CURRENCY,CURRENCY)
      and REF_CODE   = p_ref_code  -- 'IG_PRO1075'
      and MIN_AMT   <= p_BALANCE_OUT
      and MAX_AMT   >= 0
      and MIN_AMT   >= 0
      and EFFECTIVE_FROM_DATE = (select max(EFFECTIVE_FROM_DATE)
                                   from xtr_INTEREST_RATE_RANGES_v
                                  where EFFECTIVE_FROM_DATE <= p_TRANSFER_DATE
                                    and PARTY_CODE           = p_party
                                    and CURRENCY             = nvl(p_CURRENCY,CURRENCY)
                                    and REF_CODE             = p_ref_code  -- 'IG_PRO1075'
                                    and MIN_AMT             <= p_BALANCE_OUT
                                    and MAX_AMT             >= 0
                                    and MIN_AMT             >= 0)
   order by MIN_AMT desc;
Line: 1249

   select INTEREST_RATE,
          ROUNDING_TYPE,
          DAY_COUNT_TYPE,
          PRICING_MODEL,
          BALANCE_OUT                       -- not BALANCE_BF
         ,deal_number, transaction_number   -- not used
   from   xtr_intergroup_transfers_v
   where  company_code   = p_company_code
   and    party_code     = p_party_code
   and    currency       = p_currency
   and    transfer_date <= p_transfer_date
   order by TRANSFER_DATE desc, TRANSACTION_NUMBER desc;
Line: 1468

         select deal_number,
                transaction_number
         from   xtr_intergroup_transfers
         where  company_code       = l_company_code
         and    party_code         = l_party_code
         and    currency           = l_currency
         and    principal_adjust   = l_principal_adjust
         and    transfer_date      = l_transfer_date
         and    principal_action   = l_principal_action
         and    portfolio          = l_portfolio
         and    product_type       = l_product_type
         and    company_account_no = l_company_account_no
         and    party_account_no   = l_party_account_no
	 and	external_source    = 'ZBA'
         order by transfer_date desc, transaction_number desc;
Line: 1486

         select 1
         from   xtr_deal_date_amounts
         where  deal_number        = l_deal_num
         and    transaction_number = l_tran_num
         and    amount_type        = l_amt_type
         and    nvl(cashflow_amount,0) <> 0
         and    reconciled_reference is null;
Line: 1603

      select A.transaction_number
      from   xtr_interacct_transfers A,
             xtr_deal_date_amounts   B,
             xtr_deal_date_amounts   C
      where  A.company_code       = l_company_code
      and    A.transfer_amount    = l_transfer_amount
      and    A.transfer_date      = l_transfer_date
      and    A.portfolio_code     = l_portfolio
      and    A.product_type       = l_product_type
      and    A.account_no_from    = l_from_account_no
      and    A.account_no_to      = l_to_account_no
      and    A.external_source    = 'ZBA'
      and    B.deal_number        = 0
      and    B.transaction_number = A.transaction_number
      and    B.deal_type          = l_deal_type
      and    C.deal_number        = 0
      and    C.transaction_number = A.transaction_number
      and    C.deal_type          = l_deal_type
      and   (B.reconciled_reference is null or C.reconciled_reference is null);
Line: 1652

      select 1
      from   XTR_PARTY_INFO
      where  party_code = l_comp
      and    party_type = 'C';
Line: 1696

   select PARTY_CODE
   from   ce_cashpools
   where  cashpool_id   = l_cashpool_id
   and    currency_code = l_ccy;
Line: 1702

   select PARTY_CODE
   from   ce_cashpool_sub_accts
   where  cashpool_id = l_cashpool_id
   and    account_id  = l_party_bank_id;
Line: 1708

   select rounding_type,     day_count_type,        pricing_model,
          product_type,      portfolio,             fund_limit_code,
          invest_limit_code, party_pricing_model,   party_product_type,
          party_portfolio,   party_fund_limit_code, party_invest_limit_code
   from   xtr_cashpool_attributes
   where  cashpool_id = l_cashpool_id
   and    party_code  = l_intercomp_code;
Line: 1717

   select account_number
   from   xtr_bank_accounts
   where  party_code = l_party
   and    currency   = l_ccy
   and    ce_bank_account_id = l_bank_id;
Line: 1724

   select dealer_code
   from   xtr_dealer_codes_v
   where  user_id = p_fnd_user;
Line: 1776

   select party_code,
          currency_code
   from   ce_cashpools
   where  cashpool_id   = l_cashpool_id;
Line: 1782

   select iac_product_type,
          iac_portfolio
   from   xtr_cashpool_attributes
   where  cashpool_id = l_cashpool_id
   and    product_type is null; -- Condition added Bug 4309871
Line: 1789

   select account_number
   from   xtr_bank_accounts
   where  party_code = l_party
   and    currency   = l_ccy
   and    ce_bank_account_id = l_bank_id;
Line: 1830

   select param_value
   from   xtr_pro_param
   where  param_name = l_name;
Line: 1840

      SELECT VALIDATION_AUTHORIZED
      FROM   XTR_AUTH_TYPE_SUBTYPE_PROD_V
      WHERE  USER_NAME    = l_DEALER
      AND    DEAL_TYPE    = 'IAC'
      AND    DEAL_SUBTYPE = 'FIRM'
      AND    PRODUCT_TYPE = l_PRODUCT;
Line: 2157

   select dealer_code
   from   xtr_dealer_codes_v
   where  user_id = p_fnd_user;