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

Former Member
0 Likes
763

hello frds

what is the exact diff b/w open sql and native sql.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
734

Hi,

From the help on "open SQL"

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.

For more information type EXEC in the editor and press F1.

Regards

5 REPLIES 5
Read only

Former Member
0 Likes
735

Hi,

From the help on "open SQL"

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.

For more information type EXEC in the editor and press F1.

Regards

Read only

0 Likes
734

HI,

Native SQL, Its operations on database, its specific to the database used..

Open SQL: we use open SQL statements in ABAP..

All abap queries are Open SQL stmts

Open SQL runs for any database underlined

rewards if useful ,

regards,

nazeer

Read only

Former Member
0 Likes
734

hi,

Check out these related threads

Read only

Former Member
0 Likes
734

Check with below Link

Thanks

Seshu

Read only

Former Member
0 Likes
734

Hi,

<u><b>Open SQL</b></u>

Open SQL statements are a subset of Standard SQL that is fully integrated in ABAP. They allow you to access data irrespective of the database system that the R/3 installation is using. Open SQL consists of the Data Manipulation Language (DML) part of Standard SQL; in other words, it allows you to read (SELECT) and change (INSERT, UPDATE, DELETE) data.

Open SQL also goes beyond Standard SQL to provide statements that, in conjunction with other ABAP constructions, can simplify or speed up database access. It also allows you to buffer certain tables on the application server, saving excessive database access. In this case, the database interface is responsible for comparing the buffer with the database. Buffers are partly stored in the working memory of the current work process, and partly in the shared memory for all work processes on an application server. Where an R/3 System is distributed across more than one application server, the data in the various buffers is synchronized at set intervals by the buffer management. When buffering the database, you must remember that data in the buffer is not always up to date. For this reason, you should only use the buffer for data which does not often change. You specify whether a table can be buffered in its definition in the ABAP Dictionary.

<u><b>Native SQL</b></u>

Native SQL is only loosely integrated into ABAP, and allows access to all of the functions contained in the programming interface of the respective database system. Unlike Open SQL statements, Native SQL statements are not checked and converted, but instead are sent directly to the database system. When you use Native SQL, the function of the database-dependent layer is minimal. Programs that use Native SQL are specific to the database system for which they were written. When writing R/3 applications, you should avoid using Native SQL wherever possible. It is used, however, in some parts of the R/3 Basis System - for example, for creating or changing table definitions in the ABAP Dictionary.

Regards,

Bhaskar