DBA Data[Home] [Help]

APPS.IGS_PE_PER_TYPE_MAP_PKG SQL Statements

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

Line: 16

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : prabhat.patel
  ||  Created On : 05-NOV-2002
  ||  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_pe_per_type_map
      WHERE    rowid = x_rowid;
Line: 43

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

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

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

    new_references.last_update_date                  := x_last_update_date;
Line: 66

    new_references.last_updated_by                   := x_last_updated_by;
Line: 67

    new_references.last_update_login                 := x_last_update_login;
Line: 83

	SELECT 'X'
	FROM   per_person_types
	WHERE  person_type_id = new_references.per_person_type_id;
Line: 96

         FND_MESSAGE.SET_NAME ('FND','FORM_RECORD_DELETED');
Line: 109

           FND_MESSAGE.SET_NAME ('FND', 'FORM_RECORD_DELETED');
Line: 121

          FND_MESSAGE.SET_NAME ('FND', 'FORM_RECORD_DELETED');
Line: 143

      SELECT   rowid
      FROM     igs_pe_per_type_map
      WHERE    person_type_code = x_person_type_code
      AND      per_person_type_id = x_per_person_type_id
      FOR UPDATE NOWAIT;
Line: 174

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : prabhat.patel
  ||  Created On : 05-NOV-2002
  ||  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_type_code,
      x_system_type,
      x_per_person_type_id,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 203

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.

      IF ( get_pk_for_validation(
             new_references.person_type_code,
             new_references.per_person_type_id
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
Line: 218

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

  PROCEDURE afterinsert (
  x_system_type                  IN     VARCHAR2 )
  AS
 /*
  ||  Created By : ssawhney
  ||  Created On : 29nov
  ||  Purpose : Handles the After insert logic, we need to end date person type instances in OSS after the mapping is done.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */

  CURSOR person_type_cur(cp_system_type igs_pe_person_types.system_type%TYPE) IS
    SELECT  ti.rowid,ti.*
    FROM	igs_pe_typ_instances_all ti,
		igs_pe_person_types pt,
		per_all_people_f ppf
    WHERE	ppf.party_id = ti.person_id AND
		ti.person_type_code = pt.person_type_code AND
		pt.system_type = cp_system_type AND
		(ti.end_date IS NULL OR (SYSDATE BETWEEN ti.start_date AND ti.end_date))
		;
Line: 262

    SELECT '1'
    FROM  igs_pe_typ_instances
    WHERE person_id = cp_person_id
    AND   system_type = 'STAFF'
    AND   (end_date IS NULL OR (SYSDATE BETWEEN start_date AND end_date));
Line: 270

    SELECT ti.rowid,ti.*
    FROM igs_pe_typ_instances_all ti,
	 igs_pe_person_types pt
    WHERE ti.person_type_code = pt.person_type_code AND
         pt.system_type = 'SS_ENROLL_STAFF' AND
	 ti.person_id = cp_person_id;
Line: 290

  igs_pe_typ_instances_pkg.update_row
      	   (
	x_rowid                => person_type_rec.rowid,
	x_person_id            => person_type_rec.person_id,
	x_course_cd            => person_type_rec.course_cd,
	x_type_instance_id     => person_type_rec.type_instance_id,
	x_person_type_code     => person_type_rec.person_type_code,
	x_cc_version_number    => person_type_rec.cc_version_number,
	x_funnel_status        => person_type_rec.funnel_status,
	x_admission_appl_number=> person_type_rec.admission_appl_number,
	x_nominated_course_cd  => person_type_rec.nominated_course_cd,
	x_ncc_version_number   => person_type_rec.ncc_version_number,
	x_sequence_number      => person_type_rec.sequence_number,
	x_start_date           => person_type_rec.start_date,
	x_end_date             => TRUNC(sysdate),
	x_create_method        => person_type_rec.create_method,
	x_ended_by             => person_type_rec.ended_by,
	x_end_method           => 'END_MANUAL',
        x_emplmnt_category_code=> person_type_rec.emplmnt_category_code);
Line: 325

		igs_pe_typ_instances_pkg.update_row
      		(
		x_rowid                => ss_rec.rowid,
		x_person_id            => ss_rec.person_id,
		x_course_cd            => ss_rec.course_cd,
		x_type_instance_id     => ss_rec.type_instance_id,
		x_person_type_code     => ss_rec.person_type_code,
		x_cc_version_number    => ss_rec.cc_version_number,
		x_funnel_status        => ss_rec.funnel_status,
		x_admission_appl_number=> ss_rec.admission_appl_number,
		x_nominated_course_cd  => ss_rec.nominated_course_cd,
		x_ncc_version_number   => ss_rec.ncc_version_number,
		x_sequence_number      => ss_rec.sequence_number,
		x_start_date           => ss_rec.start_date,
		x_end_date             => TRUNC(sysdate),
		x_create_method        => ss_rec.create_method,
		x_ended_by             => ss_rec.ended_by,
		x_end_method           => 'END_MANUAL',
                x_emplmnt_category_code=> ss_rec.emplmnt_category_code);
Line: 360

  END afterinsert;
Line: 381

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to After Insert.
    	afterinsert(new_references.system_type);
Line: 384

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to After Update.
      Null;
Line: 387

    ELSIF (p_action = 'DELETE') THEN
      -- Call all the procedures related to After Delete.
      Null;
Line: 394

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_person_type_code                  IN     VARCHAR2,
    x_system_type                       IN     VARCHAR2,
    x_per_person_type_id                IN     NUMBER,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : prabhat.patel
  ||  Created On : 05-NOV-2002
  ||  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: 412

    x_last_updated_by            NUMBER;
Line: 413

    x_last_update_login          NUMBER;
Line: 417

    x_last_update_date := SYSDATE;
Line: 419

      x_last_updated_by := 1;
Line: 420

      x_last_update_login := 0;
Line: 422

      x_last_updated_by := fnd_global.user_id;
Line: 423

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

      x_last_update_login := fnd_global.login_id;
Line: 427

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

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_person_type_code                  => x_person_type_code,
      x_system_type                       => x_system_type,
      x_per_person_type_id                => x_per_person_type_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: 449

    INSERT INTO igs_pe_per_type_map (
      person_type_code,
      system_type,
      per_person_type_id,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login
    ) VALUES (
      new_references.person_type_code,
      new_references.system_type,
      new_references.per_person_type_id,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    ) RETURNING ROWID INTO x_rowid;
Line: 471

		p_action => 'INSERT' ,
		x_rowid => X_ROWID );
Line: 474

  END insert_row;
Line: 493

      SELECT
        system_type
      FROM  igs_pe_per_type_map
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 506

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_person_type_code                  IN     VARCHAR2,
    x_system_type                       IN     VARCHAR2,
    x_per_person_type_id                IN     NUMBER,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : prabhat.patel
  ||  Created On : 05-NOV-2002
  ||  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: 546

    x_last_updated_by            NUMBER;
Line: 547

    x_last_update_login          NUMBER;
Line: 551

    x_last_update_date := SYSDATE;
Line: 553

      x_last_updated_by := 1;
Line: 554

      x_last_update_login := 0;
Line: 556

      x_last_updated_by := fnd_global.user_id;
Line: 557

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

      x_last_update_login := fnd_global.login_id;
Line: 561

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

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_person_type_code                  => x_person_type_code,
      x_system_type                       => x_system_type,
      x_per_person_type_id                => x_per_person_type_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: 583

    UPDATE igs_pe_per_type_map
      SET
        system_type                       = new_references.system_type,
        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: 595

  END update_row;
Line: 608

  ||  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_pe_per_type_map
      WHERE    person_type_code                  = x_person_type_code
      AND      per_person_type_id                = x_per_person_type_id;
Line: 627

      insert_row (
        x_rowid,
        x_person_type_code,
        x_system_type,
        x_per_person_type_id,
        x_mode
      );
Line: 638

    update_row (
      x_rowid,
      x_person_type_code,
      x_system_type,
      x_per_person_type_id,
      x_mode
    );
Line: 649

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : prabhat.patel
  ||  Created On : 05-NOV-2002
  ||  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: 668

    DELETE FROM igs_pe_per_type_map
    WHERE rowid = x_rowid;
Line: 675

  END delete_row;