DBA Data[Home] [Help]

VIEW: APPS.OPI_INV_CC_CLS_V

Source

View Text - Preformatted

SELECT distinct (abc_cls.abc_class_id || '-'||cc_cls.cycle_count_header_id||'-'|| cc_cls.organization_id) ID, (abc_cls.abc_class_name||':' ||cc_hdr.cycle_count_header_name||'('|| MP.ORGANIZATION_CODE || ')') VALUE, abc_cls.description DESCRIPTION, (cc_hdr.cycle_count_header_ID||'-' || cc_hdr.ORGANIZATION_ID) cc_fk_key from mtl_cycle_count_classes cc_cls, mtl_abc_classes abc_cls, MTL_PARAMETERS MP, Mtl_cycle_count_headers cc_hdr WHERE cc_cls.abc_class_id = abc_cls.abc_class_id and cc_cls.organization_id = abc_cls.organization_id and cc_cls.organization_id = mp.organization_id and CC_CLS.ABC_CLASS_ID=ABC_CLS.ABC_CLASS_ID and cc_cls.organization_id = cc_hdr.organization_id and cc_hdr.cycle_count_header_id = cc_cls.cycle_count_header_id union all select (r.abc_code || '-' || l.lookup_code || '-' || mp.organization_id) ID, (r.abc_code ||':'|| l.meaning || '(' || mp.organization_code || ')') VALUE, r.rank_desc DESCRIPTION, l.lookup_code CC_FK_KEY from ic_rank_mst r, ic_whse_mst w, mtl_parameters mp, fnd_lookup_values l where w.mtl_organization_id = mp.organization_id and r.whse_code = w.whse_code and l.lookup_type = 'OPI_DBI_SUBINV' and l.lookup_code = '-1' and l.language = userenv('LANG') union all select lookup_code ID, meaning VALUE, description DESCRIPTION, lookup_code CC_FK_KEY from fnd_lookup_values where lookup_type = 'OPI_DBI_SUBINV' and lookup_code = '-1' and language = userenv('LANG')
View Text - HTML Formatted

SELECT DISTINCT (ABC_CLS.ABC_CLASS_ID || '-'||CC_CLS.CYCLE_COUNT_HEADER_ID||'-'|| CC_CLS.ORGANIZATION_ID) ID
, (ABC_CLS.ABC_CLASS_NAME||':' ||CC_HDR.CYCLE_COUNT_HEADER_NAME||'('|| MP.ORGANIZATION_CODE || ')') VALUE
, ABC_CLS.DESCRIPTION DESCRIPTION
, (CC_HDR.CYCLE_COUNT_HEADER_ID||'-' || CC_HDR.ORGANIZATION_ID) CC_FK_KEY
FROM MTL_CYCLE_COUNT_CLASSES CC_CLS
, MTL_ABC_CLASSES ABC_CLS
, MTL_PARAMETERS MP
, MTL_CYCLE_COUNT_HEADERS CC_HDR
WHERE CC_CLS.ABC_CLASS_ID = ABC_CLS.ABC_CLASS_ID
AND CC_CLS.ORGANIZATION_ID = ABC_CLS.ORGANIZATION_ID
AND CC_CLS.ORGANIZATION_ID = MP.ORGANIZATION_ID
AND CC_CLS.ABC_CLASS_ID=ABC_CLS.ABC_CLASS_ID
AND CC_CLS.ORGANIZATION_ID = CC_HDR.ORGANIZATION_ID
AND CC_HDR.CYCLE_COUNT_HEADER_ID = CC_CLS.CYCLE_COUNT_HEADER_ID UNION ALL SELECT (R.ABC_CODE || '-' || L.LOOKUP_CODE || '-' || MP.ORGANIZATION_ID) ID
, (R.ABC_CODE ||':'|| L.MEANING || '(' || MP.ORGANIZATION_CODE || ')') VALUE
, R.RANK_DESC DESCRIPTION
, L.LOOKUP_CODE CC_FK_KEY
FROM IC_RANK_MST R
, IC_WHSE_MST W
, MTL_PARAMETERS MP
, FND_LOOKUP_VALUES L
WHERE W.MTL_ORGANIZATION_ID = MP.ORGANIZATION_ID
AND R.WHSE_CODE = W.WHSE_CODE
AND L.LOOKUP_TYPE = 'OPI_DBI_SUBINV'
AND L.LOOKUP_CODE = '-1'
AND L.LANGUAGE = USERENV('LANG') UNION ALL SELECT LOOKUP_CODE ID
, MEANING VALUE
, DESCRIPTION DESCRIPTION
, LOOKUP_CODE CC_FK_KEY
FROM FND_LOOKUP_VALUES
WHERE LOOKUP_TYPE = 'OPI_DBI_SUBINV'
AND LOOKUP_CODE = '-1'
AND LANGUAGE = USERENV('LANG')