DBA Data[Home] [Help]

APPS.IGF_AW_AWD_DIST_PLANS_PKG SQL Statements

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

Line: 20

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : veramach
  ||  Created On : 31-OCT-2003
  ||  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)
  */

    CURSOR cur_old_ref_values IS
      SELECT   *
      FROM     igf_aw_awd_dist_plans
      WHERE    rowid = x_rowid;
Line: 47

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

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

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

    new_references.last_update_date                  := x_last_update_date;
Line: 74

    new_references.last_updated_by                   := x_last_updated_by;
Line: 75

    new_references.last_update_login                 := x_last_update_login;
Line: 101

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

      SELECT   rowid
      FROM     igf_aw_awd_dist_plans
      WHERE   ((cal_type = x_cal_type) AND
               (sequence_number = x_sequence_number));
Line: 217

      SELECT   rowid
      FROM     igf_aw_awd_dist_plans
      WHERE    adplans_id = x_adplans_id
      FOR UPDATE NOWAIT;
Line: 258

      SELECT   rowid
      FROM     igf_aw_awd_dist_plans
      WHERE    awd_dist_plan_cd = x_awd_dist_plan_cd
      AND      cal_type         = x_cal_type
      AND      sequence_number  = x_sequence_number
      AND      ((l_rowid IS NULL) OR (rowid <> l_rowid));
Line: 293

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : veramach
  ||  Created On : 31-OCT-2003
  ||  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)
  */
  BEGIN

    set_column_values (
      p_action,
      x_rowid,
      x_adplans_id,
      x_awd_dist_plan_cd,
      x_cal_type,
      x_sequence_number,
      x_awd_dist_plan_cd_desc,
      x_active_flag,
      x_dist_plan_method_code,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 326

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

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to Before Update.
      check_parent_existance;
Line: 342

    ELSIF (p_action = 'DELETE') THEN
      -- Call all the procedures related to Before Delete.
      check_child_existance;
Line: 345

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

    ELSIF (p_action = 'VALIDATE_DELETE') THEN
      check_child_existance;
Line: 358

    ELSIF (p_action = 'VALIDATE_UPDATE') THEN
      check_uniqueness;
Line: 365

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_adplans_id                        IN OUT NOCOPY NUMBER,
    x_awd_dist_plan_cd                  IN     VARCHAR2,
    x_cal_type                          IN     VARCHAR2,
    x_sequence_number                   IN     NUMBER,
    x_awd_dist_plan_cd_desc             IN     VARCHAR2,
    x_active_flag                       IN     VARCHAR2,
    x_dist_plan_method_code             IN     VARCHAR2,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : veramach
  ||  Created On : 31-OCT-2003
  ||  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)
  */

    x_last_update_date           DATE;
Line: 387

    x_last_updated_by            NUMBER;
Line: 388

    x_last_update_login          NUMBER;
Line: 392

    x_last_update_date := SYSDATE;
Line: 394

      x_last_updated_by := 1;
Line: 395

      x_last_update_login := 0;
Line: 397

      x_last_updated_by := fnd_global.user_id;
Line: 398

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

      x_last_update_login := fnd_global.login_id;
Line: 402

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

      fnd_message.set_token ('ROUTINE', 'IGF_AW_AWD_DIST_PLANS_PKG.INSERT_ROW');
Line: 415

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_adplans_id                        => x_adplans_id,
      x_awd_dist_plan_cd                  => x_awd_dist_plan_cd,
      x_cal_type                          => x_cal_type,
      x_sequence_number                   => x_sequence_number,
      x_awd_dist_plan_cd_desc             => x_awd_dist_plan_cd_desc,
      x_active_flag                       => x_active_flag,
      x_dist_plan_method_code             => x_dist_plan_method_code,
      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: 431

    INSERT INTO igf_aw_awd_dist_plans (
      adplans_id,
      awd_dist_plan_cd,
      cal_type,
      sequence_number,
      awd_dist_plan_cd_desc,
      active_flag,
      dist_plan_method_code,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login
    ) VALUES (
      igf_aw_awd_dist_plans_s.NEXTVAL,
      new_references.awd_dist_plan_cd,
      new_references.cal_type,
      new_references.sequence_number,
      new_references.awd_dist_plan_cd_desc,
      new_references.active_flag,
      new_references.dist_plan_method_code,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    ) RETURNING ROWID, adplans_id INTO x_rowid, x_adplans_id;
Line: 459

  END insert_row;
Line: 482

      SELECT
        awd_dist_plan_cd,
        cal_type,
        sequence_number,
        awd_dist_plan_cd_desc,
        active_flag,
        dist_plan_method_code
      FROM  igf_aw_awd_dist_plans
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 500

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_adplans_id                        IN     NUMBER,
    x_awd_dist_plan_cd                  IN     VARCHAR2,
    x_cal_type                          IN     VARCHAR2,
    x_sequence_number                   IN     NUMBER,
    x_awd_dist_plan_cd_desc             IN     VARCHAR2,
    x_active_flag                       IN     VARCHAR2,
    x_dist_plan_method_code             IN     VARCHAR2,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : veramach
  ||  Created On : 31-OCT-2003
  ||  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)
  */
    x_last_update_date           DATE ;
Line: 549

    x_last_updated_by            NUMBER;
Line: 550

    x_last_update_login          NUMBER;
Line: 554

    x_last_update_date := SYSDATE;
Line: 556

      x_last_updated_by := 1;
Line: 557

      x_last_update_login := 0;
Line: 559

      x_last_updated_by := fnd_global.user_id;
Line: 560

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

      x_last_update_login := fnd_global.login_id;
Line: 564

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

      fnd_message.set_token ('ROUTINE', 'IGF_AW_AWD_DIST_PLANS_PKG.UPDATE_ROW');
Line: 575

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_adplans_id                        => x_adplans_id,
      x_awd_dist_plan_cd                  => x_awd_dist_plan_cd,
      x_cal_type                          => x_cal_type,
      x_sequence_number                   => x_sequence_number,
      x_awd_dist_plan_cd_desc             => x_awd_dist_plan_cd_desc,
      x_active_flag                       => x_active_flag,
      x_dist_plan_method_code             => x_dist_plan_method_code,
      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: 591

    UPDATE igf_aw_awd_dist_plans
      SET
        awd_dist_plan_cd                  = new_references.awd_dist_plan_cd,
        cal_type                          = new_references.cal_type,
        sequence_number                   = new_references.sequence_number,
        awd_dist_plan_cd_desc             = new_references.awd_dist_plan_cd_desc,
        active_flag                       = new_references.active_flag,
        dist_plan_method_code             = new_references.dist_plan_method_code,
        last_update_date                  = x_last_update_date,
        last_updated_by                   = x_last_updated_by,
        last_update_login                 = x_last_update_login
      WHERE rowid = x_rowid;
Line: 608

  END update_row;
Line: 625

  ||  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)
  */
    CURSOR c1 IS
      SELECT   rowid
      FROM     igf_aw_awd_dist_plans
      WHERE    adplans_id                        = x_adplans_id;
Line: 643

      insert_row (
        x_rowid,
        x_adplans_id,
        x_awd_dist_plan_cd,
        x_cal_type,
        x_sequence_number,
        x_awd_dist_plan_cd_desc,
        x_active_flag,
        x_dist_plan_method_code,
        x_mode
      );
Line: 658

    update_row (
      x_rowid,
      x_adplans_id,
      x_awd_dist_plan_cd,
      x_cal_type,
      x_sequence_number,
      x_awd_dist_plan_cd_desc,
      x_active_flag,
      x_dist_plan_method_code,
      x_mode
    );
Line: 673

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : veramach
  ||  Created On : 31-OCT-2003
  ||  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: 692

    DELETE FROM igf_aw_awd_dist_plans
    WHERE rowid = x_rowid;
Line: 699

  END delete_row;