Professional Documents
Culture Documents
Dec-2008
Objectives
The participants will be able to:
Use Native SQL in ABAP Program and Create a table.
Use Native SQL in ABAP Program to Insert into a table. Use Native SQL in ABAP Program to select from a table. Using PERFORMING when using Exec SQL.
Dec-2008
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.
3 ABAP Native SQL | Dec-2008
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.
Dec-2008
The PERFORMING <form> option creates a looping structure that for every row retrieved, the subroutine is called.
Dec-2008
Demonstration
Creation of a program and writing ABAP native SQL.
Dec-2008
Practice
Creation of a program and writing ABAP native SQL.
Dec-2008
Summary
Database tables in ABAP Native SQL does not have to be in the ABAP Dictionary.
The TABLES statement is not required for any tables addressed through ABAP Native SQL.
Native SQL should be used to access data in tables outside of the SAP system. ABAP Native SQL statements must be enclosed between EXEC SQL and ENDEXEC. All variables defined inside the ABAP program using a DATA or PARAMETER statement and used inside an ABAP Native SQL statement, must be preceded by a colon.
Dec-2008
Questions
What is native SQL?
Dec-2008