0 votes
in Technology by (1.0m points)
Explain about SAP ABAP - Data Types?

1 Answer

0 votes
by (1.0m points)

While programming in ABAP, we need to use a variety of variables to store various information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. You may like to store information of various data types like character, integer, floating point, etc. 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

ABAP offers the programmer a rich assortment of fixed length as well as variable length data types. Following table lists down ABAP elementary data types −

Type Keyword
Byte field X
Text field C
Integer I
Floating point F
Packed number P
Text string STRING

Some of the fields and numbers can be modified using one or more names as the following −

  • byte
  • numeric
  • character-like

The following table shows the data type, how much memory it takes to store the value in memory, and the minimum and maximum value that could be stored in such type of variables.

Type Typical Length Typical Range
X 1 byte Any byte values (00 to FF)
C 1 character 1 to 65535
N (numeric text filed) 1 character 1 to 65535
D (character-like date) 8 characters 8 characters
T (character-like time) 6 characters 6 characters
I 4 bytes -2147483648 to 2147483647
F 8 bytes 2.2250738585072014E-308 to 1.7976931348623157E+308 positive or negative
P 8 bytes [-10^(2len -1) +1] to [+10^(2len -1) 1] (where len = fixed length)
STRING Variable Any alphanumeric characters
XSTRING (byte string) Variable Any byte values (00 to FF)

Example

REPORT YR_SEP_12. 
DATA text_line TYPE C LENGTH 40. 
text_line = 'A Chapter on Data Types'. 
Write text_line. 

DATA text_string TYPE STRING. 
text_string = 'A Program in ABAP'. 
Write / text_string. 

DATA d_date TYPE D<span style="color:#666600" c

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Learn More with Blogmepost

blogmepost Online Test

NCERT Questions & Answers

  • NCERT Class 12 Maths Solutions
  • NCERT Class 12 Physics Solutions
  • NCERT Class 12 Chemistry Solutions
  • NCERT Class 12 Biology Solutions
  • NCERT Class 10 Science Solutions
  • NCERT Class 10 Maths Solutions
blogmepost Q&A

CBSE Questions & Answers Portal

  • CBSE Class 12 Maths Questions Answers
  • CBSE Class 12 Physics Questions Answers
  • CBSE Class 12 Chemistry Questions Answers
  • CBSE Class 12 Biology Questions Answers
  • CBSE Class 10 Science Questions Answers
  • CBSE Class 10 Maths Questions Answers
Blogmepost

Learn Math Formula, Revise Notes

  • JEE Crash Course Questions & Answers
  • NCERT Course Questions and Answers
  • CBSE Board Questions Bank
  • ICSE Board Questions Bank
  • Free Study Materials
  • Question & Answers Bank for All Classes
  • Text Book Solutions
  • Previous Year Question Paper
  • NCERT Book Solutions

  • NCERT
  • NCERT Solutions
  • NCERT Solutions for Class 12 Maths
  • NCERT Solutions for Class 12 Physics
  • NCERT Solutions for Class 12 Chemistry
  • NCERT Solutions for Class 12 Biology
  • NCERT Solutions for Class 11 Maths
  • NCERT Solutions for Class 11 Physics
  • NCERT Solutions for Class 11 Chemistry
  • NCERT Solutions for Class 11 Biology
  • NCERT Solutions for Class 10 Maths
  • NCERT Solutions for Class 10 Science
  • NCERT Solutions for Class 9 Maths
  • NCERT Solutions for Class 9 Science
  • CBSE Classes

  • CBSE Class 5 Questions
  • CBSE Class 6 Questions
  • CBSE Class 7 Questions
  • CBSE Class 8 Questions
  • CBSE Class 9 Questions
  • CBSE Class 10 Questions
  • CBSE Class 10 Maths Questions
  • CBSE Class 11 Commerce Questions
  • CBSE Class 11 Engineering Questions
  • CBSE Class 11 Medical Questions
  • CBSE Class 12 Commerce Questions
  • CBSE Class 12 Maths Questions
  • CBSE Class 12 Engineering Questions
  • CBSE Class 12 Medical Questions
  • BOARDS

  • CBSE
  • ICSE
  • NCERT
  • IGCSE
  • Andhra Pradesh
  • Bihar
  • Gujarat
  • Jharkhand
  • Karnataka
  • Kerala
  • Madhya Pradesh
  • Maharashtra
  • Punjab
  • Rajasthan
...