Ads

NATIVE SQL and OPEN SQL in SAP ABAP

NATIVE SQL  and OPEN SQL in SAP ABAP

Open SQL allows you to access the database tables declared in the ABAP dictionary regardless of the database platform that the R/3 system is using.
Native SQL allows you to use database-specific SQL statements in an ABAP/4 program. This means that you can use database tables that are not administered by ABAP dictionary, and therefore integrate data that is not part of the R/3 system.
Basic Open SQL Commands
SELECT
INSERT
UPDATE
MODIFY
DELETE
OPEN CURSOR, FETCH, CLOSE CURSOR
Native SQL
As already mentioned, Native SQL allows you to use database-specific SQL statements in an ABAP program.
To use Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement.
Syntax
EXEC SQL [PERFORMING <form>].
  <Native SQL statement>
ENDEXEC.

ABAP Syntax
The syntax of the ABAP programming language consists of ABAP statements and comments.
ABAP Statements
Normally, each ABAP statement begins with a keyword. A statement can contain operands and additions of the keyword and is always concluded with a period.
Example
PROGRAM first_program.
WRITE 'My First Program'.

This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".

ABAP Syntax
ABAP Statements
ABAP Program Types

SAP ABAP Workbench Tools

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced