<?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: System Variable That Holds The User Group Value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281011#M1218862</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;instead of reduplicating the code...&lt;/P&gt;&lt;P&gt;you can just write it in at selection-screen output...&lt;/P&gt;&lt;P&gt;as this will also be triggered when the selection screen is displayed for the first time and all other time as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so just writing at that place will do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 17:04:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T17:04:52Z</dc:date>
    <item>
      <title>System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281006#M1218857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys/Dolls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've written a program (ok I lie not me - some other ABAPER) but I need to modify it slightly. &lt;/P&gt;&lt;P&gt;I need to evaluate which user group the person is in and based upon that enable or diasble a selection item on the front screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate any help + a very small code example would suffice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 16:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281006#M1218857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T16:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281007#M1218858</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;use the select query in the initialization event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of wa,
           BNAME type XUBNAME,
           CLASS type XUCLASS,
         end of wa.

INITIALIZATION.
select  single BNAME                " BNAME gives the user name from table USR02
           class                              " Class gives the user group from table USR02
  into wa
  from usr02
 where bname = sy-uname.

AT Selection-screen ouput.
if wa-class = 'XYZ'.
loop at screen.
  if screen-name cs 'INPUTFIELD'.
     screen-active = 0.
     modify screen.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 16:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281007#M1218858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T16:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281008#M1218859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok managed to solve this via the following piece of code which needs to go within the "initialization" section but still have one problem namely variants that were setup with the extraction option selected are still coming up with that option even though the code to disable the extraction option has been implemented as shown below - should the code below be implemented within the i"initialization" section or elsewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;initialization.

DATA: BEGIN OF user_parameters OCCURS 20.
          INCLUDE STRUCTURE usparam.
DATA: END OF user_parameters.

  CALL FUNCTION 'SUSR_USER_READ'
    EXPORTING
      user_name                  = sy-uname
   TABLES
     user_parameters            = user_parameters.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE i113(zh).
    RETURN.
  ELSE.
    LOOP AT user_parameters.
      IF user_parameters-parid = 'UGR' AND user_parameters-parva &amp;lt;&amp;gt; '99'.
        LOOP AT SCREEN.
          IF screen-name CS 'IEXT'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 10:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281008#M1218859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T10:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281009#M1218860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally sorted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had to re-duplicate the code at the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I've procedurised it now looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;initialization.
* RP 12.03.09 - Disable the extraction radio button except when the user is in
* user group 99.
  perform disable_extraction.
*


at selection-screen output.

  perform screen_control.

* RP 12.03.09 - Disable the extraction radio button except when the user is in
* user group 99.
  perform disable_extraction.

form DISABLE_EXTRACTION .

* RP - 12.03.09 - WO 1751 on CH1185.
* Disable the extraction radio button except when the user is in
* user group 99.
DATA: BEGIN OF user_parameters OCCURS 20.
          INCLUDE STRUCTURE usparam.
DATA: END OF user_parameters.

  CALL FUNCTION 'SUSR_USER_READ'
    EXPORTING
      user_name                  = sy-uname
   TABLES
     user_parameters            = user_parameters.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE i113(zh).
    RETURN.
  ELSE.
    LOOP AT user_parameters.
      IF user_parameters-parid = 'UGR' AND user_parameters-parva &amp;lt;&amp;gt; '99'.
        LOOP AT SCREEN.
          IF screen-name CS 'IEXT'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
  ENDIF.

endform.                    " DISABLE_EXTRACTION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 17:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281009#M1218860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T17:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281010#M1218861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weel done Raj/Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 17:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281010#M1218861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T17:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable That Holds The User Group Value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281011#M1218862</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;instead of reduplicating the code...&lt;/P&gt;&lt;P&gt;you can just write it in at selection-screen output...&lt;/P&gt;&lt;P&gt;as this will also be triggered when the selection screen is displayed for the first time and all other time as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so just writing at that place will do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 17:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-that-holds-the-user-group-value/m-p/5281011#M1218862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T17:04:52Z</dc:date>
    </item>
  </channel>
</rss>

