The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT multi_org_flag
INTO l_multi_org_enabled
FROM fnd_product_groups
WHERE product_group_id = 1;
SELECT count(*)
INTO l_count
FROM hr_organization_information
WHERE org_information_context = 'Operating Unit Information'
AND TO_NUMBER(trim(org_information3)) = p_reporting_entity_id;
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' , TO_NUMBER(trim(org_information3))
, '3000' , organization_id ) =
p_reporting_entity_id )
LOOP
l_pred := l_pred||', '||l_org_rec.organization_id;
( SELECT organization_id
FROM hr_organization_information
WHERE org_information_context = 'Operating Unit Information'
AND DECODE( p_reporting_level
, '1000' , TO_NUMBER(trim(org_information3))
, '3000' , organization_id ) =
p_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''';
ELSIF ( p_reporting_level = '1000' AND l_pred_type = 'IN_SELECT'
)
THEN
l_pred :=
' AND (NVL(/*ALIAS*/org_id, -99) IN '
||'( SELECT -99'
|| ' FROM DUAL'
|| ' UNION'
|| ' SELECT /*HINT*/ organization_id'
|| ' FROM hr_organization_information'
|| ' WHERE org_information_context = ''Operating Unit Information''';
SELECT meaning
INTO l_reporting_level_name
FROM fnd_lookups
WHERE lookup_type = 'FND_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 = 'FND_MO_REPORTING_LEVEL'
AND lookup_code = x_reporting_level
AND TO_NUMBER(trim(lookup_code)) >=
TO_NUMBER(trim(x_top_reporting_level));
SELECT 1
FROM FND_MO_REPORTING_ENTITIES_V
WHERE reporting_level = p_reporting_level
AND DECODE( fnd_profile.value_wnps('FND_MO_TOP_REPORTING_LEVEL')
, '1000', ledger_id
, '3000', operating_unit_id) =
( SELECT DECODE( fnd_profile.value_wnps('FND_MO_TOP_REPORTING_LEVEL')
, '1000', TO_NUMBER(trim(org_information3))
, '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;