Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Change file permission

Hi, Im using open dataset, transfer, close dataset to write data on unix server. Problem is, that all files i write by this ABAP command, have permission 660. I want to set it to 644. Is it possible, if I am not allowed to use unix commands in ABAP?

THX

Tags:
Former Member
Former Member replied

Hi,

Create one external unix command in SM69.

In that transaction, input "chmod" in the "Operation system command" field.

in the "Parameters for operating system command" input "644 &"

Lets say the external command you created is "'ZFMM_CHMOD1'".

Now we need to call this in ABAP.

data: w_output TYPE SXPGCOLIST-PARAMETERS VALUE '/tmp/swa.txt' ,

w_command TYPE SXPGCOLIST-name VALUE 'ZFMM_CHMOD1'.

 CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
  EXPORTING
    commandname                         = w_command
    ADDITIONAL_PARAMETERS               = w_output
 IMPORTING
   STATUS                               = w_status
 TABLES
   EXEC_PROTOCOL                        =  LOG


Edited by: Swastik Bharati on Sep 19, 2008 2:13 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question