cancel
Showing results for 
Search instead for 
Did you mean: 

How to continue executing batch job even after error

RaviSee
Explorer
0 Kudos
1,074

Hello,

I have a requirement where i have to continue batch job even after error and the job should not cancel and the message should appear as error not like information or warning in the job log.

View Entire Topic
RaviSee
Explorer
0 Kudos

Hello,

I have resolved the issue by writing the below logic.

if delivery contains an errors and sy-batch = 'X'. "ct_finchdel (IF_EX_LE_SHP_DELIVERY_PROC~DELIVERY_FINAL_CHECK)

Note: Ct_finchdel contains custom errors which is populated at (IF_EX_LE_SHP_DELIVERY_PROC~DELIVERY_FINAL_CHECK)

            DELETE ct_vbuk WHERE vbeln <lfs_likp>-vbeln.  "$       1 entry
            DELETE ct_vbup WHERE vbeln <lfs_likp>-vbeln. "$       1 entry
*           clearing Update indicator so that delivery cannot be created and deleting the temp delivery no. so that delivery no. should not be assigned
            CLEAR<lfs_likp>-updkz<lfs_likp>-vbeln.
*           Deleting the entries from VBPA
            CLEARct_vbpact_vbuv.

* Set the UPDKZ as D for the entries with VBELN as "$    1" in the ct_lips and ct_vbfa

endif.