The following lines contain the word 'select', 'insert', 'update' or 'delete':
| 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 Made ffg changes for the bulk performance: |
| - Modified constants C_PACKAGE_SPEC, |
| C_PACKAGE_BODY_1, C_PACKAGE_BODY_2, |
| C_PRIVATE_API_1. |
| - Obsoleted the routines GetPackageName, |
| InitGlobalVariables |
| - Modified the routines GenerateBodyPackage|
| ,GeneratePrivateProcedures, GenerateBody,|
| CreateBodyPackage, Compile |
| 06-Oct-2004 K.Boussema Made changes for the Accounting Event Extract|
| Diagnostics feature. |
| 11-Jul-2005 A.Wan Changed for MPA 4262811 |
+===========================================================================*/
--
--+==========================================================================+
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| AAD templates/Global constants |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--| |
--+==========================================================================+
--
C_COMMENT CONSTANT VARCHAR2(2000) :=
'/'||'*======================================================================+
| Copyright (c) 1997 Oracle Corporation |
| Redwood Shores, CA, USA |
| All rights reserved. |
+=======================================================================+
| Package Name |
| $name
| |
| DESCRIPTION |
| Package generated From Product Accounting Definition |
| $pad_name$
| $pad_code$
| $pad_owner$
| $pad_version$
| $pad_context$
| HISTORY |
| $history
+=======================================================================*'||'/'
;
SELECT REPLACE(fat.application_name, '''','''''')
INTO l_application_name
FROM fnd_application_tl fat
WHERE fat.application_id = p_application_id
AND fat.language = nvl(USERENV('LANG'),fat.language)
;
(p_msg => 'SQL - Select from fnd_user'
,p_level => C_LEVEL_STATEMENT
,p_module => l_log_module);
SELECT nvl(fd.user_name, 'ANONYMOUS')
INTO l_user_name
FROM fnd_user fd
WHERE fd.user_id = xla_environment_pkg.g_Usr_Id
;
SELECT nvl(xprt.name, p_product_rule_code)
, nvl(p_product_rule_version,xprb.product_rule_version)
INTO l_product_rule_name
, g_ProductRuleVersion
FROM xla_product_rules_tl xprt
, xla_product_rules_b xprb
WHERE xprb.application_id = p_application_id
AND xprb.product_rule_code = p_product_rule_code
AND xprb.product_rule_type_code = p_product_rule_type_code
AND xprb.application_id = xprt.application_id (+)
AND xprb.product_rule_code = xprt.product_rule_code (+)
AND xprb.product_rule_type_code = xprt.product_rule_type_code (+)
AND xprb.amb_context_code = xprt.amb_context_code (+)
AND xprb.amb_context_code = p_amb_context_code
AND xprb.enabled_flag ='Y'
AND xprt.language(+) = USERENV('LANG')
;
FUNCTION InsertString( p_InputString IN VARCHAR2
, p_token IN VARCHAR2
, p_value IN VARCHAR2)
RETURN VARCHAR2
IS
l_OutputString VARCHAR2(2000);
END InsertString;
l_StringValue := InsertString( p_InputString => '$pkg_name'
,p_token => '$pkg_name'
,p_value => p_package_name
);
l_StringValue := InsertString(p_InputString => ' Name : $name '
,p_token => '$name'
,p_value => p_product_rule_name
);
l_StringValue := InsertString(p_InputString => ' Code : $code'
,p_token => '$code'
,p_value => p_product_rule_code
);
l_StringValue := InsertString(p_InputString => ' Code : $code'
,p_token => '$code'
,p_value => ' '
);
l_StringValue := InsertString(p_InputString => ' Owner : $owner'
,p_token => '$owner'
,p_value => 'PRODUCT'
);
l_StringValue := InsertString(p_InputString => ' Owner : $owner'
,p_token => '$owner'
,p_value => 'CUSTOMER'
);
l_StringValue := InsertString(p_InputString => ' Owner : $owner'
,p_token => '$owner'
,p_value => ' '
);
l_StringValue := InsertString(p_InputString => ' AMB Context Code: $context'
,p_token => '$context'
,p_value => p_amb_context_code
);
l_StringValue := InsertString(p_InputString => ' AMB Context Code : $context'
,p_token => '$context'
,p_value => ' '
);
l_StringValue := InsertString(p_InputString => ' Version : $version'
,p_token => '$version'
,p_value => g_ProductRuleVersion
);
l_StringValue := InsertString(p_InputString => ' Version : $version'
,p_token => '$version'
,p_value => ' '
);
l_StringValue := InsertString(p_InputString => l_StringValue
,p_token => '$user'
,p_value => p_user_name
);
DELETE xla_aad_sources
WHERE amb_context_code = p_amb_context_code
AND product_rule_type_code = p_product_rule_type_code
AND product_rule_code = p_product_rule_code;
INSERT INTO xla_aad_sources
(
APPLICATION_ID
,AMB_CONTEXT_CODE
,PRODUCT_RULE_TYPE_CODE
,PRODUCT_RULE_CODE
,ENTITY_CODE
,EVENT_CLASS_CODE
,SOURCE_CODE
,SOURCE_DATATYPE_CODE
,SOURCE_LEVEL_CODE
,EXTRACT_OBJECT_NAME
,EXTRACT_OBJECT_TYPE_CODE
,ALWAYS_POPULATED_FLAG
,COLUMN_DATATYPE_CODE
,SOURCE_HASH_ID
,SOURCE_APPLICATION_ID
,REFERENCE_OBJECT_FLAG
,JOIN_CONDITION
,CREATION_DATE
,CREATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_LOGIN
,PROGRAM_UPDATE_DATE
,PROGRAM_APPLICATION_ID
,PROGRAM_ID
,REQUEST_ID
)
SELECT
APPLICATION_ID
,p_amb_context_code
,p_product_rule_type_code
,p_product_rule_code
,ENTITY_CODE
,EVENT_CLASS_CODE
,SOURCE_CODE
,SOURCE_DATATYPE_CODE
,SOURCE_LEVEL_CODE
,EXTRACT_OBJECT_NAME
,EXTRACT_OBJECT_TYPE_CODE
,ALWAYS_POPULATED_FLAG
,COLUMN_DATATYPE_CODE
,SOURCE_HASH_ID
,SOURCE_APPLICATION_ID
,REFERENCE_OBJECT_FLAG
,JOIN_CONDITION
,SYSDATE
,xla_environment_pkg.g_usr_id
,SYSDATE
,xla_environment_pkg.g_usr_id
,xla_environment_pkg.g_login_id
,SYSDATE
,xla_environment_pkg.g_prog_appl_id
,xla_environment_pkg.g_prog_id
,xla_environment_pkg.g_Req_Id
FROM xla_evt_class_sources_gt;
SELECT CASE WHEN SUM(DECODE(NVL(xld.budgetary_control_flag,'N'),'N',1,0)) > 0
THEN 'Y'
ELSE 'N' END
,CASE WHEN SUM(DECODE(NVL(xld.budgetary_control_flag,'N'),'Y',1,0)) > 0
THEN 'Y'
ELSE 'N' END
FROM xla_aad_line_defn_assgns xald
, xla_line_definitions_b xld
WHERE xld.application_id = xald.application_id
AND xld.amb_context_code = xald.amb_context_code
AND xld.event_class_code = xald.event_class_code
AND xld.event_type_code = xald.event_type_code
AND xld.line_definition_owner_code = xald.line_definition_owner_code
AND xld.line_definition_code = xald.line_definition_code
AND xald.application_id = p_application_id
AND xald.amb_context_code = p_amb_context_code
AND xald.product_rule_type_code = p_product_rule_type_code
AND xald.product_rule_code = p_product_rule_code;
DELETE FROM xla_evt_class_sources_gt;
xla_amb_setup_err_pkg.insert_errors;
xla_amb_setup_err_pkg.insert_errors;