The following lines contain the word 'select', 'insert', 'update' or 'delete':
| 19-NOV-2003 K.Boussema Updated the function InsertDerivedSource to |
| fix bug 3263242 |
| 20-NOV-2003 K.Boussema Changed to fix bug 3266355 and bug 3269101 |
| 18-DEC-2003 K.Boussema Changed to fix bug 3042840,3307761,3268940 |
| 3310291 and 3320689 |
| 23-FEB-2004 K.Boussema Made changes for the FND_LOG. |
| 12-MAR-2004 K.Boussema Changed to incorporate the select of lookups |
| from the extract objects |
| 22-MAR-2004 K.Boussema Added a parameter p_module to the TRACE calls|
| and the procedure. |
| 11-MAY-2004 K.Boussema Removed the call to XLA trace routine from |
| trace() procedure |
| 02-JUN-2004 A.Quaglia Added get_obj_parm_for_tab |
| Modified GetObjParm |
| 21-Sep-2004 S.Singhania Made ffg changes for the Bulk Performance: |
| - Modified routines GetStandardSource and |
| GetMeaningSource. |
| 06-Oct-2004 K.Boussema Made changes for the Accounting Event Extract|
| Diagnostics feature. |
| 07-Mar-2005 K.Boussema Changed for ADR-enhancements. |
| 18-Oct-2012 VKANTETI Bug 14756735 - Added distinct to the query |
| in get_meaning_statement function |
+===========================================================================*/
--
--
--+==========================================================================+
--| |
--| Global CONSTANTS |
--| |
--+==========================================================================+
--
--
g_chr_newline CONSTANT VARCHAR2(10):= xla_environment_pkg.g_chr_newline;
SELECT DISTINCT
xsp.ref_source_application_id
, xsp.ref_source_type_code
, xsp.ref_source_code
, xsp.parameter_type_code
, xsp.constant_value
, xsp.user_sequence
FROM xla_source_params xsp
WHERE xsp.source_code = p_source_code
AND xsp.source_type_code = p_source_type_code
AND xsp.application_id = p_source_application_id
ORDER BY user_sequence
;
SELECT DISTINCT
xsp.ref_source_application_id
, xsp.ref_source_type_code
, xsp.ref_source_code
FROM xla_source_params xsp
WHERE xsp.source_code = p_source_code
AND xsp.source_type_code = p_source_type_code
AND xsp.application_id = p_source_application_id
AND xsp.parameter_type_code = 'S' --not constant
AND xsp.ref_source_application_id IS NOT NULL
AND xsp.ref_source_type_code IS NOT NULL
AND xsp.ref_source_code IS NOT NULL
;
SELECT DISTINCT
xsb.source_code
, xsb.source_type_code
, xsb.application_id
, xst.name
, xsb.datatype_code
, xsb.plsql_function_name
, xsb.flex_value_set_id
, xsb.translated_flag
, xsb.lookup_type
, xsb.view_application_id
, xsb.key_flexfield_flag
, xsb.flexfield_application_id
, DECODE (xsb.flexfield_application_id
, NULL, NULL
, fnd.application_short_name )
, xsb.id_flex_code
, xsb.segment_code
INTO p_rec_sources.array_source_code(l_position)
, p_rec_sources.array_source_type_code(l_position)
, p_rec_sources.array_application_id(l_position)
, p_rec_sources.array_source_name(l_position)
, p_rec_sources.array_datatype_code(l_position)
, p_rec_sources.array_plsql_function(l_position)
, p_rec_sources.array_flex_value_set_id(l_position)
, p_rec_sources.array_translated_flag(l_position)
, p_rec_sources.array_lookup_type(l_position)
, p_rec_sources.array_view_application_id(l_position)
, p_rec_sources.array_key_flexfield_flag(l_position)
, p_rec_sources.array_flexfield_appl_id(l_position)
, p_rec_sources.array_appl_short_name(l_position)
, p_rec_sources.array_id_flex_code(l_position)
, p_rec_sources.array_segment_code (l_position)
FROM xla_sources_b xsb
, xla_sources_tl xst
, fnd_application fnd
WHERE xsb.source_code = p_source_code
AND xsb.source_type_code = p_source_type_code
AND xsb.application_id = p_source_application_id
AND xsb.source_code = xst.source_code
AND xsb.source_type_code = xst.source_type_code
AND xsb.application_id = xst.application_id (+)
AND xst.language (+)= USERENV('LANG')
AND xsb.enabled_flag = 'Y'
AND nvl(xsb.flexfield_application_id,p_source_application_id) = fnd.application_id (+)
;
SELECT DISTINCT
xsp.ref_source_application_id
, xsp.ref_source_type_code
, xsp.ref_source_code
FROM xla_source_params xsp
WHERE xsp.source_code = p_source_code
AND xsp.source_type_code = p_source_type_code
AND xsp.application_id = p_source_application_id
AND xsp.parameter_type_code = 'S'
AND xsp.ref_source_application_id IS NOT NULL
AND xsp.ref_source_type_code IS NOT NULL
AND xsp.ref_source_code IS NOT NULL
;
SELECT id_column_name
INTO l_id_column_name
FROM fnd_flex_validation_tables
WHERE flex_value_set_id = p_flex_value_set_id;
SELECT validation_type
INTO l_validation_type
FROM fnd_flex_value_sets
WHERE flex_value_set_id = p_flex_value_set_id;
l_statement_run := 'SELECT flex_value_meaning'
|| xla_environment_pkg.g_chr_newline
|| ' INTO l_meaning_meaning'
|| xla_environment_pkg.g_chr_newline
|| ' FROM fnd_flex_values_vl'
|| xla_environment_pkg.g_chr_newline
||' WHERE flex_value_set_id = p_flex_value_set_id'
|| xla_environment_pkg.g_chr_newline
|| ' AND flex_value = p_flex_value'
|| xla_environment_pkg.g_chr_newline
|| ' ;'
SELECT additional_where_clause
, value_column_name
, application_table_name
, id_column_name
INTO l_additional_where_clause
, l_value_column_name
, l_application_table_name
, l_id_column_name
FROM fnd_flex_validation_tables
WHERE flex_value_set_id = p_flex_value_set_id;
l_statement:= 'SELECT distinct '|| l_value_column_name --14756735
|| xla_environment_pkg.g_chr_newline
|| ' INTO l_meaning_meaning'
|| xla_environment_pkg.g_chr_newline
|| ' FROM '||l_application_table_name
|| xla_environment_pkg.g_chr_newline
|| ' WHERE '||l_id_column_name || ' = p_flex_value'
|| xla_environment_pkg.g_chr_newline
|| ' ;'
l_statement:= 'SELECT distinct '||l_value_column_name --14756735
|| xla_environment_pkg.g_chr_newline
|| ' INTO l_meaning_meaning'
|| xla_environment_pkg.g_chr_newline
|| ' FROM '||l_application_table_name
|| xla_environment_pkg.g_chr_newline
|| ' WHERE '||l_id_column_name || ' = p_flex_value'
|| ' AND '||l_additional_where_clause
|| ' ;'