FUN_MO_REPORTING_ENTITIES_V
Details
-
Schema: FUSION
-
Object owner: FUN
-
Object type: VIEW
Columns
Name |
---|
REPORTING_LEVEL ENTITY_NAME ENTITY_ID OPERATING_UNIT_ID LEGAL_ENTITY_ID SET_OF_BOOKS_ID BU_ID LEGAL_ENTITY_IDENTIFIER |
Query
SQL_Statement |
---|
SELECT '1000' reporting_level , sob.name entity_name , to_number(sob.set_of_books_id) entity_id , -9999 operating_unit_id , -9999 legal_entity_id , TO_CHAR(ou.org_information3) set_of_books_id, ou.organization_id bu_id , null legal_entity_identifier FROM hr_organization_information ou, gl_sets_of_books sob WHERE sob.set_of_books_id = DECODE(LTRIM(ou.org_information3, '0123456789'), NULL, ou.org_information3, NULL) AND ou.org_information_context = 'FUN_BUSINESS_UNIT' UNION ALL SELECT '1000' reporting_level , gl.name entity_name , gl.ledger_id entity_id , -9999 operating_unit_id , -9999 legal_entity_id , TO_CHAR(gl.ledger_id) set_of_books_id , bu.bu_id bu_id , null legal_entity_identifier FROM fun_all_business_units_v bu , gl_ledgers gl WHERE gl.ledger_id in (SELECT lr.target_ledger_id FROM gl_ledger_relationships lr WHERE lr.primary_ledger_id = bu.primary_ledger_id AND lr.target_ledger_category_code IN ('ALC','SECONDARY') AND lr.relationship_enabled_flag = 'Y' AND lr.relationship_type_code = 'SUBLEDGER') UNION ALL SELECT '2000' reporting_level , legal_entity_name entity_name , to_number(gllv.legal_entity_id) entity_id , -9999 operating_unit_id , to_number(gllv.legal_entity_id) legal_entity_id, TO_CHAR(primary_ledger_id) set_books_id , -9999 bu_id , le.legal_entity_identifier legal_entity_identifier FROM gl_ledger_le_v gllv, xle_entity_profiles le WHERE gllv.legal_entity_id = le.legal_entity_id UNION ALL SELECT '3000' reporting_level , bu_name entity_name , bu_id entity_id , bu_id operating_unit_id , to_number(bu.legal_entity_id) legal_entity_id, primary_ledger_id set_of_books_id , bu_id , le.legal_entity_identifier legal_entity_identifier FROM FUN_ALL_BUSINESS_UNITS_V bu, xle_entity_profiles le WHERE bu.legal_entity_id = le.legal_entity_id |