Use of wildcharacter in DELETE DATASET dsn

Hi All,
I have a situation where I have to delete a file from application server at runtime while executing a report. But the problem is I don't know exact filename. But I know first few characters of file which will be always same. So my question is -
Is it possible to use wild characters in 'DELETE DATASET dsn' or not?
I tried DELETE DATASET 'delv*.txt'   -  but its doesn't work. Is there any other method to do this?
thanks,
Sanjay

Hi,
This is an abap question not a security question : wrong forum.
Anyway the solution is to read the content of the directory with a wildcard 'delv*.txt' to find out the real filename and then use the filename to delete the file.
Regards,
Olivier

Similar Messages

  • Delete dataset fname

    Hi friends,
    I am creating document in CV01N by using  BAPI_DOCUMENT_CREATE2 to create document and CVAPI_DOC_CHECKIN to checkin file. My ABAP program get's ececuted in background. My program takes multiple records (for example 10 records) to process and create & checkin document in SAP content server from SAP application server and after each document get's checkin , i delete the file from sap application server using DELETE DATASET p_fname.
    Exapmle: The problem is if i am looping 10 records to create & checkin document & then deleting it from application server . The 1st record while successful checkin takes 45 seconds and while deleting  using DELETE DATASET p_fname it returns sy-subrc = 4 and does not delete the file BUT after that all other records 2nd , 3rd.......10th all gets successful checkin in 2 seconds each and it gets deleted  using DELETE DATASET  p_fname as it returns sy-subrc = 0.
    Plz help why during backgrond processing of program and pickin the file from application server for checkin , the 1st record does not get deleted after checkin while rest all records of the loop get deleted from application server after checkin. The same statement  DELETE DATASET  p_fname returns sy-subrc = 4 1st time and then sy-subrc = 0 other times in the loop.
    Thanks in advance.

    Hey Joy,
    I am not using open dataset, then why to do close dataset.  Even i capture the name of the file which does not get deleted and deleats it at the end of the program after rest of the file's in my loop get's deleated then also it does not deleats it .
    I feel that the backgrond program function CVAPI_DOC_CHECKIN recognise the 1st document in the loops it checkin and never lets it delete it from application server as it holds it somewhere while it allows other records in the loop after creating and checkin the document in CV01N to deleats it from the application server.

  • Error in Delete Dataset  dn

    Hai All
          I am trying to delete the file from the application  server using
    DELETE DATASET file name.( File name specifies the full path.). Once the control passes through the statement i am getting the sy-subrc value as 4.
    Can any one please reply and solve this problm. .
    I have used the Fm EPS_DELETE_FILE ,Still i am facing the same pblm..
    Points will be rewarded
    thankyou.

    Hi Ashnab,
    first try to OPEN the dataset - this makes sure you do not have a path names problem.
    The you may check with your BASIS people if you have enough rights to delete the server file.
    If you omit the quotes enclosing the filename, it must be a fieldname and this field must carry the full path file name.
    Regards,
    Clemens

  • Delete Dataset File not working

    Hi All,
      I am trying to delete file from application server (AL11) directory after processing using DELETE DATASET FILE is not working , after processing also file still exists.
    My code is like this,
    *&      Form  backup_file
          The file has been processed.  Go ahead and copy it to the
          backup directory and delete it from the processing directory.
    FORM backup_file .
      DATA: lv_oldfile TYPE string,
            lv_backup TYPE string,
            l_rc TYPE i.
      IF p_appl = 'X'.  "Unix file
        lv_oldfile = wa_files-filename.
      Replace the directory name with the backup directory.
        REPLACE p_dir IN wa_files-filename WITH p_back.
      Tack date/time onto the end of the file name to avoid duplicate
      files
        CONCATENATE wa_files-filename
                    sy-datum
                    sy-uzeit
                  INTO wa_files-filename.
        OPEN DATASET wa_files-filename FOR OUTPUT
                                       IN TEXT MODE
                                       ENCODING DEFAULT.
        IF sy-subrc NE 0.
          f_backup_error = 'X'.
          EXIT.
        ELSE.
        Write the file contents to the new backup file.
          LOOP AT itab_input INTO wa_input.
            TRANSFER wa_input TO wa_files-filename.
          ENDLOOP.
        ENDIF.
      Close the backup file.
        CLOSE DATASET wa_files-filename.
      Delete the original file from the processing directory.
    if sy-subrc = 0.
        DELETE DATASET lv_oldfile.
    endif.
    endform.
    Thanks Everyone!

    HI,
    You have to check the value of Sy-subrc after the delete statement,
    and the value present in the variable lv_oldfile that if there is correct
    value in the variable populated or not.
    Moreover after assigning the value to variable lv_oldfile in the step 
    lv_oldfile = wa_files-filename.
    then you should use this variable lv_oldfile only for open dataset and close dataset also.
    Hope ir helps
    Regards
    Mansi

  • Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?

    I would say to start by looking on their web site... unfortunately, that appears to be dead.
    Based on the horrible ratings on the App Store (1 star for the current version), I'm not surprised it doesn't work well.

  • My old email address was hacked and I am no longer able to access it. How can i reset my icloud ID without losing all of my pictures and more inportantly contacts? I have created a new ID but i cannot seem to use it until I delete the old account

    my old email address was hacked and I am no longer able to access it. How can i reset my icloud ID without losing all of my pictures and more importantly contacts? I have created a new ID but i cannot seem to use it until I delete the old account

    You need to use the old ID and password to delete the iCloud account. After you delete the old account, you can sign in with the new ID in iCloud.
    Have you seen this.
    http://support.apple.com/kb/HT5796
    iCloud
    iOS 6 and later: Go to Settings > iCloud.
    If you signed out before changing your Apple ID, enter your current Apple ID to sign in. The data from your iCloud account will download to your device.
    If you're still signed in with your previous Apple ID:
    Scroll down and tap Delete Account. Depending on what iCloud options are turned on, you'll be asked to confirm that you want to delete data from your device. To confirm, tap Delete. (If you're using iOS 7 and have Find My iPhone turned on, you'll be asked to enter the password for your previous Apple ID. Enter the password, then tap Turn Off.) The data will be deleted from your device, but not from iCloud.
    Enter your current Apple ID to sign in. The data from your iCloud account will download again to your device.

  • My ipod touch4 won't synch, I get a message that I have to use Itunes installer to delet Itunes and re-install, help

    I keep getting a message that says the ipod cannot be used because the required softwae is not installed I need to use ipod installer to delete and reinstall  64bit vesion. I have done this and I get the same message, turning off my laptop ad my ipod touch makes no difference.

    See:
    Trouble installing iTunes or QuickTime for Windows
    Next try posting in the iTunes forum

  • Despite my best efforts, I am unable to remove iTunes 11.1.4 from my PC, this being made necessary because the original installation had a flaw and did not load properly. Effor to use the control panel, deleting dll. files, etc. all failed. iTune out??

    Despite my best efforts, I am unable to remove iTunes 11.1.4 from my PC, this being made necessary because the original installation had a flaw and did not load properly. Effor to use the control panel, deleting dll. files, etc. all failed. And, of course, on startup, a window opens with the error and tells me find QTMovie.dll and delete it because this may be the source of the hangup. Also, in trying to delete iTunes, I get the additional message that I must get approval from the System Administrator to take this action. I am the System Administrator.
    Any ideas would be welcomed.
    Thank you.
    James
    <E-mail Edited by Host>

    Thank you for asking this question.  I'm having the same issues. 
    Liz

  • My Acrobat 9 pro crashed on my PC using XP.  I deleted it and tried to reinstall.  It asked for my license for 9, 7 and 6.  I put in the 9

    My Acrobat 9 pro crashed on my PC using XP.  I deleted it and tried to reinstall.  It asked for my license for 9, 7 and 6.  I put in the 9 & 7 license which I have.  How do I get the version 6 license.  Is there a live person at Adobe & how do I reach them??

    You have the upgrade serial number for Acrobat 9that is why it is asking the previous qualifying serial number, I am sending you the serial number of Acrobat 6 & 7 by private messaging, you can your self find them by using Find your serial number quickly
    Regards
    Rajshree

  • I have no photos on my ipad 3 but 390mb used and i cant delete it.

    Hello.
    I have deleted all the photos from my ipad 3 but when i go into settings and check usage it says camera roll has 390 mb of data used. i swipe to delete it but it wont delete. how do i fix this.?
    I have restored my ipad to factory and it goes away but if i sync from my back up the photos come back and when i delete them (I dont want any photos on my ipad) once i have deleted them i still have 390mb used. They are not syncing from a folder in itunes so how do i restore everything like imessages emails and other data but not the photos.
    cheers
    Danny.

    Mate i tried deleting them maually and i dont get the storage space back. i restored my ipad to new and its all good but soon as i restore my settings a data the space gets taken up although there are no photos in camera roll.

  • I have a MacBook Air and I use "Notes" when I delete a folder it comes back. How do I permanently delete it?

    I have a MacBook Air and I use "Notes" when I delete a folder it comes back. How do I permanently delete it?

    it all depends on what's running in the macbook air that causes it to heat up.
    open activity monitor - change my processes to all processes - and on the %CPU, click it twice and see what running using 10% and above in the %CPU section.
    highlight anything that are using high CPU percentage and hit quit process.  see if that brings the temperature back down to normal.
    screenshot below is my activity monitor - have a look at it - nothing over 10% on the %CPU section.

  • Since using firefox, when I delete an email in hotmail from my Blackberry, it does not actually delete in the hotmail account, only on the device, why and how do I change this?

    I can only delete the messages on my device. When I used to use explorer they would delete out of my inbox as well. Why has this stopped since I started using Firefox?

    Calendars (and contacts) can "sync" between your MBP and your iPhone through iCloud because they really live on the iCloud servers and the two devices are clients. iCloud can accomplish much the same trick for email messages because the email really resides on iCloud email servers.
    If the email resides on some other server, that server is responsible for whatever syncing will be done. IMAP servers like the iCloud servers are built for such syncing; other mail servers may or may not be. iCloud would not be involved with email other than iCloud email.
    I understand Hotmail has been changing how their email servers are accessed. Check with Hotmail support for any changes you may need to make to keep up.

  • Making  Statistics to Discover the use % of Select/Update/Delete

    Hi,
    I have a small database, and I'd like to do a Statistics about the use of Select/Update/Delete. I hear about two ways.
    1-) Using Audit
    2-) Reading the Archives though package DBMS_LOGMner
    What way do u suggest to me ?
    If anyone have links and more information how I can do this statistics, could post it here ?
    Thank you.
    Fernando.

    2-) Reading the Archives though package DBMS_LOGMnerWell, if the database is not in archivelog mode, you can only read the online redo logs, therefore, missing the historical information.
    The best and simpliest solution to implement auditing.
    Jaffar
    Message was edited by:
    Syed Jaffar

  • I am trying to download trial CC, but i am receiving error cod 205. how can i fix this problem? few months ago, i used trial CC and deleted it.

    i am trying to download trial CC, but i am receiving error cod 205. how can i fix this problem? few months ago, i used trial CC and deleted it.

    Creative Cloud Help / Error downloading Creative Cloud applications
    http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html

  • I used dup cleaner to delete several pics.  Now i have many pics with ? marks.  How do i eliminate these pics?

    After using Dup Cleaner, I deleted several pics.  Now in my organizer, many pics have Question Marks indicating no Pic.  How do I eliminate the thumbnails?

    Rule number one of the Organizer: don't delete, rename or move files outside of the Organizer.
    The catalog still retains the location where the files were when 'imported = indexed' in the catalog.
    In your case, simply run a File/Reconnect missing files.
    In the resulting dialog, middle of second line, you have an icon opening a menu where you can choose "Select All", then "delete all". That removes the recording of the missing files in the catalog.

Maybe you are looking for

  • How can I Request a new App. that hasn't been made yet?

         I'm in a car club with many car enthusiasts that use there iPads, iPhones, and iPods on their cars. This is done by using a car programmer that can link with Apple devices by Bluetooth. These programmers  are designed to unlock your vehicles hid

  • Infoset Queries : IMPORT Data from Clusters

    Hi , I am trying to write a IMPORT statement in an 'Additional field' in my Infoet Query.But its showing some error.the same piece of code is working in normal ABAP programs. Any clues ? Thanks, Sandip.

  • Save File Dialog problem

    Hello ! I'm new with java so dont be to rude plz ;) ... First, my situation : I have a jsp that calls a servlet that get data from a database. After that I have to take these data and write them in a .txt file by calling a Save File Dialog. What I've

  • Exporting to PST daily - Office 2010

    Hi all, I was wondering if someone could give me some advice? Our MD likes having control of his emails (mainly the backing up of them), so has just exported all emails into PST (File --> Open --> Import --> Export to file --> Export to PST --> his e

  • FF loses $_SESSION data

    Hello, I set an session variable in my index.php, say session_start(); $_SESSION['test']='hello'; I call another skript on the server via AJAX that includes something like: session_start(); echo ($_SESSION['test']); This will result in the output of