How to run SQL Queries Directly on SAP Database
If you ever wanted to write SQL queries to read/analyze data from SAP tables, then this post will be very useful for you.
To run SQL queries directly, you need to open tcode “dbacockpit”. Expand Diagnostic menu and run SQL Editor. Write your query and click Execute. That is it.
If you want to save your query for later use, you can give a name and click save.
In that way you do not need to ask help of Abap consultant to change or query data from tables. You can quickly analyze data and if necessary you make changes on data too.
Hope, that quick tip helps.
Join Query Example :
select mara.matnr, mkal.verid from mara inner join mkal on mara.matnr = mkal.matnr