Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to unlock protected source code?

Former Member
0 Likes
4,406

Hi All,

How to unlock the protected source code.

We have checked tables PROGDIR, REPOSRC, TRDIR to check any edit lock maintained for the custom program and there is no edit lock maintained against the program.

Thanks,

KK

13 REPLIES 13
Read only

Former Member
0 Likes
2,628

Don't try to play around with SAP's protected code. Below is a link on how to hide abap source code

http://wiki.scn.sap.com/wiki/display/ABAP/Hiding+ABAP+Source+code.

In case, you want to read the code.

i)   Create a Z report.

DATA: PROGRAM LIKE SY-REPID VALUE ‘PROGNAME’,
BEGIN OF itab OCCURS 500,
LINE(72),
END OF itab.


READ REPORT PROGRAM INTO itab.
IF SY-SUBRC <> 0.
…
ENDIF.

The program source code will be stored in itab .( Not sure, whether read will work or not )

Download the code , remove the portion hiding it.

Upload the program and see the code.

Read only

0 Likes
2,628

Read source code will not work. this will give subrc as 8 (protected source can not be read).

Thanks

kk

Read only

Former Member
0 Likes
2,628

You can open the program, In the menu bar Edit->Modificatoin Operations->Switch Off Assistant.

Regards

Saireddy

Read only

0 Likes
2,628

when i try above option it is saying no modifications found

thanks

kk

Read only

Former Member
0 Likes
2,628

I believe there is not just a single flag maintained for locked objects.

Read only

ThangaPrakash
Active Contributor
0 Likes
2,628

Hello K K,

Are you talking about the unlocking of report from the transport ?

Regards,

Thanga

Read only

ThangaPrakash
Active Contributor
0 Likes
2,628

Incase of unlocking objects from transport request use the transaction SE03.

In the list you will find the Unlock objects, click on it and provide the transport number in which the object is locked.

Regards,

Thanga

Read only

Former Member
0 Likes
2,628

I am not sure if this work or not but just check

1) Go to transaction SE03

2) In Administration go to Set system change option.

3) Here make General SAP Name Range modifiable.

Regards,

Jigar Thakkar.

Read only

Former Member
0 Likes
2,628

Hi, open report, then in the menu Goto-->Attributes, and there is check "Editor lock", uncheck it and save.

Regards,

George

Read only

Former Member
0 Likes
2,628

Just banish this idea out of your mind. It will be  a wastage of time. You can put more productive effect in other areas.

Just for information sake -

Program is locked in OS level. Basically it is under a directory where user's don't have read and execute permission. So neither can you read the file, nor copy the file in another location and then read it.  To read the program, you have to read the file first.

Read only

0 Likes
2,628

FYI, if we are talking about ABAP program, it does not exist on os level. G.

Read only

0 Likes
2,628

I may be wrong, but random debugging based on some leads looked like missing file level permission .

This was how I came to the conclusion -

i)   SE38 -> SAPMSYST -> /h( command line ) -> press display

ii)   KK told me sy-subrc for read program returned 8.   Based on that, I set a watchpoint on sy-subrc         = 8.

iii) FM - 'SYSTEM_HOOK_OPEN_DATASET' , Form - Check_SPTH. 

It tried to read the variable pathname  \usr\sap\EDI\SYS\global\REPSSAPMSYST.DAT. Read failed and sy-subrc was set to 8.

iv) Program - LLOCAL_EDT1F03, Form - READREP.  When sy-subrc = 8, system is setting 'FCODE' = 'PGEX' & sperr = 'X'.

v)  Message "The source is protected. See long text"  is coming from FM 'READ_SOURCE'.

Read only

Former Member
0 Likes
2,628

This message was moderated.