DBA Data[Home] [Help]

APPS.IBY_BUILD_UTILS_PKG SQL Statements

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

Line: 278

 |     inserted into the error table identifying the invalid character.
 |
 |     If no invalid characters are found in the input string, this
 |     procedure simply returns.
 |
 | PARAMETERS:
 |     IN
 |     p_fieldName  - The name  of the input field (used for logging)
 |     p_fieldValue - The value of the input field
 |     p_isComposite - Indidicates that the field is a composite
 |                     field created by appending multiple individual
 |                     fields. For composite fields, the field value
 |                     will not be printed in the error message.
 |     p_invalid_chars_list - List of invalid characters that
 |                    should not be present in the field value
 |     OUT
 |     x_docErrorRec - Error message record. This should contain the
 |                     document id when coming into this method.
 |     x_docErrorTab - Error messages table. An error message will be
 |                     added to this table if the input field value
 |                     contains an invalid char.
 |
 | RETURNS:
 |
 | NOTES:
 |
 *---------------------------------------------------------------------*/
 PROCEDURE checkForInvalidChars(
         p_fieldName          IN VARCHAR2,
         p_fieldValue         IN VARCHAR2,
         p_isComposite        IN BOOLEAN,
         p_validCharsList     IN VARCHAR2,
         p_invalidCharsList   IN VARCHAR2,
         x_docErrorRec        IN OUT NOCOPY IBY_TRANSACTION_ERRORS%ROWTYPE,
         x_docErrorTab        IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.
                                                docErrorTabType
         )
 IS
 l_error_code   VARCHAR2(100);
Line: 392

         SELECT translate(p_fieldValue, p_validCharsList, l_val_mask)
         INTO l_translated_value
         FROM DUAL;
Line: 446

         SELECT translate(p_fieldValue, p_invalidCharsList, l_inv_mask)
         INTO l_translated_value
         FROM DUAL;
Line: 525

         IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(
             x_docErrorRec, x_docErrorTab);
Line: 913

  * We need to select payment profiles that are applicable to
  * given (payment method, org, currency, int bank account).
  *
  *
  *     |  Profiles      |
  *     |  applicable to |
  *     |  given pmt     |    Profiles applicable to
  *     |  method        |    given payment currency
  *     |                |     /
  *     |     |          |    /
  *     |     V          |  L
  *     |                |
  *     |----------------|--------------------------
  *     |/              \|            Profiles
  *     |                |            applicable to
  *     |  Intersection  |     <--    given
  *     |                |            org id and org type
  *     |\              /|
  *     |----------------|--------------------------
  *     |                |
  *     |                |  .__
  *     |                |  |\
  *     |                |    \
  *     |                |
  *     |                |   Profiles applicable to
  *     |                |   given internal bank
  *     |                |   account
  *     |                |
  *     |                |
  *
  * We need the intersection of (profiles applicable to
  * a given payment method) and (profiles applicable to
  * a given org) and (profiles applicable to given payment
  * currency) and (profiles applicable to given internal
  * bank account) as shown in the graphic.
  *
  * Therefore, we need to join with the IBY_APPLICABLE_PMT_PROFS
  * four times - once to get the profiles for the method, once to get
  * the profiles for the org, and once to get the profiles for the
  * currency etc. If we are able to get a non-null intersect for these
  * five queries, it means that there is a profile that matches the
  * (org, method, currency, bank acct) combination.
  *
  * If the 'applicable_value_to' is set to NULL, it means that the
  * profile is applicable to 'all orgs' | 'all methods' |
  * 'all formats' etc., depending upon the applicable_type_code.
  * Therefore, we need to factor this condition in the join.
  */

  /*
   * Redundant joins of the form where a=b=c=a execute faster than
   * where a=b=c joins. That's why this select has a redundant join.
   */
  CURSOR c_profiles(
             p_pmt_method_cd     IN IBY_DOCS_PAYABLE_ALL.
                                        payment_method_code%TYPE,
             p_org_id            IN IBY_DOCS_PAYABLE_ALL.org_id%TYPE,
             p_org_type          IN IBY_DOCS_PAYABLE_ALL.org_type%TYPE,
             p_pmt_currency      IN IBY_DOCS_PAYABLE_ALL.
                                        payment_currency_code%TYPE,
             p_int_bank_acct_id  IN IBY_DOCS_PAYABLE_ALL.
                                        internal_bank_account_id%TYPE
             )
 IS
 SELECT
     acct_prof.payment_profile_id
 FROM
     IBY_APPLICABLE_PMT_PROFS app1,
     IBY_APPLICABLE_PMT_PROFS app2,
     IBY_APPLICABLE_PMT_PROFS app3,
     IBY_APPLICABLE_PMT_PROFS app4,
     IBY_SYS_PMT_PROFILES_B   sys_prof,
     IBY_ACCT_PMT_PROFILES_B  acct_prof
 WHERE
     /*
      * org id is a special case; since each org id has meaning
Line: 1120

 SELECT
     payment_profile_id,
     system_profile_code
 FROM
     IBY_PAYMENT_PROFILES;
Line: 1275

     UPDATE
         IBY_TRANSACTION_ERRORS err
     SET
         err.error_status     = 'INACTIVE',
         err.last_update_date = sysdate,
         err.last_updated_by  = fnd_global.user_id
     WHERE
         err.transaction_id   = p_trxn_id           AND
         err.transaction_type = p_trxn_type
     ;
Line: 1300

         UPDATE
             IBY_TRANSACTION_ERRORS err
         SET
             err.error_status     = 'INACTIVE',
             err.last_update_date = sysdate,
             err.last_updated_by  = fnd_global.user_id
         WHERE
             err.transaction_id   IN
                 (
                 SELECT
                     document_payable_id
                 FROM
                     IBY_DOCS_PAYABLE_ALL
                 WHERE
                     payment_id = p_trxn_id
                 )
             AND
             err.transaction_type = 'DOCUMENT_PAYABLE'
         ;
Line: 1324

      * status. The transaction status will get updated to a
      * failure status in case the transaction fails validation
      * later.
      */
     IF (p_trxn_type = 'DOCUMENT_PAYABLE') THEN

         print_debuginfo(l_module_name, 'Resetting status of doc'
             || ' id: '
             || p_trxn_id
             || ' to '
             || DOC_STATUS_VALIDATED
             );
Line: 1337

         UPDATE
             IBY_DOCS_PAYABLE_ALL doc
         SET
             doc.document_status = DOC_STATUS_VALIDATED
         WHERE
             doc.document_payable_id = p_trxn_id
         ;
Line: 1354

         UPDATE
             IBY_PAYMENTS_ALL pmt
         SET
             pmt.payment_status = PAY_STATUS_CREATED
         WHERE
             pmt.payment_id = p_trxn_id
         ;
Line: 1373

                 || 'when attempting to update error status to inactive '
                 || 'for transaction.'
                 );