SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Dictionary → Classic Objects in ABAP Dictionary → Views →External Views
An external view is a special view in ABAP Dictionary that defines an SAP HANA View in SAP HANA XSC in ABAP programs. The structure type defined using the view fields of an external view can be referenced in ABAP programs using TYPE. An external view can be specified as a source in Open SQL read statements
External views can only be created using the ABAP Development Tools (ADT) and only if the current database is an SAP HANA database. The SAP HANA view must exist in the SAP HANA repository in SAP HANA XSC. For SAP HANA views in SAP HANA XSA, no external views can be defined in ADT.
When an external view is activated, an alias with the name of the view is created on the SAP HANA database that points to the SAP HANA view. The names of the view fields of the external view can be defined differently from the names of the view fields of the SAP HANA view. The runtime object of the external view accesses the alias on the SAP HANA database. This performs a mapping of HANA-specific data types to the built-in types in ABAP Dictionary. 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 |
BIGINT | 8-byte integer | INT8 |
DECIMAL | Packed number | DEC |
SMALLDECIMAL | Packed number | DEC |
FLOAT | Binary floating point number | FLTP |
NVARCHAR | Unicode character string | CHAR |
VARBINARY | Byte string | RAW |
BLOB | Byte string | RAWSTRING |
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.
An external view can only be read using Open SQL if an SAP HANA database is being accessed in which the associated SAP HANA view exists. If not, the non-handleable exception DBSQL_TABLE_UNKNOWN is raised. External views can exist actively and be used as data types in a system whose standard database is not an SAP HANA database. Views of this type cannot, however, be accessed through the standard connection using Open SQL, only through a secondary connection to an SAP HANA database. Conversely, when an SAP HANA view in an SAP HANA database is accessed through a secondary connection in the current system, only an identically named database table or a structure suitable for any view in ABAP Dictionary can exist actively in ABAP Dictionary.
Notes