<?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: Pushbutton with an icon inside in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553385#M250898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, try this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zrich_0001.

type-pools: icon.

data: switch.

selection-screen begin of block b1 with frame title text-001.
selection-screen pushbutton 5(20) gocfg user-command gocfg.
selection-screen end of block b1.

start-of-selection.

at selection-screen output.

if switch = 'X'.
clear switch.
* Write pushbutton text
  write icon_red_light as icon to gocfg.
  concatenate gocfg 'Red Light' into gocfg
              separated by space.


else.
switch = 'X'.
  write icon_Green_light as icon to gocfg.
  concatenate gocfg 'Green Light' into gocfg
              separated by space.


endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2006 20:01:57 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-08-10T20:01:57Z</dc:date>
    <item>
      <title>Pushbutton with an icon inside</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553382#M250895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm migrating a program from 4.6 to 5.0 version.  On 4.6 the program shows a pushbutton with an icon.  When you press the button the icon changes and other options are displayed on screen.  I'm newby on abap so I don't know how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But anyway it works on 5.0 too, but the button shows an extrange code inside instead of the icon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every example I found of pushbutton has a text assigned to it on initialization section, but I didn't found any example with icons to try to understand how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The button is shown by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: PUSHBUTTON 72(4) PB%EXCO USER-COMMAND EXPCOL.&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;&lt;/P&gt;&lt;P&gt;Gastó&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 19:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553382#M250895</guid>
      <dc:creator>gastn_jareo</dc:creator>
      <dc:date>2006-08-10T19:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton with an icon inside</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553383#M250896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it just like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.

&amp;lt;b&amp;gt;type-pools: icon.&amp;lt;/b&amp;gt;

selection-screen begin of block b1 with frame title text-001.
selection-screen pushbutton 5(20) gocfg user-command gocfg.
selection-screen end of block b1.

start-of-selection.

&amp;lt;b&amp;gt;at selection-screen output.

* Write pushbutton text
  write icon_configuration as icon to gocfg.
  concatenate gocfg 'Configuration' into gocfg
              separated by space.&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 19:58:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553383#M250896</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-10T19:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton with an icon inside</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553384#M250897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES sscrfields. &lt;/P&gt;&lt;P&gt;TYPE-POOLS icon. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: &lt;/P&gt;&lt;P&gt;  BEGIN OF SCREEN 500 AS WINDOW TITLE title, &lt;/P&gt;&lt;P&gt;    PUSHBUTTON 2(10)  but1 USER-COMMAND cli1, &lt;/P&gt;&lt;P&gt;    PUSHBUTTON 12(30) but2 USER-COMMAND cli2 &lt;/P&gt;&lt;P&gt;                           VISIBLE LENGTH 10, &lt;/P&gt;&lt;P&gt;  END OF SCREEN 500. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN. &lt;/P&gt;&lt;P&gt;  CASE sscrfields. &lt;/P&gt;&lt;P&gt;    WHEN 'CLI1'. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    WHEN 'CLI2'. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;  ENDCASE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION. &lt;/P&gt;&lt;P&gt;  title  = 'Push button'. &lt;/P&gt;&lt;P&gt;  but1 = 'Button 1'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ICON_CREATE' &lt;/P&gt;&lt;P&gt;    EXPORTING &lt;/P&gt;&lt;P&gt;      name   = icon_information &lt;/P&gt;&lt;P&gt;      text   = 'Button 2' &lt;/P&gt;&lt;P&gt;      info   = 'My Quickinfo' &lt;/P&gt;&lt;P&gt;    IMPORTING &lt;/P&gt;&lt;P&gt;      RESULT = but2 &lt;/P&gt;&lt;P&gt;    EXCEPTIONS &lt;/P&gt;&lt;P&gt;      OTHERS = 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL SELECTION-SCREEN '0500' STARTING AT 10 10.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 20:01:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553384#M250897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T20:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton with an icon inside</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553385#M250898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, try this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zrich_0001.

type-pools: icon.

data: switch.

selection-screen begin of block b1 with frame title text-001.
selection-screen pushbutton 5(20) gocfg user-command gocfg.
selection-screen end of block b1.

start-of-selection.

at selection-screen output.

if switch = 'X'.
clear switch.
* Write pushbutton text
  write icon_red_light as icon to gocfg.
  concatenate gocfg 'Red Light' into gocfg
              separated by space.


else.
switch = 'X'.
  write icon_Green_light as icon to gocfg.
  concatenate gocfg 'Green Light' into gocfg
              separated by space.


endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 20:01:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553385#M250898</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-10T20:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton with an icon inside</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553386#M250899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very thank you guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gastó&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 14:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-with-an-icon-inside/m-p/1553386#M250899</guid>
      <dc:creator>gastn_jareo</dc:creator>
      <dc:date>2006-08-16T14:18:25Z</dc:date>
    </item>
  </channel>
</rss>

