07-11-2007 10:35 AM
Hi,
Plz let me know how to write this program.
Accept the string and disply the reverse of the string, Mention it a Palindrome.
07-11-2007 10:36 AM
07-11-2007 10:37 AM
Hi,
call function 'STRING_REVERSE'
exporting
string = p_input
lang = sy-langu
importing
rstring = output
exceptions
too_small = 1
others = 2.
Reward if useful!
07-11-2007 10:40 AM
hI,
Is it possible to write the reverse of the string with out calling FM.
07-11-2007 10:46 AM
07-11-2007 11:00 AM
hi,
data :p_input(10) type c value 'ABCD',output(10) type c .
call function 'STRING_REVERSE'
exporting
string = p_input
lang = sy-langu
importing
rstring = output
exceptions
too_small = 1
others = 2.
write output.
ans: DCBA
thnaks
jaideep
*reward points if useful...
07-11-2007 11:01 AM
do like this
data : wtab like itab.
data : text(20) value 'MALAYALAM',
len type i,
pos type i,
ntext(20),
vchar.
compute len = strlen( text ).
pos = len - 1.
do len times.
vchar = text+pos(1).
concatenate ntext vchar into ntext.
pos = pos - 1.
enddo.
if text Cs ntext.
write : / 'Pallindrome'.
endif.
regards
shiba dutta
07-11-2007 11:02 AM
hi,
chk this simple pgm.
data : c(5) value 'ABCDE'.
data : l type i,
i type i value -1.
data : str like c.
l = strlen( c ).
do l times.
i = i + 1.
l = l - 1.
STR+i(1) = C+l(1).
enddo.
write STR.
Rgds
Reshma
04-17-2013 2:03 PM
04-17-2013 2:05 PM