The following lines contain the word 'select', 'insert', 'update' or 'delete':
| 24-JUL-2003 K.Boussema Updated the error messages |
| 30-JUL-2003 K.Boussema Updated the definition of C_FLEXFIELD_SEGMENT|
| 01-SEP-2003 K.Boussema Changed the generation of Description function|
| 19-NOV-2003 K.boussema Changed generate_body_desc to order the Journal Entry|
| description by user_sequence, bug 3266183 |
| 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 |
| 20-Sep-2004 S.Singhania Added debug messages to GenerateDescriptions |
| 07-Mar-2005 K.Boussema Changed for ADR-enhancements. |
| 11-Jul-2005 A.Wan Changed for MPA. |
+===========================================================================*/
/*------------------------------------------------------------+
| |
| Description function template |
| |
+------------------------------------------------------------*/
C_DESC_PROC CONSTANT VARCHAR2(20000):= '
---------------------------------------
--
-- PRIVATE FUNCTION
-- Description_$desc_hash_id$
--
---------------------------------------
FUNCTION Description_$desc_hash_id$ (
p_application_id IN NUMBER
, p_ae_header_id IN NUMBER DEFAULT NULL $parameters$
)
RETURN VARCHAR2
IS
l_component_type VARCHAR2(80) ;
FOR desc_details_rec IN (SELECT description_detail_id
, value_type_code
, source_code
, source_type_code
, source_application_id
, flexfield_segment_code
, display_description_flag
, user_sequence
FROM xla_descript_details_b
WHERE description_prio_id = p_description_prio_id
ORDER BY user_sequence ) LOOP
l_desc_detail := NULL;
FOR literals_rec IN (SELECT xddt.language language
, REPLACE(xddt.literal, '''','''''') literal
FROM xla_descript_details_tl xddt
WHERE xddt.description_detail_id = desc_details_rec.description_detail_id
AND xddt.literal IS NOT NULL ) LOOP
IF l_first THEN
l_desc_detail := l_desc_detail || g_chr_newline ||' IF '|| C_LITERAL_DESC ;
FOR desc_rec IN (SELECT description_prio_id
, user_sequence
FROM xla_desc_priorities
WHERE application_id = p_application_id
AND description_code = p_description_code
AND description_type_code = p_description_type_code
AND amb_context_code = p_amb_context_code
ORDER BY user_sequence) LOOP
l_desc_detail:= NULL;
SELECT
xpah.description_code
, xpah.description_type_code
, REPLACE( xdtl.name , '''','''''')
FROM xla_prod_acct_headers xpah
, xla_descriptions_tl xdtl
, xla_descriptions_b xdb
, xla_aad_line_defn_assgns xald
, xla_line_definitions_b xld
WHERE xpah.application_id = p_application_id
AND xpah.product_rule_type_code = p_product_rule_type_code
AND xpah.product_rule_code = p_product_rule_code
AND xpah.amb_context_code = p_amb_context_code
AND xpah.application_id = xdb.application_id
AND xpah.amb_context_code = xdb.amb_context_code
AND xpah.description_type_code = xdb.description_type_code
AND xpah.description_code = xdb.description_code
AND xpah.application_id = xdtl.application_id (+)
AND xpah.amb_context_code = xdtl.amb_context_code (+)
AND xpah.description_type_code = xdtl.description_type_code (+)
AND xpah.description_code = xdtl.description_code (+)
AND xpah.accounting_required_flag = 'Y'
AND xpah.validation_status_code = 'R'
AND xdtl.language (+) = USERENV('LANG')
AND xpah.description_code IS NOT NULL
AND xald.application_id = xpah.application_id
AND xald.amb_context_code = xpah.amb_context_code
AND xald.event_class_code = xpah.event_class_code
AND xald.event_type_code = xpah.event_type_code
AND xald.product_rule_type_code = xpah.product_rule_type_code
AND xald.product_rule_code = xpah.product_rule_code
AND xald.application_id = xld.application_id
AND xald.amb_context_code = xld.amb_context_code
AND xald.event_class_code = xld.event_class_code
AND xald.event_type_code = xld.event_type_code
AND xald.line_definition_owner_code = xld.line_definition_owner_code
AND xald.line_definition_code = xld.line_definition_code
AND xld.budgetary_control_flag = XLA_CMP_PAD_PKG.g_bc_pkg_flag
GROUP BY xpah.description_code, xpah.description_type_code, xdtl.name
)
UNION
--line description
(
SELECT
xldj.description_code
, xldj.description_type_code
, REPLACE(xdtl.name , '''','''''')
FROM xla_aad_line_defn_assgns xald
, xla_line_defn_jlt_assgns xldj
, xla_prod_acct_headers xpah
, xla_descriptions_tl xdtl
, xla_descriptions_b xdb
, xla_line_definitions_b xld
WHERE xpah.application_id = p_application_id
AND xpah.amb_context_code = p_amb_context_code
AND xpah.product_rule_type_code = p_product_rule_type_code
AND xpah.product_rule_code = p_product_rule_code
AND xpah.accounting_required_flag = 'Y'
AND xpah.validation_status_code = 'R'
--
AND xald.application_id = xpah.application_id
AND xald.amb_context_code = xpah.amb_context_code
AND xald.event_class_code = xpah.event_class_code
AND xald.event_type_code = xpah.event_type_code
AND xald.product_rule_type_code = xpah.product_rule_type_code
AND xald.product_rule_code = xpah.product_rule_code
--
AND xldj.application_id = xald.application_id
AND xldj.amb_context_code = xald.amb_context_code
AND xldj.event_class_code = xald.event_class_code
AND xldj.event_type_code = xald.event_type_code
AND xldj.line_definition_owner_code = xald.line_definition_owner_code
AND xldj.line_definition_code = xald.line_definition_code
AND xldj.active_flag = 'Y'
AND xldj.description_code IS NOT NULL
--
AND xldj.application_id = xdtl.application_id (+)
AND xldj.amb_context_code = xdtl.amb_context_code (+)
AND xldj.description_type_code = xdtl.description_type_code (+)
AND xldj.description_code = xdtl.description_code (+)
AND xdtl.language (+) = USERENV('LANG')
--
AND xldj.application_id = xdb.application_id
AND xldj.amb_context_code = xdb.amb_context_code
AND xldj.description_type_code = xdb.description_type_code
AND xldj.description_code = xdb.description_code
AND xdb.enabled_flag = 'Y'
--
AND xald.application_id = xld.application_id
AND xald.amb_context_code = xld.amb_context_code
AND xald.event_class_code = xld.event_class_code
AND xald.event_type_code = xld.event_type_code
AND xald.line_definition_owner_code = xld.line_definition_owner_code
AND xald.line_definition_code = xld.line_definition_code
AND xld.budgetary_control_flag = XLA_CMP_PAD_PKG.g_bc_pkg_flag
GROUP BY xldj.description_code, xldj.description_type_code, xdtl.name
)
UNION -- 4262811
-- mpa header description
(
SELECT
xldj.mpa_header_desc_code
, xldj.mpa_header_desc_type_code
, REPLACE(xdtl.name , '''','''''')
FROM xla_prod_acct_headers xpah
, xla_aad_line_defn_assgns xald
, xla_line_defn_jlt_assgns xldj
, xla_descriptions_tl xdtl
, xla_descriptions_b xdb
, xla_line_definitions_b xld
WHERE xpah.application_id = p_application_id
AND xpah.amb_context_code = p_amb_context_code
AND xpah.product_rule_type_code = p_product_rule_type_code
AND xpah.product_rule_code = p_product_rule_code
AND xpah.accounting_required_flag = 'Y'
AND xpah.validation_status_code = 'R'
--
AND xald.application_id = xpah.application_id
AND xald.amb_context_code = xpah.amb_context_code
AND xald.event_class_code = xpah.event_class_code
AND xald.event_type_code = xpah.event_type_code
AND xald.product_rule_type_code = xpah.product_rule_type_code
AND xald.product_rule_code = xpah.product_rule_code
--
AND xldj.application_id = xald.application_id
AND xldj.amb_context_code = xald.amb_context_code
AND xldj.event_class_code = xald.event_class_code
AND xldj.event_type_code = xald.event_type_code
AND xldj.line_definition_owner_code = xald.line_definition_owner_code
AND xldj.line_definition_code = xald.line_definition_code
AND xldj.active_flag = 'Y'
AND xldj.mpa_header_desc_code IS NOT NULL
--
AND xldj.application_id = xdtl.application_id (+)
AND xldj.amb_context_code = xdtl.amb_context_code (+)
AND xldj.mpa_header_desc_type_code = xdtl.description_type_code (+)
AND xldj.mpa_header_desc_code = xdtl.description_code (+)
AND xdtl.language (+) = USERENV('LANG')
--
AND xldj.application_id = xdb.application_id
AND xldj.amb_context_code = xdb.amb_context_code
AND xldj.mpa_header_desc_type_code = xdb.description_type_code
AND xldj.mpa_header_desc_code = xdb.description_code
AND xdb.enabled_flag = 'Y'
--
AND xald.application_id = xld.application_id
AND xald.amb_context_code = xld.amb_context_code
AND xald.event_class_code = xld.event_class_code
AND xald.event_type_code = xld.event_type_code
AND xald.line_definition_owner_code = xld.line_definition_owner_code
AND xald.line_definition_code = xld.line_definition_code
AND xld.budgetary_control_flag = XLA_CMP_PAD_PKG.g_bc_pkg_flag
)
UNION -- 4262811
-- mpa line description
(
SELECT
xmja.description_code
, xmja.description_type_code
, REPLACE(xdtl.name , '''','''''')
FROM xla_prod_acct_headers xpah
, xla_aad_line_defn_assgns xald
, xla_mpa_jlt_assgns xmja
, xla_line_defn_jlt_assgns xldj
, xla_descriptions_tl xdtl
, xla_descriptions_b xdb
, xla_line_definitions_b xld
WHERE xpah.application_id = p_application_id
AND xpah.amb_context_code = p_amb_context_code
AND xpah.product_rule_type_code = p_product_rule_type_code
AND xpah.product_rule_code = p_product_rule_code
AND xpah.accounting_required_flag = 'Y'
AND xpah.validation_status_code = 'R'
--
AND xald.application_id = xpah.application_id
AND xald.amb_context_code = xpah.amb_context_code
AND xald.event_class_code = xpah.event_class_code
AND xald.event_type_code = xpah.event_type_code
AND xald.product_rule_type_code = xpah.product_rule_type_code
AND xald.product_rule_code = xpah.product_rule_code
--
AND xmja.application_id = xald.application_id
AND xmja.amb_context_code = xald.amb_context_code
AND xmja.event_class_code = xald.event_class_code
AND xmja.event_type_code = xald.event_type_code
AND xmja.line_definition_owner_code = xald.line_definition_owner_code
AND xmja.line_definition_code = xald.line_definition_code
AND xmja.description_code IS NOT NULL
--
AND xldj.application_id = xmja.application_id
AND xldj.amb_context_code = xmja.amb_context_code
AND xldj.event_class_code = xmja.event_class_code
AND xldj.event_type_code = xmja.event_type_code
AND xldj.line_definition_owner_code = xmja.line_definition_owner_code
AND xldj.line_definition_code = xmja.line_definition_code
AND xldj.active_flag = 'Y'
--
AND xmja.application_id = xdtl.application_id (+)
AND xmja.amb_context_code = xdtl.amb_context_code (+)
AND xmja.description_type_code = xdtl.description_type_code (+)
AND xmja.description_code = xdtl.description_code (+)
AND xdtl.language (+) = USERENV('LANG')
--
AND xmja.application_id = xdb.application_id
AND xmja.amb_context_code = xdb.amb_context_code
AND xmja.description_type_code = xdb.description_type_code
AND xmja.description_code = xdb.description_code
AND xdb.enabled_flag = 'Y'
--
AND xald.application_id = xld.application_id
AND xald.amb_context_code = xld.amb_context_code
AND xald.event_class_code = xld.event_class_code
AND xald.event_type_code = xld.event_type_code
AND xald.line_definition_owner_code = xld.line_definition_owner_code
AND xald.line_definition_code = xld.line_definition_code
AND xld.budgetary_control_flag = XLA_CMP_PAD_PKG.g_bc_pkg_flag
)
;