11-06-2007 9:06 AM
hi,
i wont to find the length of string how couled i do that?
regards
11-06-2007 9:09 AM
hi ricardo
plz try this:
DATA: w_len TYPE i.
w_len = STRLEN( v_pattern2 ).
Regards
Shimit
11-06-2007 9:08 AM
Hi,
Use STRLEN() function.
e.g
data: l_length type i,
str type strings.
l_length = strlen( str ).
11-06-2007 9:08 AM
11-06-2007 9:09 AM
hi ricardo
plz try this:
DATA: w_len TYPE i.
w_len = STRLEN( v_pattern2 ).
Regards
Shimit
11-06-2007 9:09 AM
DATA : len TYPE i
DATA : str TYPE CHAR10 value 'ABACD'.
len = strlen( str ).
WRITE 😕 len.
11-06-2007 9:09 AM
Hi
STRLEN( ).
Finding the Length of a Character String
The ABAP function STRLEN returns the length of a string up to the last character that is not a space.
[COMPUTE] <n> = STRLEN( <c> ).
STRLEN processes any operand <c> as a character data type, regardless of its real type. There is no type conversion.
As with mathematical functions, the keyword COMPUTE is optional.
Example:
DATA: INT TYPE I,
WORD1(20) VALUE '12345'.
WORD2(20).
WORD3(20) VALUE ' 4 '.
INT = STRLEN( WORD1 ). WRITE INT.
INT = STRLEN( WORD2 ). WRITE / INT.
INT = STRLEN( WORD3 ). WRITE / INT.
The results are 5 , 0, and 4 respectively.
Regards
Pavan
11-06-2007 9:09 AM
11-06-2007 9:09 AM
use
LEN = STRLEN( variable to find string length).
in len variable we will get the string length
11-06-2007 9:10 AM
data : name type string,
l_length type i.
i_length = strlen (name).
thanks and regards
vennila.
11-06-2007 9:10 AM
11-06-2007 9:10 AM
Hi,
DATA:
W_STRING1 TYPE STRING,
W_LENGTH TYPE I.
W_STRING = 'ABCDEFGHIJKL'.
W_LENGTH = STRLEN( W_STRING ).
WRITE:
/ 'Length of the string is ', W_LENGTH.
Regards,
Rama.Pammi
11-06-2007 9:10 AM
Hi,
Copy this code and you will get the solution.
Data: a(50) value 'PQRPQRPQRXYZ',
b type i.
b = strlen( a ).
write:/ b.
Reward if helpful.
Regards,
Harini.S