<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Shortdump while calling UNIX command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/shortdump-while-calling-unix-command/m-p/5871182#M1323240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem while trying to remove a file in UNIX platform in ABAP program.&lt;/P&gt;&lt;P&gt;It is working fine in the development and quality server, but not in production server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the debug result, the shortdump was thrown while executing "CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the message return in the program shortdump&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
How to correct the error                                   
    You can check the authorization beforehand with the    
    function module AUTHORITY_CHECK_C_FUNCTION.            
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
Short text                                             
    No authorization to call the C function "SYSTEM".  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
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 &amp;lt;&amp;gt; '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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows why and how to resolve this?&lt;/P&gt;&lt;P&gt;Kindly provide your feedback and input. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2009 03:47:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-10T03:47:08Z</dc:date>
    <item>
      <title>Shortdump while calling UNIX command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shortdump-while-calling-unix-command/m-p/5871182#M1323240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem while trying to remove a file in UNIX platform in ABAP program.&lt;/P&gt;&lt;P&gt;It is working fine in the development and quality server, but not in production server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the debug result, the shortdump was thrown while executing "CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the message return in the program shortdump&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
How to correct the error                                   
    You can check the authorization beforehand with the    
    function module AUTHORITY_CHECK_C_FUNCTION.            
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
Short text                                             
    No authorization to call the C function "SYSTEM".  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
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 &amp;lt;&amp;gt; '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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows why and how to resolve this?&lt;/P&gt;&lt;P&gt;Kindly provide your feedback and input. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 03:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shortdump-while-calling-unix-command/m-p/5871182#M1323240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T03:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shortdump while calling UNIX command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shortdump-while-calling-unix-command/m-p/5871183#M1323241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have authorisation in PRD to remove files. If it is really required for you. &lt;/P&gt;&lt;P&gt;Take SU53 screen shot  immediately once you get short dump and follow up with Basis Folks for required authorisation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 04:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shortdump-while-calling-unix-command/m-p/5871183#M1323241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T04:04:42Z</dc:date>
    </item>
  </channel>
</rss>

