Below are the detailed steps:
1) Update the following Profile Option Values to Yes at User level.
• FND: Diagnostics
• Personalize Self-Service Defn
2) Go to the Java OAF Page where the SQL Query executes
3) Click on the link About this Page in the bottom Left Hand Side of the page
4) Navigate to the Page Tab on the Top Left Hand Side of the page
5) In the Business Component References Details Section (You may need to expand this
section), Go to the View Objects Sub Section.
6) Find the Object that describes the piece of information that you want to find the query for
7) Click on the Link
8) The full Query used can be cut and pasted into a SQL Editor and the query run.
Note: You will have to find the Bind Variables passed to the query in order to do this!!