cancel
Showing results for 
Search instead for 
Did you mean: 

can some one help me with a simple report it is the only code that is ending with a run-time error.

Former Member
0 Kudos

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

REPORT  ZPROG3.

*&---------------------------------------------------------------------*

  include  zprog_top.

  include  zprog_sCR.

  lr = lmatnr-high - lmatnr-low.

  hi_lmatnr = lmatnr-high.

  lo_lmatnr = lmatnr-low.

  lo_limit = lmatnr-low + l2matnr-low.

  hi_limit = lmatnr-low + l2matnr-high.

*  break-point.

*tables itab.

  write / lmatnr.

if lo_limit lt  hi_lmatnr and hi_limit lt  hi_lmatnr .

      while lo_limit < lmatnr-high.

        lo_limit = lo_limit + 1.

        write  / lo_limit.

      endwhile.

    else  .

      MESSAGE 'out of limit.' TYPE 's'.

  endif.

snippets

include  zprog_sCR.

select-options lmatnr  for mara-MATNR .

select-options l2matnr  for mara-MATNR .

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

You change the message option the write in uppercase.

You try this:

MESSAGE 'out of limit.' TYPE 's'.

By:

MESSAGE 'out of limit.' TYPE 'S'.

Good luck.