DBA Data[Home] [Help]

APPS.IGF_AW_AWARD_T_PKG SQL Statements

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

Line: 19

 | that they were inserted by datamerge.                                 |
 |                                                                       |
 | The ADD_ROW routine will see whether a row exists by selecting        |
 | based on the primary key, and updates the row if it exists,           |
 | or inserts the row if it doesn't already exist.                       |
 |                                                                       |
 | This module is called by AutoInstall (afplss.drv) on install and      |
 | upgrade.  The WHENEVER SQLERROR and EXIT (at bottom) are required.    |
 |                                                                       |
 | HISTORY                                                               |
 | WHO                  WHEN             WHAT                            |
 | veramach             12-Oct-2004      FA 152 Added award_id,          |
 |                                       lock_award_flag                 |
 | veramach             03-DEC-2003      FA 131 Added app_trans_num_txt  |
 | veramach             21-NOV-2003      FA 125 Added adplans_id to tbh  |
 *=======================================================================*/

  l_rowid VARCHAR2(25);
Line: 69

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL
  ) AS
  /*
  ||  Created By : cdcruz
  ||  Created On : 08-NOV-2000
  ||  Purpose : Initialises the Old and New references for the columns of the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  ||  veramach        12-Oct-2004     FA 152 Added award_id,lock_award_flag
  ||  veramach        03-DEC-2003     FA 131 Added app_trans_num_txt to tbh signature
  ||  veramach        21-NOV-2003     FA 125 Added adplans_id to tbh signature
  */

    CURSOR cur_old_ref_values IS
      SELECT   *
      FROM     IGF_AW_AWARD_T_ALL
      WHERE    rowid = x_rowid;
Line: 99

    IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
      CLOSE cur_old_ref_values;
Line: 101

      fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Line: 134

    IF (p_action = 'UPDATE') THEN
      new_references.creation_date                   := old_references.creation_date;
Line: 142

    new_references.last_update_date                  := x_last_update_date;
Line: 143

    new_references.last_updated_by                   := x_last_updated_by;
Line: 144

    new_references.last_update_login                 := x_last_update_login;
Line: 163

      SELECT   rowid
      FROM     igf_aw_award_t_all
      WHERE    process_id = x_process_id
      AND      sl_number = x_sl_number
      FOR UPDATE NOWAIT;
Line: 215

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL
  ) AS
  /*
  ||  Created By : cdcruz
  ||  Created On : 08-NOV-2000
  ||  Purpose : Initialises the columns, Checks Constraints, Calls the
  ||            Trigger Handlers for the table, before any DML operation.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  ||  veramach        12-Oct-2004     FA 152 Added award_id,lock_award_flag
  ||  veramach        03-DEC-2003     FA 131 Added app_trans_num_txt to tbh signature
  ||  veramach        21-NOV-2003     FA 125 Added adplans_id to tbh signature
  */
  BEGIN
    set_column_values (
      p_action,
      x_rowid,
      x_process_id,
      x_sl_number,
      x_fund_id,
      x_base_id,
      x_offered_amt,
      x_accepted_amt,
      x_paid_amt,
      x_need_reduction_amt,
      x_flag,
      x_temp_num_val1,
      x_temp_num_val2,
      x_temp_char_val1,
      x_tp_cal_type,
      x_tp_sequence_number,
      x_ld_cal_type,
      x_ld_sequence_number,
      x_adplans_id,
      x_app_trans_num_txt,
      x_award_id,
      x_lock_award_flag,
      x_temp_val3_num,
      x_temp_val4_num,
      x_temp_char2_txt,
      x_temp_char3_txt,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 266

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.
      IF ( get_pk_for_validation(
             new_references.process_id,
             new_references.sl_number
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
Line: 277

    ELSIF (p_action = 'VALIDATE_INSERT') THEN
      -- Call all the procedures related to Before Insert.
      IF ( get_pk_for_validation (
             new_references.process_id,
             new_references.sl_number
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
Line: 293

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_process_id                        IN     NUMBER,
    x_sl_number                         IN OUT NOCOPY NUMBER,
    x_fund_id                           IN     NUMBER,
    x_base_id                           IN     NUMBER,
    x_offered_amt                       IN     NUMBER,
    x_accepted_amt                      IN     NUMBER,
    x_paid_amt                          IN     NUMBER,
    x_need_reduction_amt                IN     NUMBER,
    x_flag                              IN     VARCHAR2,
    x_temp_num_val1                     IN     NUMBER,
    x_temp_num_val2                     IN     NUMBER,
    x_temp_char_val1                    IN     VARCHAR2,
    x_tp_cal_type                       IN     VARCHAR2,
    x_tp_sequence_number                IN     NUMBER,
    x_ld_cal_type                       IN     VARCHAR2,
    x_ld_sequence_number                IN     NUMBER,
    x_mode                              IN     VARCHAR2 DEFAULT 'R',
    x_adplans_id                        IN     NUMBER,
    x_app_trans_num_txt                 IN     VARCHAR2,
    x_award_id                          IN     NUMBER,
    x_lock_award_flag                   IN     VARCHAR2,
    x_temp_val3_num                     IN     NUMBER,
    x_temp_val4_num                     IN     NUMBER,
    x_temp_char2_txt                    IN     VARCHAR2,
    x_temp_char3_txt                    IN     VARCHAR2
  ) AS
  /*
  ||  Created By : cdcruz
  ||  Created On : 08-NOV-2000
  ||  Purpose : Handles the INSERT DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  ||  veramach        12-Oct-2004     FA 152 Added award_id,lock_award_flag
  ||  veramach        03-DEC-2003     FA 131 Added app_trans_num_txt to tbh signature
  ||  veramach        21-NOV-2003     FA 125 Added adplans_id to tbh signature
  */
    CURSOR c IS
      SELECT   rowid
      FROM     igf_aw_award_t_all
      WHERE    process_id                        = x_process_id
      AND      sl_number                         = x_sl_number;
Line: 339

    x_last_update_date           DATE;
Line: 340

    x_last_updated_by            NUMBER;
Line: 341

    x_last_update_login          NUMBER;
Line: 345

    x_program_update_date        DATE;
Line: 350

    x_last_update_date := SYSDATE;
Line: 352

      x_last_updated_by := 1;
Line: 353

      x_last_update_login := 0;
Line: 355

      x_last_updated_by := fnd_global.user_id;
Line: 356

      IF (x_last_updated_by IS NULL) THEN
        x_last_updated_by := -1;
Line: 359

      x_last_update_login := fnd_global.login_id;
Line: 360

      IF (x_last_update_login IS NULL) THEN
        x_last_update_login := -1;
Line: 371

        x_program_update_date    := NULL;
Line: 373

        x_program_update_date    := SYSDATE;
Line: 381

     SELECT igf_aw_award_t_s.NEXTVAL INTO x_sl_number FROM dual ;
Line: 383

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_process_id                        => x_process_id,
      x_sl_number                         => x_sl_number,
      x_fund_id                           => x_fund_id,
      x_base_id                           => x_base_id,
      x_offered_amt                       => x_offered_amt,
      x_accepted_amt                      => x_accepted_amt,
      x_paid_amt                          => x_paid_amt,
      x_need_reduction_amt                => x_need_reduction_amt,
      x_flag                              => x_flag,
      x_temp_num_val1                     => x_temp_num_val1,
      x_temp_num_val2                     => x_temp_num_val2,
      x_temp_char_val1                    => x_temp_char_val1,
      x_tp_cal_type                       => x_tp_cal_type,
      x_tp_sequence_number                => x_tp_sequence_number,
      x_ld_cal_type                       => x_ld_cal_type,
      x_ld_sequence_number                => x_ld_sequence_number,
      x_adplans_id                        => x_adplans_id,
      x_app_trans_num_txt                 => x_app_trans_num_txt,
      x_award_id                          => x_award_id,
      x_temp_val3_num                     => x_temp_val3_num,
      x_temp_val4_num                     => x_temp_val4_num,
      x_temp_char2_txt                    => x_temp_char2_txt,
      x_temp_char3_txt                    => x_temp_char3_txt,
      x_lock_award_flag                   => x_lock_award_flag,
      x_creation_date                     => x_last_update_date,
      x_created_by                        => x_last_updated_by,
      x_last_update_date                  => x_last_update_date,
      x_last_updated_by                   => x_last_updated_by,
      x_last_update_login                 => x_last_update_login
    );
Line: 415

    INSERT INTO igf_aw_award_t_all(
      process_id,
      sl_number,
      fund_id,
      base_id,
      offered_amt,
      accepted_amt,
      paid_amt,
      need_reduction_amt,
      flag,
      temp_num_val1,
      temp_num_val2,
      temp_char_val1,
      tp_cal_type,
      tp_sequence_number,
      ld_cal_type,
      ld_sequence_number,
      adplans_id,
      app_trans_num_txt,
      award_id,
      lock_award_flag,
      temp_val3_num,
      temp_val4_num,
      temp_char2_txt,
      temp_char3_txt,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login,
      request_id,
      program_id,
      program_application_id,
      program_update_date,
      org_id
    ) VALUES (
      new_references.process_id,
      new_references.sl_number,
      new_references.fund_id,
      new_references.base_id,
      new_references.offered_amt,
      new_references.accepted_amt,
      new_references.paid_amt,
      new_references.need_reduction_amt,
      new_references.flag,
      new_references.temp_num_val1,
      new_references.temp_num_val2,
      new_references.temp_char_val1,
      new_references.tp_cal_type,
      new_references.tp_sequence_number,
      new_references.ld_cal_type,
      new_references.ld_sequence_number,
      new_references.adplans_id,
      new_references.app_trans_num_txt,
      new_references.award_id,
      new_references.lock_award_flag,
      new_references.temp_val3_num,
      new_references.temp_val4_num,
      new_references.temp_char2_txt,
      new_references.temp_char3_txt,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login,
      x_request_id,
      x_program_id,
      x_program_application_id,
      x_program_update_date,
      l_org_id
    );
Line: 495

  END insert_row;
Line: 538

      SELECT
        fund_id,
        base_id,
        offered_amt,
        accepted_amt,
        paid_amt,
        need_reduction_amt,
        flag,
        temp_num_val1,
        temp_num_val2,
        temp_char_val1,
        tp_cal_type,
        tp_sequence_number,
        ld_cal_type,
        ld_sequence_number,
        adplans_id,
        app_trans_num_txt,
        award_id,
        lock_award_flag,
        temp_val3_num,
        temp_val4_num,
        temp_char2_txt,
        temp_char3_txt
      FROM  igf_aw_award_t_all
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 571

      fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
Line: 615

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_process_id                        IN     NUMBER,
    x_sl_number                         IN     NUMBER,
    x_fund_id                           IN     NUMBER,
    x_base_id                           IN     NUMBER,
    x_offered_amt                       IN     NUMBER,
    x_accepted_amt                      IN     NUMBER,
    x_paid_amt                          IN     NUMBER,
    x_need_reduction_amt                IN     NUMBER,
    x_flag                              IN     VARCHAR2,
    x_temp_num_val1                     IN     NUMBER,
    x_temp_num_val2                     IN     NUMBER,
    x_temp_char_val1                    IN     VARCHAR2,
    x_tp_cal_type                       IN     VARCHAR2,
    x_tp_sequence_number                IN     NUMBER,
    x_ld_cal_type                       IN     VARCHAR2,
    x_ld_sequence_number                IN     NUMBER,
    x_mode                              IN     VARCHAR2  DEFAULT 'R',
    x_adplans_id                        IN     NUMBER,
    x_app_trans_num_txt                 IN     VARCHAR2,
    x_award_id                          IN     NUMBER,
    x_lock_award_flag                   IN     VARCHAR2,
    x_temp_val3_num                     IN     NUMBER,
    x_temp_val4_num                     IN     NUMBER,
    x_temp_char2_txt                    IN     VARCHAR2,
    x_temp_char3_txt                    IN     VARCHAR2
  ) AS
  /*
  ||  Created By : cdcruz
  ||  Created On : 08-NOV-2000
  ||  Purpose : Handles the UPDATE DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  ||  veramach        12-Oct-2004     FA 152 Added award_id,lock_award_flag
  ||  veramach        03-DEC-2003     FA 131 Added app_trans_num_txt to tbh signature
  ||  veramach        21-NOV-2003     FA 125 Added adplans_id to tbh signature
  */
    x_last_update_date           DATE ;
Line: 656

    x_last_updated_by            NUMBER;
Line: 657

    x_last_update_login          NUMBER;
Line: 661

    x_program_update_date        DATE;
Line: 665

    x_last_update_date := SYSDATE;
Line: 667

      x_last_updated_by := 1;
Line: 668

      x_last_update_login := 0;
Line: 670

      x_last_updated_by := fnd_global.user_id;
Line: 671

      IF x_last_updated_by IS NULL THEN
        x_last_updated_by := -1;
Line: 674

      x_last_update_login := fnd_global.login_id;
Line: 675

      IF (x_last_update_login IS NULL) THEN
        x_last_update_login := -1;
Line: 684

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_process_id                        => x_process_id,
      x_sl_number                         => x_sl_number,
      x_fund_id                           => x_fund_id,
      x_base_id                           => x_base_id,
      x_offered_amt                       => x_offered_amt,
      x_accepted_amt                      => x_accepted_amt,
      x_paid_amt                          => x_paid_amt,
      x_need_reduction_amt                => x_need_reduction_amt,
      x_flag                              => x_flag,
      x_temp_num_val1                     => x_temp_num_val1,
      x_temp_num_val2                     => x_temp_num_val2,
      x_temp_char_val1                    => x_temp_char_val1,
      x_tp_cal_type                       => x_tp_cal_type,
      x_tp_sequence_number                => x_tp_sequence_number,
      x_ld_cal_type                       => x_ld_cal_type,
      x_ld_sequence_number                => x_ld_sequence_number,
      x_adplans_id                        => x_adplans_id,
      x_app_trans_num_txt                 => x_app_trans_num_txt,
      x_award_id                          => x_award_id,
      x_lock_award_flag                   => x_lock_award_flag,
      x_temp_val3_num                     => x_temp_val3_num,
      x_temp_val4_num                     => x_temp_val4_num,
      x_temp_char2_txt                    => x_temp_char2_txt,
      x_temp_char3_txt                    => x_temp_char3_txt,
      x_creation_date                     => x_last_update_date,
      x_created_by                        => x_last_updated_by,
      x_last_update_date                  => x_last_update_date,
      x_last_updated_by                   => x_last_updated_by,
      x_last_update_login                 => x_last_update_login
    );
Line: 725

        x_program_update_date := old_references.program_update_date;
Line: 727

        x_program_update_date := SYSDATE;
Line: 731

    UPDATE igf_aw_award_t_all
      SET
        fund_id                           = new_references.fund_id,
        base_id                           = new_references.base_id,
        offered_amt                       = new_references.offered_amt,
        accepted_amt                      = new_references.accepted_amt,
        paid_amt                          = new_references.paid_amt,
        need_reduction_amt                = new_references.need_reduction_amt,
        flag                              = new_references.flag,
        temp_num_val1                     = new_references.temp_num_val1,
        temp_num_val2                     = new_references.temp_num_val2,
        temp_char_val1                    = new_references.temp_char_val1,
        tp_cal_type                       = new_references.tp_cal_type,
        tp_sequence_number                = new_references.tp_sequence_number,
        ld_cal_type                       = new_references.ld_cal_type,
        ld_sequence_number                = new_references.ld_sequence_number,
        adplans_id                        = new_references.adplans_id,
        app_trans_num_txt                 = new_references.app_trans_num_txt,
        award_id                          = new_references.award_id,
        lock_award_flag                   = new_references.lock_award_flag,
        temp_val3_num                     = new_references.temp_val3_num,
        temp_val4_num                     = new_references.temp_val4_num,
        temp_char2_txt                    = new_references.temp_char2_txt,
        temp_char3_txt                    = new_references.temp_char3_txt,
        last_update_date                  = x_last_update_date,
        last_updated_by                   = x_last_updated_by,
        last_update_login                 = x_last_update_login ,
        request_id                        = x_request_id,
        program_id                        = x_program_id,
        program_application_id            = x_program_application_id,
        program_update_date               = x_program_update_date
      WHERE rowid = x_rowid;
Line: 768

  END update_row;
Line: 802

  ||  Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  ||  veramach        12-Oct-2004     FA 152 Added award_id,lock_award_flag
  ||  veramach        03-DEC-2003     FA 131 Added app_trans_num_txt to tbh signature
  ||  veramach        21-NOV-2003     FA 125 Added adplans_id to tbh signature
  */
    CURSOR c1 IS
      SELECT   rowid
      FROM     igf_aw_award_t_all
      WHERE    process_id                        = x_process_id
      AND      sl_number                         = x_sl_number;
Line: 824

      insert_row (
        x_rowid,
        x_process_id,
        x_sl_number,
        x_fund_id,
        x_base_id,
        x_offered_amt,
        x_accepted_amt,
        x_paid_amt,
        x_need_reduction_amt,
        x_flag,
        x_temp_num_val1,
        x_temp_num_val2,
        x_temp_char_val1,
        x_tp_cal_type,
        x_tp_sequence_number,
        x_ld_cal_type,
        x_ld_sequence_number,
        x_mode,
        x_adplans_id,
        x_app_trans_num_txt,
        x_award_id,
        x_lock_award_flag,
        x_temp_val3_num,
        x_temp_val4_num,
        x_temp_char2_txt,
        x_temp_char3_txt
      );
Line: 856

    update_row (
      x_rowid,
      x_process_id,
      x_sl_number,
      x_fund_id,
      x_base_id,
      x_offered_amt,
      x_accepted_amt,
      x_paid_amt,
      x_need_reduction_amt,
      x_flag,
      x_temp_num_val1,
      x_temp_num_val2,
      x_temp_char_val1,
      x_tp_cal_type,
      x_tp_sequence_number,
      x_ld_cal_type,
      x_ld_sequence_number,
      x_mode,
      x_adplans_id,
      x_app_trans_num_txt,
      x_award_id,
      x_lock_award_flag,
      x_temp_val3_num,
      x_temp_val4_num,
      x_temp_char2_txt,
      x_temp_char3_txt
    );
Line: 889

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : cdcruz
  ||  Created On : 08-NOV-2000
  ||  Purpose : Handles the DELETE DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
  BEGIN

    before_dml (
      p_action => 'DELETE',
      x_rowid => x_rowid
    );
Line: 908

    DELETE FROM igf_aw_award_t_all
    WHERE rowid = x_rowid;
Line: 915

  END delete_row;