‎2009 Jul 10 4:47 AM
Hi all,
I have a problem while trying to remove a file in UNIX platform in ABAP program.
It is working fine in the development and quality server, but not in production server.
Based on the debug result, the shortdump was thrown while executing "CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command".
Below are the message return in the program shortdump
How to correct the error
You can check the authorization beforehand with the
function module AUTHORITY_CHECK_C_FUNCTION.
Short text
No authorization to call the C function "SYSTEM".
DATA: lv_command(100) TYPE C,
client_path LIKE RCGFILETR-FTAPPL,
server_path LIKE RCGFILETR-FTAPPL.
DATA: wa_files TYPE rsfillst,
it_files LIKE TABLE OF wa_files.
CALL FUNCTION 'SUBST_GET_FILE_LIST'
EXPORTING
dirname = gv_unix
filenm = '*'
TABLES
file_list = it_files
EXCEPTIONS
access_error = 1
OTHERS = 2.
IF sy-subrc = 0.
LOOP AT it_files INTO wa_files WHERE TYPE <> 'directory'.
CONCATENATE wa_files-dirname wa_files-name INTO server_path.
CONCATENATE p_fname wa_files-name INTO client_path.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
EXPORTING
i_file_front_end = client_path
i_file_appl = server_path
I_FILE_OVERWRITE = 'X'
EXCEPTIONS
FE_FILE_OPEN_ERROR = 1
FE_FILE_EXISTS = 2
FE_FILE_WRITE_ERROR = 3
AP_NO_AUTHORITY = 4
AP_FILE_OPEN_ERROR = 5
AP_FILE_EMPTY = 6
OTHERS = 7.
IF sy-subrc = 0.
concatenate 'rm -f' server_path into lv_command separated by space.
condense lv_command.
CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command.
CLEAR: lv_command.
ENDIF.
ENDLOOP.
ENDIF.
Anyone knows why and how to resolve this?
Kindly provide your feedback and input. Thanks in advance.
‎2009 Jul 10 5:04 AM
You don't have authorisation in PRD to remove files. If it is really required for you.
Take SU53 screen shot immediately once you get short dump and follow up with Basis Folks for required authorisation.
Thanks,
Raj
‎2009 Jul 10 5:04 AM
You don't have authorisation in PRD to remove files. If it is really required for you.
Take SU53 screen shot immediately once you get short dump and follow up with Basis Folks for required authorisation.
Thanks,
Raj