Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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).
      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) .

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.

Former Member
Not what you were looking for? View more on this topic or Ask a question