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

Similar Messages

  • I created a Pages document inserting 2 columns using 1) Inspector 2) Layout 3) columns.  How do I decrease the height of the column.  Have tried to use cursor and drag down the top border, but that does not reset the top border.

    I created a Pages document inserting 2 columns using 1) Inspector 2) Layout 3) columns.  How do I decrease the height of the column.  Have tried to use the cursor and drag down the top border, but that does not reset/decrease the top border.

    Set your columns back to one for the moment. In layout mode, insert a Text box. Place it in the upper left corner of your document, and drag down and right to the size of the container for your two columns. Click inside the Text Box, and now bump up your columns to 2. Your two columns are now contained in this resizable Text Box.

  • How to create a  PDF document with page curls using Adobe  CS 4?

    My  goal is to create a  PDF document with page curls. I am using Adobe  CS 4.
    1.      The document was created in Adobe InDesign  CS 4  where the page  turn (curl) transition  was applied.
    2.      Then the document was exported to .swf.
    3.     The .swf file was imported into   Adobe Acrobat Pro  to create a PDF file with  flip page or page curl transitions.
    These are the problems.
    1.      The background is not  transparent.
    2.      Page dimensions have to be increased at least an inch in width and length so that the full page can show
    3.      The command and+   will not only increases the document's  screen size. It increases the page margins.

    PDF was never designed to support the Flash page curl effect (it didn't exist back then). Anything you try (and you've tried the standard hack) will look like a hack. Personally, I don't think the effort is worth it for an effect that's much overused.

  • 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

  • Create a followup document with selected items using actions

    Hi Experts,
    We are working on CRM 5.0 with ECC 6.0 as backend.
    As per the clients business process we have to create a service order automatically from a sales order whenever there is a serviceline item with item category ZSRV presents in the sales order. The service order which is created should only contain service line item with item category ZSRV. Which means the action should copy only the selected line items to the service order.
    Now the problem is using the standard method COPY_DOCUMENT, I dont have any option for selecting the line items. I have found a method COPY_DEF_ITEMS which may be the most relavant for my scenario. But I am not able to give the processing parameters for this.
    Can any body help me about how to use the standard method    COPY_DEF_ITEMS.
    Points shall be rewarded for the helpful answer.
    Regards,
    Madhu

    PDF was never designed to support the Flash page curl effect (it didn't exist back then). Anything you try (and you've tried the standard hack) will look like a hack. Personally, I don't think the effort is worth it for an effect that's much overused.

  • Setting the Status of Document in CV02N/CV01N using BAPI

    Hi,
    I want to change the status of a document(DIR) in CV02N transaction. I found a BAPI 'BAPI_DOCUMENT_SETSTATUS'. But the status is not changing when I am trying to change the status from INWORK to RELEASED.
    Please help me ....
    Thanks in advance..
    Regards,
    Shankar

    Hello,
    Could you please put your code in the thread to have a better understanding.
    CU,
    Pelaez Lopez Philippe

  • 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

  • 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

  • How to attach HTML content to DMS Document?

    Hello,
    I have a requirement in which I have to make a HTML file which contains the current Dispaly on screen, I have to attach this HTML file inside the DMS document.
    For this I am doing following steps.
    1 ) FM SAVE_LIST
    2) FM WWW_HTML_FROM_LISTOBJECT, form this FM I am getting the Internal table which is containing the HTML content.
             a) I am converting this internal table content ot first in XSTRING using FM SCMS_TEXT_TO_XSTRING
             b) And XSTRING to Binary format.
    3) After this I am creating a DMS cocument using FM CVAPI_DOC_CREATE
    3) After DMS document creation I am using FM CVAPI_DOC_CHECKIN to attach HTML file content to this DMS Document.
    Everthing seems to be ok, but when I am using CV03N to view the document, its showing the HTML file bu not showing the original content(HTML)
    Please help to find the problem, Is there any other way from which I could CHECKIN HTML content directly inside DMS document in HTML form without converting it to binary.

    HI,
    I have not understood the requirement.
    As far as I know, HTML need not to be checked in.
    Refer also link below
    Re: some questions on SAP DMS
    May be useful in choice of FM.
    Regards
    Nitin

  • Delete specific attachment from DMS document

    Hi Experts
    I have a requirement to delete specific attachments from a DMS document. I am using the FM 'CVAPI_DOC_CHECKIN' to create the attachments to the document. Im unable to figure out a way to delete a specific attachment from the document. Appreciate any help.
    Neo

    Have you tried with FM CV140_LINKS_DELETE ? and also check the Program MCDOKDEL you will get some FMs to delete documents
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Dec 7, 2010 10:37 PM

  • Error in creating a Merge Document

    Hello, I am creating a merge document and want to use a numbers doc for the data source. I created the numbers document and Saved it. Then created the pages doc. Went to inspector and choose the link, browsed to my numbers doc, selected it, then clicked open; I get an error that says:
    Please select a numbers document that has one or more named header columns and one or more rows of data.
    My only option is to click ok, which I do, then am bnack at using the address book for my data source.
    What is wrong -- anybody?

    Katfan,
    Three most common errors:
    . Field names not in the Header row (not just the top row, but the top row being a Header row).
    . Table not being the first listed table for the Sheet in the Sheets Pane. It doesn't matter where the Table is on the Sheet, but if it's not the only Table on that sheet, it must be the First Table in the list for that sheet. You can drag the name to the top of the list.
    . And finally, not Saving the Numbers file before Merging in Pages.
    Jerry
    Message was edited by: Jerrold Green1

  • While creating a billing document

    Hi All,
    I have a sales order, say with 3 line items with 3 different customer groups.
    Now i am creating a billing document for this order using the transaction VF01.
    As the Order has 3 items with 3 different customer groups, system is splitting each line item and creating 3 invoices.
    My requirement is that, what ever may be the customer groups of the items in sales order, i want to cretae only one billing document per sales order.
    Please help.
    Thankx in advance,
    Subhani.

    Initially we are prompting user to enter Customer group at item level, so that the corresponding Business area can be populated as per the mapping between them. But if customer group is different for each line item, at the time of invoice creating it is creating multiple invoices.
    So we did in this way,
    Instead of using Customer group, we used another field 'Product heirarchy' at product heirarchy. While creating a material we are prompting to provide Product heirarchy. depending on Product heirarchy we are populating Business depending on their mapping.

  • Do we need to create individual shipment document for Transportation Chain

    Do we need to create individual shipment document in Transportation Chain if the forwarding agent is same for all shipment?
    For Example :
    first it takes truck,
             then ship,
             then again truck to reach Customer.
    in all above case forwading agent is same eg: DHL Service

    Hi Doak,
    Yes you need to create individual shipment document in Transportation chain.
    For Example : when the trucks go from their respective shipping points to the harbor, the freight documents should not also contain main leg and subsequent leg information. When you create texts, you would not know if they are supposed to be valid for the preliminary, main or subsequent legs.
    In order to avoid such limitations, we would recommend that you denote a transportation chain using multiple shipment documents. You can create these shipment documents almost automatically by using collective processing.
    If you want depict a transportation chain within a shipment document, you must also accept the limited functions available to you.
    The reason: Almost all shipment document functions refer to the document as a whole:
    1.Outputs can only be printed for the entire document, not for individual legs
    2.Handling units can only be created for the entire document, not for individual   legs
    3. The same is valid for texts, deadlines in general, etc.
    Hope this provides you some clarity.  Reward points if helpful.
    Regards
    Srikanth.A

  • 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

Maybe you are looking for