‎2009 May 18 6:15 PM
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
‎2009 May 18 6:21 PM
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
‎2009 May 18 6:21 PM
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
‎2009 May 18 6:42 PM
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
‎2009 May 18 7:00 PM
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.
‎2009 May 18 7:00 PM
‎2009 May 18 8:31 PM
So you want to check the existing auth objects or you want to restrict all vs. few users from running this tool?
‎2009 May 18 8:52 PM
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
‎2009 May 18 9:09 PM
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.
‎2009 May 18 8:54 PM
ofcourse he can... read report is not developer dependent. Any body can run it.
‎2009 May 19 10:29 AM
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.