Did you ever have one of those days when very break point you set is not hit, One thing I’ve found over the past few month when Debugging ABAP from the CRM Web Channel application is to make sure to start in the right place. This may sound like simple advice but can save hours of wasted time and frustration.
To know where to start you first need to understand two things
- How to debug and more important external debugging.
- How the application work and whish user is calling the function module.
External Debugging is straight forward and once you have any ABAP knowledge the principle is the exact same. There are a number of prerequisites to be able to perform external debugging. For further information on external you can check the development and Extension Guide on the Service Marketplace or you can check this wiki article
Once you have your system set up to debug you will then need to understand the application and how the calls are been made. There are two Jco connection types that are important to hit that break point.
There are two connection types used when executing the JCo function:
- Stateless connection – These connections are pooled. That is after each function execution the connection is returned to the pool . This connection type uses the Jco user that is set in the XCM or the web to call the APAP code.
- Stateful connection. Each session has its own stateful connection. This connection is kept open for the duration of the user session. This connection type uses the logged in user to call the ABAP code.
Once you have an understanding of the connection type mentioned you will then know for which user you will need to set you External break point for.
There are of course sometimes when you may need to debug a function module without full knowledge of the connection types been used. In these case I have found the best course of action is to perform a trace on the application a simple ST01 trace on the ABAP system can give you a good in site into which user is need to set your break point for.