cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug MDG rule based workflow in Quality system or production system

0 Kudos

How to debug MDG rule based workflow in Quality system or production system,

How to stop the exection in custome code ( we implemented BADI context preparation bADI  and Agent determination).

Accepted Solutions (0)

Answers (3)

Answers (3)

bavinash1
Explorer
0 Kudos

Hello Sekhar,

I needed something similar once.

I tried putting the infinite loop and debug via SM50. It didnt work for me due to lack of authroziation or something.

and it was not shown in sm37 and jdbg as well. Ideally it has to show for the back ground jobs. Make sure you try these two options first.

Then, I had to use log-points to understand why and where my error was occuring.

You can check or create log points using transaction SAAB.

Then, in the code, you can use the code

  skey = 'Program Begin'.

  LOG-POINT ID swf_trc_demo SUBKEY skey.

using skey, you can determine till which point your control has flown when the transaction is complete in the same SAAB transaction.

Might not be the best of the approaches, but last approach worked for me. Do let me know in case you need any further information here.

Best Regards,

Avinash Bolisetty


0 Kudos

one way is you can make the particular workflow step as foreground ,

and then process the workitem from workflow log with tcode SWIA , but in production system it may not be possible 

Former Member
0 Kudos

Hello Sekhar,

Both the badi executes in background mode, so the only possible way to debug these to implement a infinite loop within this badi. Below is the process how you can do.

1) Create a custom table with a unique identifier (ex. class name of the badi) and a flag variable. Make sure this table is editable in all the systems.

2) Select the flag value in the badi and write a infinite look with the flag variable.

3) after the process is executed, you can find the work process running in SM50/SM51 transaction.

4) Go to debugging from there and remove the flag variable during the run time.

PS : In production system, you may have to handle this variable carefully since many users will be using this system. You can add more unique identifiers to avoid confusion.

Regards

Senthil Kumar.

former_member188878
Active Contributor
0 Kudos

not sure what your are trying to achive,it wrong practice to excute the debugging in Prod.

but any why you can deactivate the custome code in dev.check it and overwrite the exixting code of Quality and prod.might this will work for you.