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

About protect a report program

Former Member
0 Likes
895

Hi experts,

I want to protect a report program, my protection code is like this....

PARAMETERS: P_PASS(10) MODIF ID M1 .

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_PASS'.

SCREEN-GROUP1 = 'M1'.

SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

IF P_PASS NE 'SANKET'.

MESSAGE I042(ZPROJ).

ENDIF.

END-OF-SELECTION.

LEAVE TO SCREEN 0.

i use this as a reference and submit it by this syntax.....

&********************************************************************

*& A T S E L E C T I O N - S C R E E N O U T P U T *

&********************************************************************

AT SELECTION-SCREEN OUTPUT.

SUBMIT ZSAN_PASS

VIA SELECTION-SCREEN

USING SELECTION-SETS OF PROGRAM 'ZSANCR001'

AND RETURN .

But i want to protect that report.use this code and suggess me plz.....

7 REPLIES 7
Read only

Former Member
0 Likes
793

use this

but after hiding the code, you cannot unhide it

DATA: gt_code(72) TYPE c OCCURS 0,

gv_code LIKE LINE OF gt_code,

gt_code2(72) TYPE c OCCURS 0.

PARAMETERS: program LIKE sy-repid.

START-OF-SELECTION.

READ REPORT program INTO gt_code.

APPEND '*@#@@[SAP]' TO gt_code2.

LOOP AT gt_code INTO gv_code.

APPEND gv_code TO gt_code2.

ENDLOOP.

INSERT REPORT program FROM gt_code2.

  • print unhidden source code for backup issues

LOOP AT gt_code INTO gv_code.

WRITE: / gv_code.

ENDLOOP. "LOOP AT gt_code INTO gv_code

Refer this link............

http://www.sap-img.com/abap/program-to-hide-abap-source-code-and-protects-it.htm

Regards,

Pavan

Read only

Former Member
0 Likes
793

If you want to protect for editing then you can set Editor Lock in Attributes of any Z/Y report program

Read only

Former Member
0 Likes
793

to protect your code from being edited by other users

<b>gotose38</b>

|

<b>go into your program</b>

|

<b>goto-->attributes</b>

|

<b>check the checkbox editor lock</b>

no other can edit your code.

regards,

srinivas

<b>*reward for useful answers*</b>

Read only

0 Likes
793

Hi all,

I want when i execute report then it demand a password.

Read only

0 Likes
793

if u lock it it can be edited after ur login id and password..so dont worry without ur login id and password no 1 can edit that...

Read only

former_member194669
Active Contributor
0 Likes
793

Hi,

Use authority object to restrict access to this program. As per your code whoever have access to debug easily know the password from code and they can easily override the password protection.

aRs

Read only

Former Member
0 Likes
793

self-answered.