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.
The difference between Open SQL and Native SQL is as follows:
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
When using Open SQL statements in an ABAP/4 program, you must ensure the following:
1) The database system being addressed must be supported by SAP.
2) The database tables being addressed must be defined in the ABAP/4 Dictionary.
No comments:
Post a Comment