How to get the queries behind a form and an OAF Page


To find the form's last executed query

     Go to the menu Help >> Diagnostics >> Examine, Provide the examine password
     Enter Block: SYSTEM
     Enter Item: LAST_QUERY
     The value field contains the last query executed by the form


To find the query last executed in a block
1.    Go to the field on the form with the value you want
2.    Go to the menu Help >> Diagnostics >> Examine
3.    Make a note of the block
4.    Go to the menu Help >> Diagnostics >> Properties >> Item
5.    Choose Object: Block
6.    Choose Object 1: <the name of the block noted above>
7.    Choose Property: Last_query
8.    The value field contains the last query executed by the form

Then what about the query behind an OA Frame work web page.
1.    Oracle has the same functionality in the “About this Page” link.  If you want to find the SQL query behind any web page, you need to enable personalization and then use “About this Page” to find the view object.  In this example we will view for iProcurement Requisitions self-service webpage.
2.    Getting to the SQL – self service
Click the About this page
      About this page
      Requires profile option FND: Diagnostics set to Yes




      Expand All, Then Click on hyperlinks for View Objects
      ReqHeaderVO
                               -   ReqDetailsVO



           3. Displays query to populate data on page