Sunday, May 22, 2011

System debugging - Explained in detail

Consider the following program, which contains a simple call to the function module ICON_SHOW.

Set a breakpoint at the CALL FUNCTION statement and now execute the program.

Ensure that the system debugging is switched off, by selecting Settings à system debugging.

On pressing F5, instead of going into the code of the function module, the function module is executed and the following pop-up is shown:

Select a record and press CONTINUE, the program is executed without going into the debug mode of the function module. Reason?

Now go to the function module ICON_SHOW. Select Goto à Main Program.



Now again select Goto à Attributes

From the above screenshot, it is understood that the program status is ‘S’ (System program). In order to debug the system program, we need to set the system debugging ON. Now repeat the above debugging by setting system debugging ON. This time, we should be able to debug the function module.

Can we set the custom programs as system programs?

Go to our program which has a call to the function module ICON_SHOW. Set the debug point at the CALL FUNCTION statement.

Go to program attributes and set the status to System Program.

Now try debugging the program with system debugging off. This time, the debug point will not even reach the CALL FUNCTION statement. Once you turn the system debugging ON, both our program and the standard function module could be debugged.

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

goodsites