DBA Data[Home] [Help]

VIEW: APPS.PSP_REP_DEF_LOV_V

Source

View Text - Preformatted

SELECT F.organization_id, F.name, G.business_group_id, G.set_of_books_id from psp_distribution_lines_history A, psp_organization_accounts G, hr_organization_units F where G.organization_account_id = A.default_org_account_id and A.default_org_account_id is not null and A.suspense_org_account_id is null and F.organization_id = G.organization_id and not exists (select 1 from psp_adjustment_lines_history palh where palh.orig_line_id = a.distribution_line_id and palh.orig_source_type = 'D' and palh.original_line_flag = 'Y') group by G.business_group_id, G.set_of_books_id, F.organization_id, F.name
View Text - HTML Formatted

SELECT F.ORGANIZATION_ID
, F.NAME
, G.BUSINESS_GROUP_ID
, G.SET_OF_BOOKS_ID
FROM PSP_DISTRIBUTION_LINES_HISTORY A
, PSP_ORGANIZATION_ACCOUNTS G
, HR_ORGANIZATION_UNITS F
WHERE G.ORGANIZATION_ACCOUNT_ID = A.DEFAULT_ORG_ACCOUNT_ID
AND A.DEFAULT_ORG_ACCOUNT_ID IS NOT NULL
AND A.SUSPENSE_ORG_ACCOUNT_ID IS NULL
AND F.ORGANIZATION_ID = G.ORGANIZATION_ID
AND NOT EXISTS (SELECT 1
FROM PSP_ADJUSTMENT_LINES_HISTORY PALH
WHERE PALH.ORIG_LINE_ID = A.DISTRIBUTION_LINE_ID
AND PALH.ORIG_SOURCE_TYPE = 'D'
AND PALH.ORIGINAL_LINE_FLAG = 'Y') GROUP BY G.BUSINESS_GROUP_ID
, G.SET_OF_BOOKS_ID
, F.ORGANIZATION_ID
, F.NAME