10-22-2007 12:03 PM
Hi,
I have one parameter on the selection screen, when i enter some string on that, it should give me the length of the string. can you pls send me the code.
Ex: if i enter : enter amount : then it should give the o/p is: 12
Akshitha.
10-22-2007 12:04 PM
parameters : p_str type string.
data : len type i.
len = strlen( p_str ).
write : / len.
regards
shiba dutta
10-22-2007 12:04 PM
parameters : p_str type string.
data : len type i.
len = strlen( p_str ).
write : / len.
regards
shiba dutta
10-22-2007 12:04 PM
10-22-2007 12:05 PM
10-22-2007 12:07 PM
USE
data : len type i,
str type string value 'Enter'.
len = strlen( str ).
This will give u da length in len
Reward all helpful queries
10-22-2007 12:07 PM
hi,
try this.
DATA : ln TYPE i,
st TYPE string.
PARAMETERS : str(50) TYPE c.
ln = STRLEN( str ).
WRITE:/ ln.
10-22-2007 12:13 PM
Hi,
data : l_len type i,
l_str type string value ' enter amount :'.
l_len = strlen( l_str ).
Note: make sure you give appropriate spaces in the brackets. else it will thro u an error message
Reward points if usefull
Regards,
Niyaz
10-22-2007 12:15 PM
Hi Akshitha
Pls try the following code:
PARAMETERS : p_string TYPE string.
DATA : i_length TYPE i.
i_length = STRLEN( p_string ).
WRITE : / i_length.
Pls reward points if useful.
10-22-2007 12:22 PM
use FM
SWA_STRINGLENGTH_GET
enter your string in EXPRESSION and use the others if needed use "X" for all three except EXPRESSION
EXPRESSION GFFHG
<b>CONDENSE_NO_GAPS
CONDENSE
WITH_LEADING_BLANKS </b>
also see STRING_LENGTH
STRING_LENGTH
Message was edited by:
Amit Singla