DBA Data[Home] [Help]

APPS.IGS_PS_REF_CD_PKG SQL Statements

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

Line: 5

   ayedubat    11-JUN-2001   modified the BeforeRowInsertUpdateDelete1 to add a
                             new validation according to the DLD,PSP001-US      */

  l_rowid VARCHAR2(25);
Line: 22

    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

    CURSOR cur_old_ref_values IS
      SELECT   *
      FROM     igs_ps_ref_cd
      WHERE    ROWID = x_rowid;
Line: 40

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

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

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

    new_references.last_update_date := x_last_update_date;
Line: 63

    new_references.last_updated_by := x_last_updated_by;
Line: 64

    new_references.last_update_login := x_last_update_login;
Line: 74

  PROCEDURE beforerowinsertupdatedelete1(
    p_inserting IN BOOLEAN DEFAULT FALSE,
    p_updating IN BOOLEAN DEFAULT FALSE,
    p_deleting IN BOOLEAN DEFAULT FALSE
    ) AS
  v_description igs_ps_ref_cd.description%TYPE;
Line: 88

    ELSE -- p_inserting or p_updating
      v_course_cd := new_references.course_cd;
Line: 102

    IF p_inserting OR
       (p_updating AND
         (old_references.reference_cd_type <> new_references.reference_cd_type)) THEN
      IF igs_ps_val_crfc.crsp_val_ref_cd_type(
                                              new_references.reference_cd_type,
                                              v_message_name) = FALSE THEN
        fnd_message.set_name('IGS',v_message_name);
Line: 116

        SELECT decode(NVL(old_references.description,'NULL'),
                      NVL(new_references.description,'NULL'),
                      NULL,old_references.description)
        INTO v_description
        FROM dual;
Line: 127

                               old_references.last_update_date,
                               new_references.last_update_date,
                               old_references.last_updated_by,
                               v_description);
Line: 145

                              old_references.last_update_date,
                              SYSDATE,
                              old_references.last_updated_by,
                              old_references.description);
Line: 151

  END beforerowinsertupdatedelete1;
Line: 159

  PROCEDURE afterrowinsertupdate2(
    p_inserting IN BOOLEAN DEFAULT FALSE,
    p_updating IN BOOLEAN DEFAULT FALSE,
    p_deleting IN BOOLEAN DEFAULT FALSE
    ) AS
  v_message_name VARCHAR2(30);
Line: 166

    IF  p_inserting  THEN
       NULL;
Line: 170

  END afterrowinsertupdate2;
Line: 248

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

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

      SELECT   ROWID
      FROM     igs_ps_ref_cd
      WHERE    course_cd = x_course_cd
      AND      version_number = x_version_number
      AND      reference_cd_type = x_reference_cd_type
      AND      reference_cd = x_reference_cd
      FOR UPDATE NOWAIT;
Line: 307

      SELECT   ROWID
      FROM     igs_ps_ref_cd
      WHERE    course_cd = x_course_cd
      AND      version_number = x_version_number
      AND      reference_cd_type = x_reference_cd_type
      AND      (l_rowid IS NULL OR ROWID <> l_rowid)
      FOR UPDATE NOWAIT;
Line: 336

      SELECT   ROWID
      FROM     igs_ps_ref_cd
      WHERE    course_cd = x_course_cd
      AND      version_number = x_version_number ;
Line: 363

      SELECT   ROWID
      FROM     igs_ps_ref_cd
      WHERE    reference_cd_type = x_reference_cd_type ;
Line: 401

      SELECT   ROWID
      FROM     igs_ps_ref_cd
      WHERE    reference_cd_type = x_reference_cd_type
      AND      reference_cd = x_reference_cd ;
Line: 434

    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
  BEGIN

    set_column_values (
      p_action,
      x_rowid,
      x_course_cd,
      x_version_number,
      x_reference_cd_type,
      x_reference_cd,
      x_description,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 455

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.
      beforerowinsertupdatedelete1 ( p_inserting => TRUE );
Line: 471

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to Before Update.
      beforerowinsertupdatedelete1 ( p_updating => TRUE );
Line: 477

    ELSIF (p_action = 'DELETE') THEN
      -- Call all the procedures related to Before Delete.
      beforerowinsertupdatedelete1 ( p_deleting => TRUE );
Line: 480

    ELSIF (p_action = 'VALIDATE_INSERT') THEN
      IF get_pk_for_validation(
           new_references.course_cd ,
           new_references.version_number ,
           new_references.reference_cd_type ,
           new_references.reference_cd  ) THEN
        fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
Line: 492

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

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to After Insert.
      afterrowinsertupdate2 ( p_inserting => TRUE );
Line: 512

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to After Update.
      afterrowinsertupdate2 ( p_updating => TRUE );
Line: 521

  PROCEDURE insert_row (
    x_rowid IN OUT NOCOPY VARCHAR2,
    x_course_cd IN VARCHAR2,
    x_version_number IN NUMBER,
    x_reference_cd IN VARCHAR2,
    x_reference_cd_type IN VARCHAR2,
    x_description IN VARCHAR2,
    x_mode IN VARCHAR2 DEFAULT 'R'
    ) AS
    CURSOR c IS SELECT ROWID FROM igs_ps_ref_cd
      WHERE course_cd = x_course_cd
      AND version_number = x_version_number
      AND reference_cd = x_reference_cd
      AND reference_cd_type = x_reference_cd_type;
Line: 535

    x_last_update_date DATE;
Line: 536

    x_last_updated_by NUMBER;
Line: 537

    x_last_update_login NUMBER;
Line: 539

    x_last_update_date := SYSDATE;
Line: 541

      x_last_updated_by := 1;
Line: 542

      x_last_update_login := 0;
Line: 544

      x_last_updated_by := fnd_global.user_id;
Line: 545

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

      x_last_update_login :=fnd_global.login_id;
Line: 549

      IF x_last_update_login IS NULL THEN
        x_last_update_login := -1;
Line: 558

      p_action => 'INSERT',
      x_rowid => x_rowid,
      x_course_cd => x_course_cd,
      x_version_number => x_version_number,
      x_reference_cd_type => x_reference_cd_type,
      x_reference_cd => x_reference_cd,
      x_description => x_description,
      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: 572

     INSERT INTO igs_ps_ref_cd (
       course_cd,
       version_number,
       reference_cd_type,
       reference_cd,
       description,
       creation_date,
       created_by,
       last_update_date,
       last_updated_by,
       last_update_login)
       VALUES (
       new_references.course_cd,
       new_references.version_number,
       new_references.reference_cd_type,
       new_references.reference_cd,
       new_references.description,
       x_last_update_date,
       x_last_updated_by,
       x_last_update_date,
       x_last_updated_by,
       x_last_update_login
       );
Line: 603

                 p_action => 'INSERT',
                 x_rowid => x_rowid
      );
Line: 606

  END insert_row;
Line: 616

  CURSOR c1 IS SELECT
      description
    FROM igs_ps_ref_cd
    WHERE ROWID = x_rowid
    FOR UPDATE NOWAIT;
Line: 628

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

  PROCEDURE update_row (
    x_rowid IN VARCHAR2,
    x_course_cd IN VARCHAR2,
    x_version_number IN NUMBER,
    x_reference_cd IN VARCHAR2,
    x_reference_cd_type IN VARCHAR2,
    x_description IN VARCHAR2,
    x_mode IN VARCHAR2 DEFAULT 'R'
    ) AS
    x_last_update_date DATE;
Line: 658

    x_last_updated_by NUMBER;
Line: 659

    x_last_update_login NUMBER;
Line: 661

    x_last_update_date := SYSDATE;
Line: 663

      x_last_updated_by := 1;
Line: 664

      x_last_update_login := 0;
Line: 666

      x_last_updated_by := fnd_global.user_id;
Line: 667

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

      x_last_update_login :=fnd_global.login_id;
Line: 671

      IF x_last_update_login IS NULL THEN
        x_last_update_login := -1;
Line: 680

    p_action => 'UPDATE',
    x_rowid => x_rowid,
    x_course_cd => x_course_cd,
    x_version_number => x_version_number,
    x_reference_cd_type => x_reference_cd_type,
    x_reference_cd => x_reference_cd,
    x_description => x_description,
    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: 694

    UPDATE igs_ps_ref_cd SET
    course_cd = new_references.course_cd,
    version_number = new_references.version_number,
    reference_cd_type = new_references.reference_cd_type,
    reference_cd = new_references.reference_cd,
    description = new_references.description,
    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: 708

      p_action => 'UPDATE',
      x_rowid => x_rowid);
Line: 711

  END update_row;
Line: 722

  CURSOR c1 IS SELECT ROWID FROM igs_ps_ref_cd
     WHERE course_cd = x_course_cd
     AND version_number = x_version_number
     AND reference_cd = x_reference_cd
     AND reference_cd_type = x_reference_cd_type ;
Line: 732

      insert_row (
        x_rowid,
        x_course_cd,
        x_version_number,
        x_reference_cd,
        x_reference_cd_type,
        x_description,
        x_mode);
Line: 743

    update_row (
      x_rowid,
      x_course_cd,
      x_version_number,
      x_reference_cd,
      x_reference_cd_type,
      x_description,
      x_mode);
Line: 753

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  BEGIN
    before_dml (
      p_action => 'DELETE',
      x_rowid => x_rowid
    );
Line: 761

    DELETE FROM igs_ps_ref_cd
    WHERE ROWID = x_rowid;
Line: 767

      p_action => 'DELETE',
      x_rowid => x_rowid);
Line: 769

  END delete_row;