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

sql>>>?

Former Member
0 Likes
839

hi ppl,

what is open sql?

what is the diffrece b/w open and native sql??

what are the areas where opne sql is used?

thanx in advance!!!

regards,

b.s

hi ppl,

what is open sql?

what is the diffrece b/w open and native sql??

what are the areas where opne sql is used?

thanx in advance!!!

regards,

b.s

5 REPLIES 5
Read only

Former Member
0 Likes
794

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.

Click the below link for OPEN SQL

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3969358411d1829f0000e829fbfe/content.htm

Click the below link for Native SQL

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
794

Hi,

Pls chek this link for the diff between native and open SQL:

http://help.sap.com/saphelp_46b/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

Open SQL allows you to access all database tables known to the SAP system, regardless of the database manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your ABAP/4 program.

To avoid incompatibilities between different database tables and also to make ABAP/4 programs independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements which are specific to SAP.

A database interface translates SAP's Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly

Regards,

Anjali

Read only

Former Member
0 Likes
794

Hi Swaminathan,

You can refer these SDN links as well..

Regards,

SP.

Read only

Former Member
0 Likes
794

Hi,

<b>OPEN SQL</b>

In the R/3 System, long-life data is stored in relational database tables. Structured Query Language (SQL) was created for accessing relational Database. SQL has two statement types: Data Definition Language (DDL) statements and Data Manipulation Language (DML) statements.

TO include SQL statements in an ABAP/4 program, use Native SQL. To avoid incompatibilities between different database tables and also to make ABAP/4 program independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements, which are specific to SAP. Using Open SQL enables you to access any database tables available to the SAP system regardless of the manufacturer be it Oracle, Informix etc.

<i>The difference between Open SQL and Native SQL is as follows:</i>

A database interface translates SAP’s Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly.

Open SQL keywords

Keywords Used for

• SELECT: Reading Data from Database Tables

• INSERT: Adding Lines to Database Tables

• UPDATE: Changing Lines in Database Tables

• MODIFY: Adding or Changing Lines

• DELETE: Deleting Lines from Database Tables

Thanks,

Ramya