SELECT
(select name from v$database) DBNAME,
(select sysdate from dual) Extract_Date,
hou.NAME "Operating Unit",
fsr.future_period_limit "Future Period Limit",
(SELECT segment1
|| '-'
|| segment2
|| '-'
|| segment3
|| '-'
|| segment4
|| '-'
|| segment5
|| '-'
|| segment6
FROM apps.gl_code_combinations
WHERE code_combination_id = fsr.ACCTS_PAY_CODE_COMBINATION_ID)
"Liability",
(SELECT segment1
|| '-'
|| segment2
|| '-'
|| segment3
|| '-'
|| segment4
|| '-'
|| segment5
|| '-'
|| segment6
FROM apps.gl_code_combinations
WHERE code_combination_id = fsr.PREPAY_CODE_COMBINATION_ID)
"Prepayment",
(SELECT segment1
|| '-'
|| segment2
|| '-'
|| segment3
|| '-'
|| segment4
|| '-'
|| segment5
|| '-'
|| segment6
FROM apps.gl_code_combinations
WHERE code_combination_id = fsr.DISC_TAKEN_CODE_COMBINATION_ID)
"Discount Taken",
(SELECT segment1
|| '-'
|| segment2
|| '-'
|| segment3
|| '-'
|| segment4
|| '-'
|| segment5
|| '-'
|| segment6
FROM apps.gl_code_combinations
WHERE code_combination_id = fsr.RATE_VAR_GAIN_CCID)
"PO Rate Variance Gain",
(SELECT segment1
|| '-'
|| segment2
|| '-'
|| segment3
|| '-'
|| segment4
|| '-'
|| segment5
|| '-'
|| segment6
FROM apps.gl_code_combinations
WHERE code_combination_id = fsr.RATE_VAR_LOSS_CCID)
"PO Rate Variance Loss",
ood.organization_code || '-' || ood.organization_name
"Inventory Organization",
hbg.BUSINESS_GROUP_NAME "Business Group",
DECODE (fsr.EXPENSE_CHECK_ADDRESS_FLAG, 'H', 'Home')
"Expense Check Address",
DECODE (fsr.USE_POSITIONS_FLAG, 'Y', 'Yes','N','No') "Use Approval Hierarchies",
hbg.EMP_NUMBER_GENERATION_METHOD "Method"
FROM apps.FINANCIALS_SYSTEM_PARAMS_ALL fsr,
apps.hr_operating_units hou,
apps.HRFV_BUSINESS_GROUPS hbg,
apps.ORG_ORGANIZATION_DEFINITIONS ood
WHERE hbg.business_group_id = fsr.business_group_id
AND HOU.BUSINESS_GROUP_ID = HBG.BUSINESS_GROUP_ID
AND fsr.INVENTORY_ORGANIZATION_ID = ood.ORGANIZATION_ID
AND fsr.SET_OF_BOOKS_ID = hou.SET_OF_BOOKS_ID
AND fsr.org_id = hou.organization_id
AND hou.name IN
ORDER BY hou.name
No comments:
Post a Comment