Application Development 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: 

Program Name which helps to hide the code of abap program

Former Member
0 Kudos

Hello Experts,

Could anybody help me in finding the name of the program on running which we can hide the CODE OF Abap program

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Here´s a snippet demonstrating how to hide the ABAP code of a given program


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.

Reward points if helpful.

9 REPLIES 9

Former Member
0 Kudos

Hi..

You can create the Transaction code (may be your program name too) for your program using se93.

So that you can execute your program just by giving the transaction code without entering into the code.

Just try it.

Reward points if useful.

Regards,

K.Tharani.

0 Kudos

sorry tharani i m not asking to hide the program name

i m asking to hide the entire code so that nobody can see it

there is a program on running which with the name of the program in the selection screen it will hide entire sap program code which u have entered in the selection screen

Former Member
0 Kudos

Here´s a snippet demonstrating how to hide the ABAP code of a given program


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.

Reward points if helpful.

0 Kudos

Hi Mike,

Could U please help me to know how to retrieve the code back or unhide the same code which is under hide

Thanks in Advance

0 Kudos

As the code is hidden, it is not possible to retrieve the code back. You have to backup it before hiding it!

0 Kudos

too late! ;-D

0 Kudos

Hi,

If you had created any versions of the prog.

You can try Utilities->Version->version management

select the required version and click on retrieve.

thanks,

teja

0 Kudos

It is possible to hide classes and Methods in ABAP Object environment?

Thanks

0 Kudos

Sorry, but this is wrong...

without comments you just need 31 lines of coding to write the coding of !!!ANY!!! report into list-output... Tested on ERP 4.7 and 7.0

Even if the code is hidden via *@#@@[SAP]