Workflow debug is not easy. Breakpoints do not work. There is only one effective way to debug Workflow.
You will need access to transaction SM50 - Work Process Overview.
You will need authorization to "Debug Process".
You will need authorisation to "Change values during debug".
Once you have checked you have all the authorisations, you have to create a FM or Method to wait.
The best practice is to create the following "Workflow debug" Table for control.
This way you can have a number of "breakpoints" and you can activate and deactivate them.
EVENT_NAME Event name
ACTIV Event activ or not
WAIT_TIME Time to wait in seconds
Your FM or Methode should be called from the BOR or Class method.
For example
CALL METHOD zcl_workflow_help=>debug_wait( x_event = 'FIND_CUSTOMER' ).
The Method can be for example:
DATA:
lv_wait_until TYPE tims,
ls_workflow_debug TYPE zworkflow_debug.
SELECT SINGLE * FROM zworkflow_debug INTO ls_workflow_debug
WHERE event_name = x_event.
IF ls_workflow_debug IS NOT INITIAL.
lv_wait_until = sy-uzeit + ls_workflow_debug-wait_time.
DO.
GET TIME.
IF ls_workflow_debug-activ IS INITIAL OR lv_wait_time LE sy-uzeit.
EXIT.
ENDIF.
ENDDO.
ENDIF.
In the table Workflow Debug you can set debug ON and OFF.
Once you have set it ON you need to run your workflow.
The workflow will wait for as many seconds as you have set.
During this time you need to start transaction SM50.
You find the waiting workflow task.
You debug the program.
In debug mode you set "Activ" off.
Than your program continues and you can debug it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
12 | |
7 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |