Last Updated on August 4, 2022 by admin

Data types

ABAP Dictionary is used to define user-defined global data types in SAP, where the user-defined data types are type definitions and can be used in the ABAP program with TYPE clause.

Types of Data types: – The following are different types of data types

  1. Data elements
  2. Structure
  3. Table types

sap abap data types

1. Data elements

Data elements are the fields in ABAP Dictionary and are used to identify the types of columns in the database.

Data elements types: – The following are the types of data elements

  • Elementary type
  • Reference type

Element type: – It has semantic attributes such as text, value tables, length, and number of decimal places. These data types can be specify by using the following methods-

  • Assigning predefined ABAP Data type: – It specifies the data elements can be  assigned with the predefined dictionary types to a element type i.e CHAR (character) and NUMC (Numeric text) and can assign length to a selected data type.
  • Assigning a Domain: –  When a domain is created it is mandatory to specify a dictionary data type and character, You can use on domain with any number of data elements.

2. Structure data types:Structure data type is a grouping of data types in one name. When structure is created in ABAP, each component should have a name and type of data.

Reference Type: – Reference types are predefined in SAP and there are defined by the ABAP programmer.

Predefined data types : – The following are predefined data types in SAP.

Data TypeValueDefault field length
C (Character)“…”1
D (Date)8“00000000”
F (Float)80
I (Integer)40
N (Numeric)1“0…0”
P (Packed)80
T (Time)6“000000”
X (Hexadecimal)1x’0…0″

Read more for free SAP ABAP training and interview questions.