To find the query related to fields in a form,
Menu: Help -> Diagnostics -> Examine
In the pop up window, choose Block: SYSTEM, Field: LAST_QUERY, the query will be displayed in Value section.
We can also find values for Environment variables and Profile variables. For example:
Block: $ENVIRONMENT$, Field: FND_TOP, return value: /u03/oracle/sit/sitappl/fnd/11.5.0
Block: $PROFILES$, Field: ORG_ID, return value: 1072.