Open SQL Statements in SAP ABAP

by | Jan 14, 2019 | ABAP Beginner

Home » SAP » ABAP » ABAP Beginner » Open SQL Statements in SAP ABAP

Preface – This post is part of the ABAP Beginner series.

When we talk about Open SQL in ABAP, then it means only Data Manipulation Language (DML) part of SQL. It means we can only manipulate the table created in ABAP Dictionary using open SQL and not create a new table using SQL. The SQL statements of ABAP Reports directly communicate with a database as shown below:

Open SQL in SAP

Open SQL in SAP – Image Illustration

Open SQL Keywords in ABAP

SAP ABAP provides many SQL keywords that can be used as DML. These are as follow:

KeywordFunction
SELECTIt is used to fetch/ read data from database table.
INSERTIt is used to insert data into a database table.
UPDATEChanges content of a row of database table based upon condition.
MODIFYSame as above, Changes content of a row of database table based upon condition. But if the data is not present as per condition, then it creates/ inserts a new data in the database table.
DELETEIt deletes a row or all data based upon condition.
OPEN CURSOR,

FETCH,

CLOSE CURSOR

To read lines of database tables using cursor. In these statements we don’t fetch data from table into something but assign it to the cursor.

 

Examples

*** We will update it soon

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Author