Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

type-incompatible error

Former Member
0 Likes
281

hi

am getting ''P" and "L" type-incompatible.

REPORT  ZTREE1.
      data: l,                         "leading  characters
            t,                         "trailing characters
            done.                      "done flag
      parameters p(25) default '    Vendor Number'.
      while done = ' '                 "the expression is evaluated first
          vary l from p+0  next p+1    "then vary assignments are performed
          vary t from p+24 next p+23.
         if l = ' ' and t = ' '.
             l = t = '-'.
         else.
             done = 'X'.
             endif.
         endwhile.
 write: / p.

pls try 2 execute this code

it giving above error

how can i remove that.

ketan..

1 REPLY 1
Read only

StMou
Active Participant
0 Likes
254

Hi,

Try this


REPORT  ZTREE1.
      data: l type C length 1,                         "leading  characters
            t type C length 1 ,                         "trailing characters
            done.                      "done flag
      parameters p type C LENGTH 25 default '    Vendor Number'.
      while done = ' '                 "the expression is evaluated first
          vary l from p+0(1)
                 next p+1(1) RANGE P    "then vary assignments are performed
          vary t from p+24(1)
                 next p+23(1) RANGE P.
         if l = ' ' and t = ' '.
             l = t = '-'.
         else.
             done = 'X'.
             endif.
         endwhile.
 write: / p.

Rgds