<?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 Handle selection screen controls based on users in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444844#M827328</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 some user defined controls - like buttons, checkboxes, radio buttons on my selection screen.&lt;/P&gt;&lt;P&gt;I want some of these controls to appear and diappear depending on the user login..etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Dany&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2008 18:07:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-17T18:07:11Z</dc:date>
    <item>
      <title>Handle selection screen controls based on users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444844#M827328</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 some user defined controls - like buttons, checkboxes, radio buttons on my selection screen.&lt;/P&gt;&lt;P&gt;I want some of these controls to appear and diappear depending on the user login..etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Dany&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2008 18:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444844#M827328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-17T18:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Handle selection screen controls based on users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444845#M827329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..Dan&lt;/P&gt;&lt;P&gt;You can do in this way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : p_cid TYPE st_employee-cid modif id A,&lt;/P&gt;&lt;P&gt;                         check as checkbox  modif id B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-uname = 'user1'.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-group = 'A'.&lt;/P&gt;&lt;P&gt;   screen-active = '0'.   " wont be displayed on screen&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if screen-group = 'B'.&lt;/P&gt;&lt;P&gt;  screen-active ='0'.    "wont be displayed on screen&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify screen.&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;if sy-uname = 'user2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;if screen-group = 'A'.&lt;/P&gt;&lt;P&gt;   screen-active = '1'.   " will be displayed on screen&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if screen-group = 'B'.&lt;/P&gt;&lt;P&gt;  screen-active ='1'.    "will be displayed on screen&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify screen.&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;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2008 18:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444845#M827329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-17T18:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Handle selection screen controls based on users</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444846#M827330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, You can create a parameter in table TPARA (SM30 table view TPARA).&lt;/P&gt;&lt;P&gt;Let's say you create a parameter Z_SUPER_USER.&lt;/P&gt;&lt;P&gt;Then you can assing this parameter to the user parameters (SU01). Put it there and put value X&lt;/P&gt;&lt;P&gt;In your code, you can then avoid hard coding the user names, by processing this parameters. In your code you enter something like this (sorry for syntax errors, coded by heart):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your PBO, you then process something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: l_super_user      type char1.

get paramter ID 'Z_SUPER_USER' field l_super_user.

if l_super_user = 'X'.
loop at screen.
if screen-name = '&amp;lt;&amp;lt;&amp;lt;NAME OF THE FIELD/SCREEN ELEMENT&amp;gt;&amp;gt;'.
screen-active = 0.
screen-invisible = 1.
modify screen.
endloop.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you can assign MOD groups to the fields you want to potentially hide. This way, you can hide them all using one command only, like.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at screen.
if screen-group1 = '&amp;lt;&amp;lt;&amp;lt;NAME OF THE GROUP&amp;gt;&amp;gt;'.
screen-active = 0.
screen-invisible = 1.
modify screen.
endloop.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leonardo De Araujo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2008 19:05:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handle-selection-screen-controls-based-on-users/m-p/3444846#M827330</guid>
      <dc:creator>LeonardoAraujo</dc:creator>
      <dc:date>2008-02-17T19:05:44Z</dc:date>
    </item>
  </channel>
</rss>

