Query to Fetch Org Id Given Request ID

select   fr.RESPONSIBILITY_NAME
        ,fr.responsibility_id
        ,fpv.PROFILE_OPTION_VALUE “Org Id”
        ,fr.application_id
        ,fa.application_id
       — ,fpv.application_id
        ,fpv.LEVEL_VALUE
        ,fpv.LEVEL_ID
 from  fnd_profile_option_values fpv
                ,fnd_application fa
                ,fnd_responsibility_tl fr
               ,fnd_concurrent_requests fcr
where fpv.profile_option_id=(select fp.profile_option_id from fnd_profile_options fp,  fnd_profile_options_tl fpt
                                where fp.PROFILE_OPTION_NAME=’ORG_ID’
                                and fp.PROFILE_OPTION_NAME=fpt.PROFILE_OPTION_NAME)
and fpv.LEVEL_VALUE_APPLICATION_ID=:p_application_id
and fr.application_id=fa.application_id
and fcr.RESPONSIBILITY_ID=fr.responsibility_id
and fpv.LEVEL_ID=10003
and fcr.REQUEST_ID=100243196
and fpv.level_value=fr.RESPONSIBILITY_ID
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s