Ingest HANA views from SAP

To extract data from a HANA view to Foundry, the HANA view needs to be published as an external view. This document describes the steps for doing that.

Prerequisites

  • SAP HANA Studio or SAP HANA Tools for Eclipse
  • ABAP Development Tools for Eclipse

Note that these tools are available from SAP development tools ↗.

External views

An external view is a special view in the ABAP Dictionary that defines an SAP HANA view in ABAP programs.

External views can only be created using the ABAP Development Tools (ADT) and only if the current database is an SAP HANA database.

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. This performs a mapping of HANA-specific data types to the predefined 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 TypeMeaningType in ABAP Dictionary
SMALLINT2-byte integerINT2
INTEGER4-byte integerINT4
BIGINT8-byte integerINT8
DECIMALPacked numberDEC
SMALLDECIMALPacked numberDEC
FLOATBinary floating point numberFLTP
NVARCHARUnicode character stringCHAR
VARBINARYByte stringRAW
BLOBByte stringRAWSTRING
NCLOBUnicode character stringSTRING

External views can be displayed using the ABAP Dictionary tool in the SAP GUI-based ABAP Workbench, but not edited.

Creating external view on top of SAP HANA view

  1. Create new ABAP repository object and select Dictionary View.
  2. In the next screen, choose the External View option and give a name and description to your external view.
  3. Next, you can verify the column mapping from the SAP HANA view to the external view.
  4. You can test your external view by displaying its content using the SE16 transaction code.

Ingesting HANA views in Foundry

Foundry can ingest the external views that you create via a sync.

HANA views are not yet part of the list of supported SAP Object Types in the sync UI. To configure them, navigate to the Advanced view and define your sync as follows:

Copied!
1 2 3 type: magritte-sap-source-adapter sapType: hanaview obj: <NAME_OF_VIEW>