Functional consultants always struggle when it comes to debug or analyze an ABAP code. In this article will try to give you few tips about ABAP + debugging which might help you with your falling hair!!!
Let’s start with Simple things:
Finding database table for any field in transaction.
Press F1 key on any field and see the technical details of the field.
Note: if you see the Table category in the technical details as structure instead of Transparent table , copy the data Element name (Go to transaction SE11 to see the Data element ) or double click on it.Use the where used list to find out the transparent table ( DB table).
Where used list for Data Element: AD_REMARK1
Finding customizing node (SPRO-Node) based on the view/table name
If you like to see where the customizing node is located in SPRO based on the table name, use transaction code SM30.
Let’s take an Example of View/Table: /BEV2/ED901
Transaction code: SM30
Note: if you see the popup asking for project, if you not sure about the name just continue without specifying the project.
How to starts with debugging
Let’s take a scenario, you are doing any business transaction and stuck with an Error message which doesn’t give much information and you want to debug it.
How to do : Starts with /H in command field to activate the debugger and use the “create break-point at statement ” to create a break-point.
It opens up another popup window:
This will create break-points on all the MESSAGE statements; use key F8, to jump from one point to another point till the time you find the place which is making a trouble.
Note: You can use other tabs as well to create break-points at a particular method, function module etc…
Explore the Development package
When you need to know about development objects for a particular functional area use SE80 with the package name to see the list of classes, function modules etc…
Note : Let’s say you are working in material management and you not sure about the package name ,open main transaction code in this case MM01 ( material create ) .Use top menu : system->status .Double click on the program name .It will open up the code .
Again use the menu option: Go to à Attribute, which show you the package name.
Double click on the package name which shows you the list of all the development objects related to material management.
Good to know for functional people
BADI: It’s used for enhancing the behavior of standard system. Example: Adding validation, more business rules, changing the flow of current process etc…
Related Transaction Code: SE18, SE19
BAPI: In simple word, it’s a remote enabled function module which will be called from outside the SAP system.
Related Transaction Code: BAPI
Enhancement: There are two types of enhancements implicit and explicit, explicit enhancement can be done at places which are already defined by SAP where developer can put their custom code to deviate the standard process. Implicit enhancement can be carried out at any place to deviate the standard process or enhance the same.
Index: When you hear this word from technical guy, he is talking about performance. Indexes are used in SAP to increase the speed of search while reading from the DB table.
Related Transaction Code: SE11
Internal Table: This is more of coding. It’s used to hold the values (material info, sales order data etc…) during the code execution. In simple word it’s a platform where you prepare your food. DB table is like fridge which stores the food (DATA) permanently but when you need to prepare the food (DATA), takes it out on platform (internal table) and put it back to fridge once its processed.