The following lines contain the word 'select', 'insert', 'update' or 'delete':
select nvl(to_char(min(ent_period_id)),fii_gl_util_pkg.g_month_id) into l_time_parameter
from fii_time_ent_period
where fii_gl_util_pkg.g_as_of_date between start_date and end_date;
SELECT
FII_MEASURE1,
:MGR_ID FII_MEASURE4,
:CCC_ID FII_MEASURE5,
:CURRENCY FII_MEASURE6,
:FIN_ID FII_MEASURE7,
:MONTH_ID FII_MEASURE8,
FII_MEASURE3,
SUM(FII_MEASURE2) FII_MEASURE2,
:LOB_ID FII_ATTRIBUTE2,
CASE WHEN je_source_name = ''Payables'' AND :FIN_TYPE = ''OE''
THEN ''pFunctionName=FII_GL_INV_EXP_DET_R&pParamIds=Y'' ELSE
CASE WHEN je_source_name = ''Payables'' AND :FIN_TYPE = ''CGS''
THEN ''pFunctionName=FII_GL_INV_COR_DET_R&pParamIds=Y'' ELSE
CASE WHEN je_source_name = ''Receivables'' AND FII_MEASURE3 <>
'''||'''||user_je_source_name||'' ''||'''||l_source_misc||'''||'''||'''
AND :FIN_TYPE = ''R''
THEN ''pFunctionName=FII_GL_INV_REV_DET_R&pParamIds=Y''
ELSE
''''
end
end
end FII_URL
FROM (
SELECT
f.je_source FII_MEASURE1,
DECODE(src.je_source_name, ''Receivables'', DECODE(f.je_category,
''Misc Receipts'', '''||'''||src.user_je_source_name||'' ''
||'''||l_source_misc||'''||'''||''',
src.user_je_source_name), src.user_je_source_name) FII_MEASURE3,
SUM('||l_sign||l_amount_col||') FII_MEASURE2,
src.je_source_name je_source_name,
src.user_je_source_name user_je_source_name
FROM fii_gl_je_summary_b f,
fii_com_cc_mappings m,
fii_fin_cat_mappings c,
fii_time_rpt_struct cal,
gl_je_sources_tl src,
fii_cc_mgr_hierarchies h
'||fii_gl_util_pkg.g_lob_from_clause||'
WHERE f.company_id = m.company_id
AND f.cost_center_id = m.cost_center_id
AND m.valid_mgr_flag = ''Y''
AND c.child_fin_cat_id = f.fin_category_id
AND src.je_source_name = f.je_source
AND h.mgr_id = &HRI_PERSON+HRI_PER_USRDR_H
AND h.emp_id = m.manager_id
AND f.period_type_id = cal.period_type_id
AND cal.time_id = f.time_id
AND cal.report_date = to_date(:P_AS_OF, ''DD-MM-YYYY'')
AND BITAND(cal.record_type_id, :BITMASK)= cal.record_type_id
'||l_ccc_join||l_lob_join||'
AND src.language = userenv(''LANG'')
AND f.company_id = m.company_id
AND f.cost_center_id = m.cost_center_id
AND c.child_fin_cat_id = f.fin_category_id
AND c.parent_fin_cat_id = &FINANCIAL ITEM+GL_FII_FIN_ITEM
GROUP BY f.je_source, src.user_je_source_name,
src.je_source_name,f.je_category)
GROUP BY FII_MEASURE1, FII_MEASURE3, je_source_name,user_je_source_name ';
' select f.je_source FII_MEASURE1,
:MGR_ID FII_MEASURE4,
:CCC_ID FII_MEASURE5,
:CURRENCY FII_MEASURE6,
:FIN_ID FII_MEASURE7,
:MONTH_ID FII_MEASURE8,
src.user_je_source_name FII_MEASURE3,
sum(f.actual_g) FII_MEASURE2,
:LOB_ID FII_ATTRIBUTE2,
case when src.je_source_name = ''Payables'' and :FIN_TYPE = ''OE''
then ''pFunctionName=FII_GL_INV_EXP_DET_R&pParamIds=Y'' else
case when src.je_source_name = ''Payables'' and :FIN_TYPE = ''CGS''
then ''pFunctionName=FII_GL_INV_COR_DET_R&pParamIds=Y'' else
case when src.je_source_name = ''Receivables'' and :FIN_TYPE = ''R''
then ''pFunctionName=FII_GL_INV_REV_DET_R&pParamIds=Y''
else
''''
end
end
end FII_URL
from fii_gl_base_v'|| fii_gl_util_pkg.g_global_curr_view ||' f,
fii_time_rpt_struct cal,
gl_je_sources_tl src,
fii_cc_mgr_hierarchies h
'||fii_gl_util_pkg.g_non_ag_cat_from_clause||fii_gl_util_pkg.g_lob_from_clause||'
where src.je_source_name = f.je_source
and h.mgr_id = &HRI_PERSON+HRI_PER_USRDR_H
and h.emp_id = f.manager_id
and f.period_type_id = cal.period_type_id
and cal.time_id = f.time_id
and cal.report_date = to_date(:P_AS_OF, ''DD-MM-YYYY'')
and bitand(cal.record_type_id, :BITMASK)= cal.record_type_id
'||fii_gl_util_pkg.g_non_ag_cat_join||fii_gl_util_pkg.g_ccc_join||fii_gl_util_pkg.g_lob_join||'
and src.language = userenv(''LANG'')
group by f.je_source, src.user_je_source_name, src.je_source_name';
SELECT inline.invoice_num FII_MEASURE1,
inline.invoice_date FII_MEASURE2,
ai.description FII_MEASURE3,
pov.vendor_name FII_MEASURE4,
inline.actual_g FII_MEASURE5,
inline.gt_actual_g FII_ATTRIBUTE1
FROM po_vendors pov,
ap_invoices_all ai,
( SELECT F.invoice_num invoice_num,
F.invoice_date invoice_date,
F.supplier_id supplier_id,
F.invoice_id invoice_id,
SUM('||l_prim_sec||') actual_g,
SUM(SUM('||l_prim_sec||')) OVER() gt_actual_g
FROM FII_AP_INV_B F,
FII_Fin_Cat_Mappings FI,
FII_Fin_Item_Hierarchies HIER,
GL_Import_References GIR,
FII_GL_Processed_Header_IDS PH
' || l_from_clause || '
WHERE HIER.Parent_Fin_Cat_ID = &FINANCIAL ITEM+GL_FII_FIN_ITEM
AND HIER.Child_Fin_Cat_ID = FI.Parent_Fin_Cat_ID
and f.account_date between to_date(:P_DET_START, ''DD-MM-YYYY'') and to_date(:P_DET_END, ''DD-MM-YYYY'')
AND FI.Child_Fin_Cat_ID = F.Fin_Category_ID
' || l_lob_join || l_ccc_join || '
AND F.GL_SL_Link_ID = GIR.Gl_SL_Link_ID
AND F.GL_SL_Link_Table = GIR.GL_SL_Link_Table
AND GIR.JE_Header_ID = PH.JE_Header_ID
GROUP BY F.invoice_num, F.invoice_id, F.supplier_id, F.invoice_date ) inline
WHERE inline.supplier_id=pov.vendor_id
AND inline.invoice_id=ai.invoice_id';
select fnd1.flex_value FII_MEASURE1,
inline.fin_category_id FII_MEASURE2,
fnd.description FII_MEASURE3,
cust.party_name FII_MEASURE4,
inline.invoice_number FII_MEASURE5,
inline.invoice_date FII_MEASURE6,
inline.sum_actual_g FII_MEASURE7,
inline.gt_actual_g FII_ATTRIBUTE1
from hz_parties cust,
fnd_flex_values_tl fnd,
fnd_flex_values fnd1,
(select '||l_hint||'
f.cost_center_id cost_center_id,
f.fin_category_id fin_category_id,
f.invoice_number invoice_number,
to_char(f.invoice_date,''DD-MON-YYYY'') invoice_date,
sum(f.actual_g) sum_actual_g,
sum(sum(f.actual_g)) over() gt_actual_g,
f.bill_to_party_id bill_to_party_id
from fii_ar_revenue_b_v'||fii_gl_util_pkg.g_global_curr_view||' f,
fii_fin_cat_mappings cat,
fii_fin_item_hierarchies hier'||l_from_clause||'
where f.posted_flag = ''Y'''||l_ccc_join||l_lob_join||'
and f.gl_date between to_date(:P_DET_START, ''DD-MM-YYYY'') and to_date(:P_DET_END, ''DD-MM-YYYY'')
and hier.parent_fin_cat_id = &FINANCIAL ITEM+GL_FII_FIN_ITEM
and hier.child_fin_cat_id = cat.parent_fin_cat_id
and cat.child_fin_cat_id = f.fin_category_id
group by f.invoice_date,
f.bill_to_party_id,
f.cost_center_id,
f.fin_category_id,
f.invoice_number) inline
where cust.party_id = inline.bill_to_party_id
and fnd1.flex_value_id = inline.cost_center_id
and fnd.flex_value_id = inline.fin_category_id
and fnd.language = userenv(''Lang'')';
select FunctionName into l_FunctionName from
(select 'FII_GL_INV_EXP_DET_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'OE' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory
union all
select 'FII_GL_INV_COR_DET_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'CGS' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory);
SELECT DISTINCT next_level_is_leaf
INTO l_fin_leaf_node
FROM fii_fin_item_hierarchies
WHERE next_level_fin_cat_id = pCategory
and parent_fin_cat_id = next_level_fin_cat_id
and child_fin_cat_id = next_level_fin_cat_id;
select FunctionName into l_FunctionName from
(select 'FII_GL_INV_EXP_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'OE' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory
union all
select 'FII_GL_INV_REV_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'R' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory
union all
select 'FII_GL_INV_COR_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'CGS' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory);
select FunctionName into l_FunctionName from
(select 'FII_GL_INV_EXP_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'OE' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory
union all
select 'FII_GL_INV_REV_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'R' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory
union all
select 'FII_GL_INV_COR_R' FunctionName
from fii_fin_item_hierarchies cat
where cat.parent_fin_cat_id in (select fin_category_id from fii_fin_cat_type_assgns where FIN_CAT_TYPE_CODE = 'CGS' and TOP_NODE_FLAG = 'Y')
and cat.child_fin_cat_id=pCategory);