Skip to Content
0
Former Member
Sep 26, 2005 at 01:40 PM

offset value

216 Views

Hai,

Iam new to abap can any one solve the above example:

data: c type i,

c1 type i,

len type i,

flag type c.

parameters word(20).

c = 0.

len = strlen( word ).

c1 = len - 1.

len = len / 2.

flag = ' '.

do len times.

if ( wordc(1) <> wordc1(1) ).

flag = 'X'.

endif.

enddo.

if flag = 'X'.

write: / 'Word', word, 'is not Palindrome'.

else.

write: / 'Word', word, 'is Palindrome'.

endif.

Inthe above program

if word = abap

than what is the value of

wordc(1) and wordc1(1)

and how many times the do statement work.

Please explain the above program with the above example.