You are on page 1of 7

http://www.saphub.

com/debugging/edit-database-table-uisng-abap-debugger/

Edit SAP Table Data Using ABAP Debugger


Posted in Debugging on 18/07/2013

Suppose you are in middle of testing and found that certain field in a table is wrongly set. The table does not have
any table maintenance (SM30), then how do change the data in the SAP table without writing any code?
Just use the debugger to edit the SAP table entries.
Note : In order to use the debugger, you must have the required authorization to use the debugger.
To edit the SAP table entries, first go to Data Browser (SE16). In this example, we shall change the value of a field
(DEPT_ID) in a custom table (ZEMPLOYEE).

Enter the Table Name as ZEMPLOYEE and press enter. In the next screen (data browsers selection screen) just
press execute to display all the table entries or you can enter proper inputs to restrict the table entries.

Now select the entry you want to edit and press display.

Enter /H in the command field and press enter to switch on the debugger. After you press enter you will see a
message Debugging switched on in the status bar. Again press enter to enter the debugger.

By default the variable CODE contains the value SHOW. Change the value of CODE to EDIT and press the pencil
as shown above to change the value of CODE to enter the edit mode. Press F8.

After changing the value of CODE, table entry will be displayed in edit mode. Now you can change the value of the
desired field (change the value of DEPT ID in this case) and press SAVE.

You will get the proper message in the status bar. Now go back and check the table entry.

Below table summarizes the possible code variable values.

FUNCTION CODE

DESCRIPTION

SHOW

Display

EDIT

Change

INSR

Insert

DELE

Delete

ANVO

Edit with key values

Se16n

Track Changes Made to SAP Table Using &SAP_EDIT


Posted in ABAP Dictionary on 29/05/2014

Yes, it is possible to track the changes made to SAP table using &SAP_EDIT.
Just check this link to know how you can edit table entries in SE16N.
To track the changes done to SAP table using &SAP_EDIT, go to SE16N. Enter change documents header table
(SE16N_CD_KEY) and name of the table for which you want to track the changes. Let us track the changes done to
KNA1 using &SAP_EDIT.

Execute (F8) to display the changes done to KNA1 table.

Display Change Documents data table (SE16N_CD_DATA) to display more details about the change.

Note: &SAP_EDIT will not work for change documents tables ( SE16N_CD_KEY and SE16N_CD_DATA ).

Activate &SAP_EDIT in SE16N


Posted in ABAP Dictionary on 29/05/2014

Function code &SAP_EDIT can be used to enable maintain entries functionality of SAP table. &SAP_EDIT will not work if SAP note
1420281 is implemented.
Before implementing the SAP note 1420281, the program used to call a subroutine where it sets the variables GD-EDIT and GD-SAPEDIT to
X if the function code is &SAP_EDIT.
After implementing SAP note 1420281, the call to subroutine is removed when function code is &SAP_EDIT.
In order to edit table entries in SE16N even if &SAP_EDIT is disabled follow the below steps.

1. Open the table that you want to edit in SE16N and enter the function code /H to switch on the debugger. In this example let us open table
KNA1 and switch on the debugger.

2. Execute to display the table entries.

3. In the debugger set the values of GD-EDIT and GD-SAPEDIT to X and press F8.

4. The table will be opened in edit mode, make the necessary changes and SAVE.

You might also like