Help needed - OS Command foe deleting a file from Appplication server.

Hi,
I have requirement, where in i need to delete a file from the application server. It has to be done automatically. I thought of using OS Command for achieving the same. Can anyone help me in achieving it. The OS of my application server system is UNIX.
Thanks in advance!!
P.S: Points will be rewarded.

Hello Sudeep,
If you define the command for each operating system using transactions SM69 (You can test it with SM49) and then call it using SXPG_COMMAND_EXECUTE which contains a parameter defining the operating system (SY-OPSYS)
then it does not matter which operating system is running, the function module always calls the correct version of the command.
So, for example you could define a command 'OS_COMMAND'
which deleted a file. This would have one version for Dos
which said 'del', and a second version for unix which said 'rm'.
The correct command would be specified by the call to SXPG_COMMAND_EXECUTE because the operating system parameter differentiates between the two commands.
[USING PROCESS CHAINS IN SAP BW|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0a7cd90-0201-0010-49a1-d730a56895f4]
SXPG_COMMAND_LIST_GET – Reads a list of external OS commands
Thanks
Chandran

Similar Messages

  • System exception while deleting the file from app server in background job

    Hi All,
    I have a issue while the deleting the file from application server.
    I am using the statement DELETE DATASET in my program to delete the file from app server.
    I am able to delete the file from the app server when i run the program from app server.
    When i run the same report from background job i am getting the message called System exception.
    Is there any secuirity which i need to get the issue.
    Thank You,
    Taragini

    Hi All,
    I get all the authorization sto delete the file from application serever.
    Thing is i am able to run the program sucessfully in foreground but not in the background .
    It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
    Can anybody please give me suggestion
    Thanks,
    Taragini

  • How to delete a file from Appliction Server.

    Hi Gurus,
    I want to delete a file from application server .
    can any one tell me the FM/BAPI.
    Plz Reply me ASAP.
    Thanks in Advance.

    BAPI_DOCUMENT_DELETE ?
    GUI_DELETE_FILE ?
    maybe just go to SE37, enter DELETE, and click on the document icon to find from repository system.
    Regards,
    Vincent

  • How to delete a file from application server?

    Hi gurus,
    i want delete a file from application server . can any one tell me the BAPI/Fm .
    thanks in advance

    See the replies of the thread;
    How to delete  File from the Application Server,ABAP
    But i can smell something fishy in both  The specified item was not found. and The specified item was not found. style of posting questions. Also both of you have similar questions in your profile....
    Hmmm, Mods have to take care of the Rest...
    Regards
    Karthik D

  • Move file to application server  or delete a file from application server

    Hi all
    I have one application in which if succeful uploading  of BMP file  from application server is not  done , File has to move to another folder like 'ERROR' Folder
    but i am unable to do that.
    here is the code:
    CONDENSE g_t_ws_move.
    CALL 'SYSTEM' ID 'COMMAND' FIELD g_t_ws_move
      ID 'TAB'     FIELD g_t_ws_command_line[].
    where
    <b>G_T_WS_MOVE= 'MOVE /Y /sapin/XVZ/journeyplan/0000000.BMP /tmp/0000000.BMP'
    means  i have to move 000000.bmp file from XVZ to tmp directory ,</b>

    Hello Neetu
    Alternatively you could use a combination of the following function modules:
    - EPS_FTP_PUT
    - EPS_DELETE_FILE
    Regards
      Uwe

  • How do I delete my iCloud email without deleting the files from the server?

    I want to delete my iCloud email from a laptop I don't use much anymore. I am afraid if I do all the files will delete from the server as well. Is this true? If not, what are the best ways to go about deleting the account without harming the files on the server (in turn deleting all my email from synced iCloud devices)?

    In Mail, delete the account, the server side will not be changed.

  • Help needed to up-convert my labview files from 5.1 to 8.6

    I can't find any resource to up-covert a few of my old 5.1 vi's to labview 8.6. Can anyone convert them?
    Thanks for your very appreciate help.
    Roberto-
    Solved!
    Go to Solution.
    Attachments:
    oldVIs.zip ‏252 KB

    attached as 8.2, which you can open
    Attachments:
    oldVIs.zip ‏156 KB

  • Delete a file from App Server

    Hi,
    Can some one tell me how to delete a specific file on the app server ?

    REPORT  zdlc_delete_files                       .
    DATA: wa_summary      TYPE yloadsummary.
    DATA: BEGIN OF tab1 OCCURS 500,
    line(600),
    END OF tab1.
    DATA: unixcom LIKE rlgrap-filename.
    DATA: lines TYPE i,
          p_patho1(60).
    SELECTION-SCREEN BEGIN OF BLOCK blk0 WITH FRAME TITLE text-u01.
    PARAMETERS: p_patho(60) LOWER CASE
                DEFAULT '/export/SAPtf/dlcinc/new/' OBLIGATORY,
                p_sfile LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk0.
    p_patho1 =  p_patho.
    CONCATENATE 'ls [D]  '' ' p_patho1 INTO p_patho1.
    unixcom = p_patho1.
    REFRESH tab1.
    CALL 'SYSTEM' ID 'COMMAND' FIELD unixcom
    ID 'TAB' FIELD tab1[].
    CASE p_sfile.
    *To delete all .Read files.
      WHEN '*.read'.
        LOOP AT tab1.
          SEARCH tab1-line FOR '.read'.
          IF sy-subrc = 0.
            CONCATENATE p_patho tab1-line INTO wa_summary-data_file.
            DELETE DATASET wa_summary-data_file.
            IF sy-subrc = 0.
              WRITE :/'File Successfully deleted :', wa_summary-data_file.
            ENDIF.
          ENDIF.
        ENDLOOP.
    *To delte all .conv files.
      WHEN '*.conv'.
        LOOP AT tab1.
          SEARCH tab1-line FOR '.conv'.
          IF sy-subrc = 0.
            CONCATENATE p_patho tab1-line INTO wa_summary-data_file.
            DELETE DATASET wa_summary-data_file.
            IF sy-subrc = 0.
              WRITE :/'File Successfully deleted :', wa_summary-data_file.
            ENDIF.
          ENDIF.
        ENDLOOP.
      WHEN OTHERS.
    *To delete a specified file.
        CONCATENATE p_patho p_sfile INTO wa_summary-data_file.
        DELETE DATASET wa_summary-data_file.
        IF sy-subrc = 0.
          WRITE :/ 'File Successfully deleted :', wa_summary-data_file.
        ELSE.
          WRITE :/ 'File does not exist: ', wa_summary-data_file.
        ENDIF.
    ENDCASE.
    CHECK THIS CODE

  • DELETE A FILE FROM A LOCATION

    Hi all ,
    I want to delete a file from alocation in batch. I want to use the    'SXPG_COMMAND_EXECUTE' fm . I want to create a command in SM69 . My operating system is WINDOWS NT .Can any one tell me what COMMAND i need to use to delete a file from pc ? And how can i create a command in sm69?
    null

    Check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f2c505211d189550000e829fbbd/frameset.htm
    It gives details about how to create / run external command for Windows in SAP.
    For deleting a file, command in Windows is <DEL filename>
    Message was edited by:
            Ashish Gundawar

  • How to delete file from application server(Unix)

    Hi All,
    Using the below code downloading a file from application server(Unix) to client machine. I want to delete the file from application server once it is downloaded to client
    We work on Forms 11.1.1.4.0 and Oracle DB 10g. Client machine are Windows 7.
    BEGIN
      IF webutil_file_transfer.AS_to_Client
      (clientFile => Name_In('global.g_file_name')
      ,serverFile => ls_AppServer_Loc)THEN
      message('Data exported Successfully');
      ELSE
       message('File download from Application Server failed');
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
      message('File download failed: '||SUBSTR(sqlerrm,1,200));
      END;
    I have search for solution on OTN. Few suggested to use HOST.
    Can any one help me how to use Host() built_in to delete the file.
    Thanks,
    Maddy

    Can any one help me how to use Host() built_in to delete the file.
    Host('/bin/rm <complete file path>');

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

  • Delete file from application server

    Hi,
       Can any one tell me how to delete a file from application server?
    Thanks,
    Rahul.

    Basic question, please search for available information.
    Thread locked.
    Thomas

  • How to delete the files from server through OAF page

    Hi All,
    I have a requirement in which i am creating files on server through my CO code.
    Now once the page is rendered, i want to delete the files from the server.
    Just wondering how can we achieve this.
    Kindly advice!
    Thanks,
    Sachin

    Hi Sachin
    all the methods in the processRequest() are called during loading of the page.
    all the methods in the processFormRequest() are called during any action events on the page.
    So Use the method in processFormRequest() : write a method in
    that on which action you want to delete the file.
    regards
    sridhar

  • How to delete Archived files from FTP

    HI,
    I am looking to delete Archived files from FTP Server, Can anybody have idea about this.
    Thanks,
    Ram

    To be frank, deletion of archived files is really a manual activity and is never in reality done by an interface
    so you have two options;
    1. log into the archived folder and manually delete archived files
    2. run a script in your file adapter - this way everytime the interface is triggered the files will be deleted - but then y do this.. instead just dont archive any files at all

  • Files from FTP server to Application server

    Hi All,
    I am new to SDN and SAP XI, can anyone tell me whether its possible to move the files (different strcuture files i.e. some are master data files and some are transaction data file) from FTP server to Application server with one interface. Actually the process is already established at clientsite for placing master data files like product, plant etc from FTP server to App server through FTP adapter. Now my requirement is to move transaction data file with completely different structure as master data to App server. If we place these trasaction data file in same folder/directory as master data files does SAP XI pick this file also. If not what are the steps I need to follow to achieve this. I know that if we create new configuration it will work but I question is does master data interface picks this transaction data file also.
    Right now our process for master data files is SAP XI picks the files and deletes the file from FTP server folder. The master data file names are plant_attr.csv, product_attr.csv etc and transcation data file name is salestrasactiondata.csv. I need to move these files to application server on daily bases.
    I appreciate your help .
    Regards
    Bob.

    > I am new to SDN and SAP XI, can anyone tell me whether its possible to move the files (different strcuture files i.e. some are master data files and some are transaction data file) from FTP server to Application server with one interface.
    Hello Bob,
    Yes it is possible.
    There can be two ways of doing it.
    1. N:1 mapping, BPM will require for this.
    N:1 Mapping refer this blog
    IDOCs (Multiple Types) Collection in BPM
    BpmPatterns CollectMerge
    part1  BPM with Patterns explained Part-1
    part2  BPM with Patterns explained Part-2
    Second option
    Create 3 scanarios in integration directory and correspondingly in integration repositoy create different data types, message types, mappings & interface mappings and then in each of scenario us different message interface and interface mapping.
    > I know that if we create new configuration it will work but I question is does master data interface picks this transaction data file also.
    >
    If you are using N:1 scenario then use *.csv in your sender adapter under file name parameter and then all the files will be picked up from same directory.
    If you are using second option (3 different scenarios) then also you can pick the different files from same directory. You will be having 3 sender adapters in this case, So, one for picking master data, and another for product data and the last one for transaction data.
    So, in case of master data use "plant_*.csv" as a file name and directory name.
    In case of product data, use "product_*.csv " as a file name and source directory will remain same.
    similarly do it for transaction data.
    So by this way all 3 sender adapters will perform their job to pick the different files from same source directory.
    Regards,
    Sarvesh

Maybe you are looking for

  • No signal dvi

    Hello all, could anyone help with this problem please?<br><br>A couple of days ago upon switching on my h8 1070uk pc there was no signal going to the monitor (connected dvi with no adapter from graphics card), after the 3rd attempt in powering off an

  • Adobe form integrated with WDA Application- hanging on click of button

    Hello Experts, These are my specifications - SAP Netweaver release - 701 Level -05 ADS Version - 802.20090618120017.572641 Version of ZCI script - 802.20090115091137.519569.519537 When I click on the submit button, the wait symbol ( a circle) keeps o

  • UDO forms doesn't display after export

    Hi Guys! I've created an add-on from my PC and works well. I did a backup of my database with UDO forms etc. and transfer them into another server. When I clicked the menu for the UDO, the form doesn't appear. Is there any files or procedure I had mi

  • Checkbox: making it checked depending on column & disabling it at same time

    Hi, In my report region, I have a column with checkbox. The requirement is : depending on the value of a column, it should be checked or unchecked. And whenever it is checked, it should get disabled. Means the user can see that in a particular row th

  • "render video" dialog box taking 3 minutes to open in Photoshop CC

    I was using photoshop cs5 and am currently on a trail of CC, everything else is working fine, just File>export>render video takes along time for the dialog box to appear, whch was not the case in cs5. Any settings I can change to speed this up?