Thursday, July 25, 2013

Removing Editor lock from Program/Funciton Module


In my career, several time I came across where the Editor lock was set and I was not able to make the changes in Program. I'm not sure whether developer has done deliberately or its just a mistake.First thing came in my mind to contact Basis team as the Author of Program was no more in company. Basis team was not able to help but they gave me one hint which was seems useful.
Basis team suggested that if you can change the person responsible of the object, you can easily remove the editor lock as you will be owner of Object. This seems perfect solution for me but I couldn't able to change because of some errors. Here are few steps which I have followed to remove the editor lock:

1) Change the person responsible of Object using transaction SE03:
    Steps are as follows:
            a) Run the transaction SE03 and select the below option:
            b) Enter the name of user, who owns the object and the package in which it was stored,
            
           c) Execute, a report will be appeared with list of objects:

              

          d) Select the object by placing the cursor and then click on change "Persons Responsible"               


         e) Enter the name of new person responsible, and press "Yes" button. This should work, but in my case it failed. I got below error:
                              
2) Remove the editor lock from table directly, like TADIR, TRDIR .
I tried to remove the editor lock flag " EDTFLAG"  of the table using transaction SE16N and the user code &SAP_EDIT. But this trick also failed. I don't know the reason but in current system &SAP_EDIT is not working and did not allow me to edit the entry of table.

3) Third thing, I tried is to edit entry of the table using function module " SE16N_INTERFACE". This function module allows you to open the table in change mode if you pass edit parameters as "X". This trick was also failed. SAP was not allowing to update the table TRDIR directly. I got below error:




4) At last I wrote a small program to edit the table directly using modify statement and that solve the issue. Here is the four lines of code which I wrote to remove the lock from table.


And this worked for me. Although I know this is not the best way to do but some time you are more worried about result than process. It was urgent and I did it.

There was one more way to gain the access by debugging but that was temporarily solution.

No comments:

Post a Comment