Wednesday, July 30, 2008

Basic debugging techniques

If we want to find out in a transaction what tables are being selected updated or modfied we can run the SQL trace ST05.To do that we need to activate trace with filter and then enter the transaction name.Then go to the transaction and excute the creation or change and see what tables are involved.Then deactivate the SQL trace and click on display.

If there are 2 differenct programs which are linked or 2 different units which need to be linked then we can use update debugging.they will go inside subroutines which use perform in update task.

System debugging is used for executing system level commands.
Always in standard programs when we are modifying the code such as enhancements if we are checking sy-subrc value then there is a chane of sy-subrc value getting modifed.So we should change the sy-subrc value back to what it was if we dont want the remaining standard code to be affected because of sy-subrc value.So its a better practise generally in most situations to assign sy-subrc to a local variable and then assign it back to sy-subrc.But in some situations we may need the value to be changed.So then we need not assign the value to sy-subrc.

In case of standard programs which have internal table with header line its always better to loop at internal table into the work area instead of only looping at internal table.This may cause the standard value to get changed which is not desirable.This is the case of implementing enhancements in the program.
If we dont know how the control of porgam is going in debugging then in the transaction before doing any activity we can press /h and then enter.This will switch on debugging.Then we can perform some activity such as saving etc.

No comments:

Post a Comment

About Me

I have 5+ years experience in SAP ABAP and ABAP CRM.I am working with SAP LABS now.

Search This Blog