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: 

Backup ABAP Programs

Former Member
0 Kudos

Hi Everyone,

I need your help.

I am working on a tool that can backup the ABAP source codes and tables.

I am using the READ REPORT to get the source code and store the result in a text file,

my question is, if I want to give this tool to a client , what kind of authorization a user need to be able

to run the tool and backup all the ABAP programs of the SAP system ?

Can any ABAP developer use the "READ REPORT" and read the source code written by

other ABAP developer ?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use transaction ST01. Use authorization check.

Then execute your program. You'll get all the authorization objects needed to run the program.

Hope it helps.

Regards,

Gilberto Li

9 REPLIES 9

Former Member
0 Kudos

Hi,

Use transaction ST01. Use authorization check.

Then execute your program. You'll get all the authorization objects needed to run the program.

Hope it helps.

Regards,

Gilberto Li

Former Member
0 Kudos

You can ask security team to create a program authorization object for this tool. Then assign that auth object to program in the attributes. This way this tool can be run only by specific users & rest of the users will get error for SUBMIT authorization.

Hope this helps.

Bipin

Former Member
0 Kudos

this is strange, I got two answers but I can not see them here !!

anyhow, Thanks for the tip of using ST01, I am not able to view or save the trace !

I got this message when I try to save the trace:

Internal error when reading trace files (file incomplete)

another question, is it enough to run the transaction for my tool without actually executing it because it will take very long time to finish ?

I am the only SAP guy in the company so I have to do everything by myself.

0 Kudos

I can see the replies now !

0 Kudos

So you want to check the existing auth objects or you want to restrict all vs. few users from running this tool?

0 Kudos

I gave the tool to a client for testing and they only extract few hundreds of ABAP programs.

while in my system I was able to extract tens of thousands !! so I need to figure out why the client couldn't

backup all the ABAP programs ?

is this related to the authorizations ?

I am using the bcuser account in my system and I am wondering if our client used a normal ABAP developer account, will the client still be able to backup all the programs ? I think I will ask a separate question about the 'READ REPORT' function and if it is possible for an abap developer to read all the abap programs in the system.

Thanks

0 Kudos

I don't think there is any auth issue for read report. For the developer access they should be able to read the report. Check the selection which they are using if there is any.

READ REPORT LV_TRDIR-NAME INTO LV_PROGRAM_SOURCE.

Former Member
0 Kudos

ofcourse he can... read report is not developer dependent. Any body can run it.

Former Member
0 Kudos

REPORT zdownload.

TABLES: trdir.

SELECT-OPTIONS name FOR trdir-name NO INTERVALS.

PARAMETERS: path TYPE c LENGTH 50 DEFAULT 'C:\USERS\SCHWAB\PROGRAMS'.

START-OF-SELECTION.

LOOP AT name.

PERFORM download_program USING name-low.

ENDLOOP.

----


  • FORM download_program

----


FORM download_program USING value(i_name) LIKE trdir-name.

DATA: BEGIN OF lt_data_tab OCCURS 0,

line(72),

END OF lt_data_tab,

l_filename TYPE string.

CONCATENATE path '\' i_name '.TXT' INTO l_filename.

READ REPORT i_name INTO lt_data_tab.

IF lines( lt_data_tab ) = 0.

MESSAGE e001(uc) WITH TEXT-TK0.

ENDIF.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = l_filename

CHANGING

data_tab = lt_data_tab[]

EXCEPTIONS

OTHERS = 0.

IF sy-subrc <> 0.

MESSAGE e001(uc) WITH TEXT-K01.

ENDIF.

ENDFORM. "download_program

AT SELECTION-SCREEN ON name.

check name-low <> space.

SELECT SINGLE * FROM trdir WHERE name = name-low.

IF sy-subrc <> 0.

MESSAGE e001(uc) WITH TEXT-K02.

ENDIF.