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

what is meant by open sql and netive sql?

Former Member
0 Likes
875

HAI,

what is meant by open sql and netive sql?

THANK YOU

ASHOK KUMAR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
825

Hi Ashok,

Open SQL

Open SQL is a set of ABAP/4 commands which perform operations on database tables. The results of these operations and associated error messages are independent of the database system used. Open SQL thus offers you unified SQL syntax and semantics for different database systems (see Portability). An ABAP/4 program which uses these commands can be run on database systems supported by SAP without modification.

From the help on Native SQL

Native SQL

Native SQL allows you to perform operations on databases over and above those in the Open SQL command set. In contrast to Open SQL, Native SQL supports not only operations on the local database active in the R/3 System, but also on any external databases.

We normally use open SQL, but in some case when you want to say look at the upper case value of an upper/lower case field in a database, you can use native SQL.

Native SQL seems somewhat slower and you have to know which databse you will be using it on before coding.

Thanks,

6 REPLIES 6
Read only

Former Member
0 Likes
826

Hi Ashok,

Open SQL

Open SQL is a set of ABAP/4 commands which perform operations on database tables. The results of these operations and associated error messages are independent of the database system used. Open SQL thus offers you unified SQL syntax and semantics for different database systems (see Portability). An ABAP/4 program which uses these commands can be run on database systems supported by SAP without modification.

From the help on Native SQL

Native SQL

Native SQL allows you to perform operations on databases over and above those in the Open SQL command set. In contrast to Open SQL, Native SQL supports not only operations on the local database active in the R/3 System, but also on any external databases.

We normally use open SQL, but in some case when you want to say look at the upper case value of an upper/lower case field in a database, you can use native SQL.

Native SQL seems somewhat slower and you have to know which databse you will be using it on before coding.

Thanks,

Read only

amit_khare
Active Contributor
0 Likes
825

Check these links -

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
825

Database language that allows you to include database-specific SQL(Open SQL) statements in an ABAP program.

Use the EXEC statement to enable ABAP Native SQL. ABAP Native SQL statements are sent to the database uninterpreted - that is, there is no syntax check. In general, ABAP programs containing database-specific SQL statements do not run with different databases. To run programs with various databases, use ABAP Open SQL.

Read only

former_member196299
Active Contributor
0 Likes
825

hi Ashok ,

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,

Ranjita

Read only

Former Member
0 Likes
825

Hi,

Open SQL : - The Queries which run on apllication server on SAP R/3.

Native SQL: - SAP R/3 does not hv its own database, so it fetches data from database server to application server, the queries pertaining to particular database from which SAP is fettching data are called Native SQL

Thanks

Sandeep

Reward if helpful

Read only

Former Member
0 Likes
825

hi ashok,

in short

open sql -> independent of database which we r using as backend.performance when compared to native sql is high. it can connect to any databse.

for ex:oracle r informix, db2,,,,,,

native sql: these r provider specific. for different databses bases these are differed.

for oracle select statement differs when we use sql server for that same select statement.

abap supports both open and native sql statements. sap recommends to use open sql statements because its independent of database used.

if helpful reward some points.

with regards,

suresh babu aluri.