02-07-2008 1:05 PM
Hi,
Suppose i declared a variable
test(20) type c.
test = '123'.
Now if you see out of 20 characters number of charecters filled in is 3. Or is there any way to find out string length???
02-07-2008 1:07 PM
data : w_len type i.
w_len = strlen( w_field ).
to have the lenght of the content of w_field.
02-07-2008 1:07 PM
data : w_len type i.
w_len = strlen( w_field ).
to have the lenght of the content of w_field.
02-07-2008 1:08 PM
Hi,
Use STrlen statement to get the length
Or fm SWA_STRINGLENGTH_GET
Import parameters Value
EXPRESSION 1666
CONDENSE_NO_GAPS
CONDENSE
WITH_LEADING_BLANKS
Export parameters Value
LENGTH 004
EX_MODIFY_EXPRESSION 1666
regards
Shiva
02-07-2008 1:09 PM
USE STRLEN COMMAND.
DATA : TEST(20).
DATA : V TYPE I.
TEST = '123'.
V = STRLEN( TEST ).
WRITE 😕 V.
02-07-2008 1:10 PM
Hi,
DATA:CHAR(20) TYPE C.
CHAR = '123'.
DATA:LEN TYPE I.
LEN = STRLEN( CHAR ).
WRITE:LEN.
Output will be 3.
02-07-2008 1:31 PM
Use: STRLEN(variable). to get the number of characters currently contained in the variable.