<?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: Syncronizing (enable/disable )the subscreen with main screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syncronizing-enable-disable-the-subscreen-with-main-screen/m-p/5247886#M1212496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not go thru ur entire code but I have a strong feeling that you need to add some conditions like you should not be allowing the user to save or change in display mode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;P&gt;Vick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2009 16:32:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-27T16:32:06Z</dc:date>
    <item>
      <title>Syncronizing (enable/disable )the subscreen with main screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syncronizing-enable-disable-the-subscreen-with-main-screen/m-p/5247885#M1212495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have implemented a screen exit (MM06E005)in me22/23 for customer data.This comes as a tab in PO header. Now the issue that i am facing is when i click change/display button i need to  enable and disable the fields of my subscreen just like the main screen (both should get enabled and disabled together) but the issue is that change/display button will have always the same sy-ucomm so wether it needs to be enabled or disable is hard to figure out.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;what i have done is that i have taken a flag which changes to 'C' to 'D' whenever user clicks the change/display button. for most of the time it works fine but many times when user clicks other buttons like save /change object this logic fails and i need to handle sy-ucomm of all these buttons.........what i feel is that this is not a clean logic and surely there would be a better way to syncronize the main screen and subsceen so they both are enabled and disabled at same time . &lt;/P&gt;&lt;P&gt;below is my code.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;declaration in topinclude
     gv_disp(1) value 'D', "for me23n
      gv_disp1(1) value 'C'. "for me22n.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;code in pbo&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-tcode = 'ME23N'.
    IF gv_ucomm EQ ''. " when the transaction is called for the first time
      LOOP AT SCREEN.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
    ELSEIF gv_ucomm EQ 'MESAVE'. " When save button is clicked
      LOOP AT SCREEN.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
      gv_disp = 'D'.
    ELSEIF gv_ucomm EQ 'MECHOB'. " When save change object  is clicked
      LOOP AT SCREEN.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
      gv_disp = 'D'.
    ELSEIF gv_ucomm EQ 'METOGG'. " change/display button is clicked then we need to flipflop the screen.
      IF gv_disp = 'D'. "Display mode
        gv_disp = 'C'.   "change mode
        LOOP AT SCREEN.
          screen-input = 1.
          MODIFY SCREEN.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          screen-input = 0.
          MODIFY SCREEN.
        ENDLOOP.
        gv_disp = 'D'.
      ENDIF.
    ENDIF.
  ELSEIF sy-tcode = 'ME22N'.
    IF gv_ucomm EQ ''.
      LOOP AT SCREEN.
        screen-input = 1.
        MODIFY SCREEN.
      ENDLOOP.
    ELSEIF gv_ucomm EQ 'MESAVE'.
      LOOP AT SCREEN.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
      gv_disp1 = 'D'.
    ELSEIF gv_ucomm EQ 'MECHOB'. " When save change object  is clicked
      LOOP AT SCREEN.
        screen-input = 1.
        MODIFY SCREEN.
      ENDLOOP.
      gv_disp = 'C'.
    ELSEIF gv_ucomm EQ 'METOGG'.
      IF gv_disp1 = 'D'. "Display mode
        gv_disp1 = 'C'.   "change mode
        LOOP AT SCREEN.
          screen-input = 1.
          MODIFY SCREEN.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          screen-input = 0.
          MODIFY SCREEN.
        ENDLOOP.
        gv_disp1 = 'D'.
      ENDIF.
    ENDIF.
  ENDIF.&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;Rahul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added code tags&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Feb 27, 2009 11:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 15:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syncronizing-enable-disable-the-subscreen-with-main-screen/m-p/5247885#M1212495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T15:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Syncronizing (enable/disable )the subscreen with main screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syncronizing-enable-disable-the-subscreen-with-main-screen/m-p/5247886#M1212496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not go thru ur entire code but I have a strong feeling that you need to add some conditions like you should not be allowing the user to save or change in display mode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;P&gt;Vick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 16:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syncronizing-enable-disable-the-subscreen-with-main-screen/m-p/5247886#M1212496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T16:32:06Z</dc:date>
    </item>
  </channel>
</rss>

