<?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 PDF binary image display on smartforms? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533980#M850246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to this but i hope i can explain it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say right now l have some pdf stored in SAP(Service Contract for example) and we're reading them as binary image files right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to retrieve such binary image and display them in an existing smartform?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i'm explaining the right way...this has something to do with DMS ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are some codes to further help in my questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ALL FUNCTION 'SCMS_UPLOAD'
    EXPORTING
      filename       =  '/usr/sap/XXXX/XXXXXX/test.pdf'
      binary         = 'X'
      frontend       = ' '
*   MIMETYPE       =
    IMPORTING
      filesize       = size
    TABLES
      data           = file_data
* EXCEPTIONS
*   ERROR          = 1
*   OTHERS         = 2
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  DATA: BEGIN OF content_bin OCCURS 1,
          line TYPE SDOK_SDATX,
        END   OF content_bin.

  DATA: BEGIN OF content_txt OCCURS 1,
          line TYPE sdokcntasc,
        END   OF content_txt.

  CALL FUNCTION 'SCMS_DOC_READ'
    EXPORTING
      mandt                       = sy-mandt
      stor_cat                    = ' '
      crep_id                     = crep_id
      doc_id                      = doc_id
    TABLES
*   ACCESS_INFO                 =
      content_txt                 = content_txt
      content_bin                 = content_bin
* EXCEPTIONS
*   BAD_STORAGE_TYPE            = 1
*   BAD_REQUEST                 = 2
*   UNAUTHORIZED                = 3
*   COMP_NOT_FOUND              = 4
*   NOT_FOUND                   = 5
*   FORBIDDEN                   = 6
*   CONFLICT                    = 7
*   INTERNAL_SERVER_ERROR       = 8
*   ERROR_HTTP                  = 9
*   ERROR_SIGNATURE             = 10
*   ERROR_CONFIG                = 11
*   ERROR_FORMAT                = 12
*   ERROR_PARAMETER             = 13
*   ERROR                       = 14
*   OTHERS                      = 15
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2008 07:19:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-13T07:19:36Z</dc:date>
    <item>
      <title>PDF binary image display on smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533980#M850246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to this but i hope i can explain it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say right now l have some pdf stored in SAP(Service Contract for example) and we're reading them as binary image files right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to retrieve such binary image and display them in an existing smartform?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i'm explaining the right way...this has something to do with DMS ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are some codes to further help in my questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ALL FUNCTION 'SCMS_UPLOAD'
    EXPORTING
      filename       =  '/usr/sap/XXXX/XXXXXX/test.pdf'
      binary         = 'X'
      frontend       = ' '
*   MIMETYPE       =
    IMPORTING
      filesize       = size
    TABLES
      data           = file_data
* EXCEPTIONS
*   ERROR          = 1
*   OTHERS         = 2
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  DATA: BEGIN OF content_bin OCCURS 1,
          line TYPE SDOK_SDATX,
        END   OF content_bin.

  DATA: BEGIN OF content_txt OCCURS 1,
          line TYPE sdokcntasc,
        END   OF content_txt.

  CALL FUNCTION 'SCMS_DOC_READ'
    EXPORTING
      mandt                       = sy-mandt
      stor_cat                    = ' '
      crep_id                     = crep_id
      doc_id                      = doc_id
    TABLES
*   ACCESS_INFO                 =
      content_txt                 = content_txt
      content_bin                 = content_bin
* EXCEPTIONS
*   BAD_STORAGE_TYPE            = 1
*   BAD_REQUEST                 = 2
*   UNAUTHORIZED                = 3
*   COMP_NOT_FOUND              = 4
*   NOT_FOUND                   = 5
*   FORBIDDEN                   = 6
*   CONFLICT                    = 7
*   INTERNAL_SERVER_ERROR       = 8
*   ERROR_HTTP                  = 9
*   ERROR_SIGNATURE             = 10
*   ERROR_CONFIG                = 11
*   ERROR_FORMAT                = 12
*   ERROR_PARAMETER             = 13
*   ERROR                       = 14
*   OTHERS                      = 15
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533980#M850246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: PDF binary image display on smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533981#M850247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone? Please its kinda urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, If I understand correctly, what I have now is are converted binary data from the PDF document?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to take these data and displaying it meaningfully(may be through some other processes like conversion again) in a smartform? Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2008 01:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533981#M850247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-14T01:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: PDF binary image display on smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533982#M850248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So its not possible to "read" a pdf file uploaded and putting it in a smartform?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2008 09:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533982#M850248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-14T09:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: PDF binary image display on smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533983#M850249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump for today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any possibilities? Thanks guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 09:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-binary-image-display-on-smartforms/m-p/3533983#M850249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T09:25:54Z</dc:date>
    </item>
  </channel>
</rss>

