SELECT fcov.company_cost_center_org_name ORGANIZATION,
fliv.line_item_name LINEITEM,
fciv.company_cost_center_org_name INTERCOMPANY,
/*startSelectList*/
/*SelectLiterals*/
/*endSelectList*/
fb.debit DEBIT,
fb.credit CREDIT
FROM
( SELECT fiocm.company_cost_center_org_id,
fiocm.line_item_id ,
/*startSelectIdList*/
/*SelectIdLiterals*/
/*endSelectIdList*/
fiocm.intercompany_id,
SUM(nvl(gbd.period_net_dr,0)) debit,
SUM(nvl(gbd.period_net_cr,0)) credit
FROM gl_balances_delta gbd,
fem_intg_ogl_ccid_map fiocm,
gl_code_combinations gcc,
fem_intg_delta_loads fidl
WHERE fiocm.code_combination_id = gbd.code_combination_id
AND gbd.delta_run_id > fidl.delta_run_id
AND gcc.code_combination_id = gbd.code_combination_id
AND fidl.loaded_flag = 'Y'
AND fidl.cal_period_id = :pCalPeriodId
AND (gbd.period_net_dr <>0 OR gbd.period_net_cr <> 0)
&FilterParamsLiteral
GROUP BY fiocm.company_cost_center_org_id,
fiocm.line_item_id,
/*startDSTBGroupbyName*/
/*GroupLiterals*/
/*endDSTBGroupbyName*/
fiocm.intercompany_id ) fb,
fem_cctr_orgs_tl fcov,
fem_ln_items_tl fliv,
/*startFromList*/
/*TableLiterals*/
/*endFromList*/
fem_cctr_orgs_tl fciv
WHERE fb.company_cost_center_org_id = fcov.company_cost_center_org_id
AND fcov.language = :pLanguageCode
AND fb.line_item_id = fliv.line_item_id
AND fliv.language = :pLanguageCode
AND fb.intercompany_id = fciv.company_cost_center_org_id
AND fciv.language = :pLanguageCode
/*startWhereClause*/
/*WhereLiterals*/
/*endWhereClause*/
&entityOrgsLiteral |