cancel
Showing results for 
Search instead for 
Did you mean: 

code for pallendrome

Former Member
0 Kudos
481

hi experts

write a program for string PALLENDROME and should display the message is the output string is

not pallendrome.

eg : SAP r ABAP then it should display SAp is not pallendrome.

plz help me.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,

Refer this thread:

Regards,

Gayathri

Former Member
0 Kudos

HI

parameters: str(10) type c.

data: a type i,z type i,

b,c type c.

a = strlen( str ) / 2.

b = str.

do a times.

a = a - 1.

c = str+a(1).

write: c.

enddo.

if b = c.

write:/ 'palindrome'.

else.

write:/ 'not a palindrome'.

endif.

HOPE THIS HELPS,

PRIYA

Former Member
0 Kudos

Hi,

Check this Out

report YXYZ.

parameter S(10) type C.

data S1(10) type C.

call function 'STRING_REVERSE'

exporting

STRING = S

LANG = 'E'

importing

RSTRING = S1.

if S = S1.

write 😕 S, 'is palindrom'.

else.

write 😕 S, 'is not palindrom'.

endif.

Regards,

Santosh