DBA Data[Home] [Help]

APPS.IGS_PS_RSV_ORGUN_PRF_PKG SQL Statements

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

Line: 20

    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 : apelleti
  ||  Created On : 04-MAY-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_PS_RSV_ORGUN_PRF
      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: 104

  PROCEDURE BeforeInsertUpdate(p_inserting BOOLEAN , p_updating BOOLEAN) AS
  p_message_name VARCHAR2(30);
Line: 107

   IF ( p_inserting = TRUE OR (p_updating = TRUE AND new_references.group_id <> old_references.group_id ) ) THEN
    IF  NOT IGS_PE_PERSID_GROUP_PKG.val_persid_group(new_references.group_id,p_message_name) THEN
        Fnd_Message.Set_Name('IGS', p_message_name);
Line: 114

  END BeforeInsertUpdate;
Line: 119

    SELECT 'x' FROM hz_parties hp,igs_pe_hz_parties pe
  WHERE hp.party_id = pe.party_id
   AND pe.oss_org_unit_cd = new_references.preference_code;
Line: 125

   Select priority_value
   from  IGS_PS_RSV_OGPRI_ALL PRI
   Where PRI.RSV_ORG_UNIT_PRI_ID = new_references.rsv_org_unit_pri_id;
Line: 150

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

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

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

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

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

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

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE    rsv_org_unit_prf_id = x_rsv_org_unit_prf_id
      FOR UPDATE NOWAIT;
Line: 269

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE    rsv_org_unit_pri_id = x_rsv_org_unit_pri_id
      AND      preference_code = x_preference_code
      AND      ((l_rowid IS NULL) OR (rowid <> l_rowid));
Line: 305

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE   ((rsv_org_unit_pri_id = x_rsv_org_unit_pri_id));
Line: 339

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE   ((preference_code = x_preference_code) AND (preference_version = x_preference_version) );
Line: 373

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE   ((preference_code = x_preference_code));
Line: 408

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE   ((preference_code = x_preference_code) AND (preference_version = x_preference_version));
Line: 442

      SELECT   rowid
      FROM     igs_ps_rsv_orgun_prf
      WHERE   ((preference_code = x_preference_code));
Line: 477

    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 : apelleti
  ||  Created On : 04-MAY-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_rsv_org_unit_prf_id,
      x_rsv_org_unit_pri_id,
      x_preference_order,
      x_preference_code,
      x_preference_version,
      x_percentage_reserved,
      x_group_id,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 510

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.
      BeforeInsertUpdate(TRUE,FALSE);
Line: 523

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to Before Update.
      BeforeInsertUpdate(FALSE,TRUE);
Line: 528

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

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

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_rsv_org_unit_prf_id               IN OUT NOCOPY NUMBER,
    x_rsv_org_unit_pri_id               IN     NUMBER,
    x_preference_order                  IN     NUMBER,
    x_preference_code                   IN     VARCHAR2,
    x_preference_version                IN     NUMBER,
    x_percentage_reserved               IN     NUMBER,
    x_group_id                          IN     NUMBER,
    x_mode                              IN     VARCHAR2 DEFAULT 'R'
  ) AS
  /*
  ||  Created By : apelleti
  ||  Created On : 04-MAY-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_ps_rsv_orgun_prf
      WHERE    rsv_org_unit_prf_id               = x_rsv_org_unit_prf_id;
Line: 573

    x_last_update_date           DATE;
Line: 574

    x_last_updated_by            NUMBER;
Line: 575

    x_last_update_login          NUMBER;
Line: 579

    x_last_update_date := SYSDATE;
Line: 581

      x_last_updated_by := 1;
Line: 582

      x_last_update_login := 0;
Line: 584

      x_last_updated_by := fnd_global.user_id;
Line: 585

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

      x_last_update_login := fnd_global.login_id;
Line: 589

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

    SELECT    igs_ps_rsv_orgun_prf_s.NEXTVAL
    INTO      x_rsv_org_unit_prf_id
    FROM      dual;
Line: 603

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_rsv_org_unit_prf_id               => x_rsv_org_unit_prf_id,
      x_rsv_org_unit_pri_id               => x_rsv_org_unit_pri_id,
      x_preference_order                  => x_preference_order,
      x_preference_code                   => x_preference_code,
      x_preference_version                => x_preference_version,
      x_percentage_reserved               => x_percentage_reserved,
      x_group_id                          => x_group_id,
      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: 619

    INSERT INTO igs_ps_rsv_orgun_prf (
      rsv_org_unit_prf_id,
      rsv_org_unit_pri_id,
      preference_order,
      preference_code,
      preference_version,
      percentage_reserved,
      group_id,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login
    ) VALUES (
      new_references.rsv_org_unit_prf_id,
      new_references.rsv_org_unit_pri_id,
      new_references.preference_order,
      new_references.preference_code,
      new_references.preference_version,
      new_references.percentage_reserved,
      new_references.group_id,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 655

  END insert_row;
Line: 678

      SELECT
        rsv_org_unit_pri_id,
        preference_order,
        preference_code,
        preference_version,
        percentage_reserved,
        group_id
      FROM  igs_ps_rsv_orgun_prf
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 696

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_rsv_org_unit_prf_id               IN     NUMBER,
    x_rsv_org_unit_pri_id               IN     NUMBER,
    x_preference_order                  IN     NUMBER,
    x_preference_code                   IN     VARCHAR2,
    x_preference_version                IN     NUMBER,
    x_percentage_reserved               IN     NUMBER,
    x_group_id                          IN     NUMBER,
    x_mode                              IN     VARCHAR2 DEFAULT 'R'
  ) AS
  /*
  ||  Created By : apelleti
  ||  Created On : 04-MAY-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: 745

    x_last_updated_by            NUMBER;
Line: 746

    x_last_update_login          NUMBER;
Line: 750

    x_last_update_date := SYSDATE;
Line: 752

      x_last_updated_by := 1;
Line: 753

      x_last_update_login := 0;
Line: 755

      x_last_updated_by := fnd_global.user_id;
Line: 756

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

      x_last_update_login := fnd_global.login_id;
Line: 760

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

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_rsv_org_unit_prf_id               => x_rsv_org_unit_prf_id,
      x_rsv_org_unit_pri_id               => x_rsv_org_unit_pri_id,
      x_preference_order                  => x_preference_order,
      x_preference_code                   => x_preference_code,
      x_preference_version                => x_preference_version,
      x_percentage_reserved               => x_percentage_reserved,
      x_group_id                          => x_group_id,
      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: 786

    UPDATE igs_ps_rsv_orgun_prf
      SET
        rsv_org_unit_pri_id               = new_references.rsv_org_unit_pri_id,
        preference_order                  = new_references.preference_order,
        preference_code                   = new_references.preference_code,
        preference_version                = new_references.preference_version,
        percentage_reserved               = new_references.percentage_reserved,
        group_id                          = new_references.group_id,
        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: 803

  END update_row;
Line: 820

  ||  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_ps_rsv_orgun_prf
      WHERE    rsv_org_unit_prf_id               = x_rsv_org_unit_prf_id;
Line: 838

      insert_row (
        x_rowid,
        x_rsv_org_unit_prf_id,
        x_rsv_org_unit_pri_id,
        x_preference_order,
        x_preference_code,
        x_preference_version,
        x_percentage_reserved,
        x_group_id,
        x_mode
      );
Line: 853

    update_row (
      x_rowid,
      x_rsv_org_unit_prf_id,
      x_rsv_org_unit_pri_id,
      x_preference_order,
      x_preference_code,
      x_preference_version,
      x_percentage_reserved,
      x_group_id,
      x_mode
    );
Line: 868

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : apelleti
  ||  Created On : 04-MAY-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: 887

    DELETE FROM igs_ps_rsv_orgun_prf
    WHERE rowid = x_rowid;
Line: 894

  END delete_row;