DMS document attachment

Hi,
I am new to DMS & I have to attached scanned images of invoices through MIRO transaction to SAP object. How should I go with it?
Anyone has worked on DMS???
kindly help...

Hi,
Try using this function module mentioned below:
  CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET'  " Checking whether the document already have any originals
                                                                                " attached on it or not
    EXPORTING
      pf_dokar       = i_data_final-doc_type   "document type uploaded into an internal table from the external file
      pf_doknr       = i_data_final-doc_no      "document number uploaded into an internal table from the external file
      pf_dokvr       = i_data_final-doc_ver     "document version uploaded into an internal table from the external file
      pf_doktl       = i_data_final-doc_part      "document part uploaded into an internal table from the external file
      pf_active_only = ' '
      pf_comp_get    = ' '
    TABLES
      ptx_data       = i_data 
    EXCEPTIONS
      not_found      = 1
      error          = 2
      OTHERS         = 3.
if i_data[] is initial.
*- Documentdata
  doc_data-documenttype    = i_data_final1-doc_type.
  doc_data-documentnumber  = i_data_final1-doc_no.
  doc_data-documentversion = i_data_final1-doc_ver.
  doc_data-documentpart    = i_data_final1-doc_part.
  doc_data-statusintern    = i_data_final1-doc_stat.
  doc_data-username        = i_data_final1-drwng_creator.
  IF NOT i_data_final1-doc_desc IS INITIAL.
    doc_data-description   = i_data_final1-doc_desc.
  ENDIF.
  APPEND doc_data.
*- ClassAllocations
  doc_class_alloc-classtype     = c_classtype.
  doc_class_alloc-classname     = c_classname.
  doc_class_alloc-standardclass = 'X'.
  APPEND doc_class_alloc.
Adding Primary, SUBtye and Design Project Characteristics to the DRAWING Class
  CLEAR it_char_val.
  it_char_val-classtype = c_classtype.
  it_char_val-classname = c_classname.
  it_char_val-charname  = 'PRIMARYTYPE' .
  it_char_val-charvalue = i_data_final1-prim_type.
  APPEND it_char_val.
  CLEAR it_char_val.
  it_char_val-classtype = c_classtype.
  it_char_val-classname = c_classname.
  it_char_val-charname  = 'SUBTYPE' .
  it_char_val-charvalue = i_data_final1-sub_type.
  APPEND it_char_val.
  CLEAR it_char_val.
  it_char_val-classtype = c_classtype.
  it_char_val-classname = c_classname.
  it_char_val-charname  = 'DESIGN_PROJECT' .
  it_char_val-charvalue = i_data_final1-design_proj.
  APPEND it_char_val.
  CLEAR it_char_val.
*Bapi called to create the document using tcode CV01N
  CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
      documentdata              = doc_data
       hostname     = gv_hostname
      pf_http_dest              = 'SAPHTTPA'
      pf_ftp_dest               = 'SAPFTPA'
   IMPORTING
     documenttype               = i_data_final1-doc_type
     documentnumber             = i_data_final1-doc_no
     documentpart               = i_data_final1-doc_part
     documentversion            = i_data_final1-doc_ver
     return                     = ls_return
   TABLES
     characteristicvalues       = it_char_val
     classallocations           = doc_class_alloc
endif.
Hope it helps
Regards
Mansi
Edited by: MANSI  ASNANI on Oct 15, 2009 7:09 AM

Similar Messages

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

  • DMS document attached to PO

    Hi,
    DMS document is attached to PO .The requirement is that the attachment should be outputted with PO to the vendor.
    Also ,I am able to see the attachment in ME 22/ME 23 but unable to see in ME22N/ ME23N.
    Please advice.
    Regards,
    Pratap

    Hello,
    In standard system, It is not possible to print attachment via the message output. Please refer Question 30 of attached
    note 457497.
    457497 FAQ: Message processing in purchasing
    "Can documents that are linked to a purchase order also be output in the message output? " And the answer is: No."
    There is no posibility to print attached documents from ME9F. Printing the PO from ME9F and print the document from ME22N by
    selecting the document and pressing print button. You will only be able to see the screen linked documents when an item in the po (or position) has been selected.
    Regards,

  • New DMS document attachment to order header - can it also be done to a task list?

    With business function LOG_EAM_CI_6, you can now attach DMS documents to the order header or operation level in the 'Additional Data' tab.
    Since a lot of clients use documents to list complex preventive maintenance instructions, is it also possible to attach a DMS document to a task list header (or operation) and have it show up in the new 'Additional Data' screen area of the resulting order (using a maintenance item/plan to generate the order)?  Or do we still have to use the task list operation PRT functionality and have it show up in the order's operation PRT?

    Hi Arthur,
    I have configured Task list as per the SAP note 1821916  & activated DOC_TL_GUI. This allowed me to attach documents to the Operation &/or Header of the Task Lists. The problem I am facing is when I assign the task list to the work order the documents are not transferred . You have stated that they have transferred to the work order so I am wondering if there is something I missed.
    Arthur Balajthy wrote:
    And I checked that by adding documents to a task list header or operation, the work order generated from a maintenance plan/item referencing that task list does have those documents attached also.
    I haven't tried from a Plan but will do that now.
    I assumed if they were attached to the Task List Operation they would transfer to the Work Order like everything else on the Task List
    Thanks in advance

  • DMS Document Attachment for Z Transactions

    Dear All,
    I have a Z transaction ( Module Pool ) , its getting used for some customer business process which is not mapped in sap. now my user requirement is that he wants to attach some documents ( diff types ) to that ztransaction like DMS functionality for normal business transactions.
    Please help me to achieve this..
    Regards
    Gee

    What do you mean by DMS type document attachment to the t-code powered by a Z-program? Can you elaborate on the requirement?
    What type of module pool is this? Are you trying to build a report using it?

  • DMS-Document attachment in MIRO

    Dear All,
    Can we attach documents  in MIRO and FB60 transactions.
    Regards,
    Venkat.

    Hi Venkat,
    From dms point of view,you want to display (attach)the documents to perticular screen means object link needs to be given.
    In standard environment there is no MIRO or MIGO transaction as onject link.You can link to Material Master(MARA).I hope this you already know.
    If you want to see dms screen in MIRO or MIGO transaction,you have to go for z-deveploment which can be programe writen by abap consultant.
    I hope this will resolve the query.
    Regards,
    Ravindra

  • Malerial List With DMS document attached to it

    Hi
    Can any one have idea from where i can get Material list to which Documents are attached.

    Hello,
    In standard system, It is not possible to print attachment via the message output. Please refer Question 30 of attached
    note 457497.
    457497 FAQ: Message processing in purchasing
    "Can documents that are linked to a purchase order also be output in the message output? " And the answer is: No."
    There is no posibility to print attached documents from ME9F. Printing the PO from ME9F and print the document from ME22N by
    selecting the document and pressing print button. You will only be able to see the screen linked documents when an item in the po (or position) has been selected.
    Regards,

  • DMS Document is not opening in ITS screen

    Hi All,
    We are on EP 7. 0 SP 17 & ECC 6.0.
    Our HODs are approving PO's and PR's through Portal through UWL. But when they are opening a PR or PO with DMS document
    attachment, the attachment file is not opeing in ITS screen.
    Thanks & Regards,
    Bharat Mistry.

    Hi Bharat,
    Have you tried to execute the same t-code in the WEBGUI directly? The result is the same? You can check SAP note 1058218 (ITS Up/Down: open document with application directly) too (I don't the SAP_BASIS version from your backend system).
    You also need to be sure that the document you are trying to open is in the app server and not in a local PC (via network drive): this will not work.
    Regards,
    Cristiano

  • To attach DMS document in sales order at item level

    Hi gurus,
    My requirement is whenever sales order is changed, I need pull off a particular DMS document and attach it to sales order at item level in background.
    This is different from GOS concept of attachement.
    Please give your thoughts on this.
    Regards,
    Thiyagu

    This functionality is not available in Standard SAP. PDF will have to be attached outside SAP system, but you can certaionly maintain a text as 'PDF attached with Sales order'
    Regards,
    Rajesh Banka

  • 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

  • Sending DMS Document as Attachment thru e-mail

    Hi,
    I am attaching the DMS document in purchase order & I am sending the PO thru email to vendor.But while doing so the attached document shuld be sent as attachment But in my present config setting it is not doing so.
    Pl suggest
    Rgds

    Hi,
    With my solution you will be able to send the PO and all link document in a mail at the same time you print it.
    First Step
    Create a new message with transaction NACE , this message will use support 8 ( external program) . The print program should be a copy the same as for printing your PO but add a new form entry inside.
    Second step .
    In the print program , create the new form entry and add the code . bellow a sample code i wrote . Some object are specific so you have to create it . If you need i can give you te detail of thoses objects.
      DATA : bin_file       TYPE xstring ,
             bin_filesize   TYPE i ,
             w_objky        TYPE objky,
             my_sender      TYPE zcl_send_mail=>ty_sender,
             mail_line      TYPE LINE OF soli_tab,
             w_attsub       TYPE so_obj_des.
      DATA: l_druvo TYPE t166k-druvo,
            l_nast  TYPE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print.
      DATA : v_parvw2   TYPE nast-parvw,
             v_parnr2   TYPE nast-parnr,
             v_lifnr    TYPE konv-lifnr,
             v_adrnr    TYPE lfa1-adrnr,
             st_address TYPE addr1_sel,
             st_sadr    TYPE sadr.
    * definition des tables internes
      DATA : it_otf   TYPE STANDARD TABLE OF itcoo ,
             it_line  TYPE STANDARD TABLE OF tline ,
             it_fill  TYPE STANDARD TABLE OF drad,
             it_new   TYPE STANDARD TABLE OF drad ,
             itb_xtkomv TYPE STANDARD TABLE OF komv WITH HEADER LINE,
             itb_xekpo  TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
             it_ekpo  TYPE HASHED TABLE OF ekpo WITH UNIQUE KEY ebeln ebelp ,
             it_draw  TYPE HASHED TABLE OF draw WITH UNIQUE KEY dokar
                                                                doknr
                                                                dokvr
                                                                doktl ,
             it_drat  TYPE HASHED TABLE OF drat WITH UNIQUE KEY dokar
                                                                doknr
                                                                dokvr
                                                                doktl
                                                                langu,
             my_attachement_list TYPE zcl_send_mail=>attachement_list,
             my_recipient_list   TYPE zcl_send_mail=>recipient_list  ,
             it_hexa TYPE solix_tab ,
             it_body TYPE soli_tab.
      CONSTANTS : c_object TYPE dokob VALUE 'EKPO' .
      FIELD-SYMBOLS : <ekpo>   TYPE ekpo,
                      <drad>   TYPE drad ,
                      <draw>   TYPE draw,
                      <drat>   TYPE drat .
      DATA : my_mail TYPE REF TO zcl_send_mail . => Specific object
    ** Here write your own code like you print the PO form in order to be able to retrieve it from memory
    ** don't send it to the printer only in spool .
    * Get OTF from Memory.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = nast-objky
        TABLES
          otf          = it_otf
        EXCEPTIONS
          memory_empty = 1.
      CHECK sy-subrc EQ 0.
    * Transform OTF into PDF
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = bin_filesize
          bin_file              = bin_file
        TABLES
          otf                   = it_otf
          lines                 = it_line
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4.
    * Transform PDF as Binary Table
      it_hexa = cl_document_bcs=>xstring_to_solix( ip_xstring = bin_file ).
    * Add PO as PDF file to the mail
      zcl_send_mail=>add_attachement_to_list(
        EXPORTING
          type                       = 'PDF'
          subject                    = 'PO'
          content_hexa               = it_hexa
        CHANGING
          attachement_list           = my_attachement_list
        EXCEPTIONS
          no_content_for_attachement = 1
          no_application_type        = 2 ).
    * Get PO Item because DIR are link to item only.
      SELECT * FROM ekpo
        APPENDING CORRESPONDING FIELDS OF TABLE it_ekpo
        WHERE ebeln = nast-objky.
    * Search for DIR .
      FREE : it_draw , it_drat .
      LOOP AT it_ekpo ASSIGNING <ekpo>.
        FREE : it_fill , it_new.
        CONCATENATE <ekpo>-ebeln <ekpo>-ebelp INTO w_objky.
        CALL FUNCTION 'CV140_SELECT_DRAD_DOCUMENTS'
          EXPORTING
            pf_key       = w_objky
            pf_object    = c_object
          TABLES
            pt_fill_drad = it_fill
            pt_new_drad  = it_new
          EXCEPTIONS
            no_document  = 1.
    * For each DIR , retrieve physical content
        LOOP AT it_fill ASSIGNING <drad>.
          IF <draw> IS ASSIGNED.
            UNASSIGN <draw>.
          ENDIF.
          READ TABLE it_draw ASSIGNING <draw>
             WITH TABLE KEY dokar = <drad>-dokar
                            doknr = <drad>-doknr
                            dokvr = <drad>-dokvr
                            doktl = <drad>-doktl.
          IF NOT <draw> IS ASSIGNED.
            SELECT * FROM draw
               APPENDING CORRESPONDING FIELDS OF TABLE it_draw
               WHERE dokar = <drad>-dokar
                 AND doknr = <drad>-doknr
                 AND dokvr = <drad>-dokvr
                 AND doktl = <drad>-doktl.
            SELECT * FROM drat
               APPENDING CORRESPONDING FIELDS OF TABLE it_drat
               WHERE dokar = <drad>-dokar
                 AND doknr = <drad>-doknr
                 AND dokvr = <drad>-dokvr
                 AND doktl = <drad>-doktl
                 AND langu = sy-langu.
            READ TABLE it_draw ASSIGNING <draw>
               WITH TABLE KEY dokar = <drad>-dokar
                              doknr = <drad>-doknr
                              dokvr = <drad>-dokvr
                              doktl = <drad>-doktl.
          ENDIF.
          CHECK <draw> IS ASSIGNED.
          READ TABLE it_drat ASSIGNING <drat>
                   WITH TABLE KEY dokar = <drad>-dokar
                                  doknr = <drad>-doknr
                                  dokvr = <drad>-dokvr
                                  doktl = <drad>-doktl
                                  langu = sy-langu.
          IF <drat> IS ASSIGNED.
            w_attsub = <drat>-dktxt.
          ELSE.
            CONCATENATE <drad>-dokar <drad>-doknr <drad>-dokvr <drad>-doktl
               INTO w_attsub SEPARATED BY '/'.
          ENDIF.
          PERFORM add_fid_to_attachement USING <draw>
                                               w_attsub
                                      CHANGING my_attachement_list.
          CHECK <drat> IS ASSIGNED.
          UNASSIGN <drat>.
        ENDLOOP.
        LOOP AT it_new ASSIGNING <drad>.
          IF <draw> IS ASSIGNED.
            UNASSIGN <draw>.
          ENDIF.
          READ TABLE it_draw ASSIGNING <draw>
             WITH TABLE KEY dokar = <drad>-dokar
                            doknr = <drad>-doknr
                            dokvr = <drad>-dokvr
                            doktl = <drad>-doktl.
          IF NOT <draw> IS ASSIGNED.
            SELECT * FROM draw
               APPENDING CORRESPONDING FIELDS OF TABLE it_draw
               WHERE dokar = <drad>-dokar
                 AND doknr = <drad>-doknr
                 AND dokvr = <drad>-dokvr
                 AND doktl = <drad>-doktl.
            SELECT * FROM drat
               APPENDING CORRESPONDING FIELDS OF TABLE it_drat
               WHERE dokar = <drad>-dokar
                 AND doknr = <drad>-doknr
                 AND dokvr = <drad>-dokvr
                 AND doktl = <drad>-doktl
                 AND langu = sy-langu.
            READ TABLE it_draw ASSIGNING <draw>
               WITH TABLE KEY dokar = <drad>-dokar
                              doknr = <drad>-doknr
                              dokvr = <drad>-dokvr
                              doktl = <drad>-doktl.
          ENDIF.
          CHECK <draw> IS ASSIGNED.
          READ TABLE it_drat ASSIGNING <drat>
                   WITH TABLE KEY dokar = <drad>-dokar
                                  doknr = <drad>-doknr
                                  dokvr = <drad>-dokvr
                                  doktl = <drad>-doktl
                                  langu = sy-langu.
          IF <drat> IS ASSIGNED.
            w_attsub = <drat>-dktxt.
          ELSE.
            CONCATENATE <drad>-dokar <drad>-doknr <drad>-dokvr <drad>-doktl
               INTO w_attsub SEPARATED BY '/'.
          ENDIF.
          PERFORM add_fid_to_attachement USING <draw>
                                               w_attsub
                                      CHANGING my_attachement_list.
          CHECK <drat> IS ASSIGNED.
          UNASSIGN <drat>.
        ENDLOOP.
      ENDLOOP.
    * Send mail to PO creator
    * Sender
    my_sender-mail = '****' . => Set the sender mail adress
    * Add Recipient
      zcl_send_mail=>add_recipient_to_list(
        EXPORTING
          uname               = sy-uname
        CHANGING
          recipient_list      = my_recipient_list
        EXCEPTIONS
          no_recipient_to_add = 1 ).
    * Mail body
      mail_line = 'PO by mail with Attachment'.
      APPEND mail_line TO it_body.
    * Create send request
      CREATE OBJECT my_mail.
    * Send Mail
      my_mail->send_mail(
          sender                      = my_sender
          mail_subject                = 'E-mail PO'
          mail_body                   = it_body
          recipient_list              = my_recipient_list
          attachement_list            = my_attachement_list ).
    Bellow the code for the routine ADD_FID_TO_ATTACHEMENT
      DATA : w_cout         TYPE dms_checkout_def,
             w_dttrg        TYPE dttrg, "Name of data carrier
             w_docfile      TYPE dms_doc_file,
             w_dappl        TYPE dappl, "Application
             w_tabix        TYPE i ,
             w_tdwa         TYPE tdwa ,
             w_phio         TYPE dms_phio,
             w_frontend TYPE dms_frontend_data.
      DATA : it_drao  TYPE STANDARD TABLE OF drao WITH HEADER LINE,
             it_kpro  TYPE dms_tbl_file .
      CONSTANTS : "c_print_option TYPE apptp VALUE '3', "Print option
                  c_hostname TYPE ntadr VALUE 'DEFAULT', "Hostname
                  c_type TYPE typdt VALUE 'PC', "Type
                  c_system TYPE char4 VALUE 'WN32'. "System
      FIELD-SYMBOLS : <kpro>   TYPE LINE OF dms_tbl_file,
                      <phio>   TYPE LINE OF dms_tbl_phio .
      CLEAR : w_tdwa .
    * Check if for DIR type KPRO is used
      CALL FUNCTION 'CV200_DB_TDWA_SELECT'
        EXPORTING
          pf_dokar  = in_draw-dokar
        IMPORTING
          psx_tdwa  = w_tdwa
        EXCEPTIONS
          not_found = 1.
      w_frontend-frontend_type = c_type. "'PC'.
      w_frontend-hostname      = c_hostname. "'DEFAULT'.
      w_frontend-winsys        = c_system.                      "'WN32'.
      w_frontend-platform      = 0.
      w_cout-comp_get          = abap_true.
      w_cout-kpro_use          = w_tdwa-kpro_use.
      w_cout-batchmode         = abap_true.
      w_cout-content_provide   = 'TBL'.
      CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET'
        EXPORTING
          pf_dokar  = in_draw-dokar
          pf_doknr  = in_draw-doknr
          pf_dokvr  = in_draw-dokvr
          pf_doktl  = in_draw-doktl
        TABLES
          ptx_data  = it_kpro
        EXCEPTIONS
          not_found = 1
          error     = 2.
      CASE w_tdwa-kpro_use.
        WHEN abap_true.
          CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET'
            EXPORTING
              pf_dokar  = in_draw-dokar
              pf_doknr  = in_draw-doknr
              pf_dokvr  = in_draw-dokvr
              pf_doktl  = in_draw-doktl
            TABLES
              ptx_data  = it_kpro
            EXCEPTIONS
              not_found = 1
              error     = 2.
          w_frontend-frontend_type = 'KP'.
          LOOP AT it_kpro ASSIGNING <kpro>.
            FREE it_drao.
            LOOP AT <kpro>-tbl_phios ASSIGNING <phio>.
              MOVE-CORRESPONDING <phio> TO w_phio.
              CALL FUNCTION 'CV120_DOC_CHECKOUT_VIEW'
                EXPORTING
                  ps_cout_def = w_cout
                  ps_doc_file = w_docfile
                  ps_draw     = in_draw
                  ps_phio     = w_phio
                  ps_frontend = w_frontend
                TABLES
                  ptx_content = it_drao
                EXCEPTIONS
                  error       = 1.
              PERFORM transform_fid_to_binary TABLES it_drao
                                           USING <kpro>-dappl
                                                 in_attsub
                                          CHANGING attachement_list .
            ENDLOOP.
          ENDLOOP.
        WHEN abap_false.
          DO 2 TIMES.
            CLEAR : w_docfile .
            FREE : it_drao.
            w_tabix = sy-index.
            w_docfile-fileno = w_tabix.
            CASE w_tabix.
              WHEN 1.
                w_dappl = in_draw-dappl.
                w_dttrg = in_draw-dttrg.
              WHEN 2.
                w_dappl = in_draw-dappl1.
                w_dttrg = in_draw-dttrg1.
            ENDCASE.
            w_docfile-dappl = w_dappl.
            w_docfile-dttrg = w_dttrg.
            CALL FUNCTION 'CV120_DOC_CHECKOUT'
              EXPORTING
                ps_cout_def      = w_cout
                ps_draw          = in_draw
                ps_doc_file      = w_docfile
              TABLES
                ptx_drao         = it_drao
              EXCEPTIONS
                error            = 1
                OTHERS           = 2.
            PERFORM transform_fid_to_binary TABLES it_drao
                                       USING w_dappl
                                             in_attsub
                                      CHANGING attachement_list .
          ENDDO.
      ENDCASE.
    Bellow the code for routine TRANSFORM_FID_TO_BINARY
      FIELD-SYMBOLS : <drao>   TYPE drao ,
                      <source> TYPE x ,
                      <dest>   TYPE x,
                      <hexa>   TYPE solix .
      DATA :   w_filelong     TYPE i ,
               w_long         TYPE i,
               w_longdes      TYPE i  .
      DATA :   it_hexa  TYPE solix_tab .
      CHECK it_drao[] IS NOT INITIAL.
    * Transform Physical document into Binary
      LOOP AT it_drao ASSIGNING <drao>.
        IF w_filelong IS INITIAL.
          w_filelong = <drao>-orln.
        ENDIF.
        ASSIGN <drao>-orblk TO <source>.
        DESCRIBE FIELD <source> LENGTH w_long IN BYTE MODE.
        CLEAR w_longdes.
        WHILE w_long GT 0.
          ASSIGN <source>+w_longdes(w_long) TO <source>.
          APPEND INITIAL LINE TO it_hexa ASSIGNING <hexa>.
          ASSIGN <hexa>-line TO <dest>.
          DESCRIBE FIELD <dest> LENGTH w_longdes IN BYTE MODE.
          MOVE <source> TO <dest>.
          w_filelong = w_filelong - w_longdes.
          w_long = w_long - w_longdes.
          CHECK w_filelong LE w_longdes.
          IF w_long NE 0.
            w_long = w_filelong.
          ENDIF.
          CHECK w_long LE 0.
          w_long = 0.
        ENDWHILE.
      ENDLOOP.
    * Add file to list of attachment
      CHECK NOT it_hexa[] IS INITIAL.
      zcl_send_mail=>add_attachement_to_list(
        EXPORTING
          type                       = w_dappl
          subject                    = in_attsub
          content_hexa               = it_hexa
        CHANGING
          attachement_list           = attachement_list
        EXCEPTIONS
          no_content_for_attachement = 1
          no_application_type        = 2 ).
    In my complete solution, an additionnal screen have been define in the header of PO to allow user managing recipient list . If you need so i can give you the code also .
    Let me know.
    Best regards

  • How to provide document attachment (DMS) functionality in MIGO transaction

    Dear All,
    How can I provide the document attachment functionality (Document will be stored in content DMS server)
    in MIGO Transaction.
    The same functionality provided by SAP in ME21n, ME22n Transactions.
    In ME21n user can upload any type of document related to  line item wise and that document can we view/ modify from ME22n as well as from DMS side ( T.code - CV02n).
    can anybody help me that how can i provide same functionality in  MIGO transaction.
    Regards,
    Priya

    Hi,
    here is a sample of GETDETAIL2. Hope it helps.
    image from DMS System
    check this as well:
    aRs - even with DMS, there can be ATTA's requiring BAPI_REL_GETRELATIONS
    I guess the Ted Mentioned here is you:
    aRS:: Bookmark this thread! (LOIO's and PHIO's for DRAW att's (Vijay too!)
    Best regards.
    Edited by: pablo casamayor on Jul 29, 2008 8:14 AM
    Edited by: pablo casamayor on Jul 31, 2008 3:53 PM

  • 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

Maybe you are looking for

  • Using one itunes library on two computers

    I want to have a master itunes library on my home computer using an external hard drive and then when I go to work, use the same library, adding new music, artwork, organizing, etc. at work and see those changes on my computer at home. I only want to

  • 10.6.2 and after effects

    ok...please don't yell at me if this has been discussed, i am just looking for a solution as I have not had any issues, til now, with after effects on a 10.6 mac. I just installed production premium on a macbook pro running 10.6.2 and after effects j

  • OEM edition of Crystal Reports for Simply Accounting - help w/invoice look

    I updated our Simply Accounting from 2008 to 2010 and now our invoices print out differently: the address does not look the same, and so it doesn't fit properly ... how can I fix this? Thanks.

  • Why should we create a new sales document type

    I want to know the actual reason behind creating new sales document type when the standard document is available

  • Java.lang.NoClassDefFoundError: weblogic/utils/StringUtils

    Everything was working fine for past 2 months. Now suddenly I am facing some weird issue starting the weblogic admin server 10.3 on Linux. There were no changes at all to any of the script. Please advise. Starting WLS with line: /root/bea/jdk160_05/b