Ads

SAP ABAP Data Types

SAP ABAP Data Types  


Data types which are used  to store information of various data types like character, integer, floating point, etc.So as a ABAP consultant,to write any code ,we have to understand data types and how to declare data types and how much space will take every data type variable in the SAP system.


TypeField
 Byte field    X
Text field    C
Integer    I
Floating Point   F
Packed number   P
Text string  STRING

Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory.


Elementary Data Types in SAP


ABAP offers the programmer a rich assortment of fixed length as well as variable length data types.
Some of the fields and numbers can be modified using one or more names as the following: byte numeric character-like


Type Type LengthType range
X1 byte                                            Any byte values (00 to FF)
C1 character                                               1 to 65535
N1 character                                               1 to 65535
D8 characters                                               8 characters
T6 characters                                              6 characters
I4 bytes                                             -2147483648 to 2147483647
F8 bytes                              2.2250738585072014E-308 to 1.7976931348623157E+308 positive or negative
P8 bytes                                  [-10^(2len -1) +1] to [+10^(2len -1) 1] (where len = fixed length)
STRINGVariable                                   Any alphanumeric characters
XSTRINGVariable                                   Any byte values (00 to FF)

Complex and Reference Types in ABAP


The complex types are classified into Structure types and Table types.In the structure types, elementary types and structures are grouped together.The ABAP OOP run-time type services enables declaration of data items at run-time.


ParameterDescription
Line or row type                  "Row of an internal table can be of elementary, complex or reference type.
"
Key                       Specifies a field or a group of fields as a key of an internal table that identifies the table rows. A key contains the fields of elementary types.
Access method
"Describes how ABAP programs access individual table entries

Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced