<?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: Modifying Screen Attributes Dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641127#M285517</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;You just need to include the transaction codes as well while checking for the modification groups.&lt;/P&gt;&lt;P&gt;Suppose you have 3 fields on the screen A,B &amp;amp; C--&amp;gt;MOD is modification group for them. You wan to keep them display only in T1 transaction &amp;amp; allowed for change in T2 transaction. Then the code would be:&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;IF screen-group1 = 'MOD' AND sy-tcode = 'T1'.&lt;/P&gt;&lt;P&gt; screen-active = 0.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; screen-active = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan.&lt;/P&gt;&lt;P&gt;Reward points if this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Nov 2006 09:45:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-22T09:45:57Z</dc:date>
    <item>
      <title>Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641125#M285515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added three custom fields into a new infotype/subtype.&lt;/P&gt;&lt;P&gt;Everything is working fine when I use PA20 to display a persons&lt;/P&gt;&lt;P&gt;data for this new infotype i.e. the three new fields are being displayed.&lt;/P&gt;&lt;P&gt;However, if I use PA30 (Change) the three new fields are still in display only&lt;/P&gt;&lt;P&gt;mode and does not allow any user input for these new fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below is what I am using:&lt;/P&gt;&lt;P&gt;  IF p0019-tmart = '61'.          " New Subtype 61&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF screen-group1 = 'CRB'.      " I have added this as a modification group&lt;/P&gt;&lt;P&gt;        screen-active = '1'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        screen-active = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to make the distinction between PA20/PA30 when activating?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:39:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641125#M285515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T09:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641126#M285516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF screen-group1 = 'CRB'. &lt;/P&gt;&lt;P&gt;screen-active = '1'.&lt;/P&gt;&lt;P&gt;screen-input = 1 . " you can use it for input &lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;screen-active = '0'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641126#M285516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641127#M285517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;You just need to include the transaction codes as well while checking for the modification groups.&lt;/P&gt;&lt;P&gt;Suppose you have 3 fields on the screen A,B &amp;amp; C--&amp;gt;MOD is modification group for them. You wan to keep them display only in T1 transaction &amp;amp; allowed for change in T2 transaction. Then the code would be:&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;IF screen-group1 = 'MOD' AND sy-tcode = 'T1'.&lt;/P&gt;&lt;P&gt; screen-active = 0.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt; screen-active = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan.&lt;/P&gt;&lt;P&gt;Reward points if this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641127#M285517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T09:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641128#M285518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes u have to distinguish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if sy-tcode = 'PA20'.
  var = 0.
elseif sy-tcode = 'PA30'.
  var = 1.
endif.

LOOP AT SCREEN.
IF screen-group1 = 'CRB'. " I have added this as a modification group
screen-active = '1'.
scree-input = var.
MODIFY SCREEN.
ELSE.
screen-active = '0'.
scree-input = var.
MODIFY SCREEN.
ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        chandrasekhar jagarlamudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641128#M285518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T09:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641129#M285519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chetan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much for your reply, much appreciated.&lt;/P&gt;&lt;P&gt;Is there anyway I can capture if the user has pressed the display icon&lt;/P&gt;&lt;P&gt;or the change icon. They have the option to do both from PA30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641129#M285519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T09:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641130#M285520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it is from PA30, then you can go with the help of SY-UCOMM = 'DIS'.&lt;/P&gt;&lt;P&gt;along with TCODE. that way you can solve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 10:00:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641130#M285520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T10:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641131#M285521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the command line put ' /h ' and in the debugging mode check for sy-ucomm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-ucomm eq 'DISP'. " for example this is for display&lt;/P&gt;&lt;P&gt;.. " some code here&lt;/P&gt;&lt;P&gt;elseif sy-ucomm eq 'CHNG'. " this one is for change mode&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 10:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641131#M285521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T10:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641132#M285522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used debug mode and the sy-ucomm is blank when I choose&lt;/P&gt;&lt;P&gt;both display and change options&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 10:05:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641132#M285522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T10:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641133#M285523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andy,&lt;/P&gt;&lt;P&gt;Sorry for the late reply mate.&lt;/P&gt;&lt;P&gt;The function code for the Change icon is MOD &amp;amp; that for the Display icon is DIS. &lt;/P&gt;&lt;P&gt;I don't think you will be able to capture this event using sy-ucomm.&lt;/P&gt;&lt;P&gt;Please compare these values against the system variable SY-PFKEY. The SY-PFKEY value when you press change icon is MOD &amp;amp; when you press Display icon is DIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do let me know if this works or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan.&lt;/P&gt;&lt;P&gt;PS: Reward points if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Chetan H. Dubey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 10:41:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641133#M285523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T10:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Screen Attributes Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641134#M285524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now managed to solve it now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 11:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-screen-attributes-dynamically/m-p/1641134#M285524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T11:59:59Z</dc:date>
    </item>
  </channel>
</rss>

