Wednesday, March 5, 2008

ABAP technique to get the code of button

Here is a little ABAP skill to find out the code of the button that clicked by users, take the “Update” button of VA22 as an example:

Step 1) Type /h in the command box

Step 2) click the “Update” button

Step 3) In the debug mode, type “SY-UCOMM” in the field names
Then it will show the code of this “Update” button - “V69A_KONY” in the field content.

Step 4) Finally, in your userexit, you can have checking condition like:

IF SY-UCOMM = ‘V69A_KONY’.
Message ‘You have clicked the Update button’ Type ‘I’.
ENDIF.

No comments: