The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT meaning
INTO l_reporting_level_name
FROM fnd_lookups
WHERE lookup_type = 'XLA_MO_REPORTING_LEVEL'
AND lookup_code = g_reporting_level;
SELECT name
INTO l_reporting_entity_name
FROM gl_sets_of_books
WHERE set_of_books_id = g_reporting_entity_id;
SELECT name
INTO l_reporting_entity_name
FROM hr_all_organization_units
WHERE organization_id = g_reporting_entity_id;
SELECT 1
FROM fnd_lookups lp
WHERE lookup_type = 'XLA_MO_REPORTING_LEVEL'
AND lookup_code = x_reporting_level
AND TO_NUMBER(lookup_code) >=
TO_NUMBER(x_top_reporting_level);
SELECT 1
FROM XLA_MO_REPORTING_ENTITIES_V
WHERE reporting_level = p_reporting_level
/* Commented out NOCOPY the code below, since it does not work for reporting set
of books. Intead, making a call to validate_reporting_level to make sure
that p_reporting_level value is within the allowed value for profile option
value for MO: Top Reporting Level.
AND DECODE( fnd_profile.value_wnps('XLA_MO_TOP_REPORTING_LEVEL')
, '1000', set_of_books_id
, '2000', legal_entity_id
, '3000', operating_unit_id) =
( SELECT DECODE( fnd_profile.value_wnps('XLA_MO_TOP_REPORTING_LEVEL')
, '1000', TO_NUMBER(org_information3)
, '2000', TO_NUMBER(org_information2)
, '3000', organization_id )
FROM hr_organization_information
WHERE organization_id = fnd_profile.value_wnps('ORG_ID')
AND org_information_context = 'Operating Unit Information'
)
*/
AND entity_id = x_reporting_entity_id;
SELECT nvl(multi_org_flag, 'N')
INTO l_multi_org_enabled
FROM fnd_product_groups
WHERE product_group_id = 1;
SELECT /*+ INDEX(HR_ORGANIZATION_INFORMATION HR_ORGANIZATION_INFORMATIO_FK1) */ count(*)
INTO l_count
FROM hr_organization_information
WHERE org_information_context = 'Operating Unit Information'
AND DECODE( p_reporting_level
, '1000' , org_information3
, '2000' , org_information2) =
to_char(l_reporting_entity_id); -- bug 9108714
OR p_pred_type = 'IN_SELECT'
OR p_pred_type = 'IN_LIST'
)
THEN
l_pred_type := p_pred_type;
(SELECT organization_id
FROM hr_organization_information
WHERE org_information_context = 'Operating Unit Information'
AND DECODE( p_reporting_level
, '1000' , org_information3
, '2000' , org_information2
) = to_char(l_reporting_entity_id) )
LOOP
l_pred := l_pred || l_org_rec.organization_id || ',';
||'( SELECT /*HINT*/ 1'
|| ' FROM hr_organization_information org_info'
|| ' WHERE /*ALIAS*/org_id = org_info.organization_id'
|| ' AND org_info.org_information_context = ''Operating Unit Information''';
||'( SELECT /*HINT*/ 1'
|| ' FROM hr_organization_information org_info'
|| ' WHERE /*ALIAS*/org_id = org_info.organization_id'
|| ' AND org_info.org_information_context = ''Operating Unit Information''';
AND l_pred_type = 'IN_SELECT' ) THEN
IF (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
FND_LOG.STRING(FND_LOG.LEVEL_EVENT,
'xla.plsql.XLA_MO_REPORTING_API.INITIALIZE.pred_text',
'Generating IN_SELECT predicate for reporting level 1000/2000');
||'( SELECT -99'
|| ' FROM DUAL'
|| ' UNION'
|| ' SELECT /*HINT*/ organization_id'
|| ' FROM hr_organization_information'
|| ' WHERE org_information_context = ''Operating Unit Information''';
||'( SELECT /*HINT*/ organization_id'
|| ' FROM hr_organization_information'
|| ' WHERE org_information_context = ''Operating Unit Information''';