How to delete a  file from AL11??????

Hi Friends,
how can i delete a file from AL11 directory....
i have found FM's like EPS_DELETE_FILE, EDI_PORT_DELETE_FILE and some more from SAP system but those are not deleting the files....
let me know if i can write a program for this and if yes then guide me for writing the same....
Thanks,
Nagesh.

reference:http://saplab.blogspot.com/2007/10/sample-abap-program-to-delete-file-from.html
REPORT ZDELETE.
Delete a file on the application server.
PARAMETERS: P_DIR LIKE RLGRAP-FILENAME
DEFAULT '/usr/sap/trans/', *it will delete files from this dir
P_FILE1 LIKE RLGRAP-FILENAME.
DATA: P_FILE(128).
DATA: W_ANS.
START-OF-SELECTION.
CONCATENATE P_DIR P_FILE1 INTO P_FILE.
check file exists
OPEN DATASET P_FILE FOR INPUT.
IF SY-SUBRC NE 0.
MESSAGE E899(BD) WITH P_FILE 'does not exist'.
EXIT.
ELSE.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = P_DIR
TEXTLINE2 = P_FILE1
TITEL = 'ARE YOU SURE YOU WANT TO DELETE'
START_COLUMN = 25
START_ROW = 6
IMPORTING
ANSWER = W_ANS
EXCEPTIONS
OTHERS = 1.
ENDIF.
CLOSE DATASET P_FILE.
CHECK W_ANS = 'J'.
delete
DELETE DATASET P_FILE.
IF SY-SUBRC NE 0.
MESSAGE E899(BD) WITH 'Invalid file name' P_FILE.
ELSE.
CLOSE DATASET P_FILE.
MESSAGE I899(BD) WITH P_DIR P_FILE1 'DELETED'.
ENDIF

Similar Messages

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How to download a file from AL11 inot Excel format without collapse the col

    Hi,
    Please suggest how to download a file from AL11 to Excel sheet.currenlty all field are merging into single column.I writing this file via using DATASET.
    Regards
    Ricky

    Hi,
       Try this code,
    ==============================================
    TYPES : BEGIN OF ty_emp,
              empno(2) TYPE c,
              empid(10) TYPE c,
              empname(3) TYPE c,
            END OF ty_emp.
    DATA : it_emp TYPE TABLE OF ty_emp,
            wa_emp TYPE ty_emp.
    DATA : pbk TYPE string.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file TYPE rlgrap-filename.
    PARAMETERS : p_asfile TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b1.
    pbk = p_file.
    OPEN DATASET p_asfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        READ DATASET p_asfile INTO wa_emp.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        APPEND wa_emp TO it_emp.
      ENDDO.
    CLOSE DATASET p_asfile.
    Filling the already created file with download PS radiobutton
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                  =
          filename                      = pbk
      FILETYPE                      = 'ASC'
         append                        = 'X'
         write_field_separator         = ' '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
        TABLES
          data_tab                      = it_emp
    EXCEPTIONS
      FILE_WRITE_ERROR              = 1
      NO_BATCH                      = 2
      GUI_REFUSE_FILETRANSFER       = 3
      INVALID_TYPE                  = 4
      NO_AUTHORITY                  = 5
      UNKNOWN_ERROR                 = 6
      HEADER_NOT_ALLOWED            = 7
      SEPARATOR_NOT_ALLOWED         = 8
      FILESIZE_NOT_ALLOWED          = 9
      HEADER_TOO_LONG               = 10
      DP_ERROR_CREATE               = 11
      DP_ERROR_SEND                 = 12
      DP_ERROR_WRITE                = 13
      UNKNOWN_DP_ERROR              = 14
      ACCESS_DENIED                 = 15
      DP_OUT_OF_MEMORY              = 16
      DISK_FULL                     = 17
      DP_TIMEOUT                    = 18
      FILE_NOT_FOUND                = 19
      DATAPROVIDER_EXCEPTION        = 20
      CONTROL_FLUSH_ERROR           = 21
      OTHERS                        = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ==============================================
    Regards,
    Krrishna

  • 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

  • How to delete 1 file from CD?

    If I only want to delete one file from a cd that contains many files, how do I do this? I don't want to erase the whole cd!

    1. find 700 MB of free space somewhere, you have it i'm sure. if not back-up & delete old stuff...
    2. copy the whole CD to there
    3. delete that one file
    4. burn a new CD (this is the one step i'm not sure you're able to do locally - hence your question. or?)
    5. allow burn to verify. then test it as mounted.
    6. if o.k., use sturdy scissors and cut the previous CD in half. or use s'th sharp and dig into the data side...
    i'm partial to the cutting in half approach. apparently putting a CD into a microwave destroys it too, and i hear the process results in interesting visual effects, but if you go that route i suggest you do this in someone else's microwave and from a safe distance...
    cheers

  • 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 a file from my hard drive through iTunes?

    I want to delete a file through my iTunes. Whenever I do, it just gives me a dialog window telling me that it will delete the file from the library and my iPod. It does NOT delete it from my hard drive. I do NOT want to let iTunes manage my music.
    How can I delete files? It seems crazy that I wouldn't be able to.

    hmm. for some strange reason after doing that it just simply warns me that in deleting the song(s) it will ruin my playlists/mess up songs currently on my ipod.
    im just trying to delete all the songs that are under a minute from various albums because they take a lot of room, yet are pretty useless. but they are strung out over multiple files and i simply would love to be able to delete them all from the library where they are arranged. do you know of any other techniques to fix it?

  • How to delete the files from iPhone before selling?

    How do I delete the files from my old iPhone4 before selling?

    Hey adhot,
    Before selling your iPhone, you'll want to follow these directions:
    Before you sell or give away your iOS device, make sure that you have removed all of your personal information. Follow these steps to protect your data and get your device to its factory default state for the new owner:
    Back up your device.
    Go to Settings > General > Reset, then tap Erase All Content and Settings.
    This will completely erase your device and turn off iCloud, iMessage, FaceTime, Game Center, and other services.
    If you are using iOS 7 and have Find My iPhone turned on, your Apple ID and password will be required. After you provide your password, the device will be erased and removed from your account so that the next owner can activate it.
    Contact your carrier for guidance on transferring service to the new owner.
    When the device is turned on for the first time by the new owner, Setup Assistant will guide them through the setup process.
    Important: Do not manually delete contacts, calendars, reminders, documents, photo streams, or any other iCloud data while signed in to your iCloud account, or the content will also be deleted from the iCloud servers and all of your iCloud devices.
    via: What to do before selling or giving away your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT5661
    Have a great day,
    Delgadoh

  • 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 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

  • Delete the file from AL11

    hi all,
    how to delete file from application server(al11)?
    apart from using EPS_DELETE_FILE
    and writing a code  any other go to acheive it
    regards
    venkat

    Hi,
    AL11 is a tool to view files that exist on the operating system of the SAP instance (which I think is Rainer's point). 
    The only way to delete this files is either programatically (with the function module you mention or other ways) or to log onto the operating system directly and delete the file.  In either case you are not deleting them from AL11, you are deleting them from the operating system.
    Regards,
    Nick

  • How to delete CR2 files from iPad

    I recently used the camera connection kit to download photos (JPEG and Raw) from my Canon G12 to my iPad.  Since I have gotten home, I have been transferring the photos to iPhoto on my MacBook Pro.  When I try to delete the photos from my iPad, it will delete the JPEG but not the CR2 Raw file.  Since the Photos app on the iPad doesn"t "see" the Raw files, I can't delete them directly on the iPad and there doesn't seem to be any way to do it from iPhoto when my iPad is connected to my MacBook Pro.  Any thoughts on how to do this?  Thanks.  Glen

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

  • How to delete a file from adobe reader on a Acer tablet

    I no longer require some pdc files in Adobe Reader.  How do I remove

    You can delete files in either of the two ways:
    1. Go to the documents tab in the File Browser -> long press on the pdf file that you want to delete - > delete the file
    2. Go to the documents tab -> Click on the Edit button in the top bar -> select the check boxes next to the files that have to be deleted -> Click on the trash icon in the top bar to delete the file.
    Hope this helps.
    Thanks.

  • How to delete a file from time machine without entering time machine mode ?

    Is there  a terminial hack or a third-party app  to delete a backed up file from the finder and at the same time from time machine without having to enter time machine mode, and is there a shortcut to do so ?

    Please post your code using code tags (click on CODE above the text area, when posting)
    response.setContentType("application/octet-stream");Why octet-stream? Set the correct mime-type.
    String disHeader = "Attachment; Filename=\"filename\"";The filename should just be the file's name. Not the complete path to the file! This will tell anyone where the file is located on the server. It's also inconvenient because by default,the browser will suggest it as the name for the download.
    Your way of writing to the output stream is just plain wrong. See this snippet (picked from [http://balusc.blogspot.com/2007/07/fileservlet.html])
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open streams.
                input = new BufferedInputStream(new FileInputStream(file), DEFAULT_BUFFER_SIZE);
                output = new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE);
                // Write file contents to response.
                byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
                int length;
                while ((length = input.read(buffer)) > 0) {
                    output.write(buffer, 0, length);
                // Finalize task.
                output.flush();
            } finally {
                // Gently close streams.
                close(output);
                close(input);
            }

  • How to delete photo files from ipad

    Now that I used the handy little card reader while on my last trip to download photos, my ipad is near capacity...urgh. How do I delete them? Is there a management system? Thanks!

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

Maybe you are looking for

  • Hp officejet 6310 won't scan

    It scanned fine on leopard, but now it won't show up at all. It still prints, too.

  • Unable to create Web i reports in Win 7 64 bit OS

    Hi,     I have WIN 7 64 bit installed on my Laptop. I am unable to create Web I reports in this machine. Does any one know why? BR, Nanda

  • Power point slides not showing

    I have a rather odd problem. I've got a lengthy pdf which I converted to jpg's. I pasted those jpg's into power point into and then imported the pptx into Captivate 6. All the slides import but only the first 2 jpg's are visible. All of the other sli

  • New MacMini's Dual Layer Drive

    Most people know that new MacMini currently on the market is register at 1.5GHz not 1.42. Also Vidoe RAM is 64MB not 32MB as well as the superdrive is matsushita UJ-845. UJ-845 is listed as DL drive and from the google it is DL drive. On my other pos

  • Dolby 5.1 and iMac

    Has anyone found a good way to access 5.1? I was intrigued by Tritton AXPro headset which claims to have optical input and to be compatible with Mac. Has anyone tried this? and yes @ $159-$179 it is not a cheap solution,