<?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: Printing image problem. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330387#M1638142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dear guru's out there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to my question, I would like to point out that there's no problem in displaying images both in the transaction SE78 and SMW0. But the only problem is, the printing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After displaying the images, i'd like to click the print button and print the contents of my screen, and there goes the problem not printing, is there any way to print it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Nov 2011 08:12:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-28T08:12:00Z</dc:date>
    <item>
      <title>Printing image problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330384#M1638139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new in abap programming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ask what could be the reason in my program for not printing the image. I do not know where's my mistake is, please help. Thanks..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this program from internet and it's pretty displaying the image ( I uploaded the image in SE78), then I created the program below and run it, but when I happened to click the print button, it wasn't giving me anything or no action at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZPICTURE04.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ADJTEMP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL SCREEN 9000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module status_9000 output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ADJTEMP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: w_lines type i.&lt;/P&gt;&lt;P&gt;  types pict_line(256) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data : ok_code type c,&lt;/P&gt;&lt;P&gt;        exit type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data :&lt;/P&gt;&lt;P&gt;  container type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;  editor type ref to cl_gui_textedit,&lt;/P&gt;&lt;P&gt;  picture type ref to cl_gui_picture,&lt;/P&gt;&lt;P&gt;  pict_tab type table of pict_line,&lt;/P&gt;&lt;P&gt;  url(255) type c.&lt;/P&gt;&lt;P&gt;  data: graphic_url(255).  data: begin of graphic_table occurs 0,&lt;/P&gt;&lt;P&gt;          line(255) type x,&lt;/P&gt;&lt;P&gt;        end of graphic_table.&lt;/P&gt;&lt;P&gt;  data: l_graphic_conv type i.&lt;/P&gt;&lt;P&gt;  data: l_graphic_offs type i.&lt;/P&gt;&lt;P&gt;  data: graphic_size type i.&lt;/P&gt;&lt;P&gt;  data: l_graphic_xstr type xstring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method cl_gui_cfw=&amp;gt;flush.  create object:&lt;/P&gt;&lt;P&gt;  container exporting container_name = 'PICTURE_CONTAINER',&lt;/P&gt;&lt;P&gt;  picture exporting parent = container.&lt;/P&gt;&lt;P&gt;  call method cl_ssf_xsf_utilities=&amp;gt;get_bds_graphic_as_bmp&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;p_object       = 'GRAPHICS'&lt;/P&gt;&lt;P&gt;p_name        = 'XLPE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_id           = 'BMAP'&lt;/P&gt;&lt;P&gt;p_btype        = 'BCOL'&lt;/P&gt;&lt;P&gt;receiving&lt;/P&gt;&lt;P&gt;p_bmp          = l_graphic_xstr&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;  graphic_size = xstrlen( l_graphic_xstr ).&lt;/P&gt;&lt;P&gt;  l_graphic_conv = graphic_size.&lt;/P&gt;&lt;P&gt;  l_graphic_offs = 0.&lt;/P&gt;&lt;P&gt;  while l_graphic_conv &amp;gt; 255.&lt;/P&gt;&lt;P&gt;    graphic_table-line = l_graphic_xstr+l_graphic_offs(255).&lt;/P&gt;&lt;P&gt;    append graphic_table.&lt;/P&gt;&lt;P&gt;    l_graphic_offs = l_graphic_offs + 255.&lt;/P&gt;&lt;P&gt;    l_graphic_conv = l_graphic_conv - 255.&lt;/P&gt;&lt;P&gt;  endwhile.&lt;/P&gt;&lt;P&gt;  graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).&lt;/P&gt;&lt;P&gt;  append graphic_table.&lt;/P&gt;&lt;P&gt;  call function 'DP_CREATE_URL'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      type     = 'IMAGE'&lt;/P&gt;&lt;P&gt;      subtype  = 'X-UNKNOWN'&lt;/P&gt;&lt;P&gt;      size     = graphic_size&lt;/P&gt;&lt;P&gt;      lifetime = 'T'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data     = graphic_table&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      url      = url.&lt;/P&gt;&lt;P&gt;  call method picture-&amp;gt;load_picture_from_url&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      url = url.&lt;/P&gt;&lt;P&gt;  call method picture-&amp;gt;set_display_mode&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      display_mode = picture-&amp;gt;display_mode_fit_center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case sy-ucomm.&lt;/P&gt;&lt;P&gt;    when 'EXIT'.&lt;/P&gt;&lt;P&gt;      leave program.&lt;/P&gt;&lt;P&gt;    WHEN '%PRI'.&lt;/P&gt;&lt;P&gt;      NEW-PAGE PRINT ON&lt;/P&gt;&lt;P&gt;      DESTINATION 'LP01'&lt;/P&gt;&lt;P&gt;      IMMEDIATELY 'X'&lt;/P&gt;&lt;P&gt;      KEEP IN SPOOL 'X'&lt;/P&gt;&lt;P&gt;      NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         endcase.&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_9000  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my pf-status "  SET PF-STATUS 'ADJTEMP", I set it from the / menu / extras / adjust template then List status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I missed for not printing it? Thanks a lot to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: chard_vill on Nov 27, 2011 8:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2011 07:56:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330384#M1638139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-27T07:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Printing image problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330385#M1638140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to SDN..!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dude, U need to upload your picture in SMW0 t-code. Not in SE78, all sE78 pcis r used to print in scripts/smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below link will be interested to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1554263"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2011 08:30:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330385#M1638140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-27T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Printing image problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330386#M1638141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat, Thanks a lot for the very helpful reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem follow the contents in the link and lost it somewhere, may be I am missing something being a beginner?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually have that program for displaying the image, uploaded from the transaction SMW0 (Binary data for WebRFC applications.). I successfully uploaded the images (format .gif and jpeg), and it was also successful displaying on the screen container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem now is also similar, print button seems not functioning, I guess I am missing something I don't know. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is really appreciated, thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my executable program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZPICTURE02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: cndp.&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE syucomm,&lt;/P&gt;&lt;P&gt;      container TYPE REF TO cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      picture TYPE REF TO cl_gui_picture,&lt;/P&gt;&lt;P&gt;      url TYPE cndp_url,&lt;/P&gt;&lt;P&gt;      print_parameters TYPE pri_params,&lt;/P&gt;&lt;P&gt;      valid_flag       TYPE c LENGTH 1..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;User can input which object name they uploaded from SMW0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_objid TYPE w3objid OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here query the table and throw error message if the object is not found.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  SELECT COUNT(*) FROM wwwparams&lt;/P&gt;&lt;P&gt;    WHERE objid = p_objid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e001(00) WITH 'MIME Object not found'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Enabled the function keys from template &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'S0100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF container is INITIAL.&lt;/P&gt;&lt;P&gt;      CREATE OBJECT container&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        container_name  = 'CONT'&lt;/P&gt;&lt;P&gt;        repid           = 'ZPICTURE02'&lt;/P&gt;&lt;P&gt;        dynnr           = '0100'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        cntl_error = 1&lt;/P&gt;&lt;P&gt;        cntl_system_error = 2&lt;/P&gt;&lt;P&gt;        create_error = 3&lt;/P&gt;&lt;P&gt;        lifetime_error = 4&lt;/P&gt;&lt;P&gt;        lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;        OTHERS = 6.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        MESSAGE i001(00) WITH 'Error while creating container'.&lt;/P&gt;&lt;P&gt;        LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF picture is INITIAL.&lt;/P&gt;&lt;P&gt;      CREATE OBJECT picture&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          parent = container&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          error = 1&lt;/P&gt;&lt;P&gt;          OTHERS = 2.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          MESSAGE i001(00) WITH 'Error while displaying pictures'.&lt;/P&gt;&lt;P&gt;          LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IF picture IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CALL FUNCTION 'DP_PUBLISH_WWW_URL'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         objid = p_objid&lt;/P&gt;&lt;P&gt;         lifetime = cndp_lifetime_transaction&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;           url = url&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;             OTHERS = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;         CALL METHOD picture-&amp;gt;load_picture_from_url_async&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;           url = url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         CALL METHOD picture-&amp;gt;set_display_mode&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;           display_mode = cl_gui_picture=&amp;gt;display_mode_fit.&lt;/P&gt;&lt;P&gt;       ELSE.&lt;/P&gt;&lt;P&gt;         MESSAGE i001(00) WITH 'Error while loading picture222'.&lt;/P&gt;&lt;P&gt;         LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call SCREEN 0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'S0100'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SET TITLEBAR 'XXX'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  CASE ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;      SET SCREEN 00.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;    when 'EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN 'PRINT'.&lt;/P&gt;&lt;P&gt;      NEW-PAGE PRINT ON&lt;/P&gt;&lt;P&gt;      DESTINATION 'LP01'&lt;/P&gt;&lt;P&gt;      IMMEDIATELY 'X'&lt;/P&gt;&lt;P&gt;      KEEP IN SPOOL 'X'&lt;/P&gt;&lt;P&gt;      NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;WHEN 'PRNLOG'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      out_parameters       = print_parameters&lt;/P&gt;&lt;P&gt;      valid                = valid_flag&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      invalid_print_params = 2&lt;/P&gt;&lt;P&gt;      OTHERS               = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT ON PARAMETERS print_parameters&lt;/P&gt;&lt;P&gt;                    NO DIALOG.&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my own opinion, the function code "%PRN" and "PRINT" seems not functioning, is there anything I missed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Nov 2011 13:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330386#M1638141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-27T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Printing image problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330387#M1638142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dear guru's out there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to my question, I would like to point out that there's no problem in displaying images both in the transaction SE78 and SMW0. But the only problem is, the printing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After displaying the images, i'd like to click the print button and print the contents of my screen, and there goes the problem not printing, is there any way to print it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2011 08:12:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-image-problem/m-p/8330387#M1638142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-28T08:12:00Z</dc:date>
    </item>
  </channel>
</rss>

