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. dtype>>Built-In Data Type in ABAP Dictionary> abap.char( len )>CHAR>> with length len>. abap.clnt>CLNT>>. The length is 3 by default. abap.cuky>CUKY>>. 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.d16n>DECFLOAT16> >. The length is 16 by default. abap.d34n>DECFLOAT34> >. The length is 34 by default. abap.datn>DATN>>. The length is 8 by default. abap.dats>DATS>>. 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_ewkb>GEOM_EWKB>> abap.int1>INT1>>. The length is 3 by default. abap.int2>INT2>>. The length is 5 by default. abap.int4>INT4>>. The length is 10 by default. abap.int8>INT8>>. The length is 19 by default. abap.lang>LANG>>. 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.rawstring>RAWSTRING>> abap.sstring(len)>SSTRING>> with length len>. abap.string>STRING>> abap.timn>TIMN>>. The length is 6 by default. abap.tims>TIMS>>. The length is 6 by default. abap.unit(2$|3)>UNIT>> with length 2 or 3. abap.utcl>UTCLONG>> . 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