DBA Data[Home] [Help]

APPS.XLA_SOURCES_F_PKG SQL Statements

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

Line: 55

|  Procedure insert_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE insert_row
  (x_rowid                            IN OUT NOCOPY VARCHAR2
  ,x_application_id                   IN NUMBER
  ,x_source_code                      IN VARCHAR2
  ,x_source_type_code                 IN VARCHAR2
  ,x_plsql_function_name              IN VARCHAR2
  ,x_flex_value_set_id                IN NUMBER
  ,x_sum_flag                         IN VARCHAR2
  ,x_visible_flag                     IN VARCHAR2
  ,x_translated_flag                  IN VARCHAR2
  ,x_lookup_type                      IN VARCHAR2
  ,x_view_application_id              IN NUMBER
  ,x_datatype_code                    IN VARCHAR2
  ,x_enabled_flag                     IN VARCHAR2
  ,x_key_flexfield_flag               IN VARCHAR2
  ,x_segment_code                     IN VARCHAR2
  ,x_flexfield_application_id         IN NUMBER
  ,x_id_flex_code                     IN VARCHAR2
  ,x_name                             IN VARCHAR2
  ,x_description                      IN VARCHAR2
  ,x_source_column_name               IN VARCHAR2
  ,x_source_table_name                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_sources_b
WHERE  application_id                   = x_application_id
  AND  source_code                      = x_source_code
  AND  source_type_code                 = x_source_type_code
;
Line: 97

xla_utility_pkg.trace('> xla_sources_f_pkg.insert_row'                    ,20);
Line: 99

INSERT INTO xla_sources_b
(creation_date
,created_by
,plsql_function_name
,source_type_code
,application_id
,flex_value_set_id
,sum_flag
,visible_flag
,translated_flag
,lookup_type
,view_application_id
,datatype_code
,source_code
,enabled_flag
,key_flexfield_flag
,segment_code
,flexfield_application_id
,id_flex_code
,source_table_name
,source_column_name
,last_update_date
,last_updated_by
,last_update_login)
VALUES
(x_creation_date
,x_created_by
,x_plsql_function_name
,x_source_type_code
,x_application_id
,x_flex_value_set_id
,x_sum_flag
,x_visible_flag
,x_translated_flag
,x_lookup_type
,x_view_application_id
,x_datatype_code
,x_source_code
,x_enabled_flag
,x_key_flexfield_flag
,x_segment_code
,x_flexfield_application_id
,x_id_flex_code
,x_source_table_name
,x_source_column_name
,x_last_update_date
,x_last_updated_by
,x_last_update_login)
;
Line: 149

INSERT INTO xla_sources_tl
(name
,description
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,application_id
,source_type_code
,source_code
,language
,source_lang)
SELECT
       x_name
      ,x_description
      ,x_creation_date
      ,x_created_by
      ,x_last_update_date
      ,x_last_updated_by
      ,x_last_update_login
      ,x_application_id
      ,x_source_type_code
      ,x_source_code
      ,l.language_code
      ,USERENV('LANG')
FROM   fnd_languages l
WHERE  l.installed_flag                 IN ('I', 'B')
  AND  NOT EXISTS
      (SELECT NULL
       FROM   xla_sources_tl                     t
       WHERE  t.application_id                   = x_application_id
         AND  t.source_code                      = x_source_code
         AND  t.source_type_code                 = x_source_type_code
         AND  t.language                         = l.language_code);
Line: 194

xla_utility_pkg.trace('< xla_sources_f_pkg.insert_row'                    ,20);
Line: 199

      (p_location   => 'xla_sources_f_pkg.insert_row');
Line: 201

END insert_row;
Line: 232

SELECT plsql_function_name
      ,flex_value_set_id
      ,sum_flag
      ,visible_flag
      ,translated_flag
      ,lookup_type
      ,view_application_id
      ,datatype_code
      ,enabled_flag
      ,key_flexfield_flag
      ,segment_code
      ,flexfield_application_id
      ,id_flex_code
FROM   xla_sources_b
WHERE  application_id                   = x_application_id
  AND  source_code                      = x_source_code
  AND  source_type_code                 = x_source_type_code
FOR UPDATE OF application_id NOWAIT;
Line: 254

SELECT language
      ,name
      ,description
      ,DECODE(language     , USERENV('LANG'), 'Y', 'N') baselang
FROM   xla_sources_tl
WHERE  application_id                   = X_application_id
  AND  source_code                      = X_source_code
  AND  source_type_code                 = X_source_type_code
  AND  USERENV('LANG')                 IN (language     ,source_lang)
FOR UPDATE OF application_id NOWAIT;
Line: 302

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

|  Procedure update_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE update_row
 (x_application_id                   IN NUMBER
 ,x_source_code                      IN VARCHAR2
 ,x_source_type_code                 IN VARCHAR2
 ,x_plsql_function_name              IN VARCHAR2
 ,x_flex_value_set_id                IN NUMBER
 ,x_sum_flag                         IN VARCHAR2
 ,x_visible_flag                     IN VARCHAR2
 ,x_translated_flag                  IN VARCHAR2
 ,x_lookup_type                      IN VARCHAR2
 ,x_view_application_id              IN NUMBER
 ,x_datatype_code                    IN VARCHAR2
 ,x_enabled_flag                     IN VARCHAR2
  ,x_key_flexfield_flag               IN VARCHAR2
  ,x_segment_code                     IN VARCHAR2
  ,x_flexfield_application_id         IN NUMBER
  ,x_id_flex_code                     IN VARCHAR2
 ,x_name                             IN VARCHAR2
 ,x_description                      IN VARCHAR2
 ,x_source_column_name               IN VARCHAR2
 ,x_source_table_name                IN VARCHAR2
 ,x_last_update_date                  IN DATE
 ,x_last_updated_by                   IN NUMBER
 ,x_last_update_login                 IN NUMBER)

IS

BEGIN
xla_utility_pkg.trace('> xla_sources_f_pkg.update_row'                    ,20);
Line: 428

UPDATE xla_sources_b
   SET
       last_update_date                 = x_last_update_date
      ,plsql_function_name              = x_plsql_function_name
      ,flex_value_set_id                = x_flex_value_set_id
      ,sum_flag                         = x_sum_flag
      ,visible_flag                     = x_visible_flag
      ,translated_flag                  = x_translated_flag
      ,lookup_type                      = x_lookup_type
      ,view_application_id              = x_view_application_id
      ,datatype_code                    = x_datatype_code
      ,enabled_flag                     = x_enabled_flag
      ,key_flexfield_flag               = x_key_flexfield_flag
      ,segment_code                     = x_segment_code
      ,flexfield_application_id         = x_flexfield_application_id
      ,id_flex_code                     = x_id_flex_code
      ,source_column_name               = x_source_column_name
      ,source_table_name                = x_source_table_name
      ,last_updated_by                  = x_last_updated_by
      ,last_update_login                = x_last_update_login
WHERE  application_id                   = X_application_id
  AND  source_code                      = X_source_code
  AND  source_type_code                 = X_source_type_code;
Line: 456

UPDATE xla_sources_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  source_code                      = X_source_code
  AND  source_type_code                 = X_source_type_code
  AND  USERENV('LANG')                 IN (language, source_lang);
Line: 473

xla_utility_pkg.trace('< xla_sources_f_pkg.update_row'                    ,20);
Line: 474

END update_row;
Line: 478

|  Procedure delete_row                                                 |
|                                                                       |
+======================================================================*/
PROCEDURE delete_row
  (x_application_id                   IN NUMBER
  ,x_source_code                      IN VARCHAR2
  ,x_source_type_code                 IN VARCHAR2)

IS

BEGIN
xla_utility_pkg.trace('> xla_sources_f_pkg.delete_row'                    ,20);
Line: 490

DELETE FROM xla_sources_tl
WHERE application_id                   = x_application_id
  AND source_code                      = x_source_code
  AND source_type_code                 = x_source_type_code;
Line: 500

DELETE FROM xla_sources_b
WHERE application_id                   = x_application_id
  AND source_code                      = x_source_code
  AND source_type_code                 = x_source_type_code;
Line: 511

xla_utility_pkg.trace('< xla_sources_f_pkg.delete_row'                    ,20);
Line: 512

END delete_row;
Line: 526

DELETE FROM xla_sources_tl T
WHERE  NOT EXISTS
      (SELECT NULL
       FROM   xla_sources_b                      b
       WHERE  b.application_id                   = t.application_id
         AND  b.source_code                      = t.source_code
         AND  b.source_type_code                 = t.source_type_code);
Line: 534

UPDATE xla_sources_tl   t
SET   (name
      ,description)
   = (SELECT b.name
            ,b.description
      FROM   xla_sources_tl                     b
      WHERE  b.application_id                   = t.application_id
        AND  b.source_code                      = t.source_code
        AND  b.source_type_code                 = t.source_type_code
        AND  b.language                         = t.source_lang)
WHERE (t.application_id
      ,t.source_code
      ,t.source_type_code
      ,t.language)
    IN (SELECT subt.application_id
              ,subt.source_code
              ,subt.source_type_code
              ,subt.language
        FROM   xla_sources_tl                         subb
              ,xla_sources_tl                         subt
        WHERE  subb.application_id                   = subt.application_id
         AND  subb.source_code                       = subt.source_code
         AND  subb.source_type_code                  = subt.source_type_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: 567

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

  ,p_last_update_date                 IN VARCHAR2
  ,p_custom_mode                      IN VARCHAR2)
IS

  l_view_application_id   number(38);
Line: 646

  f_ludate                date;        -- entity update date in file
Line: 648

  db_ludate               date;        -- entity update date in db
Line: 652

  SELECT application_id
    FROM fnd_application
   WHERE application_short_name = p_appl_short_name;
Line: 658

  SELECT application_id
    FROM fnd_application
   WHERE application_short_name = p_view_appl_short_name;
Line: 664

  SELECT flex_value_set_id
    FROM fnd_flex_value_sets
   WHERE flex_value_set_name = p_flex_value_set_name;
Line: 670

  SELECT application_id
    FROM fnd_application
   WHERE application_short_name = p_flex_appl_short_name;
Line: 700

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

     SELECT last_updated_by, last_update_date
       INTO db_luby, db_ludate
       FROM xla_sources_vl
      WHERE application_id   = l_application_id
        AND source_code      = p_source_code
        AND source_type_code = p_source_type_code;
Line: 713

        xla_sources_f_pkg.update_row
          (x_application_id           => l_application_id
          ,x_source_code              => p_source_code
          ,x_source_type_code         => p_source_type_code
          ,x_plsql_function_name      => p_plsql_function_name
          ,x_flex_value_set_id        => l_flex_value_set_id
          ,x_sum_flag                 => p_sum_flag
          ,x_visible_flag             => p_visible_flag
          ,x_translated_flag          => p_translated_flag
          ,x_lookup_type              => p_lookup_type
          ,x_view_application_id      => l_view_application_id
          ,x_datatype_code            => p_datatype_code
          ,x_enabled_flag             => p_enabled_flag
          ,x_key_flexfield_flag       => p_key_flexfield_flag
          ,x_segment_code             => p_segment_code
          ,x_flexfield_application_id => l_flex_application_id
          ,x_id_flex_code             => p_id_flex_code
          ,x_name                     => p_name
          ,x_description              => p_description
          ,x_source_column_name       => p_source_column_name
          ,x_source_table_name        => p_source_table_name
          ,x_last_update_date         => f_ludate
          ,x_last_updated_by          => f_luby
          ,x_last_update_login        => 0);
Line: 743

       xla_sources_f_pkg.insert_row
         (x_rowid                => l_rowid
         ,x_application_id       => l_application_id
         ,x_source_code          => p_source_code
         ,x_source_type_code     => p_source_type_code
         ,x_plsql_function_name  => p_plsql_function_name
         ,x_flex_value_set_id    => l_flex_value_set_id
         ,x_sum_flag             => p_sum_flag
         ,x_visible_flag         => p_visible_flag
         ,x_translated_flag      => p_translated_flag
         ,x_lookup_type          => p_lookup_type
         ,x_view_application_id  => l_view_application_id
         ,x_datatype_code        => p_datatype_code
         ,x_enabled_flag         => p_enabled_flag
         ,x_key_flexfield_flag   => p_key_flexfield_flag
         ,x_segment_code         => p_segment_code
         ,x_flexfield_application_id => l_flex_application_id
         ,x_id_flex_code         => p_id_flex_code
         ,x_name                 => p_name
         ,x_description          => p_description
         ,x_source_column_name   => p_source_column_name
         ,x_source_table_name    => p_source_table_name
         ,x_creation_date        => f_ludate
         ,x_created_by           => f_luby
         ,x_last_update_date     => f_ludate
         ,x_last_updated_by      => f_luby
         ,x_last_update_login    => 0);
Line: 794

  ,p_last_update_date                 IN VARCHAR2
  ,p_custom_mode                      IN VARCHAR2)
IS

  l_view_application_id   number(38);
Line: 803

  f_ludate                date;        -- entity update date in file
Line: 805

  db_ludate               date;        -- entity update date in db
Line: 809

  SELECT application_id
    FROM fnd_application
   WHERE application_short_name = p_appl_short_name;
Line: 824

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

     SELECT last_updated_by, last_update_date
       INTO db_luby, db_ludate
       FROM xla_sources_tl
      WHERE application_id   = l_application_id
        AND source_code      = p_source_code
        AND source_type_code = p_source_type_code
        AND language         = userenv('LANG');
Line: 837

        UPDATE xla_sources_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 source_code       = p_source_code
           AND source_type_code  = p_source_type_code;