SELECT substr(fpi.application_id,1,6) APP_ID
,substr(fa.application_short_name,1,6) S_NAME
,substr(fat.application_name,1,40) APPLICATION , fpi.PATCH_LEVEL,fa.basepath
,DECODE(fpi.status
,'I','FULL'
,'S','SHARED'
,'N','--NOT installed') STATUS
FROM fnd_product_installations fpi
,fnd_application_tl fat
,fnd_application fa
WHERE upper(fat.application_name) like upper('&application_full_name')
AND fpi.application_id = fat.application_id
AND fpi.application_id = fa.application_id
ORDER BY fat.application_name;