Edit SAP tables

No matter security on table editing. When in transaction SE16N use the command &SAP_EDIT in the command field in SAP and off you go: edit table content directly.

[warning]Know what you are doing cause this is far from a best practice way of changing data and can screw up things pretty bad if you don’t really know what you are doing. If the value that you wish to change is a dependent variable to another (background) process stay clear of this method. If you are not sure – seriously: don’t edit the table content.[/warning]

See my other post on how to track change by people who edited tables with this method.

Step-by-step

1) Go to transaction SE16N or alternatively use shortcut and type just ‘N’. Enter here the table that you wish to edit.

SE16N or just N

SE16N or just N

2) In the command field enter ‘&SAP_EDIT’ and press enter. The maintenance indicator in SE16N will switch on.

Command field entry

Command field entry

3) Narrow your search results by entering selection criteria and press F8 to run the report.

4) You can remove lines or just add/change data and press save.

&SAP_EDIT - SE16N - Table results

&SAP_EDIT - SE16N - Table results

Voila! You just hacked your way into the table structure and made some changes.

Update 05-Oct-2009: interesting comments made on this hack: blog on IT toolbox

40 thoughts on “Edit SAP tables

  1. Manish

    Hi,

    I found this very interesting. I can use it on R/3 but I do not see transaction code se16n or n in SCM system. Is there any other way to edit the table entries directly on SCM system ?

    Thank you
    Manish.

    Reply
    1. Kowboy Post author

      Hi Manish, I’m assuming you are referring to the APO system? Information is managed different. Unfortunately I have no in-depth experience with this system. Regards, Kowboy

      Reply
  2. Pingback: The BASIS of SAP

  3. Pingback: Edit Tabel SAP « Welcome 2 Chichi’s World

  4. Becky

    Hi Kowboy, we are in a development freeze (due to our current upgrade) but need an emergency change to a table in production. Since this would have required a program change (very frowned upon at present), we used this method instead for now. Great for only changing a few entries, but dangerous for large scale table changes, as you of course know. Thanks for sharing this useful knowledge!

    Reply
  5. Pablo

    donde trabajo instalaron unos SP y ahora no se puede utilizar la SE16N para modificar tablas… como se hace ahora?

    Reply
  6. Disdainful

    Kowboy by name Cowboy by nature..

    why would you want to post about something that undermines the very principles of a fully integrated ERP? And those that use this… why?? maybe have a chat with your local friendly Auditor and see what they think?

    Reply
  7. SAPBasisMan

    To Disdainful
    … you obviously don’t live in the real world.
    Sometimes this is the only way to rectify critical situations in a Production environment. Ur probably a not techie type manager .. This has been around a while ..
    See quote from SAP themselves

    “The sole purpose of this function was to enable the well-trained SAP Support experts to provide a fast solution for customers in a highly critical situation.
    The special function &SAP_EDIT was protected in the system by the highest developer authorization that could be assigned.”

    But obviously you don’t fill the criteria mentioned by SAP

    Reply
  8. ms. sy-subrc=0

    this code ‘&SAP_EDIT’ is not working. before i can used this when i edit sap table. but now it doesnt open the maintenance indicator.

    Reply
    1. Kowboy Post author

      It’s possible that the security to access &SAP_EDIT is tightened so the transaction cannot be used anymore. SAP gave some attention to this loophole after the wider publicity this feature got.

      Reply
  9. Axe

    “Using &SAP_EDIT functionality users can update tables even with SE16N (SAP has removed this
    function with note 1420281.). ”
    “The content was delivered in Release 600 with Support Package 17 and Support Package 18.”

    Good that the backdoor’s been closed, as this would be extremely damaging in the hands of a cowboy. But agree, there are occassions where this may be the only way to correct a critical error.
    I expect SAP have another way, or it’s possible to roll back the Note in extreme circumstances, but likely to be unsupported!

    Reply
  10. APO SCM

    Thanks for the advice, Will have to check but it is certainly very useful for the urgent situation and for the experienced consultant.

    Reply
  11. Vijay

    &SAP_EDIT is not working to activate Maintain entries.
    Could you please help how to edit table entries…

    Thanks,
    Vijay.

    Reply
  12. Avt

    Instead use the transaction UASE16N until they take it away

    Utilizar la transaccion UASE16N mientras no la deshabiliten tambien. 😛

    Un saludo

    Reply
  13. Jronman64

    After support packages Ehp4 we lost SE16N and UASE16N. I found the possibility to go over SE37 and SE16N_INTERFACE, i can see and change tables, but can not search for specific fields. Can you help me?

    regards
    JR

    Reply
  14. Renate

    mit EHP4 (und den Sicherheitspatches im Dezember 2010) ist die SE16N nicht verschwunden, aber man kann nun die Nutzung komplett verbieten oder wirklich einschränken.
    Wenn Sie sich mit Ihren SAP-Basis-Leuten und der Revision zusammensetzen und ein Konzept zur Nutzung der SE16N in Ausnahmefällen erarbeiten, dann verliert die Nutzung dieser Funktion auch den Hackerstatus.
    Wenn man die SE37 nutzt, um verbotene Funktionen auszuführen, halte ich das für nicht legal. Sie sollten sich auch da vor einer Nutzung sicher sein, dass Ihr Arbeitgeber das akzeptiert.

    Gruß Renate

    Reply
  15. arrariv

    Yeah, my last resort is quite same as stankowski.it : find the line “call function ‘SE16N_INTERFACE'” in the include “LSE16NF10” and put a break-point, run SE16N and change values of gd-edit & gd-sapedit to ‘X’ in the debug mode and continue.

    Reply
  16. Fernando

    For users who still having problems by using the &sap_edit on SE16n, you can simply do this:
    – Open SE16n;
    – Fill the desired table name;
    – Fill any filters you wish;
    – BEFORE you execute, put /h on command bar (for debugging) and then press enter;
    – Run (F8), it will start debugger;
    – Put two variables on the Variables Tab (gd-sapedit AND gd-edit);
    – Edit both variables, put X as value (The hexa must be 5800 on unicode systems);
    – Press F8 for resume processing and Voila, you SE16N is now editable.

    Reply
  17. krish

    hi gurus

    i am new to sap mm . kindly explain, how t-code se16n can be usefull in integration with tables such as ekko or ekpo or lfa1 … what can be achieved ..

    many thanks

    krishna

    Reply
  18. John

    I need to edit field “Calculation Base,” however, after following the above steps, this field in not open for editing. Any suggestions will be greatly appreciated!

    Reply
    1. Vipul

      Try this –
      1) Go to SE16N and type the table name you want to deal with
      2) Instead of typing &SAP_EDIT in the command window, type /H to activate the debug
      3) Hit the F8 key to enter the data browser for the table you typed on step 1)
      4) While in debug, type the name of the following two global variables on the right panel: GD-EDIT and GD-SAPEDIT
      5) Change the values of BOTH variables to an uppercased X
      6) Finally, type F8 to exit from debug

      Reply

Leave a reply to Pablo Cancel reply