<?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: Reg: Display image form application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306627#M1026904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code base which is used to upload a picture from the SAP Application Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    TYPES pict_line TYPE x LENGTH 1022.
    DATA l_mime_api   TYPE REF TO if_mr_api.
    DATA l_pict_wa    TYPE xstring.
    DATA l_pict_tab   TYPE TABLE OF pict_line.
    DATA l_length     TYPE i.
    DATA l_url        TYPE c LENGTH 255.

    l_mime_api = cl_mime_repository_api=&amp;gt;get_api( ).

    l_mime_api-&amp;gt;get(
      EXPORTING i_url = '/SAP/PUBLIC/BC/ABAP/Sources/PLANE.GIF'
      IMPORTING e_content = l_pict_wa
      EXCEPTIONS OTHERS = 4 ).

    IF sy-subrc &amp;lt;&amp;gt; 0.
      RETURN.
    ENDIF.

    l_length = XSTRLEN( l_pict_wa ).
    WHILE l_length &amp;gt;= 1022.
      APPEND l_pict_wa(1022) TO l_pict_tab.
      SHIFT l_pict_wa BY 1022 PLACES LEFT IN BYTE MODE.
      l_length = XSTRLEN( l_pict_wa ).
    ENDWHILE.
    IF l_length &amp;gt; 0.
      APPEND l_pict_wa TO l_pict_tab.
    ENDIF.

    CALL FUNCTION 'DP_CREATE_URL'
      EXPORTING
        type    = 'IMAGE'
        subtype = 'GIF'
      TABLES
        data    = l_pict_tab
      CHANGING
        url     = l_url.

    picture-&amp;gt;load_picture_from_url(
         EXPORTING url = l_url ).
    picture-&amp;gt;set_display_mode(
         EXPORTING display_mode = picture-&amp;gt;display_mode_stretch ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Entire code is available in the program &lt;STRONG&gt;DEMO_CFW.&lt;/STRONG&gt;&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;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2008 14:52:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-05T14:52:55Z</dc:date>
    <item>
      <title>Reg: Display image form application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306623#M1026900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an image stored in application server for eg d:\test.gif.&lt;/P&gt;&lt;P&gt;My requirement is to display the image from this path into a container in screen programming.&lt;/P&gt;&lt;P&gt;How can i achieve it. Kindly help.&lt;/P&gt;&lt;P&gt;I tried using load_picture_from_url method of class cl_gui_picture, its not working.&lt;/P&gt;&lt;P&gt;If i try to display an image from presentation server using this class and method its working fine. But my requirement is to display it form application server.&lt;/P&gt;&lt;P&gt;Help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 07:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306623#M1026900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T07:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Display image form application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306624#M1026901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;To Download a File from Application Server&lt;/P&gt;&lt;P&gt;use the folloeing code&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;filename&amp;gt;&lt;/P&gt;&lt;P&gt;FOR INPUT/OUTPUT/APPEND&lt;/P&gt;&lt;P&gt;IN TEXTMODE&lt;/P&gt;&lt;P&gt;ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;filename&amp;gt; INTO &amp;lt;workarea&amp;gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;filename&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Vikas C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306624#M1026901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Display image form application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306625#M1026902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First download the image to presentation server from application server  and then Load the Image using your approach with the classes you mentioned.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306625#M1026902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Display image form application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306626#M1026903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the image that you are displaying is lying outside of the ABAP Application Server, you can use the above mentioned method. (load_picture_from_url). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the same document is lying in ABAP Application Server, then you can use the BDS ( Business Document Server ) to manage data. This is a new tool. Below is the link and sample demo code which will give you a good overview of the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PDF of the Business Document Server&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample code of the BDS Implementation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappro.com/download03.cfm?session=" target="test_blank"&gt;http://www.sappro.com/download03.cfm?session=&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first link is place which will give u the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 14:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306626#M1026903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T14:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Display image form application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306627#M1026904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code base which is used to upload a picture from the SAP Application Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    TYPES pict_line TYPE x LENGTH 1022.
    DATA l_mime_api   TYPE REF TO if_mr_api.
    DATA l_pict_wa    TYPE xstring.
    DATA l_pict_tab   TYPE TABLE OF pict_line.
    DATA l_length     TYPE i.
    DATA l_url        TYPE c LENGTH 255.

    l_mime_api = cl_mime_repository_api=&amp;gt;get_api( ).

    l_mime_api-&amp;gt;get(
      EXPORTING i_url = '/SAP/PUBLIC/BC/ABAP/Sources/PLANE.GIF'
      IMPORTING e_content = l_pict_wa
      EXCEPTIONS OTHERS = 4 ).

    IF sy-subrc &amp;lt;&amp;gt; 0.
      RETURN.
    ENDIF.

    l_length = XSTRLEN( l_pict_wa ).
    WHILE l_length &amp;gt;= 1022.
      APPEND l_pict_wa(1022) TO l_pict_tab.
      SHIFT l_pict_wa BY 1022 PLACES LEFT IN BYTE MODE.
      l_length = XSTRLEN( l_pict_wa ).
    ENDWHILE.
    IF l_length &amp;gt; 0.
      APPEND l_pict_wa TO l_pict_tab.
    ENDIF.

    CALL FUNCTION 'DP_CREATE_URL'
      EXPORTING
        type    = 'IMAGE'
        subtype = 'GIF'
      TABLES
        data    = l_pict_tab
      CHANGING
        url     = l_url.

    picture-&amp;gt;load_picture_from_url(
         EXPORTING url = l_url ).
    picture-&amp;gt;set_display_mode(
         EXPORTING display_mode = picture-&amp;gt;display_mode_stretch ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Entire code is available in the program &lt;STRONG&gt;DEMO_CFW.&lt;/STRONG&gt;&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;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:52:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-display-image-form-application-server/m-p/4306627#M1026904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:52:55Z</dc:date>
    </item>
  </channel>
</rss>

