Google Search - Blog...........

ABAP - Sample Program On Hiding Any Report Program.

REPORT zhidereport

NO STANDARD PAGE HEADING.



DATA: g_code(72) TYPE c OCCURS 0,

g_code1 LIKE LINE OF g_code,

g_code2(72) TYPE c OCCURS 0.



PARAMETERS: program LIKE sy-repid.



START-OF-SELECTION.



READ REPORT program INTO g_code.



IF sy-subrc NE 0.

MESSAGE e398(00) WITH 'Report' program 'not found.'.

* ATTENTION:

* READ REPORT on a hidden source code return SY-SUBRC=8 !!!

ENDIF.



READ TABLE g_code INDEX 1 INTO g_code1.



* append *special* 1st line to hide cource code

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

LOOP AT g_code INTO g_code1.

APPEND g_code1 TO g_code2.

ENDLOOP.



INSERT REPORT program FROM g_code2.

No comments:

Post a Comment