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

Doubt : open SQL

Former Member
0 Likes
642

hi all,

To make the R/3 System independent of the database system with which you use it despite the differences in the SQL syntax between various databases, we use abap as it uses OPEN SQL.

What are the various Database systems and how does SQL varies with it??

Thanks and regards,

Gaurav

5 REPLIES 5
Read only

Former Member
0 Likes
604

EXEC SQl statement does Native SQL .Normally we use OPEN sql statement.

This is not database specific.So datbase convetor converts into database specific sql statements for our sql statements.This is slow fetching compared to Native 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.

Native SQL Statements in ABAP Programs

To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:

Of course, u can use Native SQL commands using EXEC and ENDEXEC

But it leades to extra burden in SAP version upgradation. and it may lead to data base inconsistancy.

U bettr update the tables using BDC / BAPI / Transactions

Reward if useful

Read only

0 Likes
604

hi,

i asked a different question

Thanks and regards,

Gaurav

Read only

Former Member
0 Likes
604

Hi,

This must help u definitely

Open SQL

Open SQL consists of a set of ABAP statements that perform operations on the central database in the R/3 System. The results of the operations and any error messages are independent of the database system in use. Open SQL thus provides a uniform syntax and semantics for all of the database systems supported by SAP. ABAP programs that only use Open SQL statements will work in any R/3 System, regardless of the database system in use. Open SQL statements can only work with database tables that have been created in the ABAP Dictionary.

Reagrds

Read only

sreelatha_gullapalli
Active Participant
0 Likes
604

hi

verify the following link

http://books.google.com/books?id=chADT7sQ_aUC&pg=PA125&lpg=PA125&dq=thevariousdatabase+systems&source=web&ots=5fp-VrUhU2&sig=KgFS9BA5YZJW6STKKEL4HWFerY4#PPA117,M1

hope it will help you

regards

sreelatha gullapalli

Read only

ThomasZloch
Active Contributor
0 Likes
604

supported databases:

http://help.sap.com/saphelp_nw04/helpdata/en/90/ed8e3f55b20617e10000000a114084/frameset.htm

The exact syntax for the same operations varies slighty (or not so slightly) from DB to DB, that's why we're glad to use Open SQL. It would be impossible to list all differences here, you would need to research for yourself.

Greetings

Thomas