Using  BAPI_DOCUMENT_CREATE2

hello,
I'm using this BAPI and when I execute it, it returns the document number  that was created, but when I look for it with transaction CV03N, the document does not exist.  In addition, if I execute the BAPI again, the document number continues being increased, although the previous document has not been created.
I don't know if it's by a customizing problem or it's by the parameters that I'm introducing.

Hi,
did you use BAPI_TRANSACTION_COMMIT after bapicall.,
if not do that.
are you doing it in SE37 or in program.
if it is Program then you call the <b>BAPI_TRANSACTION_COMMIT.</b> or if it is from SE37 then you go to menu Function module->Test->Test Sequence
now you will get a popup, in that enter your BAPI first, and then enter the BAPI_TRANSACTION_COMMIT .
and enter,
now execute the BAPI. and check it after that
regards
vijay

Similar Messages

  • Problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2

    Hi experts,
    I'm getting problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2.
    I have a scenario where is defined the document type ZC1, document part 200, authorization group 0002 and for all of these  documents the storage category "Cofre DMS1". And the status which demands the storage category is 'FR'.
    I've been fullfiling the BAPI_DOCUMENT_CREATE2 in this way:
    "Tables
    data: it_doc like bapi_doc_draw2,
          it_return like bapiret2,
          it_files like bapi_doc_files2 occurs 0 with header line,
          it_objs like bapi_doc_drad occurs 0 with header line.
    "Variables
    data: wl_doctype like bapi_doc_draw2-documenttype,
          wl_docnumber like bapi_doc_draw2-documentnumber,
          wl_docpart like bapi_doc_draw2-documentpart,
          wl_docversion like bapi_doc_draw2-documentversion.
    it_doc-documenttype = 'ZC1'.
    it_doc-documentpart = '200'.
    it_doc-documentversion = '00'.
    it_doc-description = 'Test of documents creation via BAPI'.
    it_doc-username = sy-uname.
    it_doc-statusextern = 'FR'.
    it_doc-authoritygroup = '0002'.
    refresh it_files[].
    clear it_files.
    it_files-originaltype = '1'.
    it_files-storagecategory = 'Cofre DMS1'.
    it_files-wsapplication = 'PDF'.
    it_files-docfile = 'c:\110307.pdf'.
    it_files-description = 'Test file'.
    append it_files.
    refresh it_objs[].
    clear it_objs.
    it_objs-objecttype = 'EKPO'.
    it_objs-objectkey = '47000497600010'.
    append it_objs.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        documentdata = it_doc
      IMPORTING
        documenttype = wl_doctype
        documentnumber = wl_docnumber
        documentpart = wl_docpart
        documentversion = wl_docversion
        return = it_return
      TABLES
        objectlinks = it_objs
        documentfiles = it_files.
    After execute the BAPI process I got the following error:
    E26 087 - Data carrier COFRE DMS1 not defined
    Does anybody have a sugestion to help me, please?
    Thks
    David
    Edited by: David Tsutsui on Mar 18, 2010 10:52 AM

    Please refer to this thread, it tells why you need a data carrier you can also configure the same in DC20.
    Data Carriers for Storage the Originals of DMS

  • Create document using BAPI_DOCUMENT_CREATE2

    Hi Experts,
    i am using BAPI_DOCUMENT_CREATE2 to create document like transaction CV01N. When i create it through CV01N, it is fine and I can see the attached file.
    but when i run my program, the document is created without attached file. can anyone have some solutions for me? following is the code.
    REPORT ztest_fw.
    DATA:
        lv_docnum           TYPE BAPI_DOC_AUX-DOCNUMBER,
        LW_DOCDATA    TYPE BAPI_DOC_DRAW2,
        LW_RETURN       TYPE BAPIRET2,
        LW_DSP             TYPE BAPI_DOC_DRAT,
        LW_OBJLINK      TYPE BAPI_DOC_DRAD,
        LW_DOCFILE      TYPE BAPI_DOC_FILES2,
        LT_DSP              TYPE STANDARD TABLE OF BAPI_DOC_DRAT,
        LT_OBJLINK      TYPE STANDARD TABLE OF BAPI_DOC_DRAD,
        LT_DOCFILE      TYPE STANDARD TABLE OF BAPI_DOC_FILES2.
    START-OF-SELECTION.
       CLEAR LW_DOCDATA.
        LW_DOCDATA-DOCUMENTTYPE = 'DRW'.
        LW_DOCDATA-documentversion = '00'.
        LW_DOCDATA-documentpart    = '000'.
        LW_DOCDATA-laboratory     = '001'.
       CLEAR LW_DSP.
        LW_DSP-DESCRIPTION = 'Test created by Fang wei-SD'.
       LW_DSP-LANGUAGE = 'E'.
        APPEND LW_DSP TO LT_DSP.
       LW_DOCFILE-DOCFILE = 'D:\Function study\Inbound & Outbound IDoc user exits.pdf'.
       LW_DOCFILE-ORIGINALTYPE     = '1'.
        LW_DOCFILE-STORAGECATEGORY  = 'SAP-SYSTEM'.
       LW_DOCFILE-STORAGECATEGORY  = 'DMS_C1_ST'.
        LW_DOCFILE-WSAPPLICATION    = 'PDF'.
        LW_DOCFILE-LANGUAGE         = 'E'.
        LW_DOCFILE-CHECKEDIN        = 'X'.
        LW_DOCFILE-ACTIVE_VERSION   = 'X'.
        APPEND LW_DOCFILE TO LT_DOCFILE.
       CLEAR LW_OBJLINK.
        LW_OBJLINK-OBJECTTYPE = 'IFLOT'.
        LW_OBJLINK-OBJECTKEY  = '1350'.
        LW_OBJLINK-DOCUMENTDIRECTION = 'X'.
        APPEND LW_OBJLINK TO LT_OBJLINK.
        CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
          EXPORTING
            DOCUMENTDATA         = LW_DOCDATA
          IMPORTING
            DOCUMENTNUMBER = lv_docnum
            RETURN               = LW_RETURN
          TABLES
            DOCUMENTDESCRIPTIONS = LT_DSP
            OBJECTLINKS          = LT_OBJLINK
            DOCUMENTFILES        = LT_DOCFILE.
        IF LW_RETURN-TYPE CA 'EA'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          MESSAGE  ID LW_RETURN-ID
                          TYPE LW_RETURN-TYPE
                          NUMBER LW_RETURN-NUMBER.
        ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               WAIT          = 'X'
          CLEAR lw_return.
          CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
            EXPORTING
              DOCUMENTTYPE            = 'DRW'
              DOCUMENTNUMBER          = lv_docnum
              DOCUMENTPART            = '000'
              DOCUMENTVERSION         = '00'
           IMPORTING
             RETURN                  = lw_return
            TABLES
              DOCUMENTFILES           = lt_docfile
          IF LW_RETURN-TYPE CA 'EA'.
            CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
            MESSAGE  ID LW_RETURN-ID
                            TYPE LW_RETURN-TYPE
                            NUMBER LW_RETURN-NUMBER.
          ELSE.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               WAIT          = 'X'
            WRITE: / 'document number = ', lv_docnum.
          ENDIF.
        ENDIF.

    Hi Wei,
    based on your description I would kindly ask you to check if the flag 'USE KPRO' is set for the document type 'DRW'. Because as storage category you hand over the value 'SAP-SYSTEM' and this is not a KPRO storage category. So if the 'USE KPRO' flag is set then this original won't be displayed in CV03N.
    Is there maybe a difference in display between transaction CV02N and CV03N?
    Best regards,
    Christoph

  • Using BAPI_DOCUMENT_CREATE2 from BSP Application

    I am trying to add a document in DMS from a BSP application. The bapi_create_document2 works except that it will not upload a file from the client PC. The exact same code with the exact same parameters supplied works from within an ABAP program. I assume that this is because the web server is the presentation server in the BSP application and does not have access to the files on the PC.
    I know that I can use the  <htmlb:fileUpload> tag to move a file from the PC to the data object type ref to CL_HTMLB_FILEUPLOAD. The contents would then be in data->content. I am wondering if there is then some way to add the original file from the object using this BAPI or another one.

    I can tell you what we did.  When you use BAPI_DOCUMENT_CREATE2 you can specify a SAPFTP or SAPHTTP destination.  These are RFC destinations where the sapftp or saphttp executable can be found.  We setup an SAP gateway installation on each of our global content and cache servers.  We then use the client IP address to determine the closest SAP Content server to the client.  We use JavaScript (and the filesystem object - note your server must be in the trusted zone in IE for this to work) to copy the file from the client machine to the nearest Content Server.  Then when we call the BAPI we specify the correct RFC Destination where the file is located and it is checked in correctly.
    Now if you don't use the Content and Cache Servers and only want to upload into the R/3 database repository, then I would just use the fileUpload and write the file to a local directory on the server.  Then point to the SAPFTP/SAPHTTP RFC that would have access on that server.

  • Problem creating documents using BAPI_DOCUMENT_CREATE2

    Dear all,
    I am using
    BAPI_DOCUMENT_CREATE2
    to create a quality document attachment ( PDF file)  for one of our dynpro screen..
    then  I retrive the document information using  'BAPI_DOCUMENT_CHECKOUTVIEW2
    and show the document using function module
    CV120_START_APPLICATION
    1) it works fine only for the person who is creating the document as the bapi is creating a reference to his directory path.
    2) it  doesnt work if the user is moving the file into another directory on his local computer as the directory reference path is gone..
    3) if a different user is trying to acess file it doesnt even show up as   he will never have the direcory path created by some body else.
    how to over come this situation.
    I have done lot of investigation and I found that 'BAPI_DOCUMENT_CHECKOUTVIEW2 has some paraneters
    pf_http_dest = 'SAPHTTPA'
    pf_ftp_dest = 'SAPFTPA'
    but could not able to understand it properly. Please kindly help..
    Thank you very much in Advance.
    Regards
    syam.
    Edited by: syambabu g on Oct 22, 2008 1:39 PM
    Edited by: syambabu g on Oct 22, 2008 1:47 PM
    Edited by: syambabu g on Oct 22, 2008 1:50 PM

    Please refer to this thread, it tells why you need a data carrier you can also configure the same in DC20.
    Data Carriers for Storage the Originals of DMS

  • Not able to upload Documents using  BAPI_DOCUMENT_CREATE2 (From SE37)

    Hi
    Not able to upload and created Document in SAP DMS Repository using Function BAPI_DOCUMENT_CREATE2.
    I'm using this BAPI directly from SE37.
    Alwasy it is giving Error - E26 253 Error while checking in and storing:c:\ZANALYSIS_PATTERN.XLS
    Inputs I have given -
    In Document Data -
    Document Type - SDC
    Document Version- 00
    Document Part - 000
    Description - TEST
    In Document Files -
    Document Type - SDC
    Document Version- 00
    Document Part - 000
    Storage Category - ZHCL_CS
    WS Application - XLS
    DocPath - C:\
    DocFile - C:\ZANALYSIS_PATTERN.XLS
    Language - EN
    CheckedIn - X
    PF_FTP_DEST - SAPFTPA
    PF_HTTP_DEST - SAPHTTPA
    DEFAULTCLASS - X
    Please advice if I had skipped something and mentioned anything wrong.
    Thanks
    Prashant

    HI,
    I am also uploading a pdf file to dms through bapi_document_checkin.
    I am getting error E26 253 Error while checking in and storing:C:\DOCUMENTS AND SETTINGS\AGARW01S\DESKTOP\10 2_VIEW 1.PDF
    Inputs I have given -
    In Document Data -
    Document Type - SPE
    Document Version- A
    Document Part - 000
    Description - UPLOAD
    In Document Files -
    Document Type - SPE
    Document Version- A
    Document Part - 000
    Storage Category - DMS_C1_ST
    WS Application - PDF
    DocPath - C:\DOCUMENTS AND SETTINGS\AGARW01S\DESKTOP\10 2_VIEW 1.PDF
    DocFile - 10 2_VIEW 1.PDF
    Language - EN
    CheckedIn - X
    PF_FTP_DEST - SAPFTPA
    PF_HTTP_DEST - SAPHTTPA
    can u please help me as it is urgent.
    Shilpa

  • Using BAPI_DOCUMENT_CREATE2 to create a document and checkin to VAULT

    In a development we are using the function module BAPI_DOCUMENT_CREATE2
    to create a document and check in the original file into the R/3 storage
    system in one go (see subroutine below).
    However, we got the requirement to use a Vault ("Tresor") as the storage
    backend. Unfortunatly, just setting the documentfiles-storagecategory element to 'VAULT' results in 3 things:
    - the document gets created OK
    - the original file does NOT get checked in
    - the error message "Original 1 wurde bereits eingecheckt und abgelegt" (...has already been checked in)
    So please advise how to use the BAPI modules to achieve the checkin into
    a Vault storage.
    Could this have something to do with the undocumented documentfiles-originaltype element? What does this have to be set instead of the '1', thats working with SAP-SYSTEM storage?
    *&      Form  l_create_doc_and_save
    *       text
    *      -->P_LG_IOTAB  text
    *      <--P_YRAD_DOCFIELDSIOT  text
    *AP 001 ins
    FORM l_create_doc_and_save
                   TABLES x_iotab STRUCTURE ccihs_am07iot
                   CHANGING x_yrad_docfields STRUCTURE yrad_docfieldsiot.
    * create a new document in DMS with data from x_yrad_docfieldsiot
    * and set the new document in x_iotab
      DATA: l_files_tab LIKE bapi_doc_files2 OCCURS 0,
            l_drat_tab LIKE bapi_doc_drat OCCURS 0.
      DATA: l_docdata_wa LIKE bapi_doc_draw2,
            l_files_wa LIKE bapi_doc_files2,
            l_drat_wa LIKE bapi_doc_drat,
            l_return_wa LIKE bapiret2.
      DATA: l_doctype    LIKE bapi_doc_draw2-documenttype,
            l_docnumber  LIKE bapi_doc_draw2-documentnumber,
            l_docpart    LIKE bapi_doc_draw2-documentpart,
            l_docversion LIKE bapi_doc_draw2-documentversion.
    *fill document data
      CLEAR l_docdata_wa.
      l_docdata_wa-documenttype = x_yrad_docfields-dokar.
      l_docdata_wa-statusintern = x_yrad_docfields-statusintern.
    *  l_docdata_wa-documentnumber = x_yrad_docfields-doknr.
      CLEAR l_files_wa.
    *  l_files_wa-storagecategory = lc_database.  " 'SAP-SYSTEM'
      l_files_wa-storagecategory = x_yrad_docfields-storagecategory.
      l_files_wa-docfile = x_yrad_docfields-docpath.
      l_files_wa-originaltype = '1'.   " <--
      l_files_wa-wsapplication = x_yrad_docfields-wsapplication.
      APPEND l_files_wa TO l_files_tab.
      CLEAR l_drat_wa.
      l_drat_wa-language = lc_d.  " 'DE'
      l_drat_wa-description = x_yrad_docfields-description_de.
      APPEND l_drat_wa TO l_drat_tab.
      CLEAR l_drat_wa.
      l_drat_wa-language = lc_e.  " 'EN'
      l_drat_wa-description = x_yrad_docfields-description_en.
      APPEND l_drat_wa TO l_drat_tab.
      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
          documentdata               = l_docdata_wa
    *   HOSTNAME                   =
    *   DOCBOMCHANGENUMBER         =
    *   DOCBOMVALIDFROM            =
    *   DOCBOMREVISIONLEVEL        =
        IMPORTING
          documenttype               = l_doctype
          documentnumber             = l_docnumber
          documentpart               = l_docpart
          documentversion            = l_docversion
          return                     = l_return_wa
        TABLES
    *   CHARACTERISTICVALUES       =
    *   CLASSALLOCATIONS           =
          documentdescriptions       = l_drat_tab
    *   OBJECTLINKS                =
    *   DOCUMENTSTRUCTURE          =
          documentfiles              = l_files_tab
    *   LONGTEXTS                  =
    *   COMPONENTS                 =
    * error occured?
      IF l_return_wa-type CA 'EA'.
        ROLLBACK WORK.
        MESSAGE ID '26' TYPE 'I' NUMBER '000'
                WITH l_return_wa-message.
      ELSE.
        COMMIT WORK.
        CLEAR x_iotab.
        x_iotab-zzdokar = l_doctype.
        x_iotab-zzdoknr = l_docnumber.
        x_iotab-zzdokvr = l_docversion.
        x_iotab-zzdoktl = l_docpart.
        x_iotab-linemod = ic_linemode-insert.
        IF sy-langu = lc_d.
          x_iotab-zzdktxt = x_yrad_docfields-description_de.
        ELSEIF sy-langu = lc_e.
          x_iotab-zzdktxt = x_yrad_docfields-description_en.
        ELSE.
          x_iotab-zzdktxt = x_yrad_docfields-description_de.
        ENDIF.
        APPEND x_iotab.
        CALL FUNCTION 'YRAD_LB34_SAVE_PEND_SET'
             EXPORTING
                  i_flg_save_pend = true.
        CLEAR x_yrad_docfields.
      ENDIF.
    ENDFORM.                    " l_create_doc_and_save

    Hi Frank,
    Did you manage to figure out what the problem was?
    Thank you.
    Regards,
    Bruno

  • UPLOADING DATA USING BAPI_DOCUMENT_CREATE2

    Hi Friends,
    I am uploading data for CV01N using FM "BAPI_DOCUMENT_CREATE2",
    it is updating the data successfully,
    but for my requirement i need to change the value of
    RC29P-POSTP     Bom Item Category in the DOCUMENT STRUCTURE , it is default taking as "D", my requirement with "T" also.
    I am not finding the correct field in the Function module to mapp this POSTP (Bom Item Category ).
    Can any one suggest, as its urgent.
    Otherwise can any one suggest FM to create DOCUMENT STRUCTURE ( CV11 ) with above requirement.
    Regards,
    Sivaram.
    Message was edited by:
            Sivaram Prasad Gadde
    Message was edited by:
            Sivaram Prasad Gadde

    Hi Frank,
    Did you manage to figure out what the problem was?
    Thank you.
    Regards,
    Bruno

  • Error while using BAPI_DOCUMENT_CREATE2

    Hi All,
    I am using the bapi BAPI_DOCUMENT_CREATE2 for creating a Document info record. I am getting an error "You are not authorized for activity 52 document type QUA". Can any please help with this.
    Regards.

    Hi,
    Send a Su53 dump to your authorization department and get the relavant authorization for creating the DIR.
    Best Regards, Murugesh AS

  • BAPI_DOCUMENT_CREATE2 - DMS upload

    Hi,
        I using BAPI_DOCUMENT_CREATE2 to upload a document in DMS server.
    It is giving me error while uploading ' Error while checking in and storing: C:\file1.pdf '. I am upload files from front end.
       I am using the DOCUMENTFILES   parameter DOCPATH,DOCFILE and STORAGECATEGORY. I have also given the full file name in header documentdata DOCFILE1.
    Regards,
    Karthik.k

    Hello,
    I have the problem : I want to upload a file on my frontend in the server DMS.
    The info record is ok and the file is attached but when i want to display the file PDF i have the error 26 254.
    I'm using the BAPI "BAPI_DOCUMENT_CREATE2" with parameters :
        documentdata-documenttype =  'ZBE'.
        documentdata-documentnumber = 'TEST DMS14'.
        documentdata-documentversion = '00'.
        documentdata-documentpart  = '000'.
        documentdata-description = 'Document DMS Besace'.
        documentdata-docfile1 = 'C:\test.pdf'.
        documentdata-wsapplication1 = 'PDF'.
        documentdata-datacarrier1 = 'SAP-SYSTEM'.
    Thanks for your help.

  • 'bapi_document_create2'  open original

    Hi,
    We try to open document with original using 'bapi_document_create2'.
    the document was create, but the original checked in.
    can i use this bapi - and leave the original open ? (check out).
    thanks,
    Aviva.

    Hi Aviva,
    based on your description I assume that in the BAPI table DOCUMENTFILES you have entered all the original data and also a storage category. In this case the original file will be checked in by the BAPI automatically. To leave the original checked out please do not enter a storage category value in table DOCUMENTFILES.
    Best regards,
    Christoph

  • XSTRING to PDF or XSTRING to BAPI_DOCUMENT_CREATE2

    I am working with an Adobe form.  I have the form data coming back to me in an xstring.  What I need to do is to convert this xstring to a pdf.  How can I do this?  If I have it in OTF data then I can handle the conversion but is there a way to go from xstring to OTF?
    My end goal is to use BAPI_DOCUMENT_CREATE2 (it creates a DMS document) and use this newly created PDF as a hardcopy, attaching it to the document.  Is there a way to just pass the xstring into this BAPI instead of creating the PDF first?
    Regards,
    Davis

    Hi, Davis
    Please Go Through The Following Thread Hope will help you,
    [Converting XSTRING into PDF|Re: Converting XSTRING into PDF]
    May Be following also will be helpful for you.
    [BAPI's and Xstrings - does it work? |BAPI's and Xstrings - does it work?]
    Kind Regards,
    Faisal
    Edited by: Faisal Altaf on Feb 5, 2009 7:31 PM

  • Clarification of background processing and BAPI_DOCUMENT_CREATE2

    Hello,
    i am sorry to mention this long discussed topic,
    but i would very appreciate to clarify how can i checkin new originals for a new document using background processing.
    we are trying to use BAPI_DOCUMENT_CREATE2 to create a document and checkin original from a network path +
    server\file.pdf+ .
    i have read that i should add the path in AL11 - did it, how should i use it?
    i have read that i should use the SAPFTPA & SAPHTTPA parameters when calling the function - i have these in SM59 and the connection test is successful - but what should i do with them?
    will be very thankful for your help.
    here's an example from our code:
      call function 'BAPI_DOCUMENT_CREATE2'
        exporting
          documentdata         = ls_doc
         pf_ftp_dest          = 'SAPFTPA'
         pf_http_dest         = 'SAPHTTPA'
        importing
          documenttype         = lf_doctype
          documentnumber       = lf_docnumber
          documentpart         = lf_docpart
          documentversion      = lf_docversion
          return               = ls_return
        tables
          documentdescriptions = lt_drat
          objectlinks          = lt_drad
          documentfiles        = lt_files.

    Hi,
    Populate the document original information according as per below guideline.
    The tables 'DOCUMENTFILES' contain the entries about originals that you you want to allocate to the document. The meanings of the structure fields are:
    'SOURCEDATACARRIER': Data carrier name (optional) of a server on which
                         an original is stored
    'STORAGECATEGORY':   Name of the data carrier that you want to check
                         original into. The function module determines the
                         storage type, SAP Database, vault, or archive
                         using the name  of the data carrier.
    'DOCFILE':           File name of the original
    'WSAPPLICATION':     Name of the workstation application. This entry is
                         necessary when no workstation application has been
                         assigned to the document info record or the new
                         original is of another type.
    Regards
    Keerthi

  • Using BAPI_DOCOUMENT_CREATE2 func. in Business Connector without SAPGUI.

    We're using "BAPI_DOCUMENT_CREATE2" function to upload XML data to SAP system in Business Connector 4.7
    We use SAPGUI in Business Connector to call the BAPI function.
    But we found that there's a performance problem when using SAPGUI.
    So, we want to use BAPI_DOCOUMENT_CREATE2 function in Business Connector without SAPGUI.
    If you know how to do this, please let US know.
    Thank you.

    Hi,
    You can also try:
    1. pub.sap.client:createTID and assign created tid to variable $tid
    2. INVOKE sap.map:outbound for your BAPI and assign created tid in step 1 to parameter $tid
    3. pub.sap.client:confirmTID and assign created tid in step 1 to parameter $tid
    It should work.
    Krzys

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

Maybe you are looking for

  • Mac Pro 2009 8 core with an endless cycle while booting up

    Dear all, My Mac Pro 2009 edition (2.26 GHz,8-cores) is suffering from a weird situation which I can't solve, so I post the message and hope someone can help me to find a solution. On Monday Morning, I found the rainbow cycle is running behind the sc

  • Stock and value with GL account

    Dear friends, i want to see the stock and the stock value with respect to the GLaccount, i want to see the materials  posted for the GL account with stock and value for perticular period. Regards, Deviprasad

  • Starting and stopping Elapsed Time

    I have some code in LabVIEW 8.2.1 I am writing for Qual test with a customer. The basics of the test are the following: monitor and record pressure (thru transducers), temperatures (fluid and ambient), and monitor the opening and closing a valve. The

  • How to make a fullscreen background changeable?

    Hello, I am working on a site where I have made a fullscreen background image, which scale with the size of the browser window. I would like to make it change to a new pic ( also fullscreen ) when clicking links. Any suggestions how to do this? This

  • TVARVC table entry

    Hi, . Can anyone help me understand how to use a TVARVC table entry in a select option/parameter in a SAP standard report variant? I have called them from a program before but can't find any documentation to show how to use them in a variant Cheers