Skip to Content
author's profile photo Former Member
Former Member

offset value

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 26, 2005 at 01:26 PM

    you should have posted this in ABAP forum.

    anyhow to answer your question.

    if word = abap

    than what is the value of

    wordc(1) and wordc1(1)

    c1 = 4 - 1 .

    c = 0

    word+c(1) => a

    word+c1(1) => p

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.