DBA Data[Home] [Help]

APPS.IGS_PR_INST_STA_REF_PKG SQL Statements

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

Line: 16

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL,
    x_reference_cd_type                 IN     VARCHAR2    DEFAULT NULL
  ) AS
  /*
  ||  Created By : nbehera
  ||  Created On : 02-NOV-2001
  ||  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     igs_pr_inst_sta_ref
      WHERE    rowid = x_rowid;
Line: 44

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

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

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

    new_references.last_update_date                  := x_last_update_date;
Line: 69

    new_references.last_updated_by                   := x_last_updated_by;
Line: 70

    new_references.last_update_login                 := x_last_update_login;
Line: 93

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

      SELECT   rowid
      FROM     igs_pr_inst_sta_ref
      WHERE    stat_type = x_stat_type
      AND      unit_ref_cd = x_unit_ref_cd
      AND      reference_cd_type = x_reference_cd_type
      FOR UPDATE NOWAIT;
Line: 153

      SELECT   rowid
      FROM     igs_pr_inst_sta_ref
      WHERE   ((stat_type = x_stat_type));
Line: 183

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL,
    x_reference_cd_type                 IN     VARCHAR2    DEFAULT NULL
  ) AS
  /*
  ||  Created By : nbehera
  ||  Created On : 02-NOV-2001
  ||  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_stat_type,
      x_unit_ref_cd,
      x_include_or_exclude,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login,
      x_reference_cd_type
    );
Line: 214

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

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

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

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_stat_type                         IN     VARCHAR2,
    x_unit_ref_cd                       IN     VARCHAR2,
    x_include_or_exclude                IN     VARCHAR2,
    x_mode                              IN     VARCHAR2 DEFAULT 'R',
    x_reference_cd_type                 IN     VARCHAR2

  ) AS
  /*
  ||  Created By : nbehera
  ||  Created On : 02-NOV-2001
  ||  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)
  */
    CURSOR c IS
      SELECT   rowid
      FROM     igs_pr_inst_sta_ref
      WHERE    stat_type                         = x_stat_type
      AND      unit_ref_cd                       = x_unit_ref_cd;
Line: 272

      SELECT include_or_exclude
      FROM igs_pr_inst_sta_ref
      WHERE     stat_type                       = x_stat_type;
Line: 276

    x_last_update_date           DATE;
Line: 277

    x_last_updated_by            NUMBER;
Line: 278

    x_last_update_login          NUMBER;
Line: 283

    x_last_update_date := SYSDATE;
Line: 285

      x_last_updated_by := 1;
Line: 286

      x_last_update_login := 0;
Line: 288

      x_last_updated_by := fnd_global.user_id;
Line: 289

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

      x_last_update_login := fnd_global.login_id;
Line: 293

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

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_stat_type                         => x_stat_type,
      x_unit_ref_cd                       => x_unit_ref_cd,
      x_include_or_exclude                => x_include_or_exclude,
      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,
      x_reference_cd_type                 => x_reference_cd_type
    );
Line: 331

    INSERT INTO igs_pr_inst_sta_ref (
      stat_type,
      unit_ref_cd,
      include_or_exclude,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login,
      reference_cd_type
    ) VALUES (
      new_references.stat_type,
      new_references.unit_ref_cd,
      new_references.include_or_exclude,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login,
      x_reference_cd_type
    );
Line: 361

  END insert_row;
Line: 381

      SELECT
        include_or_exclude
      FROM  igs_pr_inst_sta_ref
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 394

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_stat_type                         IN     VARCHAR2,
    x_unit_ref_cd                       IN     VARCHAR2,
    x_include_or_exclude                IN     VARCHAR2,
    x_mode                              IN     VARCHAR2 DEFAULT 'R',
    x_reference_cd_type                 IN     VARCHAR2
  ) AS
  /*
  ||  Created By : nbehera
  ||  Created On : 02-NOV-2001
  ||  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: 435

    x_last_updated_by            NUMBER;
Line: 436

    x_last_update_login          NUMBER;
Line: 440

    x_last_update_date := SYSDATE;
Line: 442

      x_last_updated_by := 1;
Line: 443

      x_last_update_login := 0;
Line: 445

      x_last_updated_by := fnd_global.user_id;
Line: 446

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

      x_last_update_login := fnd_global.login_id;
Line: 450

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

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_stat_type                         => x_stat_type,
      x_unit_ref_cd                       => x_unit_ref_cd,
      x_include_or_exclude                => x_include_or_exclude,
      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,
      x_reference_cd_type                 => x_reference_cd_type
    );
Line: 473

    UPDATE igs_pr_inst_sta_ref
      SET
        include_or_exclude                = new_references.include_or_exclude,
        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: 485

  END update_row;
Line: 499

  ||  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     igs_pr_inst_sta_ref
      WHERE    stat_type                         = x_stat_type
      AND      unit_ref_cd                       = x_unit_ref_cd;
Line: 518

      insert_row (
        x_rowid,
        x_stat_type,
        x_unit_ref_cd,
        x_include_or_exclude,
        x_mode,
        x_reference_cd_type
      );
Line: 530

    update_row (
      x_rowid,
      x_stat_type,
      x_unit_ref_cd,
      x_include_or_exclude,
      x_mode,
      x_reference_cd_type
    );
Line: 542

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : nbehera
  ||  Created On : 02-NOV-2001
  ||  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: 561

    DELETE FROM igs_pr_inst_sta_ref
    WHERE rowid = x_rowid;
Line: 568

  END delete_row;