Create a DMS Document

Hi All,
I have a requirement to upload  document from the application server to
the DMS. We have a standard BAPI available for creating a document in DMS i.e. BAPI_DOCUMENT_CREATE2 but I am not able to attach  application server file along with this.
Anybody has any idea for this???????
Regards,
Vijeyeeta

Hi,
Try this. It should work.
Fill the parameters to be passed to BAPI_DOCUMENT_CREATE2 FM
ls_files-storagecategory = <storage>.
ls_files-wsapplication = <wsapp>.
ls_files-description = <desc>.
ls_files-docfile = <appserverfilename>.
append ls_files to lt_files.
ls_doc-description = <desc>.
ls_doc-documenttype = <doctyp>.
ls_doc-documentversion = <docver>.
ls_doc-documentpart = <docpart>.
append ls_doc to lt_doc.
ls_drat-language = 'EN'.
ls_drat-description = <desc>.
append ls_drat to lt_drat.
ls_charval-classtype = <cltype>.
ls_charval-classname = <clname>.
ls_charval-charname = <chname>.
ls_charval-charvalue = <chval>.
append ls_charval to lt_charval.
ls_classalloc-classtype = <cltype>.
ls_classalloc-classname = <clname>.
ls_classalloc-status = <status>.
ls_classalloc-standardclass = 'X'.
append ls_classalloc to lt_classalloc.
call function module to create document in DMS
call function 'BAPI_DOCUMENT_CREATE2'
exporting
documentdata = ls_doc
pf_ftp_dest = 'SAPFTPA '
importing
documenttype = lv_doctype
documentnumber = lv_docnum
documentpart = lv_docpart
documentversion = lv_docver
return = ls_return
tables
characteristicvalues = lt_charval
classallocations = lt_classalloc
documentdescriptions = lt_drat
documentfiles = lt_files.
Thanks,
Abhishek
Edited by: abhishek sinha on May 19, 2009 4:52 AM

Similar Messages

  • Create a DMS Document (similar to CV01N) using WDA

    Hi All,
    I have a requirement to upload some documents from the frontend system (user's system) to
    the DMS. We have a standard BAPI available for creating a document in DMS i.e. BAPI_DOCUMENT_CREATE2 but I am not able to attach any file along with this.
    Anybody has any idea for this???????
    Regards,
    Prakash Pandey

    Hi,
    Try this. It should work.
    1. Upload the file using FILE_UPLOAD UI Element and it will return an XSTRING.
    2. Convert this XSRTING into BINARY( call function 'SCMS_XSTRING_TO_BINARY) and Upload it to the App Server using OPEN/WRITE DATASET methods.
    3. Fill the parameters to be passed to BAPI_DOCUMENT_CREATE2 FM
          ls_files-storagecategory = <storage>.
          ls_files-wsapplication     = <wsapp>.
          ls_files-description         = <desc>.
          ls_files-docfile               = <appserverfilename>.
          append ls_files to lt_files.
          ls_doc-description         = <desc>.
          ls_doc-documenttype    = <doctyp>.
          ls_doc-documentversion = <docver>.
          ls_doc-documentpart    =  <docpart>.
          append ls_doc to lt_doc.
          ls_drat-language    = 'EN'.
          ls_drat-description = <desc>.
          append ls_drat to lt_drat.
          ls_charval-classtype = <cltype>.
          ls_charval-classname = <clname>.
          ls_charval-charname  = <chname>.
          ls_charval-charvalue = <chval>.
          append ls_charval to lt_charval.
          ls_classalloc-classtype     = <cltype>.
          ls_classalloc-classname     = <clname>.
          ls_classalloc-status        = <status>.
          ls_classalloc-standardclass = 'X'.
          append ls_classalloc to lt_classalloc.
    4.call function module to create document in DMS
          call function 'BAPI_DOCUMENT_CREATE2'
            exporting
              documentdata         = ls_doc
              pf_ftp_dest          = 'SAPFTPA '
            importing
              documenttype         = lv_doctype
              documentnumber       = lv_docnum
              documentpart         = lv_docpart
              documentversion      = lv_docver
              return               = ls_return
            tables
              characteristicvalues = lt_charval
              classallocations     = lt_classalloc
              documentdescriptions = lt_drat
              documentfiles        = lt_files.
    Thanks,
    Abhishek

  • DMS Document not getting created thru Webdynpro ABAP Strange Problem

    Dear all,
    My requirement is that I have a Webdynpro ABAP application sitting on SAP Server1 and I am having a FileUploadUI Element in there for uploading files and we have SAP Server2 with the DMS configured. So, what we have done is we have an RFC in SAP Server2 and we are calling it from our webdynpro ABAP application sitting on SAP Server1. And we are calling BAPI_Create2 with all the necessary parameters in this RFC to create the DMS document with the file from webdynpro ABAP application. But its not working. I am passing the Presentation Server File Path of the File to the BAPI_create2.Even if I write the file to the application server of SAP Server2 and then pass this file path to the BAPI_Create2 then also it doesn't work but when I execute this RFC locally in the SAP Server2 with the presentation server file path It executes successfully.
    I don't know what I am missing.
    Please help.
    Thanks and regards,
    --Sonal

    Dear Thomas,
    Suppose I have got the file copied to the application server in SAP Server2 using datasets from WDA in SAP server1.
    Now I have an RFC say ZFILE_UPLOAD in SAP Server2 for which we have made an SAP ABAP RFC Connection from SAP Server1. In this RFC I am calling BAPI_create2 using the application server filepath(of SAP Server2) in docfile parameter along with ur suggested destination then also it doesn't work. Gives an error that "error in storing and checking file" i.e. Error 253.
    One more query how to handle the file upload of different file types say I am uploading a pdf file from my webdynpro abap application in SAP server1. Then I get the xstring and pass it to ZFILE_UPLOAD and convert it into binary and write it there in SAP Server2 using datasets. Is it possible to upload any kind of file and then creating the DMS document out of it?
    and how to call this RFC?
    Thanksn and regards,
    --Sonal

  • DMS document attachment with Incoming Invoice

    Hi All,
    We are creating one DMS document and want to attach it to an Incoming Invoice (MIRO).
    We are using the bapi BAPI_DOCUMENT_CREATE.  What are the fields to pass in Objectlink.
    Please help us to achieving it.
    Thanks

    We have created an Incoming Invoice already using 'BAPI_INCOMINGINVOICE_CREATE'. We are now creating a DMS document using 'BAPI_DOCUMENT_CREATE' and want it to be linked to the existing Invoice. For this we are trying to use the 'OBJECTLINKS' table.
    The linked document should be visible in T-Code FBL1N. Can you please throw some light on how to do this?
    Edited by: Himansu.P on Jun 14, 2011 3:06 PM

  • Link DMS Document to Report

    Hello I created a PDF documentation for a report and
    want to link it with a SAP report (called by transaction SA38)
    I created a DMS document by transaction CV01N
    created document links to report, transaction and
    developement object R3TR/PROG/<report name>
    and also transaction R3TR/TRAN/<transaction>
    I released the document (status).
    But I do not know how to make this documentation
    available from selection screen of report.
    Can anybody help me with this task?
    Thank you
    Matthias
    [other Keywords: CV02N CV03N]

    Hi Matthias
    Whenever you create a DIR  for Example with parameters
    Docuemnt Number   - 100005
    Document Type - DRW
    Part - 000
    Version - 00
    You can Link this DIR with Standard SAP Object such as Material Master ( MARA ) , Vendor Master ( LFA1 ) , Customer ( KNA1)  in DC10 ( Define Document Types > Define Object Links ).
    In this Standard SAP Object are available that can be linked to Document Type. If the Object you desire to link to SAP DMS DIR is not available the you will have to do ABAP Developement to link your desired object to DIR in SAP DMS.
    Check this Link
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/b2/c043a66fab11d1949500a0c92f024a/content.htm
    Check your Object which you want to link to SAP DMS. if not the Follow the procedure given in link.
    Hope this information is usefull to you.
    With Regards
    Mangesh Pande

  • Create DMS document from direct object transaction instead of CV01N

    Dear Experts,
    I have raised an issue for the same thing in past and got helpful reply also. However it is not working here. I have searched enough but did not get satisfactorily answer.
    My requirement here is to create and store DMS document directly from the object attached to DMS document type instead of CV01N e.g. create PR ME51N, create project CJ20N etc.
    So far I have done the required configuration to get create option in transaction while entering DMS document number. I kept document description field as an optional for respective document type and created and assigned role in Define profile step. Number range is internal. So I think all necessary configuration in place. Now problem here is when I am clicking on create easy document icon, it ask me to select document type and file from local machine also. But nothing is happening afterwards and document is not getting created and stored. Transaction return on screen without any number and so. Please help me out. Did I miss anything?
    Looking forward for your reply. Points will be allocated for answer.
    Best Regards,
    Bhagat

    Hi Bhagat,
    Select the document type in question,navigate to "Define object links".Please verify if the following values have been maintained:
    Screen no-233
    When new version-1
    Create document-1
    Document version-1
    Additional functions-checked
    Post this,re-test the scenario and share the results.Also,do confirm if you are able to create documents of the above document type using CV01n transaction successfully.
    Regards,
    Pradeepkumar Haragoldavar

  • DMS document output in SOP report

    Hi all,
    I want to OUTPUT a DMS document in SOP Report template. But it is not reflecting in my SOP report  though I have fullfilled the prerequisites.Here are my steps that i carried out
    1)  I have linked the DMS doc. in a value assignment in user defined text.
    2) The DMS document type is SBV.
    3) The required document indicator tick is alos ensured in specify user defined text types in BASIC DATA & TOOLS in customizing.
    3)It is also ensured that the EHS <> DMS doc types are linked in customizing.
    4) I put the symbol in wwi report template under GESTDHEADE HEADER User-defined text .
    But when I run the preview (cg42) the space where I have assigned the symbol is blank.
    I even tried to put my required data in Long text in user defined text tab assigning REMARKS as user defined text type but there is no output in  REPORT when i carry out preview.
    Requesting your  comment what shall be the cause of this .
    Regards,
    Ashish pradhan

    Hello all
    the document type SBV should not be used or used only carefully regarding this. I recommend to use a customer specific document type. SBV is related to WWI report templates. Furthermore make sure that generation variant fits usage of data record in which you have set up the document which is located in the user defined text (Active indicator of usage must be set). I know cases in the area of access problemes so that the WWI could not retrieve the user defined document. PLease make sure that you have "checked" WWI layout without error (WWI Check).
    PLease check this:
    if you have uploaded e.g. an rtf file and created a value assignment and you have uploaded the document to be stored in the user defined text than the document is "there". That means: in this process the SAP EH&S process generate a new unique id which should show up in the user defined text (there somthing like this should show up: SBV WWI 0000111223 numbers...)
    Using this unique ID you can check if the document is really in DMS available. Furthermore depending on the EH&S release (support package etc.) you could check this. If you "click" with the mouse key on the unique id (refer above) the SAP EH&S system should upload directly to your client computer the document and start immediatly the corresponding application (e.g. word etc.) . In doing so you can check if the document is "really" there
    May be you need to check further DMS customizing. E.g. depending on the document you have used in upload there is a missing link to the "type" of document. .E.g. the EXCEL macro regarding standard SAP output variant links to I believe a seperate document type
    Hope that helps
    With best regards
    CB

  • DMS Document Type - Repository

    Hi Experts,
    Need a help.
    Is this possible to link DMS document type (created with help of DC20) with dedicated content repository (OAC0)?
    Regards
    Adam

    Hi Adam,
    If you do not select the "KPRO" indicator then your original files will get uploaded on SAP database with different storage category.
    You can have different category for different document type...provided while uploading the document/file from CV01N/CV02N you should select the correct category from the pop up.
    Thanks
    Pravin

  • DMS document attachment to Service Entry sheet

    Hi All,
    One requirement, need to attach DMS document with Service entry sheet (t-code ML81N), any possibilites with object linking as in standard there is no object linking (ESSR object) available.
    Thank You,
    Manoj

    hi,
    1. I think u could use services for objects is the best way to fulfil requirement.
    note: a. If u want to use ESSR as business document. u need to go for Archive linking and store document as business
                  document in Services for objects.
    2. If u going to use standard object linking from DMS for 'ESSR' object so for not exist.
        Note:reason is not required any DMS object linking here as i guess. Coz u will be creating Entry sheet agianst Purchase
                orders and vendors too.
                 IN PLM, u can maintain DIR in purchase order or u can maintain in vendor masters. any how u r filling WBS nor also in
                 basic data sheeet of ML81N.
                 So datacan be easily tracable due to all are interconnected each other.
    3. If u want to use ESSR as object link from DMS u need go for development. but this is not required as i guess.
    Benakaraj
    ??P

  • DMS Document Management - Storing Documents at Unix Level

    Hi all,
    I've created a DMS prototype, SAP 4.6C custom ABAP program which calls BAPI_DOCUMENT_CREATE2, which works great. It stores a link to a networked path + file, i.e. X:\folderA\doc1.dat but not the document itself.
    Now, we wish to do the same but store the documents on the SAP unix server but outside of R3 because the number and size of documents is considerable. We want to link the document, i.e. /sap/dms/doc1.dat but not load the document into R3. It is not working and believe problem is as per below.
    Question #1
    1. What does the data carrier section of config look like for Unix document storage? (IMG/CAC/DMS/General Data/Define Data Carrier)
    2. What does the storage system section of config look like for Unix document storage?(IMG/CAC/DMS/General Data/Settings for Storage System)
    3. General question - How is the storage system related to the data carrier?
    Please feel free to point me to documentation as what I've seen so far is vague or unrelated.
    Thanks in advance,
    Dave
    [email protected]

    HI,
    Please see the below link if give some help.
    http://www.sap-img.com/sap-dms.htm
    http://www.sap.com/solutions/business-suite/plm/pdf/BWP_Document_Management.pdf
    Regards,
    Anil

  • DMS document Number ID

    Hi Experts,
    Could you please know the way to find the archive document ID for DMS documents.
    I  am creating a new repository  for DMS attachmments . But currently whether its stored or not to check this i need archive link document ID,
    Pleaseshare your thoughts
    Regard
    Geetha

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • DMS (document management) integrate document in product

    Hello,
    I want to integrate documents in my products (crm) in background. My documents are located in my server sap. ( so I have a URL of my document : file://server/folder/test.doc)
    I have found only one mean. I try to use DMS (document management service) programming interface with the FM
    1 - SDOK_LOIO_CREATE : I create a logical document
    2 - SDOK_PHIO_CREATE : I create a physical document
    but after..?
    when do I download my document? when do I create the link with my product?
    There is a documention here
    http://help.sap.com/saphelp_crm31/helpdata/fr/15/aea9375d79fb7de10000009b38f8cf/frameset.htm
    but it is not enough for me.
    Can you help me, please?
    Say me it's possible with DMS...
    an example of coding is helpfull..
    which FM uses..
    Many thanks in advance for anything help,
    Servane,
    nb: I have tried to use BDS services but it use only in foreground.

    no idea?

  • DMS document in Portal UWL

    Hello,
    I have the following requirement:
    1 - Workflow is created after the invoice image is attached to the FI document (the imagem is stored in a DMS document linked to the FI Document).
    2 - The workitem is created in the UWL. This workitem has a link to the image. When the user double clicks, the image (jpg for example) appears in the windows viewer.
    This is all. Is there any way I can do this? I see several theoritical solutions:
    1 - Retrieve the image URL (I don't know how to do this)
    2 - Attach the DMS document to the workitem. This is not good because a WebGUI windows would open with the DMS object, not the image.
    3 - ?
    Suggestions?

    Thanks Manasa.
    But my question is how to get a document from SAP - DMS (say CV03N).  If I get a document then I can convert and make it display on the BSP screen. 
    Thanks,
    Krish

  • DMS - Document Validity

    Hi to all,
    Does anybody know if exist a functionality to handle date of validity of a DMS document? I mean, after approving a document (with the "Release Flag"), I need to fix "manually" a date that the document will be "valid to", the date that the document is "valid from" is automatic when the status with the release indicator is set. The standard system places the date "valid to" automatically.
    Thanks!
    Regards,
    Martin

    Good day,
    The easiest way to do this is by using classification.
    You need to create a user exit using DOCUMENTMAIN01, when a document is released, it must populate the classification field with a valid to/from date.
    In the same exit, you could then also check when the document is accessed, and if it surpasses the valid to date, you can "prompt" the user that the document is no longer valid.
    If you really want to get smart, you can, in the same user exit, change the documents status to "Not Valid" after the allowed period has been reached.
    Regards,
    Freddie Botha
    www.documation.co.za
    SAP DMS, CAD Integration, Data Archiving, Imaging & Scanning, Workflow
    [email protected]
    Please reward points for helpful answers

  • Object Link to DMS document - does not allow to link to docs not released

    Hi Folks,
    I am trying to create an object link from cProjects 4.5 to a DMS document. When I select a document in DMS I am getting the message "26 223 Document <doc_number> has not been released". If I set the status of the DMS document to a released status I am allowed to create the object link.
    My question is - why am I only allowed to object link to released DMS documents? I want link to a DMS document regardless of the status.
    Thanks,
    Lashan

    Hi Lashan,
    Not sure whether this works, but do check in CFC01 and see "Document Type Dependent Data'
    Regards,
    Aby

Maybe you are looking for

  • DPS Potential buyer questions

    Hi. I have a little experience with InDesign CS6 which I have used to create and publish epub books.   I now would like to create single edition apps. I already have an Apple Developer account. After looking at a number of different solutions Adobe D

  • Datebook problems with windows Vista?

    There have been a few times where I have opened my palm desktop and all of my datebook entries have been erased.  I think I have narrowed it down to a problem that happens after my computer (which runs on Windows Vista OS) updates itself and restarts

  • Why can i only print current frame in an email?

    Why can I only print the current frame of an email?

  • How can i fix my bookkmarks? They dont show on the book in safari

    They dont show in the bbokmark.

  • Partitioning an External Drive

    Hi, I'm in the process of switching from my PC setup to my iBook via my external hard drive. I partitioned half the hard drive (200GB) to NTFS and loaded most of my data onto this partition, hoping to hook it up to the iBook, create a new mac paritio