‎2007 May 08 10:33 AM
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
‎2007 May 08 10:56 AM
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
‎2007 May 08 10:47 AM
TYPE_INT1
public static final int TYPE_INT1
1-byte integer . Corresponds to ABAP type 'b'.
‎2007 May 08 10:47 AM
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
‎2007 May 08 10:48 AM
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.
‎2007 May 08 10:56 AM
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
‎2007 May 08 10:57 AM
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.