DBA Data[Home] [Help]

APPS.AS_STATUS_PUB SQL Statements

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

Line: 47

l_last_update_date                 DATE          ;
Line: 48

l_last_updated_by                  NUMBER        ;
Line: 49

l_last_update_login                NUMBER        ;
Line: 71

       SELECT 1
         FROM as_statuses_vl
        WHERE TRIM(NLS_UPPER(status_code)) = p_status_code;  -- trimmed value passed while opening
Line: 203

   IF    (p_status_rec.last_update_date = FND_API.G_MISS_DATE)
   OR    TRIM(p_status_rec.last_update_date) IS NULL
   THEN
          l_last_update_date := sysdate;
Line: 208

          l_last_update_date := p_status_rec.last_update_date;
Line: 210

   IF    (p_status_rec.last_update_login = FND_API.G_MISS_NUM)
   OR    TRIM(p_status_rec.last_update_login) IS NULL
   THEN
          l_last_update_login := fnd_global.login_id;
Line: 215

          l_last_update_login := p_status_rec.last_update_login;
Line: 217

   IF    (p_status_rec.last_updated_by = FND_API.G_MISS_NUM)
   OR    TRIM(p_status_rec.last_updated_by) IS NULL
   THEN
          l_last_updated_by := fnd_global.user_id;
Line: 222

          l_last_updated_by := p_status_rec.last_updated_by ;
Line: 357

      fnd_message.set_name('AS', 'AS_STATUS_INSERT_FAILED');
Line: 366

              AS_STATUSES_PKG.INSERT_ROW(
                  l_row_id,
                  p_status_rec.status_code,
                  p_status_rec.enabled_flag,
                  p_status_rec.lead_flag,
                  p_status_rec.opp_flag,
                  p_status_rec.opp_open_status_flag,
                  p_status_rec.opp_decision_date_flag,
                  p_status_rec.status_rank,
                  p_status_rec.forecast_rollup_flag,
                  p_status_rec.win_loss_indicator,
                  NULL,
                  l_attribute_category,
                  l_attribute1,
                  l_attribute2,
                  l_attribute3,
                  l_attribute4,
                  l_attribute5,
                  l_attribute6,
                  l_attribute7,
                  l_attribute8,
                  l_attribute9,
                  l_attribute10,
                  l_attribute11,
                  l_attribute12,
                  l_attribute13,
                  l_attribute14,
                  l_attribute15,
                  p_status_rec.meaning,
                  l_description,
                  l_creation_date,
                  l_created_by,
                  l_last_update_date,
                  l_last_updated_by,
                  l_last_update_login);
Line: 461

PROCEDURE update_status (
    p_api_version_number   IN     NUMBER,
    p_init_msg_list        IN     VARCHAR2 ,
    p_commit               IN     VARCHAR2 ,
    p_validation_level     IN     NUMBER,
    p_status_rec           IN     STATUS_Rec_Type ,
    x_return_status        OUT    VARCHAR2,
    x_msg_count            OUT    NUMBER,
    x_msg_data             OUT    VARCHAR2)

IS
-- Declaration of local variables and cursors
l_api_version                      NUMBER:= p_api_version_number;
Line: 474

l_api_name        CONSTANT         VARCHAR(30) DEFAULT 'UPDATE_STATUS';
Line: 491

l_last_update_date                 DATE          ;
Line: 492

v_last_update_date                 DATE          ;
Line: 493

l_last_updated_by                  NUMBER        ;
Line: 494

l_last_update_login                NUMBER        ;
Line: 533

l_current_last_update_date         DATE;
Line: 536

CURSOR  get_update_row_cur(p_status_code in VARCHAR2) IS
      SELECT   last_update_date,
               enabled_flag,
               lead_flag,
               opp_flag,
               opp_open_status_flag ,
               opp_decision_date_flag,
               forecast_rollup_flag,
               win_loss_indicator,
               attribute_category,
               attribute1,
               attribute2,
               attribute3,
               attribute4,
               attribute5,
               attribute6,
               attribute7,
               attribute8,
               attribute9,
               attribute10,
               attribute11,
               attribute12,
               attribute13,
               attribute14,
               attribute15,
               meaning,
               description,
               status_rank
        FROM   as_statuses_vl
       WHERE   TRIM(NLS_UPPER(status_code)) = p_status_code; -- trimmed value passed while opening
Line: 567

CURSOR  lock_row_for_update(p_status_code in VARCHAR2) IS
      SELECT   last_update_date
        FROM   as_statuses_vl
       WHERE   TRIM(NLS_UPPER(status_code)) = p_status_code; -- trimmed value passed while opening
Line: 577

   SAVEPOINT update_status;
Line: 614

  OPEN   get_update_row_cur(TRIM(NLS_UPPER(p_status_rec.status_code)));
Line: 615

   FETCH  get_update_row_cur
    INTO  l_last_update_date,
          l_enabled_flag,
          l_lead_flag,
          l_opp_flag,
          l_opp_open_status_flag ,
          l_opp_decision_date_flag,
          l_forecast_rollup_flag,
          l_win_loss_indicator,
          l_attribute_category,
          l_attribute1,
          l_attribute2,
          l_attribute3,
          l_attribute4,
          l_attribute5,
          l_attribute6,
          l_attribute7,
          l_attribute8,
          l_attribute9,
          l_attribute10,
          l_attribute11,
          l_attribute12,
          l_attribute13,
          l_attribute14,
          l_attribute15,
          l_meaning,
          l_description,
          l_status_rank;
Line: 644

   IF     get_update_row_cur%NOTFOUND
   THEN
          CLOSE  get_update_row_cur;
Line: 829

IF   p_status_rec.last_update_date = FND_API.G_MISS_DATE
OR   TRIM(p_status_rec.last_update_date) IS NULL
THEN
     l_last_update_date := SYSDATE;
Line: 834

     l_last_update_date := p_status_rec.last_update_date ;
Line: 837

IF  p_status_rec.last_update_login = FND_API.G_MISS_NUM
OR  TRIM(p_status_rec.last_update_login) IS NULL
THEN
    l_last_update_login := fnd_global.login_id;
Line: 842

    l_last_update_login :=  p_status_rec.last_update_login;
Line: 845

IF  p_status_rec.last_updated_by = FND_API.G_MISS_NUM
OR  TRIM(p_status_rec.last_updated_by) IS NULL
THEN
    l_last_updated_by := fnd_global.user_id;
Line: 850

    l_last_updated_by := p_status_rec.last_updated_by;
Line: 904

      fnd_message.set_name('AS', 'AS_STATUS_UPDATE_FAILED');
Line: 913

   OPEN   lock_row_for_update(TRIM(NLS_UPPER(p_status_rec.status_code)));
Line: 914

   FETCH  lock_row_for_update INTO  l_current_last_update_date;
Line: 915

   IF     lock_row_for_update%NOTFOUND
   THEN
          CLOSE  lock_row_for_update;
Line: 921

   IF l_last_update_date <> l_current_last_update_date
   THEN
          fnd_message.set_name('AS', 'AS_RECORD_UPDATED');
Line: 928

   AS_STATUSES_PKG.UPDATE_ROW(
              p_status_rec.status_code,
              v_enabled_flag,
              v_lead_flag,
              v_opp_flag,
              v_opp_open_status_flag,
              v_opp_decision_date_flag,
              v_status_rank,
              v_forecast_rollup_flag,
              v_win_loss_indicator,
              NULL,
              v_attribute_category,
              v_attribute1,
              v_attribute2,
              v_attribute3,
              v_attribute4,
              v_attribute5,
              v_attribute6,
              v_attribute7,
              v_attribute8,
              v_attribute9,
              v_attribute10,
              v_attribute11,
              v_attribute12,
              v_attribute13,
              v_attribute14,
              v_attribute15,
              v_meaning,
              v_description,
              l_last_update_date,
              l_last_updated_by,
              l_last_update_login);
Line: 969

   CLOSE  get_update_row_cur;   -- closed after update...
Line: 970

   CLOSE  lock_row_for_update ;
Line: 982

    ROLLBACK TO update_status;
Line: 989

    ROLLBACK TO update_status;
Line: 996

    ROLLBACK TO update_status;
Line: 1003

END update_status;