Copyright 2024 - BV TallVision IT

Direct table update methods - for problem fixing.

Use SE16 or SE16n to do small scale fixing - or use LSMW for bigger scale fixing.

Apply this article on a production system - and you are committing a true sin.... Please realize that performing updates directly on tables can lead to "damaged data" because:

  • The data you are changing is not checked as designed (you are in effect bypassing field checks and determination logic).
  • The data you are changing may be in the process of being changed already (if someone is handling the record you are changing in the regular application, the change may be overwritten or worse your bypass change can introduce data integrity problems).
  • Changing data can normally lead to updates of change documents which itself can trigger workflow. Both the change document and workflow won't be created/triggered, which can could lead to data integrity problems. Don't ignore the follow-up actions a change can have. 

Is applying a change directly to a live production table really the only option ? This can easily get out of hand so BE VERY AWARE. 

Use SE16 in debug mode

If you have debugging authorization and you can change values in the debugger, SE16 can be your candidate to applying a fix. A step list:

  1. Start SE16 and fill in the table you would like to change. Make sure the selection is restricted to the entries you like to change (but no 100% match is required)
  2. From the list of presented entries, double click on the one you would like to change
  3. Type /hin the command window, to start the debugger
  4. Press enter, the debugging screen will appear
  5. Change ABAP variabele SY-UCOMM to EDIT and press F8
  6. Change what you want to change and don't forget to save your changes

Note: field changes executed in the debugger are logged in the system log. Also note: if it is not editing you need, there is also a function code DELE to delete a selected entry. From the overview screen, you can also select multiple lines (all lines) and set the SY-UCOMM to DEL5, hit F8. A popup wll appear to confirm you want to delete the selected records.

Above: this is where the debugger will stop when you start it as /H from the SE16 overview report. The screenshot shows the system variable for the menu action code is altered. 

If for some odd reason you are planning to do this on a production system, to e.g. alter the order content for an order to your best friend, note that this is what the system log would reveal:

Use SE16N with a special user command

A steplist:

  1. Run transaction SE16N and supply your table name and selection of data you would like to change. A checkbox "Maintain entries" is displayed, but grayed out - just ignore for now.
  2. In the command field, type &SAP_EDIT, then hit F8
  3. Now you can change quantities, prices, delivery dates etc.
  4. Don't forget to hit save when finished (and don't be fooled by the message "Entry created", it saved your entry)

These activities get logged in tables SE16N_CD_DATA and SE16N_CD_KEY. Must have S_DEVELOP with DEBUG to do this.

Function module SE16N_INTERFACE

If you have SE37 authorisation, call function module SE16N_INTERFACE to start transaction SE16N in editing mode. Test the function, fill in the table of your choice in I_TAB and set I_EDIT and I_SAPEDIT to "X". Then fill in the IT_SELFIELDS parameter, which should specify selection parameters for the table.

Upon execution, the SE16N application is started with full editing options available. Do be careful, this is a very effective way tot totally mess up the system.

Migration workbench - LSMW

Need more power to applying changes ? Check out the articles on Legacy System Migration Workbench.