DBA Data[Home] [Help]

APPS.JAI_PA_PREF_PKG SQL Statements

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

Line: 21

                   , x_last_update_date    varchar2
                   , x_force_edits         varchar2
                  )   IS
    lx_rowid rowid := null;
Line: 26

    vf_ludate   DATE := to_date(x_last_update_date, 'DD-MM-YYYY HH:MI:SS');
Line: 31

     IF(x_distribution_rule is NULL or x_context_id is null or x_last_update_date is null ) then
      fnd_message.set_name('JA', 'JAI_VALUE_MESSAGE');
Line: 37

      lr_setup_preference_rec.last_update_login  := 0;
Line: 41

      select *
      from   jai_pa_setup_preferences
      where  distribution_rule = x_distribution_rule
      and    context_id        = x_context_id;
Line: 47

      /* Check if the row exists in the database. If it does, retrieves the creation date for update_row. */
       OPEN cur_get_rec;
Line: 55

     /* Removed the check for userid and added check using last_update_date
    for bug 4967445 */

       /* Update only if force_edits is 'Y' or if vf_ludate > vd_ludate */
    if ( vf_ludate > lr_setup_preference_rec.last_update_date or x_force_edits = 'Y' ) then
         -- update row if present
      lr_setup_preference_rec.last_update_date   := vf_ludate ;
Line: 62

      lr_setup_preference_rec.last_updated_by    := ln_user_id;
Line: 67

       jai_pa_pref_pkg.update_row
                      ( lr_setup_preference_rec);
Line: 79

        lr_setup_preference_rec.last_update_date   := sysdate;
Line: 80

        lr_setup_preference_rec.last_updated_by    := ln_user_id;
Line: 82

         jai_pa_pref_pkg.insert_row
         (lr_setup_preference_rec
         ,lx_rowid
         ,lr_setup_preference_rec.setup_preference_id
         ) ;
Line: 95

 procedure insert_row
                  (
                     x_setup_preference_rec  in jai_pa_setup_preferences%rowtype
                   , x_rowid                in out nocopy rowid
                   , x_setup_preference_id  in out nocopy jai_pa_setup_preferences.setup_preference_id%type
                  )
  is
     cursor c_get_setup_prefrence_id
     is
     select jai_pa_setup_preferences_s.nextval
     from dual;
Line: 114

    insert into jai_pa_setup_preferences
                (
                 setup_preference_id
                ,distribution_rule
                ,context_id
                ,preference
                ,created_by
                ,creation_date
                ,last_update_login
                ,last_update_date
                ,last_updated_by
                )
    values
                (
                  x_setup_preference_id
                , x_setup_preference_rec.distribution_rule
                , x_setup_preference_rec.context_id
                , x_setup_preference_rec.preference
                , x_setup_preference_rec.created_by
                , x_setup_preference_rec.creation_date
                , x_setup_preference_rec.last_update_login
                , x_setup_preference_rec.last_update_date
                , x_setup_preference_rec.last_updated_by
                );
Line: 139

  end insert_row;
Line: 141

  procedure update_row
                    ( x_setup_preference_rec   in    jai_pa_setup_preferences%rowtype
                    )
  is
  begin

    update jai_pa_setup_preferences
    set
         distribution_rule      = x_setup_preference_rec.distribution_rule
        ,context_id             = x_setup_preference_rec.context_id
        ,preference             = x_setup_preference_rec.preference
        ,created_by             = x_setup_preference_rec.created_by
        ,creation_date          = x_setup_preference_rec.creation_date
        ,last_update_login      = x_setup_preference_rec.last_update_login
        ,last_update_date       = x_setup_preference_rec.last_update_date
        ,last_updated_by        = x_setup_preference_rec.last_updated_by
    where
        (
          (   distribution_rule     = x_setup_preference_rec.distribution_rule
          and   context_id            = x_setup_preference_rec.context_id
          )
        );
Line: 167

  end update_row;
Line: 169

  procedure delete_row (x_setup_preference_id   in  jai_pa_setup_preferences.setup_preference_id%type)
  is
  begin
    delete jai_pa_setup_preferences
    where  setup_preference_id = x_setup_preference_id;
Line: 174

  end delete_row;