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

Difference >< Open Sql and Native SQL

Former Member
0 Likes
1,320

What is the Difference >< OPEN SQL and NATIVE SQL ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
946

Hi Avi,

Open SQL - ABAP specific SQL

Native SQL - DB specific SQL

Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using.

Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.

As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.

Reward if helpful.

Regards,

Harini.S

3 REPLIES 3
Read only

Former Member
0 Likes
946

The main difference is that open SQL is transportable between SAP systems running different databases. Native SQL is particular to the database being used.

As a result open SQL doesn't support all the syntaxes of native SQL.

rob

Read only

Former Member
0 Likes
947

Hi Avi,

Open SQL - ABAP specific SQL

Native SQL - DB specific SQL

Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using.

Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.

As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.

Reward if helpful.

Regards,

Harini.S

Read only

Former Member
0 Likes
946

Hi Avi,

There is an interface between our R/3 system and Database.

Using this interface. You can write open SQL statements to accsess Database. Here we don't bother whether it is Oracle, Informix etc. So the statement syntax will not be dependent on Database underlying.

In Native Sql we don't access thru Interface.Directly we access Database.So we need to Write the statements in the correct syntax. i.e Database dependent.This is faster but if you use this there will be some inconsistency. So always better use Open SQL

Regds,

Mukesh Kumar