Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

data type

Former Member
0 Kudos

Hi all,

I want to know the data type of the value that is entered in the field.

Pls tell me the possible ways.


Former Member
0 Kudos


Press F1 on that field then press technical attributes icon, then a popup will come there you find the field, double click on that one, then it will show you the Data type



Former Member
0 Kudos


press f1 on that field

u will get discription

in that one option is there technical information

if click that u will get that feild name

double click on that field

you will get the data type of that obj

reward if usefull

Former Member
0 Kudos

press f1 .



Predefined ABAP Types

These data types are predefined in the R/3 System kernel, and are visible in all ABAP programs. You can use predefined types to define local data types and objects in a program and to specify the type of interface parameters and field symbols.

Predefined Elementary ABAP Types with Fixed Length

These predefined elementary data types are used to specify the types of individual fields whose lengths are always fixed at runtime. The following table shows the different fixed-length data types. All field lengths are specified in bytes.

Data Type


field length


field length

Initial value


Numeric types





Integer (whole number)





Floating point number



1 - 16


Packed number

Character types



1 - 65535

' … '

Text field

(alphanumeric characters)





Date field

(Format: YYYYMMDD)



1 - 65535

'0 … 0'

Numeric text field

(numeric characters)





Time field

(format: HHMMSS)

Hexadecimal type



1 - 65535

X'0 … 0'

Hexadecimal field

Data types D, F, I, and T describe the technical attributes of a data object fully. Data types C, N, P, and X are generic. When you use a generic type to define a local data type in a program or a data objet, you must specify the field length and, in the case of type P, the number of decimal places. When you user generic types to specify the types of interface parameters of field symbols, you do not have to specify the technical attributes.

The initial value (and initial field length in the case of the generic types), are values that are used implicitly in short forms of the TYPES and DATA statements.

The fixed-length predefined types are divided into:

Numeric Types

As well as the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.

integers - type I

The value range of type I numbers is -2*31 to 2*31-1 and includes only whole numbers. Non-integer results of arithmetic operations (e.g. fractions) are rounded, not truncated.

You can use type I data for counters, numbers of items, indexes, time periods, and so on.

Packed numbers - type P

Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.

You can use type P data for such values as distances, weights, amounts of money, and so on.

Floating point numbers - type F

The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.

You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.

Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.

Character types

Of the five non-numeric types, the four types C, D, N, and T are character types. Fields with these types are known as character fields. Each position in one of these fields takes up enough space for the code of one character. Currently, ABAP only works with single-byte codes such as ASCII and EBCDI. However, an adaptation to UNICODE is in preparation. Under UNICODE, each character occupies two or four bytes.

Hexadecimal Type

The remaining non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits.

Predefined Elementary ABAP Types with Variable Length

These predefined elementary data types are used to specify the types of individual fields whose lengths are not fixed until runtime. There are two predefined ABAP data types with variable length that are generically known as strings:

STRING for character strings

A string is a sequence of characters with variable length. A string can contain any number of alphanumeric characters. The length of a string is the number of characters multiplied by the length required for the internal representation of a single character.

XSTRING for byte strings

A byte string is a hexadecimal type with variable length. It can contain any number of bytes. The length of a byte string is the same as the number of bytes.

When you create a string as a data object, only a string header is created statically. This contains administrative information. The actual data objects are created and modified dynamically at runtime by operational statements.

The initial value of a string is the empty string with length 0. A structure that contains a string is handled like a deep structure. This means that there are no conversion rules for structures that contain strings.

Predefined Complex Data Types

ABAP contains no predefined complex data types that you can use to define local data types or data objects in a program. All complex data types are based on elementary ABAP types, and are constructed in ABAP programs or in the ABAP Dictionary.

Message was edited by:

Karthikeyan Pandurangan

0 Kudos

Dear all,

I want to know the data type of the VALUE in that field DYNAMICALLY.

Like whether it is date or char or time etc.,

0 Kudos

Hi Srujan,

You can use DESC FIELD <fieldname> TYPE <a variable of single char value>.

Now this variable shall inform you the type of data that is being used in that field.

For more info on this goto the transaction ABAPDOCU and search for DESC FIELD.

<b>Reward points if this helps,</b>


Former Member
0 Kudos


<u><b>Data Types</b></u> <u><b>Field Length</b></u> <u><b>Valid length</b></u> <u><b>Initial value</b></u> <u><b>Meaning</b></u>

I 4 4 0 Integer(whole number)

F 8 8 0 Floating Number

P 8 1-16 0 Packed number

C 1 1-65535 ' .. ' Alphanumeric character

D 8 8 '00000000' Date field

N 1 1-65535 '0..0' Numeric character

T 6 6 '000000' Time field (HH:MM:SS)

X 1 1-65535 X'0..0' Hexadecimal field



Former Member
0 Kudos

Check this code :;

      l_date TYPE d,
      l_char(10) type c,
      l_numc(10) type n,
      typ TYPE string.

WRITE:/ typ.

WRITE:/ typ.

WRITE:/ typ.

Output is




Reward if useful