<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get file from dms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884899#M1325523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Use FM 'CVAPI_DOC_GETDETAIL' &amp;amp; &lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;'CVAPI_DOC_CHECKOUTVIEW'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2013 05:41:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-10-17T05:41:40Z</dc:date>
    <item>
      <title>get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884893#M1325517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;can anyone help me to get the data for a file in dms with a specific doknr? i need to get the binary data to send them per mail.&lt;/P&gt;&lt;P&gt;I searched in function group cv120 (i tried cv120_read_file2table but it doesn't work for me) but wasn't able find a solution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;jacko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884893#M1325517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T11:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884894#M1325518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT  lo_objid&lt;/P&gt;&lt;P&gt;                 INTO TABLE it_lo_objid&lt;/P&gt;&lt;P&gt;                 FROM dms_doc2loio&lt;/P&gt;&lt;P&gt;                WHERE dokar = documenttype&lt;/P&gt;&lt;P&gt;                  AND  doknr = documentnumber&lt;/P&gt;&lt;P&gt;                  AND dokvr  = documentversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT SINGLE phio_id&lt;/P&gt;&lt;P&gt;                        ph_class&lt;/P&gt;&lt;P&gt;                 INTO   (wa_object_id-objid ,wa_object_id-class)&lt;/P&gt;&lt;P&gt;                 FROM    dms_ph_cd1&lt;/P&gt;&lt;P&gt;                 WHERE   loio_id = wa_lo_objid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module will give the content in binary format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;             object_id                 = wa_object_id&lt;/P&gt;&lt;P&gt;            client                    = sy-mandt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      AS_IS_MODE                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      RAW_MODE                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      TEXT_AS_STREAM            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FILE_ACCESS_INFO          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FILE_CONTENT_ASCII        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            file_content_binary       =   it_file_content_binary&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_existing              = 1&lt;/P&gt;&lt;P&gt;            not_authorized            = 2&lt;/P&gt;&lt;P&gt;            no_content                = 3&lt;/P&gt;&lt;P&gt;            bad_storage_type          = 4&lt;/P&gt;&lt;P&gt;            OTHERS                    = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the lenght of the output will be of 1022 .&lt;/P&gt;&lt;P&gt;Hence you need to change it to 255 to send it by mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Papiya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:39:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884894#M1325518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T11:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884895#M1325519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot this looks nice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a fuba for converting that to length 255?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;jacko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 14:19:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884895#M1325519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T14:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884896#M1325520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this wiki of mine and check if it helps. I guess this is the exact functionality you require.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/code" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/code&lt;/A&gt;&lt;EM&gt;to&lt;/EM&gt;get&lt;EM&gt;the&lt;/EM&gt;content&lt;EM&gt;of&lt;/EM&gt;an&lt;EM&gt;attachment&lt;/EM&gt;in&lt;EM&gt;DM&lt;/EM&gt;and&lt;EM&gt;mail&lt;/EM&gt;it&lt;EM&gt;to&lt;/EM&gt;external&lt;EM&gt;email&lt;/EM&gt;id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Papiya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 15:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884896#M1325520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T15:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884897#M1325521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your example but i have to work with FUBA SO_NEW_DOCUMENT_ATT_SEND_API1 and therefore i need a solution to attach my file from dms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used your solution:&lt;/P&gt;&lt;P&gt;SELECT lo_objid INTO TABLE it_lo_objid&lt;/P&gt;&lt;P&gt;      FROM dms_doc2loio&lt;/P&gt;&lt;P&gt;      WHERE dokar EQ 'Z01'&lt;/P&gt;&lt;P&gt;      AND dokvr EQ '00'&lt;/P&gt;&lt;P&gt;      AND doknr LIKE srch_str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_lo_objid INTO wa_lo_objid.&lt;/P&gt;&lt;P&gt;      SELECT SINGLE phio_id ph_class INTO (wa_object_id-objid ,wa_object_id-class)&lt;/P&gt;&lt;P&gt;        FROM dms_ph_cd1&lt;/P&gt;&lt;P&gt;        WHERE loio_id = wa_lo_objid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;      object_id = wa_object_id&lt;/P&gt;&lt;P&gt;      client = sy-mandt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AS_IS_MODE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RAW_MODE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TEXT_AS_STREAM =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILE_ACCESS_INFO =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILE_CONTENT_ASCII =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      file_content_binary = it_file_content_binary&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;      not_existing = 1&lt;/P&gt;&lt;P&gt;      not_authorized = 2&lt;/P&gt;&lt;P&gt;      no_content = 3&lt;/P&gt;&lt;P&gt;      bad_storage_type = 4&lt;/P&gt;&lt;P&gt;      OTHERS = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA: act_length TYPE i.&lt;/P&gt;&lt;P&gt;      DATA: act_diff TYPE i.&lt;/P&gt;&lt;P&gt;      DATA: act_rest_length TYPE i.&lt;/P&gt;&lt;P&gt;      DATA: act_line TYPE string.&lt;/P&gt;&lt;P&gt;      DATA: act_rest TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA: count TYPE i,&lt;/P&gt;&lt;P&gt;            data_string TYPE xstring.&lt;/P&gt;&lt;P&gt;      DATA: "it_CONTENT_BINARY TYPE solix_tab,&lt;/P&gt;&lt;P&gt;             it_content_binary TYPE solix_tab,&lt;/P&gt;&lt;P&gt;             it_line TYPE LINE OF solix_tab,&lt;/P&gt;&lt;P&gt;            it_content_binary_solix TYPE solix,&lt;/P&gt;&lt;P&gt;            wa_content_binary TYPE solix.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TEMP START&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      DESCRIBE TABLE it_file_content_binary LINES count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      count = count * 1022.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          input_length       = count&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIRST_LINE         = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LAST_LINE          = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;         buffer             = data_string&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          binary_tab         = it_file_content_binary[]&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;         failed             = 1&lt;/P&gt;&lt;P&gt;         OTHERS             = 2&lt;/P&gt;&lt;P&gt;                .&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          buffer                = data_string&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  APPEND_TO_TABLE       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OUTPUT_LENGTH         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          binary_tab            = it_content_binary[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I can't use it_content_binary[] in SO_NEW_DOCUMENT_ATT_SEND_API1 without getting an CX_SY_DYN_CALL_ILLEGAL_TYP&lt;/P&gt;&lt;P&gt;it says the actual given field has the right type but not the right length! (CONTENTS_BIN)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what's my foult!&lt;/P&gt;&lt;P&gt;big thanks to you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;greets, jacko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jacko1986 on Jul 20, 2009 3:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 13:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884897#M1325521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T13:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884898#M1325522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jacob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I am 4 years too late to ask this question , but did you find the solution to this problem you were facing in trying to load data from the DMS ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 04:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884898#M1325522</guid>
      <dc:creator>m4abrams</dc:creator>
      <dc:date>2013-10-17T04:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884899#M1325523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Use FM 'CVAPI_DOC_GETDETAIL' &amp;amp; &lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;'CVAPI_DOC_CHECKOUTVIEW'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 05:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884899#M1325523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-17T05:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: get file from dms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884900#M1325524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the following document, that says how to download or print the DMS Attachment but after getting data you can convert it and mail instead download or print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="45345" __jive_macro_name="document" class="jive_macro jive_macro_document active_link" href="https://community.sap.com/" modifiedtitle="true" title="Printing or Downloading Service For Object Attachments to local desktop"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;- Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 05:47:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-dms/m-p/5884900#M1325524</guid>
      <dc:creator>VijayaKrishnaG</dc:creator>
      <dc:date>2013-10-17T05:47:19Z</dc:date>
    </item>
  </channel>
</rss>

