DBA Data[Home] [Help]

APPS.CE_BANK_AND_ACCOUNT_VALIDATION SQL Statements

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

Line: 48

   |   create_bank/update_bank API.                                        |
   |                                                                       |
   |   Validate:                                                           |
   |    1. Combination of Country and Bank Name is unique                  |
   |    2. Combination of Country and Short Bank Name is unique            |
   |       -- remove this 2nd validation due to upgrade changes            |
   |    3. Combination of Country and Bank Number is unique                |
   |                                                                       |
   |   Bug 6642215/6742860: Validation changed to check combination of     |
   |   bank name, number and country is unique.                            |
   |                                                                       |
   |   Bug 8572093 validation changes for 6642215 should only apply for    |
   |   upgraded banks. For banks created in R12, original validations will |
   |   apply.                                                              |
   |                                                                       |
   |   Bug 14498341 - Rewritten procedure. The uniqueness validations must |
   |                  check for the combination of:                        |
   |                    - Bank Name                                        |
   |                    - Bank Number                                      |
   |                    - Country                                          |
   |                                                                       |
   | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                |
   |                                                                       |
   | ARGUMENTS                                                             |
   |   IN:                                                                 |
   |     p_temp_id in HZ_ORG_PROFILE_VAL_GT table                          |
   +=======================================================================*/
   PROCEDURE validate_bank (p_temp_id       IN  NUMBER,
                            x_return_status IN OUT NOCOPY VARCHAR2) IS
     l_bank_name_rowid     VARCHAR2(1000);
Line: 93

       SELECT  country
       FROM    HZ_BANK_VAL_GT
       WHERE   temp_id = p_temp_id;
Line: 98

       SELECT  bank_or_branch_number
       FROM    HZ_BANK_VAL_GT
       WHERE   temp_id = p_temp_id;
Line: 103

       SELECT  organization_name
       FROM    hz_org_profile_val_gt
       WHERE   temp_id = p_temp_id;
Line: 109

       SELECT  'Y'
       FROM    hz_parties  BankParty,
               hz_organization_profiles  BankOrgProfile,
               hz_code_assignments   BankCA
       WHERE   BankParty.PARTY_TYPE = 'ORGANIZATION'
       AND     BankParty.status = 'A'
       AND     BankParty.PARTY_ID = BankOrgProfile.PARTY_ID
       AND     SYSDATE between TRUNC(BankOrgProfile.effective_start_date)
               and NVL(TRUNC(BankOrgProfile.effective_end_date), SYSDATE+1)
       AND     BankCA.CLASS_CATEGORY = 'BANK_INSTITUTION_TYPE'
       AND     BankCA.CLASS_CODE = 'BANK'
       AND     BankCA.OWNER_TABLE_NAME = 'HZ_PARTIES'
       AND     NVL(BankCA.STATUS, 'A') = 'A'
       AND     BankCA.OWNER_TABLE_ID = BankParty.PARTY_ID
       AND     BankOrgProfile.home_country = l_country
       AND     nvl(BankOrgProfile.bank_or_branch_number,'--NULL--') = nvl(l_bank_number,'--NULL--')
       AND     upper(BankParty.party_name) = upper(l_bank_name)
       AND     BankParty.party_id <> p_temp_id;
Line: 214

   |   update_bank_branch API                                              |
   | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                |
   |                                                                       |
   | ARGUMENTS                                                             |
   |   IN:                                                                 |
   |     p_temp_org_profile_id   temp_id in HZ_ORG_PROFILE_VAL_GT table    |
   +=======================================================================*/
   PROCEDURE validate_branch (p_temp_org_profile_id   IN  NUMBER,
                              x_return_status         IN OUT NOCOPY VARCHAR2)
   IS
   BEGIN
    NULL;
Line: 313

      SELECT  1
      FROM    fnd_currencies fc
      WHERE   fc.currency_code = p_currency_code;
Line: 354

       SELECT  rowid
       FROM    ce_bank_accounts
       WHERE   bank_account_name = p_account_name
       AND     bank_branch_id = p_branch_id;
Line: 360

       SELECT  'X'
       FROM    ce_bank_accounts
       WHERE   bank_branch_id = p_branch_id
       AND     bank_account_name = p_account_name
       AND     bank_account_id <> NVL(p_account_id, -1);
Line: 517

                    SELECT territory_short_name
                    INTO l_country_name
                    FROM fnd_territories_vl
                    WHERE territory_code = Xi_country_code;
Line: 650

            SELECT reverse(l_temp4) INTO l_temp4_r FROM dual;
Line: 691

   |   Validate that at least one account use is selected for the          |
   |     bank account                                                      |
   | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                |
   |                                                                       |
   | ARGUMENTS                                                             |
   |   IN:                                                                 |
   |     p_ap, p_ar, p_pay, p_xtr                                          |
   +=======================================================================*/
   PROCEDURE validate_account_use(p_ap      IN  VARCHAR2,
                                  p_ar      IN  VARCHAR2,
                                  p_pay     IN  VARCHAR2,
                                  p_xtr     IN  VARCHAR2,
                x_return_status     IN OUT NOCOPY VARCHAR2 ) IS


   BEGIN
     cep_standard.debug('CE_BANK_AND_ACCOUNT_VALIDATION.validate_account_use (+)');
Line: 739

   |   Short Account Name is required when Xtr use is selected for the     |
   |     bank account                                                      |
   | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED                                |
   |                                                                       |
   | ARGUMENTS                                                             |
   |   IN:                                                                 |
   |     p_short_account_name, p_xtr                                       |
   +=======================================================================*/
   PROCEDURE validate_short_account_name(p_short_account_name  IN  VARCHAR2,
                                       p_xtr              IN  VARCHAR2,
                         x_return_status     IN OUT NOCOPY VARCHAR2 ) IS

   BEGIN
     cep_standard.debug('CE_BANK_AND_ACCOUNT_VALIDATION.validate_account_use (+)');
Line: 830

        SELECT full_name
        INTO   l_return
        FROM   per_employees_x
        WHERE  employee_id = p_emp_id;
Line: 865

    SELECT  hl.meaning || ', '
    FROM     hr_organization_information     oi,
             hr_lookups            hl
    WHERE     oi.org_information_context = 'CLASS'
    AND       oi.org_information1 = 'HR_BG'
    and      hl.lookup_type = 'ORG_CLASS'
    AND      hl.lookup_code =  oi.org_information1
    and     oi.organization_id =  p_org_id;
Line: 875

    SELECT  hl.meaning || ', '
    FROM     hr_organization_information     oi,
             hr_lookups            hl
    WHERE     oi.org_information_context = 'CLASS'
    AND       oi.org_information1 = 'HR_LEGAL'
    and      hl.lookup_type = 'ORG_CLASS'
    AND      hl.lookup_code =  oi.org_information1
    and     oi.organization_id =  p_org_id;
Line: 885

    SELECT  hl.meaning || ', '
    FROM     hr_organization_information     oi,
             hr_lookups            hl
    WHERE     oi.org_information_context = 'CLASS'
    AND       oi.org_information1 = 'OPERATING_UNIT'
    and      hl.lookup_type = 'ORG_CLASS'
    AND      hl.lookup_code =  oi.org_information1
    and     oi.organization_id =  p_org_id;
Line: 969

    SELECT  'BG'
    FROM    ce_security_profiles_v
     WHERE   organization_type = 'BUSINESS_GROUP'
    AND     organization_id = p_org_id;
Line: 975

        SELECT  'OU'
        FROM    ce_security_profiles_v
        WHERE   organization_type = 'OPERATING_UNIT'
        AND     organization_id = p_org_id;
Line: 1202

      SELECT 1
      FROM   fnd_territories ft
      WHERE  ft.territory_code = p_country_code;
Line: 1282

     select currency_code into p_cur
     from ce_bank_accounts
     where bank_account_id = p_bank_account_id;
Line: 1292

       select count(*) into p_ap_def
       from ce_bank_accounts ba, ce_bank_acct_uses_all bau
       where ba.bank_account_id = bau.bank_account_id
       and ba.currency_code = p_cur
       and nvl(bau.org_id, bau.LEGAL_ENTITY_ID) = p_org_id
       and nvl(bau.AP_DEFAULT_SETTLEMENT_FLAG,'N') = 'Y'
       and bau.bank_acct_use_id <> nvl(p_bank_acct_use_id, bau.bank_acct_use_id);
Line: 1301

       select count(*) into p_xtr_def
       from ce_bank_accounts ba, ce_bank_acct_uses_all bau
       where ba.bank_account_id = bau.bank_account_id
       and ba.currency_code = p_cur
       and nvl(bau.org_id, bau.LEGAL_ENTITY_ID) = p_org_id
       and nvl(bau.XTR_DEFAULT_SETTLEMENT_FLAG,'N') = 'Y'
       and bau.bank_acct_use_id <> nvl(p_bank_acct_use_id, bau.bank_acct_use_id) ;
Line: 1441

       SELECT  'X'
       FROM    ce_bank_acct_uses_all
       WHERE   bank_account_id = p_bank_account_id
       AND     NVL(org_id, legal_entity_id) = p_org_le_id
       AND     bank_acct_use_id <> NVL(p_acct_use_id, -1);
Line: 1509

    select count(*) into p_pay_doc_count
    from ce_payment_documents
    where PAYMENT_DOCUMENT_ID = P_PAYMENT_DOCUMENT_ID;
Line: 1516

      select nvl(PAYMENT_DOC_CATEGORY, '-1')
      into P_PAYMENT_DOC_CATEGORY_CODE
      from ce_payment_documents
      where PAYMENT_DOCUMENT_ID = P_PAYMENT_DOCUMENT_ID;
Line: 1529

     select count(*) into p_ap_doc_cat_count
     from ce_ap_pm_doc_categories
     where BANK_ACCT_USE_ID = P_BANK_ACCT_USE_ID
     and PAYMENT_METHOD_CODE = P_PAYMENT_METHOD_CODE;
Line: 1535

        select nvl(PAYMENT_DOC_CATEGORY, '-1')
       into P_PAYMENT_DOC_CATEGORY_CODE
       from ce_ap_pm_doc_categories
       where BANK_ACCT_USE_ID = P_BANK_ACCT_USE_ID
       and PAYMENT_METHOD_CODE = P_PAYMENT_METHOD_CODE;
Line: 1552

     select nvl(PAYMENT_DOC_CATEGORY, '-1')
      into P_PAYMENT_DOC_CATEGORY_CODE
     from ce_bank_acct_uses_all
     where  BANK_ACCT_USE_ID = P_BANK_ACCT_USE_ID;
Line: 1597

    SELECT 'BG'
    FROM     hr_organization_information     oi,
             hr_lookups            hl
    WHERE     oi.org_information_context = 'CLASS'
    AND       oi.org_information1 = 'HR_BG'
    and      hl.lookup_type = 'ORG_CLASS'
    AND      hl.lookup_code =  oi.org_information1
    and     oi.organization_id =  p_org_id;
Line: 1607

        SELECT 'OU'
    FROM     hr_organization_information     oi,
             hr_lookups            hl
    WHERE     oi.org_information_context = 'CLASS'
    AND       oi.org_information1 = 'OPERATING_UNIT'
    and      hl.lookup_type = 'ORG_CLASS'
    AND      hl.lookup_code =  oi.org_information1
    and     oi.organization_id =  p_org_id;