DBA Data[Home] [Help]

APPS.IGR_I_A_LINES_PKG SQL Statements

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

Line: 17

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : hreddych
  ||  Created On : 22-JAN-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     igr_i_a_lines
      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: 59

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

    new_references.last_update_date                  := x_last_update_date;
Line: 68

    new_references.last_updated_by                   := x_last_updated_by;
Line: 69

    new_references.last_update_login                 := x_last_update_login;
Line: 95

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

      SELECT   rowid
      FROM     igr_i_a_lines
      WHERE    sales_lead_line_id = x_sales_lead_line_id
      FOR UPDATE NOWAIT;
Line: 152

      SELECT   rowid
      FROM     igr_i_a_lines
      WHERE   ((enquiry_appl_number = x_enquiry_appl_number) AND
               (person_id = x_person_id));
Line: 184

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : hreddych
  ||  Created On : 22-JAN-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_person_id,
      x_enquiry_appl_number,
      x_sales_lead_line_id,
      x_preference,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 214

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

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

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

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_person_id                         IN     NUMBER,
    x_enquiry_appl_number               IN     NUMBER,
    x_sales_lead_line_id                IN     NUMBER,
    x_preference                        IN     NUMBER,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : hreddych
  ||  Created On : 22-JAN-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: 262

    x_last_updated_by            NUMBER;
Line: 263

    x_last_update_login          NUMBER;
Line: 267

    x_program_update_date        DATE;
Line: 271

    x_last_update_date := SYSDATE;
Line: 273

      x_last_updated_by := 1;
Line: 274

      x_last_update_login := 0;
Line: 276

      x_last_updated_by := fnd_global.user_id;
Line: 277

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

      x_last_update_login := fnd_global.login_id;
Line: 281

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

        x_program_update_date    := NULL;
Line: 294

        x_program_update_date    := SYSDATE;
Line: 298

      fnd_message.set_token ('ROUTINE', 'IGR_I_A_LINES_PKG.INSERT_ROW');
Line: 304

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_person_id                         => x_person_id,
      x_enquiry_appl_number               => x_enquiry_appl_number,
      x_sales_lead_line_id                => x_sales_lead_line_id,
      x_preference                        => x_preference,
      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: 317

    INSERT INTO igr_i_a_lines (
      person_id,
      enquiry_appl_number,
      sales_lead_line_id,
      preference,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login,
      request_id,
      program_id,
      program_application_id,
      program_update_date
    ) VALUES (
      new_references.person_id,
      new_references.enquiry_appl_number,
      new_references.sales_lead_line_id,
      new_references.preference,
      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
    ) RETURNING ROWID INTO x_rowid;
Line: 347

  END insert_row;
Line: 367

      SELECT
        person_id,
        enquiry_appl_number,
        preference
      FROM  igr_i_a_lines
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 382

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_person_id                         IN     NUMBER,
    x_enquiry_appl_number               IN     NUMBER,
    x_sales_lead_line_id                IN     NUMBER,
    x_preference                        IN     NUMBER,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : hreddych
  ||  Created On : 22-JAN-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: 425

    x_last_updated_by            NUMBER;
Line: 426

    x_last_update_login          NUMBER;
Line: 430

    x_program_update_date        DATE;
Line: 434

    x_last_update_date := SYSDATE;
Line: 436

      x_last_updated_by := 1;
Line: 437

      x_last_update_login := 0;
Line: 439

      x_last_updated_by := fnd_global.user_id;
Line: 440

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

      x_last_update_login := fnd_global.login_id;
Line: 444

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

      fnd_message.set_token ('ROUTINE', 'IGR_I_A_LINES_PKG.UPDATE_ROW');
Line: 455

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_person_id                         => x_person_id,
      x_enquiry_appl_number               => x_enquiry_appl_number,
      x_sales_lead_line_id                => x_sales_lead_line_id,
      x_preference                        => x_preference,
      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: 476

        x_program_update_date := old_references.program_update_date;
Line: 478

        x_program_update_date := SYSDATE;
Line: 482

    UPDATE igr_i_a_lines
      SET
        person_id                         = new_references.person_id,
        enquiry_appl_number               = new_references.enquiry_appl_number,
        preference                        = new_references.preference,
        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: 500

  END update_row;
Line: 514

  ||  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     igr_i_a_lines
      WHERE    sales_lead_line_id                = x_sales_lead_line_id;
Line: 532

      insert_row (
        x_rowid,
        x_person_id,
        x_enquiry_appl_number,
        x_sales_lead_line_id,
        x_preference,
        x_mode
      );
Line: 544

    update_row (
      x_rowid,
      x_person_id,
      x_enquiry_appl_number,
      x_sales_lead_line_id,
      x_preference,
      x_mode
    );
Line: 556

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : hreddych
  ||  Created On : 22-JAN-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: 575

    DELETE FROM igr_i_a_lines
    WHERE rowid = x_rowid;
Line: 582

  END delete_row;