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

Query SAP Database with Native Sql.

Former Member
0 Likes
683

Hi,

I would like to query the table MARA with native sql and return all headings and data

Select * from MARA where MATNR = '00000000151515'

<i>I need this to be able to TEST my Sql statements.</i>

In SqlServer you have the Query Analyser where I can do just this, but is there some nice in SAP Tool for this as well ?

[Unfortanely I can't connect to SAP_U01 database from QA...]

//Martin

6 REPLIES 6
Read only

christian_wohlfahrt
Active Contributor
0 Likes
640

Hi Martin,

maybe you give ST05 a try: last button gives the possibility to enter a SQL-statement directly - and for explanation it has to be executed (somehow).

Regards,

Christian

Read only

0 Likes
640

Hi,

This doesn't work...

//MA

Read only

Former Member
0 Likes
640

Hi Martin,

u could try to connect to your SAP system with SAPR3/SAP

BR,

Alvaro

Read only

0 Likes
640

Sorry, I don't understand what you mean...

//MA

Read only

Former Member
0 Likes
640

anyways, why do you want to do it? It is not a good idea to use native sql for the purposes of getting data. SAP can change a database model next release, and in this case you will need to change your code too.

Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
640

The closest you can get with something similar is SE16. You use ST05 to evaluate the performance of your SQL statement, considering the index you are having.