In most of the External List Management (ELM) developments, we need to work with BADI CRM_MKTLIST_BADI. As a developer we need to debug the BADI implementation to check the data which flows from Web UI screen at run time and proceed with the development. Debugging this BADI is bit tricky.
1. Execute SAP Transaction SM51 and check the number of servers in your SAP system.
For example, our SAP system has two servers viz dc1-20 and dc1-22.
This is a very important step. We never know which server gets triggered when we execute the Web UI. So we need to put break point in both servers as shown in steps below.
2. Execute Transaction SE37 and open FM CRM_MKTLIST_WORKFLOW_DEBUG in one server say dc1-20. Put one External breakpoint(not the normal breakpoint as we will execute from Web UI).
3. Execute SE37 again and open the same FM CRM_MKTLIST_WORKFLOW_DEBUG in second server say dc1-22 and put one more External breakpoint in another line.
4. Please note, you need to keep at least one session open in each server dc1-20 and dc1-22.
5. Go to your user parameters (Transaction code SU3) and insert a Parameter with ID CRM_DEBUG_CODE and value as MKTLIST.
6. Please do not open more than 5 sessions in total (1 session you will need for WebUI). The debugger will open one more session. So need to have one extra session to be available.
9. Now debug normally or press F8. It will take you to the BADI Methods. Please note, you need to have breakpoint in the BADI Methods as well.
Points to remember
1) Put External breakpoint in all servers in FM CRM_MKTLIST_WORKFLOW_DEBUG.
2) Keep at least one session open in all the servers.
3) Do not open more than 5 sessions in total.
4) And dont forget to put debugger in the BADI method you want to look and remove the parameter CRM_DEBUG_CODE in your user setting once your debugging is finished.
You might also like to check our other post on Deleting Foreign Locks using Debug.
Sharing is caring. If you believe this information might help someone, please share with them. They would surely appreciate it.
If you want to get such practical issues and resolutions straight to your inbox, please SUBSCRIBE. We respect your privacy and take protecting it seriously.
Thank you very much for your time!!
Image courtesy : www.theguardian.com