background image

BC170_2.a2.1

Using ABAP Native SQL

EXEC SQL.

<any SQL 

statement>
ENDEXEC.

In this example, the 
program
creates a table in the Oracle
database, which is not 
known
to the ABAP Dictionary.

The newly created 
database
table is populated using 
an
SQL INSERT statement.

background image

BC170_2.a2.2

SELECT Using ABAP Native SQL 

Data retrieved 

using the SELECT 

statement is 

transported to the 

ABAP program

using Host 

Variables.

A Host Variable is any data item

that is defined by the ABAP 

program and used inside an 

ABAP Native SQL Statement. 

They must be preceded by a 

colon.

D

efi

n

ed

Used

These are Host 
Variables

background image

BC170_2.a2.3

ABAP Native SQL and the 

PERFORMING Option

The PERFORMING 

<form> option creates 

a looping structure 

that calls a subroutine 

for every 

row retrieved.


Document Outline