SAP AMDP HDB SQLSCRIPT MAPPING



Get Example source ABAP code based on a different SAP table
  



ABAP_AMDP - Mapping of ABAP Types to SQLScript
Elementary ABAP types are mapped to the appropriate types in SQLScript as shown in the following tables. The type mapping includes:
Interface parameters of an AMDP method
References to ABAP types using the AMDP macro $ABAP.type
The tables distinguish parameters that reference a type defined in ABAP from those that reference a built-in type in the ABAP Dictionary. No parameters or type references can be defined for SQLScript types that are not listed here.
ITOC

Mapping with Reference to Types Defined in ABAP
Numeric Types ABAP TypeHANA TypeNote
bSMALLINTSMALLINT is a two byte integer with sign
sSMALLINTSMALLINT is a two byte integer with sign
iINTEGER-
int8BIGINT-
p, length leng with dec decimal places DECIMAL, length 2len-1 with dec decimal places-
decfloat16VARBINARY, length 8Cannot be interpreted as a number in the database and no calculations can be performed
decfloat34VARBINARY, length 16Cannot be interpreted as a number in the database and no calculations can be performed
fDOUBLE-
Character-Like Types ABAP TypeHANA TypeNote
c, length lenNVARCHAR, length len-
stringNCLOBNot allowed for input/output parameters
n, length lenNVARCHAR, length lenA suitable casting to a numeric database type must be performed before calculations can be made in the database. Numeric results must be transformed back to the ABAP format.
Byte-Like Types ABAP TypeHANA TypeNote
x, length lenVARBINARY, length len-
xstringBLOBNot allowed for input/output parameters
Date Types, Time Types, and Time Stamp Types ABAP TypeHANA TypeNote
dNVARCHAR, length 8A casting to the DATE type of the database must be performed before date calculations can be made. SQLScript offers the built-in function to_dats.
tNVARCHAR, length 6A casting to the TIME type of the database must be performed before time calculations can be made. SQLScript offers the built-in function to_tims.
utclongTIMESTAMP-

Mapping with Reference to Types Defined in ABAP Dictionary
The built-in types in ABAP Dictionary are mapped like the associated ABAP types, with the following exceptions. Dictionary TypeHANA TypeNote
DECFLOAT16SMALLDECIMALRecommended mapping
DECFLOAT34DECIMALRecommended mapping
DF16_DEC, length leng with dec decimal places DECIMAL, length 2len-1 with dec decimal places Value range on the database is smaller than in ABAP
DF34_DEC, length leng with dec decimal places DECIMAL, length 2len-1 with dec decimal places Value range on the database is smaller than in ABAP
DF16_SCL-Obsolete, not supported
DF34_SCL-Obsolete, not supported
DATNDATERecommended mapping
TIMNTIMERecommended mapping
GEOM_EWKBST_GEOMETRYRecommended mapping
SSTRING, length lenNVARCHAR, length len-



Latest notes:

In the recommended mappings, the ABAP type should be defined with reference to the built-in ABAP Dictionary type to define the more suitable HANA type.
NON_V5_HINTS
ABAP_HINT_END