ST05 SQL tracing tool is used to find the tables that have been accessed by a transaction code.
Goto following the IMG path:
T.Code ST05 -> Activate trace -> Open the specific transaction for which you want to find the table -> Deactivate trace -> Display trace
The Object Name column should provide for the tables that have been accessed by the T.Code
Steps to find a table behind any SAP T.Code
In this example, we are finding a table behind a Sales Order.
Step 1: Enter the T.Code ST05 in the command box to activate the Trace.
Step 2: In the ST05 Performance Trace screen, select the Activate Trace button.
Step3: Now start a new Session:
System-> New GUI Window
Step 4: On SAP Easy Access Goto T.Code VA03 to display the Sales Order.
Step 5: In the Display Sales Documents screen, select the sales order number for which you want to show the table.
Order: 14
Press the Continue button.
Step 6: Now the Display Standard Order 14: Overview screen appears:
Step 7: Go to ST05 Performance Trace window and select the Deactivate Trace on All Instances button.
Then Goto More->Display Trace.
Step8: In the ST05 Filter Conditions for Trace Records screen press the execute button.
Step 9: In the Performance Analysis: Trace Display(Main Records) screen press the Find button.
In the Find window type the sale order number for which you want to find the table:
Search Term:14
Check the radio button Display Number of Hits:
Press the tick button.
Step 10: In the Performance Analysis: Trace Display(Main Records) screen you can see the major header table VBAK for sales order is displayed.
By the same method, we can also find tables that store all the fields of the standard table EKKO.
Step 1: Goto T.Code ST05.
Step 2: Activate the Trace.
Step 3: Open a new session and Goto T.Code SE11.
Step 4: In the ABAP Dictionary: Initial Screen type the name of the standard table for which you want to find the information.
Database table: EKKO
Step5: Dictionary: Display Tables screen shows all the fields of the EKKO table.
Step6: In the ST05 Performance Trace window press the Deactivate Trace on All Instances
More -> Display Trace
Step 6: In the Performance Analysis: Trace Display(Main Records) screen, press the find button and type the table name.
Search Term: EKKO
Check the radio button Display Number of Hits and press the tick button.
Step 7: In the Performance Analysis: Trace Display(Main Records) screen, you can find the table that has all the field names for Table EKKO.