SAP CDS DTYPE



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS_DDL - CDS Simple Type, dtype

ABAP_SYNTAX
... dtype ...

What does it do?
Types a CDS simple type in CDS TDL.
Typing can be specified with dtype using a built-in data type from ABAP Dictionary. The table below shows the possible options for dtype and their meanings. dtypeBuilt-In Data Type in ABAP Dictionary
abap.char( len )CHAR with length len.
abap.clntCLNT. The length is 3 by default.
abap.cukyCUKY. The length is 5 by default.
abap.curr(len,dec)CURR with length len and with dec decimal places. dec can be specified as 1 or 2. No other value is valid.
abap.d16nDECFLOAT16 . The length is 16 by default.
abap.d34nDECFLOAT34 . The length is 34 by default.
abap.datnDATN. The length is 8 by default.
abap.datsDATS. The length is 8 by default.
abap.dec(len,$[dec$])DEC with length len and with dec decimal places. len must be a value between 1 and 31. dec is optional and can be a value between 1 and 14.
abap.geom_ewkbGEOM_EWKB
abap.int1INT1. The length is 3 by default.
abap.int2INT2. The length is 5 by default.
abap.int4INT4. The length is 10 by default.
abap.int8INT8. The length is 19 by default.
abap.langLANG. The length is 1 by default.
abap.numc( len )NUMC with length len.
abap.quan(len,$[dec$])QUAN with length len and with dec decimal places. dec is optional.
abap.raw(len)RAW with length len.
abap.rawstringRAWSTRING
abap.sstring(len)SSTRING with length len.
abap.stringSTRING
abap.timnTIMN. The length is 6 by default.
abap.timsTIMS. The length is 6 by default.
abap.unit(2$|3)UNIT with length 2 or 3.
abap.utclUTCLONG . The length is 27 by default.
len and dec must be used to specify values for the length and decimal places of the respective generic type. The values specified here in parentheses must be within the value ranges allowed by ABAP Dictionary.



Latest notes:

Unlike typing in CDS DDL, data types abap.accp and abap.fltp are not supported in CDS TDL. The data type abap.accp is deprecated. Instead of abap.fltp, a decimal floating point number type can be used.
NON_V5_HINTS
ABAP_HINT_END
VX_EXA_ONLY

ABAP_EXAMPLE_VX
The following CDS simple type is based on the built-in ABAP Dictionary data type INT4.
DRTY DEMO_SIMPLE_TYPE
ABAP_EXAMPLE_END