<?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 Dialog Programming - Dynamically Changing the ICON &amp; Function Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dialog-programming-dynamically-changing-the-icon-function-code/m-p/2829104#M662034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to change the ICON and the Function Code of a Push Button in a Screen, dynamically in the Dialog Programming? Please suggest me a suitable solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate Your Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kannan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 01:14:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-19T01:14:50Z</dc:date>
    <item>
      <title>Dialog Programming - Dynamically Changing the ICON &amp; Function Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dialog-programming-dynamically-changing-the-icon-function-code/m-p/2829104#M662034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to change the ICON and the Function Code of a Push Button in a Screen, dynamically in the Dialog Programming? Please suggest me a suitable solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate Your Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kannan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 01:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dialog-programming-dynamically-changing-the-icon-function-code/m-p/2829104#M662034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T01:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dialog Programming - Dynamically Changing the ICON &amp; Function Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dialog-programming-dynamically-changing-the-icon-function-code/m-p/2829105#M662035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to change icon dynamically based on function code of a button or based on a values like ...if a particular vaiable is outputted one icon and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not right to change the function code of a button dynamically(dont believe it is possible too) ...coz the purpose of push button and therby uniquely identifying the action on a button with a function code is lost....so it is better to use multiple buttons...(including radiobuttons/push buttons/check boxes) and uniquely identify them and then change icons accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For dynamic changes in icon please refer the following code&lt;/P&gt;&lt;P&gt;Simple steps&lt;/P&gt;&lt;P&gt;***********************&lt;/P&gt;&lt;P&gt;First create a status icon Box on the screen required(go to screen painter..left side...last icon at the bottom with a 'Tick and Cross' Mark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in PBO&lt;/P&gt;&lt;P&gt;case itab-status. "checkin status if itab-status&lt;/P&gt;&lt;P&gt;"if we are using table control drag and drop the icon box into the column so that we can loop at the table control and change status icons for each line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 'OPEN'.&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_GREEN_LIGHT' "name of icon u want&lt;/P&gt;&lt;P&gt;text = 'open' "text of the icon&lt;/P&gt;&lt;P&gt;info = 'Status' "tool -tip text&lt;/P&gt;&lt;P&gt;add_stdinf = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;result = status_icon&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;icon_not_found = 1&lt;/P&gt;&lt;P&gt;outputfield_too_short = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;Similarly for other 'Complete' also follow similar steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc = 0.&lt;/P&gt;&lt;P&gt;"success&lt;/P&gt;&lt;P&gt;sy-subrc = 1.&lt;/P&gt;&lt;P&gt;Icon does not exist&lt;/P&gt;&lt;P&gt;sy-subrc = 2.&lt;/P&gt;&lt;P&gt;Icon and text do not fit on screen&lt;/P&gt;&lt;P&gt;sy-subrc = 3.&lt;/P&gt;&lt;P&gt;Error displaying status icon&lt;/P&gt;&lt;P&gt;Please refer the standard code "DEMO_DYNPRO_STATUS_ICONS" in se38&lt;/P&gt;&lt;P&gt;on click of a button it is changing the status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 02:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dialog-programming-dynamically-changing-the-icon-function-code/m-p/2829105#M662035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T02:27:01Z</dc:date>
    </item>
  </channel>
</rss>

