How to end/terminate a batch input session?

When you run batch input from LSMW in foreground mode. You can`t just quit it normally with Stop Transaction. So how do you quit it ? Use BEND command.

‘/BEND’ command will terminate a batch input processing and mark session as incorrect. Normally this command is used in sm35 in foreground mode.