Application Development and Automation 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: 
Read only

general

Former Member
0 Likes
1,371

suppose if we use int1 the length is set to 3 places then what does it mean

1-byte integer between 0 to 225.plz explain me i want clear idea on it.

points will be rewarded

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,197

Hi,

if the length is set to 3 places it will take upto maximun of number 255.

if u try to enter 256 it will not accept.

Rgds,

Prajith

5 REPLIES 5
Read only

Former Member
0 Likes
1,197

TYPE_INT1

public static final int TYPE_INT1

1-byte integer . Corresponds to ABAP type 'b'.

Read only

Former Member
0 Likes
1,197

INT1 1-byte integer, integer number <= 255.

Integer will hold only values between 0 and 255.

If any value is assigned other than the range, then arthimetic exception will come ... Over flow message. And then it terminates.

Generally this data type is used when you were dealing with ASCII codes.

Raj

Read only

Former Member
0 Likes
1,197

CHAR: Character string. Fields of type CHAR may have a maximum length of only 255 in tables. If longer character fields are to be used in tables, you must choose data type LCHR. There are no restrictions on the length of such fields in structures

INT1: 1-byte integer between 0 and 255. The length is set to 3 places for this data type.

INT2: 2-byte integer between -32767 and 32767. Fields of this type should only be used for length fields. These long fields are positioned immediately in front of a long field (type LCHR, LRAW). With INSERT or UPDATE on the long field, the database interface enters the length which was actually used in the length field. The length is set to 5 places for this data type.

INT4: 4-byte integer between -2147483647 bis 2147483647. The length is set to 10 places for this data type.

Read only

Former Member
0 Likes
1,198

Hi,

if the length is set to 3 places it will take upto maximun of number 255.

if u try to enter 256 it will not accept.

Rgds,

Prajith

Read only

Former Member
0 Likes
1,197

Hi Manjula,

In Computers data is stored in binary language. When we say 1-byte integer means 8 bit binary number. The maximum value that can be represented using 8 bits is (2 ** 8 - 1 = 255). So the range is from 0 to 255. When displayed in decimal format the length is not more than 3 digits.

Regards,

Smita.