<?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: gui status. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436849#M208181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the desired button on the application toolbar and for the SY-UCOMM value assigned for this button in the PF-STATUS modify the screen fields into display or change on an alternate basis in the screen flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other option would be to use two different buttons than one.Then the job will be much easier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Jun 2006 09:09:26 GMT</pubDate>
    <dc:creator>nishanthbhandar</dc:creator>
    <dc:date>2006-06-23T09:09:26Z</dc:date>
    <item>
      <title>gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436847#M208179</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;  I want to use the dual functionality of the "Display to Change" button on the apllication toolbar, ie: when i click it the first time i should display a set of fields and when i click it again, another set of fields should appear. Subsequent clicking of the button should alternate between display of the two sets of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks,&lt;/P&gt;&lt;P&gt; Sruthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 08:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436847#M208179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T08:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436848#M208180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use a variable like data : DISPLAY(1) value 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in PAI you can control DISPLAY flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*PAI
if display eq 'X'.
  display = space.
else.
  display = 'X'.
endif.

*PBO
if DISPLAY eq 'X'.
  loop at screen.
    screen-input = 0.
    modify screen.
  endloop.
else.
  loop at screen.
    screen-input = 1.
    modify screen.
  endloop.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ibrahim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 09:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436848#M208180</guid>
      <dc:creator>ibrahim_u</dc:creator>
      <dc:date>2006-06-23T09:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436849#M208181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the desired button on the application toolbar and for the SY-UCOMM value assigned for this button in the PF-STATUS modify the screen fields into display or change on an alternate basis in the screen flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other option would be to use two different buttons than one.Then the job will be much easier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 09:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436849#M208181</guid>
      <dc:creator>nishanthbhandar</dc:creator>
      <dc:date>2006-06-23T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436850#M208182</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;Declare a flag flag_display and initialize it to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on button click, you can check this flag and if it is 'X' then do the processing for display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the last, change the flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in PBO,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. check the flag. &lt;/P&gt;&lt;P&gt;2. if it is display, loop at screen modify the screen with display settings.&lt;/P&gt;&lt;P&gt;3. if it is not display, loop at screen modify the screen with change settings.&lt;/P&gt;&lt;P&gt;4. Change the flag to X if it is clear elseif it is marked as X then clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_abc = 'X',&lt;/P&gt;&lt;P&gt; clear v_abc.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; v_abc = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 09:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436850#M208182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T09:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436851#M208183</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;I am assuming you require this for module pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two internal tables : for 1st set of buttons(1st pf status) and 2nd set of buttons (2nd pf status).&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_first-value = 'Button1'.&lt;/P&gt;&lt;P&gt;append it_first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_first-value = 'Button2'.&lt;/P&gt;&lt;P&gt;apppend it_first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_second-value = 'Button3'.&lt;/P&gt;&lt;P&gt;append it_second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_second-value = 'Button4'.&lt;/P&gt;&lt;P&gt;append it_second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now do as follows :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ok_code = 'Toggle'.&lt;/P&gt;&lt;P&gt;set pf-status 'ZPF' excluding it_first.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;set pf-status 'ZPF' excluding it_second.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a pf status with all 4 buttons ( buttons1 to buttons4).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 16:29:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436851#M208183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T16:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: gui status.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436852#M208184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use two buttons in the GUI Status.&lt;/P&gt;&lt;P&gt;Set a variable to track (Display or Change).&lt;/P&gt;&lt;P&gt;In the PBO section, use the EXCLUDING option for SET PF-STATUS.&lt;/P&gt;&lt;P&gt;Only show one button at a time based on the variable.&lt;/P&gt;&lt;P&gt;In the PAI section, set the variable based on the ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: gv_mode(1)    type c.
data: begin of gt_status occurs 5,
        fcode(4)   type c,
      end of gt_status.
.....

gv_mode = 'D'.

.....

PBO...

refresh gt_status.
if gv_mode = 'D'.
  gt_status-fcode = 'ZDIS'.
  append gt_status.
  set pf-status 'MAIN' excluding gt_status immediately.
elseif gv_mode = 'C'.
  gt_status-fcode = 'ZCHG'.
  append gt_status.
  set pf-status 'MAIN' excluding gt_status immediately.
endif.  
  

PAI...
ok_code_save = ok_code.
clear ok_code.
case ok_code_save.
  when 'ZDIS'.
    gv_mode = 'D'.
  when 'ZCHG'.
  gv_mode = 'C'.
endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 18:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-status/m-p/1436852#M208184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T18:00:12Z</dc:date>
    </item>
  </channel>
</rss>

