Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Testing SQL Queries

Former Member
0 Likes
2,194

Hi gurus,

All i want to know that if is there any transaction for testing and getting results of SQL queries like phpmyadmin's SQL running area.

Thx,

3 REPLIES 3
Read only

Former Member
0 Likes
1,153

Hi,

As of my knowledge we can use SM50 to see the running program name and retrieving table name..

Regards,

Nandha

Read only

Former Member
0 Likes
1,153

I think you can accomplish this by creating the proper INFOSETs and afterwards executing the query on them, using transactions SQ01 and SQ02, respectively.

I am not experienced with this, but INFOSETs are like a projection of (a) database table(s), let's say it is somehow similar to a View. You access SQ02, define the data you are going to work with, and then test the query you will execute through SQ01.

Hope this helps.

Avraham

Read only

Former Member
0 Likes
1,153

As far as I know, there is no simple and quick way to type in arbitrary SQL and get a display (preferably ALV) of the results. I'd be interested to learn otherwise.

A kludge that I have used is to go to transaction SE30 (ABAP Runtime Analysis) and hit button "Tips & Tricks" (at top left). In the SQL Interface section (first item in left-hand navigation tree) you can enter any ABAP Open SQL query (or modify the predefined ones) in the two windows that are displayed side by side.

These get executed by hitting "Measure Runtime". In order to see the selection results, you have to stop in the debugger, which you achieve simply by putting

BREAK <user>

statements into the query. In fact, you may put in any ABAP coding including data declarations. The system generates a report to run the fragment inside a form routine. The debugger will stop in the generated coding.

-- Sebastian

PS: Of course, no one should have authority to do this on anything but a development system.