Select Distinct ffcr.Id, ffcr.Form_Name, ffcr.Enabled,
fft.User_Form_Name, fat.Application_Name, ffcr.Description,
ffca.Action_Type, ffca.Enabled, ffca.Object_Type,
ffca.message_type, ffca.message_text
from FND_FORM_CUSTOM_RULES ffcr,
FND_FORM ff,
FND_FORM_TL fft,
Fnd_Application_Tl fat,
Fnd_Form_Custom_Actions ffca
where ffcr.form_name = ff.form_name
And ff.Form_Id = fft.Form_Id
And ff.Application_Id = fat.Application_Id
And fft.User_Form_Name Like 'XXCUST%'
And ffcr.Enabled ='Y'
and ffcr.id = ffca.rule_id;