Change UNIX file permitions using ABAP

Hello,
I create a file using the open and close dataset statements and the file has the following permitions:
-rw-rw----
Now i whant to send the file using FTP to another server, but function module FTP_COPY return the error:
Permission denied
Is that possible to change the file permition on the file creation or after?
Kind regards
Rui Almeida
Message was edited by: Rui Almeida

Yes , you can chnage, are you the owner of the file, then it can be done.
i can tell you the simple way to do that.
REPORT ZUNIX line-size 400
                no standard page heading.
data: unixcom like   rlgrap-filename.  
"7 full perimission to read
"7 full permission to change
"7 full permission to delete
<b>unixcom = 'CHMOD 777 fillfullpath'.</b>
data: begin of tabl occurs 500,
        line(400),
      end of tabl.
data: lines type i.
start-of-selection.
  refresh tabl.
  call 'SYSTEM' id 'COMMAND' field unixcom
                id 'TAB'     field tabl[].
in the above code provide fullpath of the file.
Regards
vijay

Similar Messages

  • Changing physical path in FILE TCODE using ABAP CODE

    Hi all ,
    I want to change physical path linked to logical path in TCODE FILE dynamically using ABAP program. Is it possible.
    If yes then how?
    Thanks for your help.
    Regards,
    Uday.

    s

  • Changing Unix file attributes in target host

    Hello,
    I need to transmit a file from a SAP server to a target host in Unix.
    Actually the transmission is OK. I'm using the SAPFTP program.
    Now, my problem is that in the new file on the target system (in Unix) I need to change the file permissons to 777.
    The FM FTP_COMMAND doesn't work because the command chmod is not available through ftp. If I use this, I receipt the message "502 SITE command is not implemented".
    Somebody have another idea to change the Unix file attributes in a remote way from ABAP?
    Best regards!

    Hi Roberto,
    Look at the below BLOG, this explaines about the Commands which we use in FTP ..
    /people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap
    Regards
    Sudheer

  • Opening a pdf file without using ABAP

    Hi All,
        Can I open a pdf file in the ITS without using ABAP
        coding. I mean by using Java Script in an another
        dialog/page can i open a pdf file. If anyone has got
        any idea or sample code please let me know.
      Thanks,
       Amitabh

    Hi,
      Where exactly you want to open the file?
    The most simple way  would be to upload the file under MIMES and provide the URL in the corresponding ITS service.
    BR,
    Disha.
    Pls reward points for helpful answers.

  • Open *.PDF file by using ABAP program

    Hi,
    Can anyone please tell me about  " how to  open a PDF file by using an ABAP program".
    Regards,
    Prasanth

    Welcome to SDN.
    Refer this class - CL_GUI_PDF_VIEWER
    You may refer this thread also -
    Re: Open Jpg, Excel, word, pdf files from SAP screen.
    Regards,
    Amit

  • SIMPLE QUESTION, BROWNIE POINTS FOR ANSWERERS: changing the file path used for an audio recording

    After changing the name of an audio recording in the .band Media folder, the .band file continues to use the previous file name to try to find the audio file. I want to update the file path so that it uses the same file but with the new name. I thought I might be able to change the file path by editing projectData, but it appears to be encoded.
    This is a common, crucial feature present in virtually all DAWs. Surely there must be a feasible way to do this in GarageBand?

    you can't change the names of GB's assets behind its back
    if you want to change the name of the region that GB displays: double click the region within GB to open the track editor, then double click the name of the region (in the track editor) to change its name

  • Status change of Single correction using Abap report

    Hi Experts,
    I have a requirement to change the status of Single correction CR's to "completed" and also set the preceding document to appropriate status . I am using the function module CRM_ORDER_MAINTAIN followed by ORDER_SAVE to do so.
    But this does not change the status.
    Please let me know if there is anything that has to be done while changing the status of CR through an ABAP Report.
    Thanks in advance for ur help.
    Rithesh

    Use function CRM_STATUS_CHANGE_EXTERN and also CRM_ORDER_SAVE and commit at the end.

  • Workflow to change item/file permissions using a people column on the List/Library?

    SharePoint 2013 Online.
    I have a Document library with users that can only add new items permission by default.
    There is a new people column in that library
    I presume I can manually change perimssions on one item/file to let a user have full control over that particular item.
    Can a workflow be added to so that the user in that people column get's full control to the item on edit or new events in the Workflow?
    Can all other individual users be removed with this permissions for that item from the events of the workflow?
    Thanks in Advance!
    ============================
    Thank You
    cyberpine.com

    Hi cyberpine,
    In SharePoint on-premise, there are some workflow actions used to modify list item permission from SharePoint Designer workflow, like Add List Item Permissions, Replace List Item permissions. And these actions are only available in
    Impersonation Step.
    I’m not sure if it is similar in SharePoint online, you may check this. If there is any further question, I would like suggest you to give a new thread on
    Office 365 forum.
    Thanks & Regards,
    Emir
    Emir Liu
    TechNet Community Support

  • Dynamically changing the file name using the submit button

    I am currently using a submit button to send information to myself from the user of the form. Is there any way to change the name of the file that is emailed as a .pdf file according to some type of parameter or data set that is collected in the form?

    Not programmatically. The attachment wil take the same name as the opened PDF. If you change the name of the PDF then it will change your form name as well. That cannot be done programmatically.

  • How to delete the unix files automatically using the unix scripts

    Hi
    we have the ADF Project deployed on weblogic server running on top of Linux OS. But, our ADF running project is generating temporary files in weblogic server path below path
    /u01/oracle/product/Middleware/user_projects/domains/based_domain/servers/AdminServer/tmp.
    we are deleting the folders and files existed in TMP directory manually, when size is huge. but, our requirement is to delete the same automatially using the shell scripting based on the time interval say for every 10 hours or 2 days.
    Can anybody please provide us the solution.
    Regards
    Nagaraju Manchala

    Moderator Action:
    @ Nagaraju,
    Your duplicate post of this same exact question,
    that you had placed in the WebLogic Server - Clustering forum,
    has been deleted.
    For future reference, do not ever multi-post. Multi-posting is poor forum etiquette.
    Pick whichever forum you think is most appropriate and place your inquiry.
    You will get a response or you will not get a response.
    There is no obligation, in these free forums populated by end users just like yourself, that a post ever get a response.

  • Check if files exist using ABAP

    Hi All,
    I'm currently using FM: FILE_GET_NAME_USING_PATH, and I'd like to do a check to see if the filepath with file (i.e. /com/tmp/file.txt) I am getting back exists or not.
    Very simple question, just not sure what to do.
    Thanks,
    John

    There is a class that provides methods to check, if a file exist or if a certain directory does exist
      CALL METHOD cl_gui_frontend_services=>directory_exist
        EXPORTING
          directory            = lv_path
        RECEIVING
          result               = lv_valid
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
          CALL METHOD cl_gui_frontend_services=>file_exist
            EXPORTING
              file                 = x_file_with_path
            RECEIVING
              result               = y_file_exists
            EXCEPTIONS
              cntl_error           = 1
              error_no_gui         = 2
              wrong_parameter      = 3
              not_supported_by_gui = 4
              OTHERS               = 5.
    Hope that helps,
    Michael

  • Changing msglog file name using legato

    hi all;
    i want to change the default file name nsrnmo.log to nsrnmo<date>.log so that new file is always create whenever RMAN is run through Legato. i believe nsrnmo.bat file need to be modified but when i try to call my customized batch file in this file RMAN throws error.
    Appreciate if you provide your valuable suggestions and solutions.
    Regards,
    Aijaz

    Tycho,
    I did as follows in nsrnmo.bat
    SET PRECMD="cmd.exe/c E:\oracle\administration\scripts\secure\date-time.bat >precmd_txt >2>&1"
    SET NSR_RMAN_OUTPUT="E:\oracle\administration\logs\nsrnmo%PRECMD%.log"
    where date-time is the bat file have following lines
    set NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS
    for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
    for /f "tokens=1" %%u in ('time /t') do set t=%%u
    set datestr=%d:~6,4%%d:~0,2%%d:~3,2%
    set timestr=%t:~0,2%%t:~3,2%
    set datetime=%datestr%-%timestr%
    Regards
    Aijaz

  • Page Snapshot on Mac using Shift+Command+4, can I change the file type?

    Is there a way to have this feature save the screen shot as a .jpg or something other than .png?
    Thanks for The help!

    Actually you can change the file type, using a defaults write command in Terminal. Whatever you select changes the file type for all screenshots until/unless you globally change it again. All OnyX does is run this command in the program's interface--if you don't know how to use Terminal you may prefer this. If you want to use Terminal, you would launch it, then copy this command:
    defaults write com.apple.screencapture type jpg
    Paste it into the Terminal window and then press the Return key. I believe you need to restart for the change to take effect.
    Francine
    Francine
    Schwieder

  • How do I change a file name of a photo

    I am new to the Mac and running Yoesomite. I wanted to know can I change the file name of a photo in iPhoto.  If not, then is the process to export the file to the desktop and then change the file name using cmd i.  I used to be able to do this in Windows easily but now I am not sure how to do this on a Mac.

    You can take the photo you need from iPhoto Library in Pictures. Click it with right mouse button and choose Show Package Contents. In that folder that opens, choose Masters and now you can find the photo that you needed, but it will take some time as there are many folders and some may be empty. Copy that photo to Desktop and do what you want from that point.
    Don't do that.
    It's utterly unnecessary, slow and difficult and worse, risks dataloss.
    Use the simple and supported ways.
    Export using File -> export, or use a Media Browser.
    When uploading to Wordpress there is no need to rename the file. Just upload it from the Media Browser (*see below) and you can title it in the Wordpress dialogue.
    *For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • How to update master pay data in HR using ABAP

    Hi,
    My requirement is that I need to update the master pay data for all the employees. The pay scale has been revised and so the pay scale needs to be changed. This means that the configuration needs to be done.
    Once this config is done, the pay scale master data for all the existing employees also needs to be updated.
    Can anyone please tell me where all do I need to go and make the changes? I have got this confrmed that PA0008 (Infotype for Basic Pay) does not have to be changed. So, where else do I need to make changes so that, this change reflects in the existing employees data going forward. The amout of salary needs t be changed.
    Does this change requires a change in any infoype data or do we need to change the data of some transaction.
    Please help as soon as possible as this is very important.
    Regards,
    Namrata

    Hi Namrata,
    It is not advisable to change te pay data using ABAP coding. It should be done from functional side.
    To updat the master pay data just go to PA30, enter the employee number and select the infotype 8 (Basic Pay). Once in change mode you can update the data.
    Regards,
    Firoz.

Maybe you are looking for