Debugging

How to debug the field symbol?

via a breakpoint


How to catch an exception? 

I create a new exception dynamically. Since I don’t know the exact name of exception, I can only create a breakpoint based on CX_ROOT, which is super class of all class based exceptions.

/wp-content/uploads/2013/11/clipboard4_317960.png

then all that I can do is just F8, F8 and F8… Soon ( ten seconds later) I found one exception raised in a suspicious method GET_TABLE_CONTENT.

/wp-content/uploads/2013/11/clipboard5_317961.png

Then I click “Display Trigger Location”, the debuger displays the method GET_P_ASSOC_OBJ_DEF_ATTRIB which leads to the exception CX_SY_NO_HANDLER.

/wp-content/uploads/2013/11/clipboard6_317962.png

Wait.. isn’t this trouble-maker method developed by myself?


After going through BSP framework code I learnt that BSP framework will first try to determine the cell type by calling our property getter method ( PREFIX GET_P_XXX). Only the successful determination of field type can trigger the successive call of content getter method ( PREFIX GET_XXXX) to retrieve the cell content.
By the way, if the method which trigger the exception is not owned by you, you need to know which class that method belongs to.
You can achieve it by using SE80->Repository Information System

/wp-content/uploads/2013/11/clipboard8_317964.png

/wp-content/uploads/2013/11/clipboard9_317965.png


Comments