In ABAP, you can use TYPE to refer to the line type of
a database table or view dbtab known to the ABAP Dictionary.
The line type of a database table dbtab is a structure
with the same name. The names and the sequence of the components in the structure
dbtab correspond exactly to the names and the sequence of
the fields in the declaration of the database table or view in the ABAP Dictionary. The ABAP data type
(see DATA) and the length of the components are derived as follows from the data types in the ABAP Dictionary:
DD data type | ABAP data type |
ACCP | N(6) |
CHAR n | C(n) |
CLNT | C(3) |
CUKY | C(5) |
CURR n, m, s | P((n + 2) / 2) DECIMALS m [NO-SIGN] |
DEC n, m, s | P((n + 2) / 2) DECIMALS m [NO-SIGN] |
DATS | D |
FLTP | F |
INT1 | no equivalent |
INT2 | no equivalent |
INT4 | I |
LCHR n | C(n) |
LRAW n | X(n) |
LANG | C(1) |
NUMC n | N(n) |
PREC | s |
QUAN n, m, s | P((n + 2) / 2) DECIMALS m [NO-SIGN] |
RAW n | X(n) |
RAWSTRING | XSTRING |
SSTRING | STRING |
STRING | STRING |
TIMS | T |
UNIT n | C(n) |
VARC n | C(n) |