SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP Database Accesses → ABAP and SAP HANA →Access to SAP HANA Views Using External Views
Open SQL provides access to all database tables and views whose structures are defined as repository objects in ABAP Dictionary. An SAP HANA View (Attribute View, Analytic View, Calculation View), on the other hand, is an entity of the SAP HANA database and is defined here using SAP HANA Studio. This uses HANA-specific data types and different naming conventions to ABAP Dictionary also apply. This means that direct access to an SAP HANA view using Open SQL is not possible.
An external view is a special view in ABAP Dictionary that functions as a proxy for an SAP HANA view and which can be accessed using SAP HANA and Open SQL. External views can only be created using ABAP Development Tools. This maps HANA-specific data types to types in ABAP Dictionary. The names of the types can be modified. The following table lists the currently supported HANA-specific data types and indicates which ABAP Dictionary types they are mapped to by default.
HANA Type | Meaning | Type in ABAP Dictionary |
SMALLINT | 2-byte integer | INT2 |
INTEGER | 4-byte integer | INT4 |
DECIMAL | Packed number | DEC |
SMALLDECIMAL | Packed number | DEC |
FLOAT | Binary floating point number | FLTP |
VARCHAR | Character string | CHAR |
NVARCHAR | Unicode character string | CHAR |
VARBINARY | Byte string | RAW |
BLOB | Byte string | RAWSTRING |
CLOB | Character string | STRING |
NCLOB | Unicode character string | STRING |
External views can be displayed in the ABAP Dictionary tool in the SAP GUI-based ABAP Workbench, but not edited. Like a regular view, an external view can be referenced as a structured data type and all Open SQL reads are possible.
Note
The following restrictions currently apply to the use of external views in ABAP programs: