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.
cancel
Showing results for 
Search instead for 
Did you mean: 

easy one

Former Member
0 Kudos

please somebody there !

q1]]What is the minimum and maximum values for all the Elementary data types---state individually?

q2]]why all the lines of an internal table need to have the same datatype---i.e., the definition of internal table in the sap library notes?

thanks in advance

abaper

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

for the first question,

Just try to arrange it properly. i have distributed the header with '|'.

<b>Data Type | Initial

field length |

Valid

field length |

Initial value | Meaning |</b>

Numeric types

I 4 4 0 Integer (whole number)

F 8 8 0 Floating point number

P 8 1 - 16 0 Packed number

Character types

C 1 1 - 65535 ' … ' Text field

(alphanumeric characters)

D 8 8 '00000000' Date field

(Format: YYYYMMDD)

N 1 1 - 65535 '0 … 0' Numeric text field

(numeric characters)

T 6 6 '000000' Time field

(format: HHMMSS)

Hexadecimal type

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

for the second question: if you have different types, then it will lead to a mismatch and you till get type conflict.so you need to use the same datatypes for a particular line.

reward if helpful.

5 REPLIES 5

Former Member
0 Kudos

Hi,

for the first question,

Just try to arrange it properly. i have distributed the header with '|'.

<b>Data Type | Initial

field length |

Valid

field length |

Initial value | Meaning |</b>

Numeric types

I 4 4 0 Integer (whole number)

F 8 8 0 Floating point number

P 8 1 - 16 0 Packed number

Character types

C 1 1 - 65535 ' … ' Text field

(alphanumeric characters)

D 8 8 '00000000' Date field

(Format: YYYYMMDD)

N 1 1 - 65535 '0 … 0' Numeric text field

(numeric characters)

T 6 6 '000000' Time field

(format: HHMMSS)

Hexadecimal type

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

for the second question: if you have different types, then it will lead to a mismatch and you till get type conflict.so you need to use the same datatypes for a particular line.

reward if helpful.

Former Member
0 Kudos

Regarding your second point, what you state is not completely true...

Indeed, you can declare an internal table without any reference to the Data Dictionnary. E.g:

types : begin of linetype,
          field1    type i,
          field2(3) type c,
          field3    type n,
        end of linetype.

data : table type table of linetype.

All the lines will have the exact same type, though.

With the possible exception of deep structures, where one of the fields is a table. This table does not need to have the same number of entries for each line of its "container" table...

I think internal tables were designed to look like DB tables, in the beginning.

If you try to create more complex structures, you should use ABAP objects.

Former Member
0 Kudos

Hi

q1]]What is the minimum and maximum values for all the Elementary data types---state individually?

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm">ABAP Data types</a>

http://academic.uofs.edu/faculty/SP355/abap1.htm

Former Member
0 Kudos

Type Field Length Max Value Min Value

-


I 4 231-1 -231

F 8 1x10*308 1x10*-307

P 8 depends on size depends on size

C 1 NA

D 8 Format: YYYYMMDD

N 1 65535 1

T 6 Format: HHMMSS

X 1 65535 1

All lines of internal table should have the same datatype in order to avoid 'Type Mismatch'.

    • represents exponent.

NA - Not Applicable.

Plz reward points if helpful.

Former Member
0 Kudos

good