GCS Consolidation Trial Balance Data Source

Description
Categories: BI Publisher
Application: Financial Consolidation Hub (Obsolete)
Source:
Short Name: GCS_TB_SOURCE
DB package: GCS_XML_DT_UTILITY_PKG
SELECT gcer.run_name RUN_NAME,
					   ght.hierarchy_name HIERARCHY_NAME,
					   fcpt.cal_period_name CAL_PERIOD_NAME,
					   gdtct.data_type_name BALANCE_TYPE,
					   to_char(gcer.start_time, 'DD-MON-YYYY HH24.MI.SS AM') START_TIME,
					   to_char(gcer.end_time, 'DD-MON-YYYY HH24.MI.SS AM') END_TIME,
					   fct.name CURRENCY_NAME,
					   to_char(CalPdEndDt.date_assign_value, 'DD-MON-YYYY') DATE_ASSIGN_VALUE,
					   gcer.hierarchy_id,
					   gdc.dataset_code DATASET_CODE,
					   ghb.fem_ledger_id LEDGER_ID,
					   gcer.CAL_PERIOD_ID,
					   fct.currency_code CURRENCY_CODE,
					   fnd_currency.safe_get_format_mask(fct.currency_code, 50) format_mask,
                       gcer.BALANCE_TYPE_CODE BALANCE_TYPE_CODE,
					   gdtcb.data_type_code
				  FROM gcs_cons_eng_runs gcer,
					   gcs_hierarchies_b ghb,
					   gcs_hierarchies_tl ght,
					   fem_cal_periods_tl fcpt,
					   fnd_currencies_tl fct,
					   gcs_data_type_codes_b gdtcb,
					   gcs_data_type_codes_tl gdtct,       
					   (SELECT date_assign_value, cal_period_id
						  FROM fem_cal_periods_attr
						 WHERE attribute_id = :pCalPeriodEndDateAttr
						   AND version_id = :pCalPeriodEndDateVersion) CalPdEndDt,
					   gcs_dataset_codes gdc,
					   gcs_entry_headers geh
				 WHERE gcer.run_name = :pRunName
				   AND gcer.run_entity_id = :pEntityId
				   AND geh.entry_id = :pXmlFileId
				   AND gcer.cal_period_id = fcpt.cal_period_id
				   AND CalPdEndDt.cal_period_id = gcer.CAL_PERIOD_ID
				   AND fct.currency_code = geh.currency_code
				   AND fct.language = :pLanguageCode
				   AND gdc.hierarchy_id = gcer.hierarchy_id
				   AND gdc.balance_type_code = gcer.BALANCE_TYPE_CODE
				   AND gcer.balance_type_code = gdtcb.data_type_code
				   AND gdtcb.data_type_id = gdtct.data_type_id
				   AND gdtct.language = :pLanguageCode
				   AND fcpt.language = :pLanguageCode
				   AND gcer.hierarchy_id = ghb.hierarchy_id
				   AND ghb.hierarchy_id = ght.hierarchy_id
				   AND ght.language = :pLanguageCode
				   AND gcer.MOST_RECENT_FLAG = 'Y'
Ask a question