cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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.

0 Likes
View Entire Topic
RaymondGiuseppi
Active Contributor

In the BAdI implementation did you

  • (wrong) use a MESSAGE statement to raise an error
  • (good) fill the CT_FINCHDEL with document number and message variable
RaviSee
Explorer
0 Likes
Thanks.. will check
RaviSee
Explorer
0 Likes

I have executed the program RVV50R10C in foreground and it is populating the error in ct_finchdel but still it is creating delivery and in background it is not creating any delivery and not throwing any error

RaymondGiuseppi
Active Contributor
0 Likes
  • Is an application log available in SLG1 or in transaction V_SA?
  • Are pop-up windows displayed during interactive execution?
  • Did you already look for OSS notes?
  • Are other Customer Exit/BAdI/User Exit active that would check sy-batch or require a GUI connexion?
RaviSee
Explorer
0 Likes
Hi @RaymondGiuseppi, I am checking your mentioned points and get back with the answers.
RaviSee
Explorer
0 Likes
Hello @RaymondGiuseppi, I have created a job via sm36 for the error scenario at delivery but still it is creating deliveries even though i populated errors at CT_FINCHDEL and it is showing in V_SA. Is there any way not to create deliveries when error occured without terminating the job.
Sandra_Rossi
Active Contributor
0 Likes
It will be difficult to help you if you do not answer the questions...
Sandra_Rossi
Active Contributor
0 Likes

I mean, you don't help us a lot if you don't answer ALL the questions asked by Raymond:


@RaymondGiuseppi wrote:

Is an application log available in SLG1 or in transaction V_SA?
Are pop-up windows displayed during interactive execution?
Did you already look for OSS notes?
Are other Customer Exit/BAdI/User Exit active that would check sy-batch or require a GUI connexion?


 

RaviSee
Explorer

Hello, thanks everyone for guiding me.. I have found the solution by using a below code at USEREXIT_SAVE_DOCUMENT_PREPARE to skip the error deliveries without stopping the background job.

if delivery contains an errors and sy-batch = 'X'.  "ct_finchdel (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.

 

Sandra_Rossi
Active Contributor
0 Likes

@RaviSeeThanks for the feedback. You'd better post a separate answer, it will be difficult to find it at the end of this unrelated answer. NB: what is this comment in your code: "ct_finchdel (IF_EX_LE_SHP_DELIVERY_PROC~DELIVERY_FINAL_CHECK)"?