Direct entry to SAP tables via SE16N_INTERFACE or favorites theft

In the work of an SAP ERP system consultant, a desire often arises to correct a value in a table directly. This desire arises, as a rule, in three cases either from the laziness of reversing (deleting) documents, or from not knowing the process, or, conversely, from a perfect understanding of the processes, table relationships, and the possible consequences of such an intervention in the database. Although here I forgot to indicate another case - because of stupidity, but I sincerely believe that there are only a few such consultants.

On one project, I had a key user, which can be set as an example to all users. Excellent understanding of the processes, adequate and rare questions, the ability to educate end users and the presence of well-chosen favorites that meet all user processes. I decided to borrow this list. Of course, the simplest thing is to ask the user to upload them and transfer them as a file, but why should we ask the user when we can take it and not tell anyone about it.


A tackle story is not about how I stole favorites, but an example of direct writing to tables.



Define a table that needs editing


Each consultant has his own leverage to search for the name of the desired table. Someone uses F1, someone Google, and the pros remember them by heart (a joke of course). In this section, I will not describe how to search for the necessary tables, I will just inform you that we will write in the SMEN_BUFFC table. It is she who stores the user's favorites.

I want to say right away that this table stores the favorites in a completely different format compared to the downloaded favorites in a local file. That is, my attempt to simply upload this table to excel and convert it to the correct format for loading failed.

Function module


We start transaction SE37 “ABAP-functional modules” and execute FM SE16N_INTERFACE.


In FMK itself you only need to write the name of our table SMEN_BUFFC and put "X" opposite I_EDIT.

We launch our FMku.

You haven’t done anything yet. Have a chance to stop


At this stage, it is better to stop and think again, and give an account of your actions. I will not talk about the consequences of such an intervention in the tables, and it is clear that this can cause the collapse of the entire system. But if you know exactly what you are doing, then move on, but I warned .

Add, delete, change


As a result of the work of FMK, we open our editing table. Here you can add, delete rows or adjust values.
In the end, I just took all the user's favorites from the SMEN_BUFFC table and inserted them into the same table, but after changing the username to mine.

Do not be alarmed, consultant, I did all this not in the productive, but on the home server. After all, after I received well-structured transactions, I simply uploaded them to a local file and loaded them into the desired system.

Epilogue


There are other ways to edit tables that may be simpler, but in my story I used the FM SE16N_INTERFACE.
As I said at the beginning, everything could be done much faster, and most importantly safer, but that would not be interesting.

Also popular now: