Error in BAPI_DOCUMENT_CREATE2

My objective is to transfer a file from Application layer to DMS. So i used the function module called 'BAPI_DOCUMENT_CREATE2'. But i get the error
"Error while checking and storing : /sapia/iface/in/comm/sapmas/WFDOC.PDF"

Hi,
I am getting an error "An error occured while creating the original attribute for PDF"
I tried with out file attachment, it works as you know it is simple....
I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )
Any idea on how to solve this?
All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
ws_docdata-documenttype = 'ARE'.
ws_docdata-description = 'BAPI DMS'.
ws_docdata-statusextern = 'CR'.
ws_file-storagecategory = 'DMS_C1_ST'.
ws_file-wsapplication   = 'PDF'.
ws_file-description = 'Job output'.
ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
append ws_file to it_files.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
  EXPORTING
     documentdata               = ws_docdata
IMPORTING
     return                     = v_ret
TABLES
     documentfiles              = it_files   .
BREAK-POINT.
IF v_ret-type CA 'EA'.
  ROLLBACK WORK.
  WRITE : v_Ret-message.
ELSE.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = '5'.
ENDIF.
Thanks
Pavan

Similar Messages

  • BAPI_DOCUMENT_CREATE2 253 Error while checking in and storing

    Hello,
    I am having a problem when I want to execute a BAPI_DOCUMENT_CREATE2 from SAP MII.
    Then i get the following error:
    <TYPE>E</TYPE>
      <ID>26</ID>
      <NUMBER>253</NUMBER>
      <MESSAGE>Error while checking in and storing: C:\Temp\test.pdf</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1>C:\Temp\test.pdf</MESSAGE_V1>
    The strange thing is when I execute the BAPI in SE37 (SAP) with the same settings it works great
    Already looked at some SAP Notes and topics here on SDN, but can't find the solution.
    Kind regards,
    Nick

    Hi,
    I am getting the same error.
    Can you plz help.
    Regards
    Shruti

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

    GIVE ME A HAND PLEASE!!
    SYSTEM ENVIRONMENT : 4.6B PATCH 30.
    KPRO ENVIRONMENT :  CONTENTS SERVER 6.30
                USING IN  SAP DB 7.4 ENVIRONMENT
    I AM USING JCO BY CALLING BAPI_DOCUMENT_CREATE2 FUNCTION IN APACHE WEB.
    THERE IS NO PROBLEM IF I CREATE A DOCUMENT WITHOUT APPENDING FILE(DOCUMENT)
    BUT IF I APPEND A FILE THEN IT MAKES AN ERROR (WHEN CHECKING IN KPRO)
    I FOUND THE“ERROR 5 TRANSFER_ERROR” IN SDOK_PHIOS_CHECKIN FUNCTION,
    TYPE = E
    ID = 26
    NUMBER = 253
    MESSAGE = Error while checking in and storing:
    WHEN I TRIED TO TRACE THE FUNCTIONS.
    HANDLING THE PROBLEM BY BAPI FUNCTION IN SAP IS POSSIBLE,
    BUT CALLING THAT IN WEB THEN MAKES ERROR.
    GIVE ME A HAND PLEASE!!
    <DETAILED ERROR INFORMATION>
       CALL FUNCTION 'RFC_START_PROGRAM'
            DESTINATION 'BACK'
             EXPORTING
               COMMAND    = COMMAND
               REG_SERVER = 'Y'
               USE_GWHOST = 'N'
             IMPORTING
               ERROR     = ERR_MESS
             EXCEPTIONS
               SYSTEM_FAILURE        = 1 MESSAGE ERR_MESS
               COMMUNICATION_FAILURE = 2 MESSAGE ERR_MESS.
    command     : saphttp  -a 376A6E0E4ED041385B989C0E00000000 -g space14 -x sapgw01
    ERROR MESSAGE : RFC PARTNER DOES NOT ALLOW TO START ANY PROGRAM

    Hi Christoph,
    I have a similar question. Here is my code. However it does not work. The error message i get is Error uploading the file.
    I tried splitting file name to split between docpath as '/usr/sap/XFV/DVEBMGS20/data/' and doc file as 'pdfdata1.pdf'. But it still does not work.
      ws_docdata-documenttype = 'XEV'.
      ws_docdata-description = 'BAPI DMS'.
      ws_docdata-statusextern = 'CT'.
      ws_file-storagecategory = 'SAP-SYSTEM'.
      ws_file-wsapplication   = 'PDF'.
      ws_file-originaltype = '1'.
      ws_file-docfile = '/usr/sap/XFV/DVEBMGS20/data/pdfdata1.pdf'.
      APPEND ws_file TO it_files.
      lw_link-OBJECTTYPE = 'DIMAIOB'.
      lw_link-OBJECTKEY = '00000000000053009076'.
      APPEND lw_link to it_links.
      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
          documentdata    = ws_docdata
          pf_ftp_dest     = 'SAPFTPA'
          pf_http_dest    = 'SAPHTTPA'
        IMPORTING
          documentnumber  = v_docnum
          documentpart    = v_docpart
          documentversion = v_docver
          return          = v_ret
        TABLES
          OBJECTLINKS     = it_links
          documentfiles   = it_files.
    Thanks
    Pavan

  • Error: while using fm 'bapi_document_create2'

    Hi.
    I am using fm 'bapi_document_create2' for creating douments of dms.
    it throws me an error 'version assigned automatically internally for document type'
    error no: e006(26)
    i have populated all tables properly and passing to the bapi.
    part of code***
    loop at it_docdata.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        DOCUMENTDATA               = it_docdata
      HOSTNAME                   =
      DOCBOMCHANGENUMBER         =
      DOCBOMVALIDFROM            =
      DOCBOMREVISIONLEVEL        =
      CAD_MODE                   = ' '
      PF_FTP_DEST                = ' '
      PF_HTTP_DEST               = ' '
    IMPORTING
       DOCUMENTTYPE               = documenttype
       DOCUMENTNUMBER             = documentnumber
       DOCUMENTPART               = documentpart
       DOCUMENTVERSION            = documentver
       RETURN                     = ireturn
    TABLES
       CHARACTERISTICVALUES       = it_doccharval
       CLASSALLOCATIONS           = it_docclassalloc
       DOCUMENTDESCRIPTIONS       = it_docdescp
       OBJECTLINKS                = it_objectlinks
       DOCUMENTSTRUCTURE          = it_docstructure
       DOCUMENTFILES              = it_docfiles
       LONGTEXTS                  = it_doclongtext
      COMPONENTS                 =
    endloop.
      what could the problem?????
    please treat it on priority.
    Thanks and regards
    Siddhesh

    Hi,
    I know the original post is from several years back, but could you please explain what he solution was?
    I am experiencing the same issue.
    regrads
    Julian

  • BAPI_DOCUMENT_CREATE2 error

    Hi!!
    I'm trying to create a document through BAPI_DOCUMENT_CREAT2, we fill everything and run, not an error but the document is not created,
    follows the fields that I filled
    DocumentType - DBE
    DocumentNumber - 22224
    DOCUMENTVERSION - 00
    DOCUMENTPART - 000
    DESCRIPTION - "TEST"
    USERNAME - PTCABAP
    STATUSEXTERN - SW
    STATUSINTERN-W1
    TABLE
    DOCUMENTDESCRIPTIONS - LANGUAGE - EN
    LANGUAGE_ISO - EN
    DESCRIPTION - "TEST"
    can someone help me?
    thank you

    follows:
    DocumentType - DBE
    DocumentNumber - 22224
    DOCUMENTVERSION - 00
    DOCUMENTPART - 000
    DESCRIPTION - "TEST"
    USERNAME - PTCABAP
    STATUSEXTERN - SW
    STATUSINTERN-W1
    TABLE
    DOCUMENTDESCRIPTIONS - LANGUAGE - EN
    LANGUAGE_ISO - EN
    DESCRIPTION - "TEST"

  • Error while creating document with attachment.

    Hi,
    I am getting an error "An error occured while creating the original attribute for PDF"
    I tried with out file attachment, it works as you know it is simple....
    I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )
    Any idea on how to solve this?
    All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
    ws_docdata-documenttype = 'ARE'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CR'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
         documentdata               = ws_docdata
    IMPORTING
         return                     = v_ret
    TABLES
         documentfiles              = it_files   .
    BREAK-POINT.
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

    Hi,
    I found that it is due to document type = 'ARE'. I changed hte document type to one of hte standard type 'TST'. It works for presentation server, but does not work for application server. Any ideas? Any help is appreciated with points.
    ws_docdata-documenttype = 'TST'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CT'.
    ws_docdata-documentnumber = 'ZNG-10000000017'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = p_file.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        documentdata               = ws_docdata
       pf_ftp_dest                = 'SAPFTPA'
       pf_http_dest               = 'SAPHTTPA'
    IMPORTING
       documentnumber             = v_docnum
       documentpart               = v_docpart
       documentversion            = v_docver
       return                     = v_ret
    TABLES
       documentfiles              = it_files   .
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

  • Error While Checking In & Storing

    Hi Guru's
    There are some documents which  are stored in our legacy system.We are trying to transfer documents from legacy to ECC6.0 through java connector.
    In java program we have done the coding by calling the function module BAPI_DOCUMENT_CREATE2.When we run the java program we are getting the error as Error while checking in and storing although we have defined the storage category
    While if we run the same java program by defining the storage category as SAP-System, documents are getting uploaded in 4.6 system and we are unable to find out  the Storage category SAP-SYSTEM in 4.6 system
    Kindly let me know how to resolve this issue or is there any way to transfer documents from legacy to ECC 6.0
    Regards
    Bhanu

    Hi Bhanu
    Is it error No 26253 correct me if I am wrong.
    If this is the error the check with basis administrator. Log space must be full or content server must be down due to some reasons.
    With Warm reagards
    Mangesh Pande

  • Error while calling BAPIs for DMS from Portal

    Hi everybody,
    We are developing a portal with Web Dynpro and trying to call from our java code BAPIs that deals with DMS:
    BAPI_DOCUMENT_CREATE2 - to create a new DMS document and checkin an original.
    CVAPI_DOC_CHECKIN - to checkin an original to an existing DMS document.
    CVAPI_DOC_CHECKOUT - to checkout an original from the DMS.
    While using other bapi's that deals with DMS but do not deals with originals (like creating a new document, retrieving metadata about documents and originals) we don't have any problem.
    Only when trying to checkin or checkout originals we get the following message (from the DMS?): RFC_START_PROGRAM
    the full message is: com.sap.aii.proxi.framework.core.BaseProxiException:RFC_START_PROGRAM error key:RFC_ERROR_PROGRAM.
    does anybody knows the meaning of this message?
    by the way - those BAPIs works well while called from the R/3. only when we call them from the portal we have this problem.
    thanks for any information, Adi.

    Hi Adi,
    Right now I have a similar problem. Did you find the cause/solution?

  • Error while calling BAPIs of DMS from Portal

    Hi everybody,
    We are developing a portal with Web Dynpro and trying to call from our java code BAPIs that deals with DMS:
    BAPI_DOCUMENT_CREATE2 - to create a new DMS document and checkin an original.
    CVAPI_DOC_CHECKIN - to checkin an original to an existing DMS document.
    CVAPI_DOC_CHECKOUT - to checkout an original from the DMS.
    While using other bapi's that deals with DMS but do not deals with originals (like creating a new document, retrieving metadata about documents and originals) we don't have any problem.
    Only when trying to checkin or checkout originals we get the following message (from the DMS?): RFC_START_PROGRAM
    the full message is: com.sap.aii.proxi.framework.core.BaseProxiException:RFC_START_PROGRAM error key:RFC_ERROR_PROGRAM.
    does anybody knows the meaning of this message?
    by the way - those BAPIs works well while called from the R/3. only when we call them from the portal we have this problem.
    thanks for any information, Adi.

    Hi Adi,
    Right now I have a similar problem. Did you find the cause/solution?

  • BAPI_DOCUMENT_CREATE2 - Document upload to DMS - Back ground

    Hi,
    We are trying to uploda a file into DMS(CV01N) from SAP R/3, BAPI 'BAPI_DOCUMENT_CREATE2'. This works fine in foregroung but when we ececute it in background, we get an error saying 'Error while checking in and storing'.
    Could anyone please suggest me if we can sucessfully execute in back ground mode?
    Thanks,
    Ranjith Singh.

    it is not possible to download in background to a presentation server (your local PC) hence it is not possbile to upload either.
    when you submit the program to the background thenthe session is no longer attached to the PC that created it.
    Because of this you have to go via the application server.
    compare hundred of threads by searcing the ABAP forum with keywords +download +background
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c

  • 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

  • Error in DMS document

    Hello all,
    I am using the following FM for DMS storage of documents.
    BAPI_DOCUMENT_CREATE2
    When i execute the BAPI i get the following error :
    Error while checking in and storing: D:\DOCUMENTS AND SETTINGS
    Can anyone help out on the same and tell the DMS setings or Basis settings that needs to be done.
    Regards,
    Arun

    Hi!
    It seems for me, in the DOCUMENTFILES parameter, there is not the full path and filename given to the FM, through the DOCPATH and DOCFILE fields.
    It supposed to seem somehow like this:
    DOCUMENTFILES-DOCPATH = 'D.Documents and settingsSAPDMS_upload'
    DOCUMENTFILES-DOCPATH = 'test.doc'
    Or something like that.
    Regards
    Tamá

  • DMS - Errror BAPI_DOCUMENT_LOAD and BAPI_DOCUMENT_CREATE2

    Hi Experts!
    During inserting a new document with BAPI_DOCUMENT_LOAD or BAPI_DOCUMENT_CREATE2 I get always the error 'ERROR WHILE CHECKING IN AND STORING: G:\mynewdoc.txt' .
    G: is my external hard disk connected to my laptop on which I am working in SAP.
    mynewdoc.txt is the new text-document that I want to insert.
    Does anybody knows something about this error?
    Do I need a special communication between the SAP-System and a external device like my hard disc?
    Thanks in advance for your support!!
    Regards
    Franz

    Hi Franz,
    I use the same BAPI BAPI_DOCUMENT_CREATE2 for checking documents from a network drive, without any problems.
    Could you post the coding for filling all the parameters of the BAPI?
    Regards,
    John.

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

Maybe you are looking for

  • Short dump SAPLSLVC_FULLSCREEN in ALV mode

    Hi all I encountered a short dump in production after i load a text file in my customised program. I did not encountered such error in DEV and UAT. This dump occurs when i add or remove the columns in ALV mode. Runtime Error          PERFORM_NOT_FOUN

  • Validate date of Birth

    How I can validate date of birth? Month-Date-Year Example: 11-21-1960 Thanks

  • Template removal issues

    I have editable regions that I have removed in my templates but they are still present in the pages that were created  from the templates how can I remove them in the pages??,

  • How do i transfer pictures from 60 gig Ipod to iMac?

    I am giving a family member a 60 gig Ipod Video. And How can I get the pictures off the Ipod and onto my new iMac?

  • No lock in the preference pane???

    We have noticed that we don't have a lock in the lower left hand corner of the sharing preference pane anymore. I.e., when the authorized user would normally have to unlock it to make any changes we simply don't have a lock there anymore? I've read a