How to delete the check_in or check_out original file of a document.

hello,
using function 'BAPI_DOCUMENT_CHANGE2' delete a original checked in or checked out.following code:
data: lv_objkt like aeoi-OBJKT,
      lv_doknr like draw-doknr,
      lv_dokar like draw-dokar,
      lv_doktl like draw-doktl,
      lv_dokvr like draw-dokvr,
      lv_slen type i.
lv_dokar = 'DRW'.
lv_doknr = '00000000000155'.
lv_doktl = '000'.
lv_dokvr = '-'.
  data:
**..... Document data DATA:
  ls_doc LIKE bapi_doc_draw2,
**..... Indicator for change relevance
  ls_docx LIKE bapi_doc_drawx2,
**..... Bapi return structure
  ls_return LIKE bapiret2,
**.... Originals that are checked in simultaneously
  lt_files LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.
  ls_doc-documenttype = lv_dokar.
  ls_doc-documentnumber = lv_doknr.
  ls_doc-documentversion = lv_dokvr.
  ls_doc-documentpart = lv_doktl.
  lt_files-deletevalue = 'X'.
  lt_files-documenttype = lv_dokar.
  lt_files-documentnumber = lv_doknr.
  lt_files-documentversion = lv_dokvr.
  lt_files-documentpart = lv_doktl.
  CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
  EXPORTING:
  documenttype = ls_doc-documenttype
  documentnumber = ls_doc-documentnumber
  documentpart = ls_doc-documentpart
  documentversion = ls_doc-documentversion
  documentdata = ls_doc
  documentdatax = ls_docx
  IMPORTING:
  return = ls_return
  TABLES:
   documentfiles = lt_files.
Did an error occur ??
  IF ls_return-type CA 'EA'.
    ROLLBACK WORK. MESSAGE ID '26' TYPE 'I' NUMBER '000'
  WITH ls_return-message.
  ELSE.
    COMMIT WORK.
  ENDIF.
execute this code,but original file was not deleted.
what reason?
pls help me.

this problem has been resolved.it isn't a problem.who want to know how to be solved,pls contact me by email.

Similar Messages

  • How to delete the data in archived log files

    hi
    how can i delete the enteries in archived log files. and what is the disadvantage of deleting archived log enteries.

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • How to delete the heapdump, Javacore and Ariview files

    Hi all,
    i got the problem with the heapdump and javacore files
    the problem is /usr directory we assigned space of 17 GB, after some days it got filled up, so we deleted the heapdump, javacore and arciviews in /usr/sap/SID/<instance>/j2ee/cluster/server0 directory. now it was showing the 35% of space is full, after one hour again it was showing 100% no space. but in the directory there is no heap dump and javacore files.
    my question is other than this any where else it was creating the heapdump, javcore and arciviews
    can you please help me out
    Thanks and Regards
    Dileep
    Edited by: Dileep P on May 6, 2008 1:05 PM

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • How to delete the obsolete webdynpro interface IWCI* file

    hi:
    I created a local webdyrnpro component  ZZ_TEST, but during saving, there is some error occurs, so I deleted this webdynpro and try to create it again. but I found that its corresponding interface file ZIWCI_ZTEST still existed in system.
    And when I tried to delete it manually, the following message is displayed:
    'Object cannot be edited with Class Builder'.
    and this interface could not be edited or renamed too. So it is leaved in system foreever and I have no way to delete it, which block me to recreate webdynrpo component ZZ_TEST with the same name.
    So, do you have any good way to force to delete this interface clearly?
    thanks.
    Edited by: Tony Zheng on Jul 5, 2010 4:31 PM
    Edited by: Tony Zheng on Jul 5, 2010 4:41 PM

    Even I have the same error..
             I was creating a web dynpro component , interface got created but not the web dynpro component. I tried to recreate the web dynpro component, it is not allowing me to create it. It gives a error message
    " The ABAP Interface does not exist"
    When i try to delete the interface in SE24. It gives a error message " Object cannot be edited with Class Builder".
    Is there any way to forcefully delete the interface.
    Ranganathan.

  • How to delete the first page from a large number of documents

    Hello all,
    My company has migrated from Adobe Acrobat pro 8 to 11. In version 8 we had
    used Document Processing to remove the first page from all pdf's within a
    directory (5000+). This process took about an hour.
    Now my research has led me to use Actions in version 11, however it appears
    that the action require each document to be open and saved (one after another)
    in Acrobat in order for the first page to be removed.  This thrashing has made this process very
    slow to the point where it's useable.
    Is there any way to run actions from the command line
    so time isn't wasted opening up each document in Acrobat? 
    Is there another way to quickly remove the first page
    from a PDF in bulk?
    I'm outside my expertise area here, so if you need any additional
    information let me know.
    Thanks in advance.

    Indeed, batch processing in Acrobat XI is inferior in many ways to what it was previously.
    To answer your questions:
    1. No.
    2. Yes, it can be done using a stand-alone app much more quickly and more efficiently, but it's somewhat more complicated to develop such an app than to set up an Action in Acrobat.

  • How to delete the queries in  BW Production which are no longer existing.

    Hi,
    How to  delete the queries in BW production which are no longer existing in DEV.
    1. I tried Using RSZDELETE in Production it is not getting deleted and the below message given.
    Query object 4A7V83T3RB4ABIOKSDJT2HWDL is blocked. Deletion has been cancelled.
    2. I tried creating another query in dev with the same technical name and send a transport with deletion
    it is not working.
    Please advise me on this for any function module or any other method.
    Thanks
    Surya

    Hi,
    If you transported the query from DEV and now you want to delete it, you should open a BEx request (Dev Class under which it was originally transported -- or-- Standard - type) in DEV delete the query and move the transport to Production.
    As far as your error is concerned, usually  when you  can delete a query using the delete option in query designer itself,
    Business Explorer> query-> delete objects , when you press execute the system offers you a list of dependent objects on the query(workbook,views), in case the sysytem is unable to delete them i.e.they being used as a input query for a characteristic variable (replacement path),then system throws this error.You can delete these all depndents under there prescribed roles , fav s & then proceed.
    Hope this will be expedite.
    Thax & regards.
    Vaibhave Sharma

  • How to delete the orphaned Expected Rule Entries exist in the FIM portal

    Hi,
    How to delete the orphaned Expected Rule Entries exist in the FIM portal.
    A large number of orphaned Expected Rule Entries exist in the FIM portal (originally 140000k+ objects, currently 75000+ objects). They consume the a lot of FIM database space and slows down the identity lifecycle management synchronization processes.
    Regards
    Anil Kumar

    Hello,
    in my environments i use this approach:
    https://social.technet.microsoft.com/Forums/en-US/1af6cf77-4c55-4a3e-93cc-0baae80bc88f/expiration-workflow-cannot-delete-ere?forum=ilm2
    This sets up a compination of Sets, Workflow and MPR to let the "Expiration Workflow" delete EREs as soon as they get orphaned.
    This works fine since 3 years now, even if there are comming SQL-Jobs within a FIM update, but I implemented this before this was done.
    I would suggest to clear the current orphaned EREs with PowerShell to avoid request flooding when implementing the above solution. Then implement that housecleening above.
    Regards
    Peter
    Peter Stapf - ExpertCircle GmbH - My blog:
    JustIDM.wordpress.com

  • How to delete the saved score in a game downloaded from app store for my macbook and restart the game from the beginning ? please help

    HOW to delete the saved score in a game downloaded from the app store to restart the game from the begining with fresh scores.
    i am unable to do so. please help

    In system preferences, create a new account again, using the short name of the "deleted" account. You may be prompted to re-use the old home folder. Log out and log in to test it worked. Then log in as your new admin, and do the delete process again. Don't choose to securely delete this time - just a regular delete.
    When you have time to spare, go to Disk Utility, and use the Erase tab to securely erase free space on the drive. This will accomplish the same thing that your originally tried to do. Use the fastest method - anything more secure is a waste of time. You may need to run it overnight - it can take several hours.
    Matt

  • How to delete the specified line in file?

    How to delete the specified line in file? In case of deleting a specified line in a file, how to do?
    Line 1
    Line 2
    Line 3
    Line 4
    Line 5
    The case is a file including the above content. Now I wanna to delete the "Line 3" and how to realize the action in Java?

    An alternative solution can be :
    import java.io.LineNumberReader;
    import java.io.IOException;
    import java.io.File;
    import java.io.FileReader;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.PrintWriter;
    public class LineDeleter {
    public static void main(String args[]){
    try {
    //suppose you want to delete line 3
         int lineToBeDeleted = 3;
         File f = new File("line.txt");
         long fileSize = f.length();
    //Wrap the FileReader with a LineNumberReader. It will help you
    //identify the lines.
    LineNumberReader lnr = new LineNumberReader( new FileReader(f));
    //Wrap the FileWriter object with BufferedWriter object. Create it with the buffersize
    //equal to the file size.
         BufferedWriter bw = new BufferedWriter(new FileWriter(new File("line1.txt")),(int)fileSize);
    //Wrap BufferedWriter object with PrintWriter so that it allows you
    //to print line by line
    PrintWriter pw = new PrintWriter(bw);
         String s=null;
         while ( (s=lnr.readLine())!=null ){
              System.out.println(s);
              int lineNumber = lnr.getLineNumber();
    //match the line number
              if(! (lineNumber==lineToBeDeleted)){
                   pw.println(s);
              pw.flush();
              lnr.close();
              pw.close();
         catch(Exception e){System.out.println(e);}
    If you want you can rename the line1.txt to the original file name.
    I hope this helps.Good luck!!!!!!

  • How to delete the PO..?

    Hi all
    Can anybody explain me how to delete the purchase order
    1.Before release ..?
    2.After release..?
    Thanks
    sp-mm

    How to use "me98" to delete PO from system completely?
    I am using "me98"(archive) to delete a PO that have a mistake for vendor code. 
    The following step is: 
    the 1 step: I maintained and saved a variant.  For this variant, I have to create a name for this variant and select the PO which want to delete. it's right? 
    the 2 step: I maintained a "Start Date".  For "Start Date",I select the "immediate " to execute it.  Is it right? 
    the 3 step: whether I maintained the "Spool Params" or not?  May I execute it immediately or not? 
    I have no idea for deleting PO via the "archive".   How can i do that ? 
    Archiving is not deleting. What do you think why SAP developed that much programs to retrieve and read data from an archive. 
    Archiving is saving and keeping data for a certain period (based on local laws for data retention and auditing purposes) outside of the production data base.  Such a job is usually done to keep the database small and fast. 
    While doing archiving the records are written to a file and verified to be readable and then the original record gets deleted from the database. Only if you delete then the file with the archived data you have deleted the record forever. 
    Sometimes people seems to work like a burglar and want erase every single evidence for an error. But even errors, or especially errors are subject to be audited if they are corrected in the right way. This is the same for financial and tax auditiors as for auditors for ISO 9000. 
    To be able to archive, you need to setup the path from SAP to the archive. You need to define the size of your archive and how may records should be kept there. 
    Step 1: Create variant for Archiving. Give it a name. Enter your PO number. Flag One step procedure. Flag detailed log. Erase flag for test run. 
    Step 2: Maintain your start date, you can use Immediate in such a small case. 
    Step 3: Maintain spool parameters. Enter your printer and set the values if you want to print immediatly and if you want keep the print. I suggest to hold the spool in the system. This helps you to determine any error. 
    Step 4. Execute the variant. 
    It creates 4 jobs: 
    ARV_MM_EKKO_SUB...., ARV_MM_EKKO_WRI.... ARV_MM_EKKO_DEL..... 
    ARV_MM_EKKO_STO.... If one of the steps fails, then everything is rolled back, hence nothing is archived, the record is still in your database. In this case use the jobs spool and joblogs to find out what happend.
    http://www.sap-img.com/materials/how-can-we-delete-purchase-requisition.htm
    Regards,
    Ashok

  • How to Delete the dimension from the cube ?

    Hi ,
    how to Delete the dimension from the cube ?
    i have added the new dimension by assiging one characteristic to that dimension .
    now i  want to delete it ,
    but system saying that   Dimension ZXXX  contains InfoObjects; deletion not possible .
    how to delete it ? any help .
    Thanks

    Make sure you donot have any data in cube. If you have some data in cube, then you will not be able to see Delete option.
    Right click on the cube-->Delete data.
    Then double click on the cube>Goto Edit mode> select the IO under that Dimension> right click> now you will be able to see the Delete option (provided you have deleted all the date from Cube)
    Then right click on Dimension-->Delete
    Regards,
    Pavan

  • How to delete the one of cost centers in Splitting Structure(OKEW)?

    Dear All,
    I have a question about Splitting Structure as below? Could I get favor from you? Thanks a lot.
    How to delete the one of cost centers in Splitting Structure(OKEW)?
    Jocha

    Hi Chang
    Welcome to SDN! Its our pleasure to help you here
    Step 1: Select your Cost Center in OKEW which is assigned to the Splitting Str
    Eg: Cost Ctr 1001 is assigned to Splitting Str Z1... Tick the Check box against 1001 under Z1 Splitting Str
    Step 2: Do a Single Click on the text "Non Assigned Cost Centers"
    Step 3: Press Shift +F6 (Or Click on the Assign Button, next to the Pencil icon)
    Br, Ajay M

  • ADF Desktop Integration : How to delete the table in Excel?

    Hi,
    I am using Jdev 11.1.1.3.0 and Excel 2007 for Oracle ADF DI, I had created an ADF table using pageDef file in the excel. Now I wanted to delete that table and use a different pageDef file.
    I could not find a way to delete that table.
    I deleted full row of tables and then I used different pageDef file and created a new adf table. But when I am running this version of excel, I am getting runtime exception and excel is getting corrupted.
    My question how to delete the table not corrupting the Excel.
    Thanks
    Pavan

    Pavan,,
    Welcome to OTN.
    You can delete the table by selecting the top left column (of the table) and then select delete from the ADFdi tab.
    Refer the documentation for more info.
    http://docs.oracle.com/cd/E17904_01/web.1111/e10139/get_start_dev_tools.htm#ADFDI608
    -Arun

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Does any one know , how to delete the others in itunes. it takes lot of space

    does any one know , how to delete the others in itunes. it takes lot of space, i wanna delete that... Actually what it contains

    Those are the data of the installed apps. Don't listen if someone says that it's an iOS, because it is not. On your iPhone, go to general > usage. It will show you all the programs installed on your iPhone. If you click any of them you will see how much of "others" it has (documents and data)
    There's no way to delete it if you want to still have those apps. You can reinstal those which has the most "others" but after some time of usage, it will raise again.

Maybe you are looking for