Application Development 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: 

field When out of range doesnt go into message but goes to runtime error

Former Member
0 Kudos

Hi !

I have this code part in mt report which runs into runtime error

when I put anything with alphabet to check if its giving me error message

it goes out into runtime instead. The field type is CHAR still it does not gioves message but instead goes into runtime error.

  if sscrfields-ucomm = 'ONLI'.
    if pa_dls = 'X'.
      if pa_regio ne 'AB' and pa_regio ne 'MB'
      and pa_regio ne 'SK' and pa_regio ne 'BC'.
        message e010(zsd).
      endif.
      if pa_zlsd not between 01 and 16 .<<<<<<<<<<problem here
        message e044(zsd) .

      elseif pa_zsec not between  01 and 36.
        message e045(zsd) .

      elseif pa_ztwp not between 001 and 126.
        message e046(zsd) .

      elseif pa_zrang  not between 01 and 34.
        message e047(zsd) .

      elseif pa_zmeri not between 01 and 06.
        message e048(zsd) .
      endif.

it wiol be the same problem for other fields too.

I am not sure why its going into runtime

instead of giving messagethat its not within range.

When i but a number out of that range it does give me

error message saying its out of range.

2 REPLIES 2

Former Member
0 Kudos

.

0 Kudos

just try, like below

if pa_zlsd not between '01' and '16'--->insert them in ' '

thanq