sapdev logo background
sapdev logo sapdev logo
Comments

SAP BUILT IN TYPES DICTIONARY documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Predefined Types in ABAP Dictionary
The following table lists the predefined types in ABAP Dictionary . These types cannot be used directly in ABAP programs, and are therefore also known as external data types. Instead, they are used in ABAP Dictionary to define data types and database fields that can be referenced from ABAP programs. Each predefined data type in ABAP Dictionary is assigned to the predefined ABAP type listed in the last column of the table.
Type Permitted Positions m Meaning
ABAP Type
ACCP 6Posting period n
, length 6
CHAR 1-30000Character string
c , length m
CLNT 3Client c , length 3
CUKY 5 Currency key for currency fields
c , length 5
CURR 1-31 Currency field in BCD format
p , length (m+1)/2
DATS 8 Date d
DEC 1-31Packed number BCD format
p , length (m+1)/2
DF16_DEC 1-15 Decimal floating point number stored in BCD format
decfloat16
DF16_RAW 16 Decimal floating point number stored in binary format
decfloat16
DF16_SCL 16 Decimal floating point number stored in binary format with subsequent scaling
decfloat16
DF34_DEC 1-31 Decimal floating point number stored in BCD format
decfloat34
DF34_RAW 34 Decimal floating point number stored in binary format
decfloat34
DF34_SCL 34 Decimal floating point number stored in binary format with subsequent scaling
decfloat34
FLTP 16Floating point number
f
INT1 31-byte integer b

INT2 52-byte integer s

INT4 104-byte integer i

INT8 198-Byte-Integer int8

LANG 1Language c , length 1
LCHR 256-...Long character string
c , length m
LRAW 256-...Long byte string
x , length m
NUMC 1-255 Numeric text
n , length m
PREC 2Obsolete data type s

QUAN 1-31 Quantity field in BCD format
p , length (m+1)/2
RAW 1-255Byte string x , length m
RAWSTRING 256-...Byte string ( BLOB
) xstring
SSTRING 1-1333Character string
string
STRING 256-...Character string ( CLOB
) string
TIMS 6Time t
UNIT 2-3 Unit key of a quantity field
c , length m

Notes
  • The ABAP types b and s , assigned to the types INT1 and INT2 , cannot be specified either statically or dynamically in ABAP statements. These types only occur in ABAP programs, in relation to the types INT1 and INT2 from ABAP Dictionary.

  • The types RAWSTRING and STRING for

  • LOB s have a variable length. A maximum length can be specified, but there is no upper limit.
  • The type SSTRING also has a variable length, but there is an upper limit. The maximum length is 1333. The benefit of using it, and not CHAR , is that it is assigned to the ABAP type string . Its advantage over STRING is that it can also be used for key fields in database tables and in WHERE conditions

  • .
  • The maximum length of data types that are based on RAWSTRING , STRING , and SSTRING can be determined using the predefined function dbmaxlen .

  • The maximum number of characters of the types LCHR and LRAW

  • is the value of a preceding INT2 field in a transparent database table. If the statement SELECT is used to read an LCHR field and an LRAW field, the preceding length field must also be read.
  • If a data type CURR , DEC , DF34_DEC , DF16_DEC

  • , or QUAN has an even number of characters (not recommended), the length of the associated ABAP type p is rounded up and hence becomes the next highest uneven number.
  • The data type PREC is obsolete and should no longer be used. In ABAP Dictionary and in ABAP programs, it is handled like INT2 , despite the predefined length (2). The length 2 is relevant only for screen fields of the type PREC , which can have two-character positive values at most. The property sign cannot be set for a domain of the type PREC

  • For more information and further tips, see Use of Predefined Types from ABAP Dictionary .
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




  • BUILT_IN_TYPES_COMPLETE
    BUILT_IN_TYPES_GENERIC




    comments powered by Disqus