DBA Data[Home] [Help]

APPS.XLA_SEG_RULES_F_PKG SQL Statements

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

Line: 61

|  Procedure insert_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE insert_row
  (x_rowid                            IN OUT NOCOPY VARCHAR2
  ,x_application_id                   IN NUMBER
  ,x_amb_context_code                 IN VARCHAR2
  ,x_segment_rule_type_code           IN VARCHAR2
  ,x_segment_rule_code                IN VARCHAR2
  ,x_transaction_coa_id               IN NUMBER
  ,x_accounting_coa_id                IN NUMBER
  ,x_flexfield_assign_mode_code       IN VARCHAR2
  ,x_flexfield_segment_code           IN VARCHAR2
  ,x_enabled_flag                     IN VARCHAR2
  ,x_flex_value_set_id                IN NUMBER
  ,x_name                             IN VARCHAR2
  ,x_description                      IN VARCHAR2
  ,x_creation_date                    IN DATE
  ,x_created_by                       IN NUMBER
  ,x_last_update_date                 IN DATE
  ,x_last_updated_by                  IN NUMBER
  ,x_last_update_login                IN NUMBER)

IS

CURSOR c IS
SELECT rowid
FROM   xla_seg_rules_b
WHERE  application_id                   = x_application_id
  AND  amb_context_code                 = x_amb_context_code
  AND  segment_rule_type_code           = x_segment_rule_type_code
  AND  segment_rule_code                = x_segment_rule_code
;
Line: 98

  l_log_module := C_DEFAULT_MODULE||'.insert_row';
Line: 102

  trace(p_msg    => 'BEGIN of procedure insert_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 107

INSERT INTO xla_seg_rules_b
(creation_date
,created_by
,amb_context_code
,application_id
,segment_rule_type_code
,segment_rule_code
,transaction_coa_id
,accounting_coa_id
,flexfield_assign_mode_code
,flexfield_segment_code
,enabled_flag
,flex_value_set_id
,version_num
,updated_flag
,last_update_date
,last_updated_by
,last_update_login)
VALUES
(x_creation_date
,x_created_by
,x_amb_context_code
,x_application_id
,x_segment_rule_type_code
,x_segment_rule_code
,x_transaction_coa_id
,x_accounting_coa_id
,x_flexfield_assign_mode_code
,x_flexfield_segment_code
,x_enabled_flag
,x_flex_value_set_id
,0
,'Y'
,x_last_update_date
,x_last_updated_by
,x_last_update_login)
;
Line: 145

INSERT INTO xla_seg_rules_tl
(last_update_login
,amb_context_code
,last_update_date
,last_updated_by
,created_by
,application_id
,segment_rule_type_code
,segment_rule_code
,name
,description
,creation_date
,language
,source_lang)
SELECT
       x_last_update_login
      ,x_amb_context_code
      ,x_last_update_date
      ,x_last_updated_by
      ,x_created_by
      ,x_application_id
      ,x_segment_rule_type_code
      ,x_segment_rule_code
      ,x_name
      ,x_description
      ,x_creation_date
      ,l.language_code
      ,USERENV('LANG')
FROM   fnd_languages l
WHERE  l.installed_flag                 IN ('I', 'B')
  AND  NOT EXISTS
      (SELECT NULL
       FROM   xla_seg_rules_tl                   t
       WHERE  t.application_id                   = x_application_id
         AND  t.amb_context_code                 = x_amb_context_code
         AND  t.segment_rule_type_code           = x_segment_rule_type_code
         AND  t.segment_rule_code                = x_segment_rule_code
         AND  t.language                         = l.language_code);
Line: 194

  trace(p_msg    => 'END of procedure insert_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 199

END insert_row;
Line: 223

SELECT created_by
      ,transaction_coa_id
      ,accounting_coa_id
      ,flexfield_assign_mode_code
      ,flexfield_segment_code
      ,enabled_flag
      ,flex_value_set_id
FROM   xla_seg_rules_b
WHERE  application_id                   = x_application_id
  AND  amb_context_code                 = x_amb_context_code
  AND  segment_rule_type_code           = x_segment_rule_type_code
  AND  segment_rule_code                = x_segment_rule_code
FOR UPDATE OF application_id NOWAIT;
Line: 240

SELECT last_update_login
      ,name
      ,description
      ,DECODE(language     , USERENV('LANG'), 'Y', 'N') baselang
FROM   xla_seg_rules_tl
WHERE  application_id                   = X_application_id
  AND  amb_context_code                 = X_amb_context_code
  AND  segment_rule_type_code           = X_segment_rule_type_code
  AND  segment_rule_code                = X_segment_rule_code
  AND  USERENV('LANG')                 IN (language     ,source_lang)
FOR UPDATE OF application_id NOWAIT;
Line: 270

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

|  Procedure update_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE update_row
 (x_application_id                   IN NUMBER
 ,x_amb_context_code                 IN VARCHAR2
 ,x_segment_rule_type_code           IN VARCHAR2
 ,x_segment_rule_code                IN VARCHAR2
 ,x_transaction_coa_id               IN NUMBER
 ,x_accounting_coa_id                IN NUMBER
 ,x_flexfield_assign_mode_code       IN VARCHAR2
 ,x_flexfield_segment_code           IN VARCHAR2
 ,x_enabled_flag                     IN VARCHAR2
 ,x_flex_value_set_id                IN NUMBER
 ,x_name                             IN VARCHAR2
 ,x_description                      IN VARCHAR2
 ,x_last_update_date                  IN DATE
 ,x_last_updated_by                   IN NUMBER
 ,x_last_update_login                 IN NUMBER)

IS

l_log_module                    VARCHAR2(240);
Line: 346

  l_log_module := C_DEFAULT_MODULE||'.update_row';
Line: 350

  trace(p_msg    => 'BEGIN of procedure update_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 355

UPDATE xla_seg_rules_b
   SET
       last_update_date                 = x_last_update_date
      ,transaction_coa_id               = x_transaction_coa_id
      ,accounting_coa_id                = x_accounting_coa_id
      ,flexfield_assign_mode_code       = x_flexfield_assign_mode_code
      ,flexfield_segment_code           = x_flexfield_segment_code
      ,enabled_flag                     = x_enabled_flag
      ,flex_value_set_id                = x_flex_value_set_id
      ,updated_flag                     = 'Y'
      ,last_updated_by                  = x_last_updated_by
      ,last_update_login                = x_last_update_login
WHERE  application_id                   = X_application_id
  AND  amb_context_code                 = X_amb_context_code
  AND  segment_rule_type_code           = X_segment_rule_type_code
  AND  segment_rule_code                = X_segment_rule_code;
Line: 376

UPDATE xla_seg_rules_tl
SET
       last_update_date                 = x_last_update_date
      ,name                             = X_name
      ,description                      = X_description
      ,last_updated_by                  = x_last_updated_by
      ,last_update_login                = x_last_update_login
      ,source_lang                      = USERENV('LANG')
WHERE  application_id                   = X_application_id
  AND  amb_context_code                 = X_amb_context_code
  AND  segment_rule_type_code           = X_segment_rule_type_code
  AND  segment_rule_code                = X_segment_rule_code
  AND  USERENV('LANG')                 IN (language, source_lang);
Line: 395

  trace(p_msg    => 'END of procedure update_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 400

END update_row;
Line: 404

|  Procedure delete_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE delete_row
  (x_application_id                   IN NUMBER
  ,x_amb_context_code                 IN VARCHAR2
  ,x_segment_rule_type_code           IN VARCHAR2
  ,x_segment_rule_code                IN VARCHAR2)

IS

l_log_module                    VARCHAR2(240);
Line: 418

  l_log_module := C_DEFAULT_MODULE||'.delete_row';
Line: 422

  trace(p_msg    => 'BEGIN of procedure delete_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 427

DELETE FROM xla_seg_rules_tl
WHERE application_id                   = x_application_id
  AND amb_context_code                 = x_amb_context_code
  AND segment_rule_type_code           = x_segment_rule_type_code
  AND segment_rule_code                = x_segment_rule_code;
Line: 438

DELETE FROM xla_seg_rules_b
WHERE application_id                   = x_application_id
  AND amb_context_code                 = x_amb_context_code
  AND segment_rule_type_code           = x_segment_rule_type_code
  AND segment_rule_code                = x_segment_rule_code;
Line: 451

  trace(p_msg    => 'END of procedure delete_row',
        p_module => l_log_module,
        p_level  => C_LEVEL_PROCEDURE);
Line: 456

END delete_row;
Line: 480

DELETE FROM xla_seg_rules_tl T
WHERE  NOT EXISTS
      (SELECT NULL
       FROM   xla_seg_rules_b                    b
       WHERE  b.application_id                   = t.application_id
         AND  b.amb_context_code                 = t.amb_context_code
         AND  b.segment_rule_type_code           = t.segment_rule_type_code
         AND  b.segment_rule_code                = t.segment_rule_code);
Line: 489

UPDATE xla_seg_rules_tl   t
SET   (name
      ,description)
   = (SELECT b.name
            ,b.description
      FROM   xla_seg_rules_tl                   b
      WHERE  b.application_id                   = t.application_id
        AND  b.amb_context_code                 = t.amb_context_code
        AND  b.segment_rule_type_code           = t.segment_rule_type_code
        AND  b.segment_rule_code                = t.segment_rule_code
        AND  b.language                         = t.source_lang)
WHERE (t.application_id
      ,t.amb_context_code
      ,t.segment_rule_type_code
      ,t.segment_rule_code
      ,t.language)
    IN (SELECT subt.application_id
              ,subt.amb_context_code
              ,subt.segment_rule_type_code
              ,subt.segment_rule_code
              ,subt.language
        FROM   xla_seg_rules_tl                       subb
              ,xla_seg_rules_tl                       subt
        WHERE  subb.application_id                   = subt.application_id
         AND  subb.amb_context_code                  = subt.amb_context_code
         AND  subb.segment_rule_type_code            = subt.segment_rule_type_code
         AND  subb.segment_rule_code                 = subt.segment_rule_code
         AND  subb.language                         = subt.source_lang
         AND (SUBB.name                             <> SUBT.name
          OR  SUBB.description                      <> SUBT.description
          OR (subb.description                      IS NULL
         AND  subt.description                      IS NOT NULL)
          OR (subb.description                      IS NOT NULL
         AND  subt.description                      IS NULL)
      ))
;
Line: 526

INSERT INTO xla_seg_rules_tl
(last_update_login
,amb_context_code
,last_update_date
,last_updated_by
,created_by
,application_id
,segment_rule_type_code
,segment_rule_code
,name
,description
,creation_date
,language
,source_lang)
SELECT   /*+ ORDERED */
       b.last_update_login
      ,b.amb_context_code
      ,b.last_update_date
      ,b.last_updated_by
      ,b.created_by
      ,b.application_id
      ,b.segment_rule_type_code
      ,b.segment_rule_code
      ,b.name
      ,b.description
      ,b.creation_date
      ,l.language_code
      ,b.source_lang
FROM   xla_seg_rules_tl                 b
      ,fnd_languages                    l
WHERE  l.installed_flag                IN ('I', 'B')
  AND  b.language                       = userenv('LANG')
  AND  NOT EXISTS
      (SELECT NULL
       FROM   xla_seg_rules_tl                   t
       WHERE  t.application_id                   = b.application_id
         AND  t.amb_context_code                 = b.amb_context_code
         AND  t.segment_rule_type_code           = b.segment_rule_type_code
         AND  t.segment_rule_code                = b.segment_rule_code
         AND  t.language                         = l.language_code);
Line: 591

  ,p_last_update_date             IN VARCHAR2
  ,p_custom_mode                  IN VARCHAR2)
IS
  CURSOR c_app_id IS
  SELECT application_id
  FROM   fnd_application
  WHERE  application_short_name          = p_application_short_name;
Line: 603

  f_ludate                DATE;        -- entity update date in file
Line: 605

  db_ludate               DATE;        -- entity update date in db
Line: 623

  f_ludate := nvl(to_date(p_last_update_date, 'YYYY/MM/DD'), sysdate);
Line: 630

    SELECT last_updated_by, last_update_date
      INTO db_luby, db_ludate
      FROM xla_seg_rules_tl
     WHERE application_id          = l_application_id
       AND amb_context_code        = p_amb_context_code
       AND segment_rule_type_code  = p_segment_rule_type_code
       AND segment_rule_code       = p_segment_rule_code
       AND language                = userenv('LANG');
Line: 641

      UPDATE xla_seg_rules_tl
         SET name                    = p_name
            ,description             = p_description
            ,last_update_date        = f_ludate
            ,last_updated_by         = f_luby
            ,last_update_login       = 0
            ,source_lang             = userenv('LANG')
       WHERE userenv('LANG')         IN (language, source_lang)
         AND application_id          = l_application_id
         AND amb_context_code        = p_amb_context_code
         AND segment_rule_type_code  = p_segment_rule_type_code
         AND segment_rule_code       = p_segment_rule_code;