Open Sql & Native Sql
Prepared By : Pragya Chhatrashali
Native Sql
Native Sql is used to make calls to the
database.
The database in SAP can be anything like
Oracle,MSSQL,Informix,or DB2 hence it is
not possible to make changes everywhere if
the database changes.
To execute ABAP Native SQL in an ABAP
program, use the statement EXEC.
Open Sql
Open Sql is used by the ABAP Programmers
to make calls while accessing a database.
These open sql statements are sent to DB
interface which decodes the open sql to
native sql depending on the database
used.Thus you wont need to make any
changes even if the database changes.
In Short
Open Sql is the sql language used internally
by the sap application server.
Native Sql is the language used directly by
the DB.
The Application server translates the open
sql to native sql when sending commands to
DB.
Conclusion
To avoid conflicts between database tables
and to keep ABAP programs independent
from the database system used, SAP has
generated its own set of SQL statements
known as Open SQL.
Sql Joins