‎2007 May 29 1:17 PM
Hi,
Can anyone tell me how bits/bytes is one character... Is there any function module to find out the length of a character / string / any other data types in terms of bits/bytes???
Regards
Jiku
‎2007 May 29 1:20 PM
8 bits = 1 byte
To find out the length of string you can use the command STRLEN
‎2007 May 29 1:20 PM
One character is 1 byte. This differs from data type to data type. Packed contains 2 numbers packed into 1 byte. Check out the help on data types. It has some info on this.
‎2007 May 29 1:23 PM
hi
1 byte = 8 bits.
to find out lenght of a given string then use strlrn function.
for ex: 's1 = 'asdf'
data: i1 type i.
i1 = strlen(s1)
write:/10 i1.
if helpful reward some points.
with regards,
suresh babu aluri.
‎2007 May 29 1:23 PM
Hi Jiku,
length of a character depends on your system settings, if the system is running on UniCode (2 Byte) or Non UniCode (1 Byte).
Length of a string: http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb33d9358411d1829f0000e829fbfe/frameset.htm
Length of other data type look into DESCRIBE syntax.
Best regards,
ok
Message was edited by:
Oliver Kohl
‎2007 May 29 1:31 PM
Hi,
8 bits = 1 byte.
data : str(10) value 'Apple',
ln(10).
ln = STRLEN( str ).
write ln.
Regards,
Bhaskar