Explicitly change the Batch Job status programatically
I am runnign one program from batch mode. Eve if i have error in my program in aby step like 'Delivery does not exist' or 'Shipment does not exist', my program is executed in batch mode with status as 'Finished' - but no spool number is generated. And i am showing all these error in Application Log(SLG1). I want my batch job status to be 'Cancelled' when there is atleast one error.
In online mode , i can come out of the program control incase of error using 'Leave to transaction Zxxxx'. In case of batch mode, i want to set the batch status to 'cancelled' mode when any error is encountered.
Can some one help me please...