Below script can be used to Find the RUP Patchset level in Oracle Apps

SELECT
    bug_number,
    decode(bug_number,
    '4334965', '11i.ATG_PF.H RUP3',
    '4676589', '11i.ATG_PF.H.RUP4',
    '5473858', '11i.ATG_PF.H.RUP5',
    '5903765', '11i.ATG_PF.H.RUP6',
    '6241631','11i.ATG_PF.H.RUP7') RUP_Patch_Description
    FROM ad_bugs
    WHERE
    bug_number in ( '4334965','4676589','5473858','5903765','6241631') ;