Skip to Content
0
Former Member
Jun 25, 2008 at 08:22 AM

raise error message in loop and exit

618 Views

Dear Friends,

I am looping on an internal table and validating data.

so if in between if i find any inconsistency, i want to throw an error and exit.

let me put it in sample code.

loop at itab1 into wa1.

perform check_data using wa1.

endloop.

form check_data using wa1.

if wa1-field1 is initial.

message 'No Data can't save' type 'E'.

i want to give this error and end loop processing

  • how can i give?

  • i can't use continue also as its not in loop endloop.

  • friends pls suggest.

endif.

endform.

Regards,

Simha