<?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: Custom Container in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614114#M870690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in this example the picture has an URL placement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data:&lt;/STRONG&gt;  picture   TYPE REF TO cl_gui_picture,&lt;/P&gt;&lt;P&gt;         g_pic_url TYPE saeuri.&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 = picture-&amp;gt;display_mode_fit&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;&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   = g_pic_url&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          error = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works for me &lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards Tom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 14:33:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-25T14:33:10Z</dc:date>
    <item>
      <title>Custom Container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614112#M870688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing new image with customer container program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i have taken function module then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want about &lt;STRONG&gt;what is code for put the image?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply me soon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx,&lt;/P&gt;&lt;P&gt;s.suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 11:39:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614112#M870688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T11:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614113#M870689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I paste here the example program to display IMAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;program name SAPMZATTMENU_C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;amp; Module pool       SAPMZATTMENU                                      *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*


INCLUDE MZATTMENU_CTOP.
Data

INCLUDE MZATTMENU_CO01.
Modules     *
INCLUDE MZATTMENU_CI01.
Modules     *
INCLUDE MZATTMENU_CF01.
Routines   *&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;TOP coding MZATTMENU_CTOP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Include MZATTMENUTOP                                      Module poo*
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

PROGRAM  SAPMZATTMENU                                                .

data: logo_container type ref to cl_gui_custom_container,
      logo           type ref to cl_gui_picture.

data: sf_homepage(255)     type c.
data: url(255) type c.
constants: true(1)   type c value 'X',       " TRUE
           false(1)  type c value ' '.       " FALSE
constants: screen_on(1)  type c value '1',
           screen_off(1) type c value '0'.

define screen_display.
  loop at screen.
    check screen-name = &amp;amp;1.
    screen-input     = screen_off.
    modify screen.
  endloop.
end-of-definition.
*
define screen_invisible.
  loop at screen.
    check screen-name = &amp;amp;1.
    screen-invisible  = screen_on.
    screen-input      = screen_off.
    modify screen.
  endloop.
end-of-definition.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;include : MZATTMENU_CO01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           MZATTMENUO01                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_9000  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module STATUS_9000 output.
  SET PF-STATUS 'MAINSCR'.
*  SET TITLEBAR 'xxx'.
data: partner_flag like trpari-s_checked.
 sf_homepage = 'Tafe Chennai Home Page'.
call function 'TR_GET_PARTNER_PROJECTS'
     importing  we_partner_flag = partner_flag
     exceptions others          = 1.
  if sy-subrc ne 0 or partner_flag eq false.
    screen_invisible 'SF_HOMEPAGE'.
  endif.


endmodule.                 " STATUS_9000  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  zinit_picture_control  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module zinit_picture_control output.
data: query_table like w3query occurs 1 with header line,
      html_table like w3html occurs 1,
      return_code like  w3param-ret_code,
      content_type like  w3param-cont_type,
      content_length like  w3param-cont_len,
      pic_data like w3mime occurs 0,
      pic_size type i.

  if url is initial.

    if logo_container is initial.
      create object logo_container
             exporting  container_name = 'LOGO_CONTAINER'
             exceptions others         = 1.
      if sy-subrc ne 0.
        exit.
      endif.
    endif.

    if logo is initial.
      create object logo
             exporting  parent = logo_container
             exceptions others = 1.
      if sy-subrc ne 0.
        exit.
      endif.
    endif.

    refresh query_table.
    query_table-name  = '_OBJECT_ID'.                "#EC NOTEXT
             "#EC NOTEXT
    query_table-value = 'ENJOY'.        "#EC NOTEXT
*    query_table-value = 'ZTAFELOGO2'.   "#EC NOTEXT

    append query_table.

    call function 'WWW_GET_MIME_OBJECT'
         tables
              query_string        = query_table
              html                = html_table
              mime                = pic_data
         changing
              return_code         = return_code
              content_type        = content_type
              content_length      = content_length
         exceptions
              object_not_found    = 1
              parameter_not_found = 2
              others              = 3.
    if sy-subrc = 0.
      pic_size = content_length.
    endif.

    call function 'DP_CREATE_URL'
         exporting
              type     = 'image'
              subtype  = cndp_sap_tab_unknown
              size     = pic_size
              lifetime = cndp_lifetime_transaction
         tables
              data     = pic_data
         changing
              url      = url
         exceptions
              others   = 1.

    call method logo-&amp;gt;load_picture_from_url
         exporting url     = url
         exceptions others = 1.

  endif.
endmodule.                 " zinit_picture_control  OUTPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;include : MZATTMENU_CI01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           MZATTMENUI01                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_9000  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_9000 input.
data: l_fieldname type scrfname,
      l_fcode_old like sy-ucomm.

case sy-ucomm.
  when 'PICK'.
*    get cursor field l_fieldname.
*    if l_fieldname eq 'SF_HOMEPAGE'.
*      call function 'CALL_BROWSER'
*           exporting   url    = 'http://tafechannel.com'
*           exceptions others  = 1.
*    endif.

endcase.

endmodule.                 " USER_COMMAND_9000  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;include MZATTMENU_CF01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No coding.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCREEN 900 Logic&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
 MODULE STATUS_9000.
 module zinit_picture_control.

*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In  the SCreen create a Custom Container named 'LOGO_CONTAINER'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this out .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balakumar.G&lt;/P&gt;&lt;P&gt;Reward Points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 11:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614113#M870689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T11:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614114#M870690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in this example the picture has an URL placement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data:&lt;/STRONG&gt;  picture   TYPE REF TO cl_gui_picture,&lt;/P&gt;&lt;P&gt;         g_pic_url TYPE saeuri.&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 = picture-&amp;gt;display_mode_fit&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;&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   = g_pic_url&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          error = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works for me &lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards Tom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 14:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/3614114#M870690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T14:33:10Z</dc:date>
    </item>
  </channel>
</rss>

