Friday, July 10, 2009

Find query behind the Form or OA Framework page

FORMS

The simplest way to find a query in a form is to go to
Help -> Diagnostics -> Examine from the navigation toolbar
select SYSTEM block
and LAST_QUERY field


This approach has the disadvantage that it only shows the last query run by the form while there can be multiple queries run in different blocks.

To see a query in a block, first check the name of the block.


Now go to Help -> Diagnostics -> Item


Change the Object to 'Block'
and in 'Object1' select the name of the block.
The 'Value' field will automatically display the query that was run to retrieve the data in the block.


OA FRAMEWORK

The OA framework is not as flexible as Forms, but there is still a way to see the queries run by OA framework pages.
Forst set the prodile FND: Diagnostics to Yes for your user.
Now, when you log to any JSP page you will see 'About Page' in the bottom left corner.
Click on it and then click on 'Expand all' as on the picture below.


When you scroll down you will see the views on which the records are based


Click on the view name to see the query.


3 comments:

  1. Hi This was really helpful. I have one question, when I changed from Item to Block like what you indicated above, the last query didnot show any sql. Can you pls let me know the reason.

    ReplyDelete
  2. Hi Dasaradhi,

    This is hard to tell, really depends on the block. I.e. some of the Java based grids do not populate the Last_query

    ReplyDelete