1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
REPORT z_hide_abap NO STANDARD PAGE HEADING. 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. 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. "IF sy-subrc NE 0 READ TABLE gt_code INDEX 1 INTO gv_code. * append *special* 1st line to hide cource 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. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
*&---------------------------------------------------------------------* *& Report ZS_REPOSRC_DOWNLOAD *&---------------------------------------------------------------------* *& Purpose: Download compressed source code from table REPOSRC *& Author : Daniel Berlin *& Version: 1.0.1 *& License: CC BY 3.0 (http://creativecommons.org/licenses/by/3.0/) *&---------------------------------------------------------------------* REPORT zs_reposrc_download. DATA: v_fnam TYPE rlgrap-filename, " Local file name v_file TYPE string, " Same, but as a string v_xstr TYPE xstring, " Source (compressed) v_xlen TYPE i, " Length of source t_xtab TYPE TABLE OF x255. " Source plugged into a table PARAMETERS: report TYPE progname DEFAULT sy-repid "#EC * MATCHCODE OBJECT progname OBLIGATORY. START-OF-SELECTION. " -- Select local file name WHILE v_fnam IS INITIAL. v_fnam = report. CALL FUNCTION 'NAVIGATION_FILENAME_HELP' EXPORTING default_path = v_fnam mode = 'S' IMPORTING selected_filename = v_fnam. ENDWHILE. v_file = v_fnam. " -- Fetch compressed source code SELECT SINGLE data INTO v_xstr FROM reposrc WHERE progname = report AND r3state = 'A'. v_xlen = XSTRLEN( v_xstr ). " -- Plug source into a table CALL METHOD cl_swf_utl_convert_xstring=>xstring_to_table EXPORTING i_stream = v_xstr IMPORTING e_table = t_xtab EXCEPTIONS OTHERS = 1. " -- Download to local file CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING filetype = 'BIN' filename = v_file bin_filesize = v_xlen TABLES data_tab = t_xtab EXCEPTIONS OTHERS = 0. |
1 |
decompress.exe ztme11 ztme11.abap -u |
代码隐藏不了了啊,
新版本的SAP,好像确实 是不能使用了。