cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug SM62 / SM64 background events

mahabaleshwar_patil
Participant
0 Kudos

How to debug SM62 / SM64 background events ?

Those events are called from some of the standards transaction like va02 / cj20n but intern those events trigger the some report.

these events re triggered method cl_batch_event=>raise

w_evepara = vbak-vbeln.
CALL METHOD cl_batch_event=>raise
EXPORTING
i_eventid = 'ZMSP_UPD'
i_eventparm = w_evepara
* i_server =
* i_ignore_incorrect_server = 'X'
EXCEPTIONS
excpt_raise_failed = 1
excpt_server_accepts_no_events = 2
excpt_raise_forbidden = 3
excpt_unknown_event = 4
excpt_no_authority = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

when I make the some changes those events triggered and background and executed successfully.

I want o debug the those events , can any one help me to debug background events ?

Accepted Solutions (0)

Answers (2)

Answers (2)

mahabaleshwar_patil
Participant
0 Kudos

I wan to debug the code which is written inside the Event. I mean I want to debug the Program which is getting executed for the particular event.

I know event name and I know program name it will be triggered for the VA02 transaction. but I want to debug the program associated that event .

I can see the program of that event is in release state in SM37. after VA02 that program will be finished and executed successfully.

Rashid_Javed
Contributor
0 Kudos

You said

"I mean I want to debug the Program which is getting executed for the particular event."

Now these are two different processes. your transaction VA02 is a dialog work process. The job running as a result of event is running in background work process. You can debug that but through different technique. check the following link for debugging background jobs.

https://archive.sap.com/discussions/thread/185784

https://blogs.sap.com/2016/01/26/debug-background-job-with-ease/

Rashid_Javed
Contributor
0 Kudos

Why do you want to debug an event? OR do you mean you want to know what program is executed as result of event trigger?

If that is the case, you should check transaction SM37. there is an input to search a job related to event.

Hope that helps.

mahabaleshwar_patil
Participant
0 Kudos

I wan to debug the code which is written inside the Event. I mean I want to debug the Program which is getting executed for the particular event.

I know event name and I know program name it will be triggered for the VA02 transaction. but I want to debug the program associated that event .

I can see the program of that event is in release state in SM37. after VA02 that program will be finished and executed successfully.

This event is triggred by method cl_batch_event=>raise

Event Id is i_eventid = 'ZMSP_UPD' and event parameter is

i_eventparm = w_evepara.

can you please assit how do i debug the program.