Restricting user to close dialog

how to restrict user to close the dialog with the button on the top right corner of the dialog when we set Undecorate(true).?

I'm not quite sure I follow you.
If you're asking about an undecorated dialog without a close button then how can the user click it?
If it has a close button then by default that's the only way to close the dialog. If you want to restrict them to closing it via that then just don't add in another means of closing it.

Similar Messages

  • How to Restrict User to View but Not Print a Document

    Dear All,
    I'm actually wonder is there a way where SAP can restrict users for instance they are able to view the PO, but unable to print it out. Is there a function or a query for such restriction? Please advise.
    Thanks,
    serene

    Hi Serene,
    Check the link
    Re: Document Printing Restriction
    *Close the thread if issue solved.
    Regards
    Jambulingam.P

  • GW8 HP1 Windows client - problems with restricted users

    I've reproduced these on a few clean WinXP and Windows 2003 systems in both a GW 7.0.3 upgrade scenario and fresh install of GW 8 HP1 scenario. I am curious if anyone else has been able to reproduce these:
    - Client ignores DefaultIPAddress and DefaultIPPort values for non-administrative users. If these are defined under HKEY_CURRENT_MACHINE\Software\Novell\GroupWise by the installer's setup.cfg, they are ignored when the user who is logged in is a non-administrative user. Administrative user profiles correctly pull these values but non-administrative users always try ngwnameserver. If the user profile is upgraded to an admin profile, then they start reading DefaultIPAddress and DefaultIPPort. This does not seem to be a permissions problem on the reg. keys themselves, as the values can be read by regedit when logged in as the user.
    - Client does not setup MAPI profiles for the Address Book for a non-administrative user. Windows Messaging configuration dialog opens if you try to use the Address Book. If the user account is upgraded to an admin, then the next GW startup will configure the profile correctly. Downgrading the user to a non-admin at that point allows the Address Book to continue to function.
    This also does not seem to be a permission problem writing to the MAPI profiles registry keys under HKCU\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem. I can manually import the correct keys when logged in as the restricted user and then the Address Book works without issue.
    It does not look like in both cases the GW client even attempts to access the registry keys in question as per RegMon.
    GW 7.0.3 client on the same equipment does not have a problem.
    Any thoughts? Any other issues people have seen running GW 8 as a non-administrative user?

    Originally Posted by elarsson
    I've reproduced these on a few clean WinXP and Windows 2003 systems in both a GW 7.0.3 upgrade scenario and fresh install of GW 8 HP1 scenario. I am curious if anyone else has been able to reproduce these:
    - Client ignores DefaultIPAddress and DefaultIPPort values for non-administrative users. If these are defined under HKEY_CURRENT_MACHINE\Software\Novell\GroupWise by the installer's setup.cfg, they are ignored when the user who is logged in is a non-administrative user. Administrative user profiles correctly pull these values but non-administrative users always try ngwnameserver. If the user profile is upgraded to an admin profile, then they start reading DefaultIPAddress and DefaultIPPort. This does not seem to be a permissions problem on the reg. keys themselves, as the values can be read by regedit when logged in as the user.
    - Client does not setup MAPI profiles for the Address Book for a non-administrative user. Windows Messaging configuration dialog opens if you try to use the Address Book. If the user account is upgraded to an admin, then the next GW startup will configure the profile correctly. Downgrading the user to a non-admin at that point allows the Address Book to continue to function.
    This also does not seem to be a permission problem writing to the MAPI profiles registry keys under HKCU\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem. I can manually import the correct keys when logged in as the restricted user and then the Address Book works without issue.
    It does not look like in both cases the GW client even attempts to access the registry keys in question as per RegMon.
    GW 7.0.3 client on the same equipment does not have a problem.
    Any thoughts? Any other issues people have seen running GW 8 as a non-administrative user?
    I've reproduced this now with the FCS GW 8 client as well.
    Also a point of clarification on the MAPI profiles -- in an upgrade scenario from GW 7 client, if the user profile previosuly existed on the machine and had the MAPI settings configured by the GW 7 client, then they will work fine with GW 8. The issue seems to only occur with new user profiles, logging into a machine as a non-administrative user. The GW 8 client does not create the proper registry keys for the MAPI profile under HKEY_CURRENT_USER and the Address Book does not function.

  • Restrict users to change value in user id field in SM36

    Hi,
    Our users are currently given authorization objects S_BTCH_NAM, S_BTCH_ADM and S_TCH_JOB in order to be able create background jobs and execute using batch admin userid, and not under their own userid.
    I like to know is there way to restrict users to execute transaction SM35, SM36, SM37 to create a job under another person's userid.
    I am looking at grey off the userid field in SM35, SM36, SM37 when users execute these t-code in online mode. I want to restrict them from schedule job to run under another person userid.
    However, if users perform a transaction and call a customised program to create a batch job in background to be executed under batch_admin userid, without failing the job.
    How can it be achieved? Does SAP allows configuration to grey off userid field?

    The problem is that our customized program will first create a job under user "X" userid for audit trail purpose. Because user "X"does not have necessary authorization to perform full update of all other transactions or tables update, in the job, the program will indicate a non-user account with SAP_ALL authorization to perform the update.
    Since your custom program check for S_BTCH_ADM and S_BTCH_NAM from User's authorization we cannot put S_BTCH_ADM=N there and in that case, users would be able to create jobs with other user ID by executing SM36 directly.
    Option 1: Discuss with your developer if it is possible to create a custom exit in the Sm36 program to perform the above authorization check in your Batch user ID's authorization instead of your dialog users. In that case your custom program would run as expected as long as your Batch user ID has proper authorizations for S_BTCH_ADM and S_BTCH_NAM and your dialog users can be restricted to S_BTCH_ADM= N
    Option2: Create a transaction variant for SM36 in tcode SHD0 and make field "User" invisible and then link the transaction variant to a custom tcode which is to be created with start type "Transaction with Variant (variant transaction)".
    Please refer to an SDN article for process of [creation of a transaction variant and linking it to a variant transaction|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d1443e-0184-2c10-c68d-c612f771fe6f?quicklink=index&overridelayout=true]
    Then have your custom program updated to call the custom tcode instead of SM36 and modify your user's roles to replace SM36 authorization with ZSM36 (Check indicator values of SM36 are pulled into the role). This will ensure your custom program can create jobs under a different user whereas when your user executes SM36 online, the field to change 'user' will not be visible and by default they would be forced to create jobs under their own IDs inspite of having S_BTCH_ADM=Y and S_BTCH_NAM= <your Batch user ID>
    Hope this helps!
    Sandipan

  • Restrict User Connections Using Logon Trigger

    Hi all,
    Now I am restricting user connections from selected terminals, using following logon trigger.
    It allows users with DBA privileged user.
    How to restrict DBA Privileged users users ?
    Note:- As per my application needs DBA privilege.
    CREATE OR REPLACE TRIGGER on_logon
    AFTER LOGON
    ON DATABASE
    DECLARE
    VPROGRAM VARCHAR2(30);
    Vusername VARCHAR2(30);
    VTERMINAL VARCHAR2(30);
    CURSOR user_prog IS
    SELECT UPPER(program),UPPER(username),NVL(TERMINAL,'X') FROM v$session
    WHERE audsid=sys_context('USERENV','SESSIONID');
    BEGIN
    OPEN user_prog;
    FETCH user_prog INTO Vprogram,Vusername,VTERMINAL;
    IF VTERMINAL NOT IN ( 'APP1','APP2','APP3')+
    and Vusername='ABUL'+
    THEN
    RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login');
    END IF;
    CLOSE user_prog;
    END;
    Thanks i Advance
    Abk

    Your application needs the DBA role? That is a terrible design-- it violates every principle of secure coding.
    Login triggers don't fire for users with the DBA role, so you won't be able to use a login trigger here. You could ditch the login trigger and configure invited and excluded nodes in the listener's sqlnet.ora file, i.e.
    tcp.validnode_checking = yes
    tcp.excluded_nodes = (hostname1,hostname2,hostname3)You'll have to restart the listener after making that change.
    Justin

  • Any parameters can restrict user ID to log-on application server

    Dear All,
    I had configured the login group (/nSMLG) as following:
    Logon Group  Instance
    TEST            app1
    TEST            app2
                        app3
                        app4
    However, app3 and app4 still have illegal user log-on.
    Did any profile parameters can restrict user ID to log-on application
    server?
    BR,
    Well

    Hello Well Well,
    I could clearly understand what you mean. From what you have stated I am able to understand that:
    1. You have 4 application servers.
    2. You have included 2 of them in Logon group TEST.
    3.  The remaining two are not part of logon group.
    4. You want users not to login into app3 and app4 but to TEST only.
    There is no profile paramter for this. At the max you can close the dispatcher port for these 2 servers but then no one would be able to login into  them.
    Best is to include all of them in to SMLG.
    Regards.
    Ruchit.

  • Restrict users to see some colums from an report

    Hi,
    is there a way to restrict users (group of users) to see some columns in a report.
    For example:
    mr X to see both quantity and price columns
    and mr Y to see just quantity column
    in the same report
    or I have to make 2 report one with both columns and one with just an column.
    Thanks in advance
    best regards
    Nicolae Ancuta

    Hi Nicolae ,
    Security is enforced on two levels:
    Object-level security controls access to Metadata Repository objects (configured in
    Administrator Tool), and Web Catalog objects such as Folders, Filters, and Dashboards, etc. (configured in BI Answers Web Application). Data-level security controls access to content and data in end-user Reports and Dashboards (configured in Administrator Tool). Administrator Tool Manage Menu item Security Manager is used to define Users and User Groups and define Repository permissions.
    Data-level permissions can be set to above Groups and Users from the Presentation Table properties dialog box of each Subject area.BI Answers Web Page, Settings Menu
    Administration, to view and administer privileges associated with various components of the Answers Web application.
    More here in the documentation
    http://download.oracle.com/docs/cd/E10415_01/doc/nav/portal_booklist.htm
    Regards,
    Mohammad Farhan Alam

  • Restricting user to exit ..

    Hi all...
        set parameter ID 'xxx' FIELD xxx.
        call transaction 'xxxx' .
        perform job01 .
    After calling the following transaction xxxx, i need to continue to perform Job01.
    The problem is, the user might close session, or goto another transaction without finishing the job in xxxx. This will resulted in 'job01' cant be done.
    What should i do to make sure, or restrict user from exiting the transaction called.

    hi Kokwei,
    you can start a transaction in a new window using the following.. and returs the code back to the pgm with the addition 'T' int the way
    data : t(10).
    CALL FUNCTION 'ALINK_CALL_TRANSACTION' starting  new task t
      EXPORTING
        transactionname       = 'SE24'
      <b> WAY                   = 'T'</b>
    this starts the tcode in a new window..
    so that closing this new window will not stop the pgm.
    regards
    satesh

  • Retrieving ALL values from a single restricted user property

    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");

    Well, the code you've got will retrieve the single value of the property
    for the current user. You're getting the default value because the
    current user doesn't have Locations property set, so the ProfileWrapper
    returns the default value from the property set.
    I assume you want to get the list of available values that you entered
    into the .usr file in Workshop. If so, I've attached a
    SetColorController.jpf, index.jsp, and GeneralInfo.usr (put in
    META-INF/data/userprofiles) I wrote for an example that does just this.
    It uses the PropertySetManagerControl to retrieve the restricted values
    for a property, and the jsp uses data-binding to create a list from that
    pageflow method.
    For a just-jsps solution, you can also use the
    <ps:getRestrictedPropertyValues/> tag. I've attached a setcolor-tags.jsp
    that does the same thing.
    Greg
    Dirk wrote:
    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");
    [att1.html]
    package users.setcolor;
    import com.bea.p13n.controls.exceptions.P13nControlException;
    import com.bea.p13n.property.PropertyDefinition;
    import com.bea.p13n.property.PropertySet;
    import com.bea.p13n.usermgmt.profile.ProfileWrapper;
    import com.bea.wlw.netui.pageflow.FormData;
    import com.bea.wlw.netui.pageflow.Forward;
    import com.bea.wlw.netui.pageflow.PageFlowController;
    import java.util.Collection;
    import java.util.Iterator;
    * @jpf:controller
    * @jpf:view-properties view-properties::
    * <!-- This data is auto-generated. Hand-editing this section is not recommended. -->
    * <view-properties>
    * <pageflow-object id="pageflow:/users/setcolor/SetColorController.jpf"/>
    * <pageflow-object id="action:begin.do">
    * <property value="80" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:setColor.do#users.setcolor.SetColorController.ColorFormBean">
    * <property value="240" name="x"/>
    * <property value="220" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:index.jsp@#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="240,240,240,240" name="elbowsX"/>
    * <property value="144,160,160,176" name="elbowsY"/>
    * <property value="South_1" name="fromPort"/>
    * <property value="North_1" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:index.jsp">
    * <property value="240" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@">
    * <property value="116,160,160,204" name="elbowsX"/>
    * <property value="92,92,92,92" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#begin.do#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="204,160,160,116" name="elbowsX"/>
    * <property value="201,201,103,103" name="elbowsY"/>
    * <property value="West_0" name="fromPort"/>
    * <property value="East_2" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.ejb.property.PropertySetManager#propSetMgr">
    * <property value="31" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.profile.UserProfileControl#profileControl">
    * <property value="37" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="formbeanprop:users.setcolor.SetColorController.ColorFormBean#color#java.lang.String"/>
    * <pageflow-object id="formbean:users.setcolor.SetColorController.ColorFormBean"/>
    * </view-properties>
    public class SetColorController extends PageFlowController
    * @common:control
    private com.bea.p13n.controls.ejb.property.PropertySetManager propSetMgr;
    * @common:control
    private com.bea.p13n.controls.profile.UserProfileControl profileControl;
    /** Cached possible colors from the User Profile Property Set definition.
    private String[] possibleColors = null;
    /** Get the possible colors, based upon the User Profile Property Set.
    public String[] getPossibleColors()
    if (possibleColors != null)
    return possibleColors;
    try
    PropertySet ps = propSetMgr.getPropertySet("USER", "GeneralInfo");
    PropertyDefinition pd = ps.getPropertyDefinition("FavoriteColor");
    Collection l = pd.getRestrictedValues();
    String[] s = new String[l.size()];
    Iterator it = l.iterator();
    for (int i = 0; it.hasNext(); i++)
    s[i] = it.next().toString();
    possibleColors = s;
    catch (P13nControlException ex)
    ex.printStackTrace();
    possibleColors = new String[0];
    return possibleColors;
    /** Get the user's favorite color from their profile.
    public String getUsersColor()
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    return profileControl.getProperty(profile, "GeneralInfo", "FavoriteColor").toString();
    catch (P13nControlException ex)
    ex.printStackTrace();
    return null;
    // Uncomment this declaration to access Global.app.
    // protected global.Global globalApp;
    // For an example of page flow exception handling see the example "catch" and "exception-handler"
    // annotations in {project}/WEB-INF/src/global/Global.app
    * This method represents the point of entry into the pageflow
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward begin()
    return new Forward("success");
    * @jpf:action
    * @jpf:forward name="success" path="begin.do"
    protected Forward setColor(ColorFormBean form)
    // set the color in the user's profile
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    profileControl.setProperty(profile, "GeneralInfo", "FavoriteColor", form.getColor());
    catch (P13nControlException ex)
    ex.printStackTrace();
    return new Forward("success");
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class ColorFormBean extends FormData
    private String color;
    public void setColor(String color)
    this.color = color;
    public String getColor()
    return this.color;
    [GeneralInfo.usr]
    [att1.html]

  • Any way to see ICONS in Open and Close Dialog boxes?

    Is there any way to see ICONS in Open and Close Dialog boxes, instead of just lists of items names?
    I know you can preview one at a time, but I'd love to see all my artwork as picture icons, just as you can in a finder window.
    Windows does this, but not OSX that I know of. Is there a third party app that enables you to see icon view in the Open and Close Dialogs?

    Thank you Steve Jobs. I guess that feature has been added in Leopard. Now there really is nothing that I'll miss from Windoze.

  • How to restrict users from creation of varients in report transaction

    Hi All,
    I have a requirement where buisness wants to restrict users in creating varients in report transactions.because of create options users will be creating more screen varients which will be disturbing for the other users to select a particular standard varient.Kindly give ur input regarding this
    With regards
    Girish A

    Hi,
    First edit the role assigned to users using PFCG.
    Then go to Authorization tab and click on "Change Authorization Data".
    It will opened up the profile of the role. now find the authorization object "S_PROGRAM".
    In that edit "User action ABAP/4 program" object.
    Remove "VARIANT" check box if it was checked and save. Now press
    Generate button or "Shift+F5".
    That's it.
    You can ask for this to your basis team. They can perform this task  easily.

  • Windows 2008 : How to Restrict Users to Copy file from Shared Folder

    Hello All,
    I need to Restrict Users to Copy file from Shared Folder. Please let me know is there any method to achieve this requirement.

    If user have Read permission, they can copy it. So actually you cannot restrict user from copy your files if they could read/edit.
    Some programs could help restrict users from edit/modify/copy the content of their files such as Office files, PDF files etc as Oscar said above.
    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact [email protected]

  • How can we restrict users from changing the data in HFM.

    Hi All,
    We have requirement from users where, They don't want the base data being loaded from SAP to HFM via FDM through ERPi to get changed in HFM at <Entity Currency>. They want data to be read only and no body should be able to change neither Grid nor Forms and neither Smart View. If we restrict by Shared services access then again they can't change ownership management value.
    Regards,
    Sushil

    Hi Thanos, Thanks for your reply.
    Yes i am aware of the security class, so your suggestion is to use security classes to restrict users? And how can i use the phased submission for the same?  I am new to HFM so please bear with me.
    I have one more question that my Application is HFM EPMA application. So is it necessary to have Application Administrator to change hierarchy and Deploy the Application from EPMA?
    Thanks,
    Sushil

  • How can i restrict user to access database object (procedure) or JSP

    Hi
    I have 9ias infrastructure 902, on win2k box with 9i DB.
    and I have one PL/SQL web application and another J2EE application both are hosted by 9ias 902.
    Now we are looking forward to couple both with SSO.
    I have deloyed samples of both and works fine.
    Each application have different set of users, i mean there is no common user.
    How can i restrict user not to view the web page which is not authorised to them.
    as far as i understand from the Grocery demo is pick the role (which is a string only) from OID and programaticall apply security via if else endif construct.
    can any one through light upto my concern.
    regards
    [email protected]

    Hey Mary
    No i haven't try to do that via pl/sql....
    as the our application is j2ee app... deployed in oc4j.. with sso and ldap....
    still finding to do so....
    what i have realized that LDAP is just to store user information in inverted tree... and one have to build separated access security mechnisum that will be applicable to j2ee system....
    thanx...
    samir....

  • User Authorisations in Dialog Programming.

    Hi Friends,
    I have a small requirement, I want to create user authorisations in dialog programming.
    Actually client requirement is he want to enter absence details of each and every branch.
    For that i have created a cusom table and i  also i have developed a dialog program inorder to update the details
    and to retrive all the data i have created a report program also.
    Now the client requirement is he want user authorisations while updating the data through dialog programming, that means if a user loging in that particular branch he want to enter the absence details pertaining to that branch only, when he tries to enter the details of other employee pertaining to another branch an error should be raised.
    Actually in the client place they are using authrisation object as 'Z_WERKS'.  The basis person has created this and provided for me.
    Actually i have created an Authority check in module pool program.Here iam attaching my prog,
    Pls provide me the sample code if at all available.
    *& Include ZEMPTOP                                           Module pool
    PROGRAM  ZEMP.
    TABLES : ZABS,PA0001.
    DATA : WA_PA0001 LIKE PA0001,
           V_ANS.
    DATA: BEGIN OF Z_WERKS OCCURS 0,
            PERSA LIKE T500P-PERSA,
            NAME1 LIKE T500P-NAME1,
          END OF Z_WERKS.
    *&  Include           ZEMPI01
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'DISP'.
    SELECT SINGLE * FROM ZABS WHERE PERNR = ZABS-PERNR.
    IF SY-DBCNT <> 0.
    *MESSAGE I000(Z00) WITH 'Details of' ZABS-PERNR .
    else.
    MESSAGE I000(Z00) WITH 'No Details Available to Display'.
    ENDIF.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    LEAVE TO SCREEN 0.
    WHEN 'CLS'.
    CLEAR ZABS.
    WHEN 'INS'.
    INSERT ZABS .
    ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
    IF SY-DBCNT <> 0.
    MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
    'inserted successfully'.
    ENDIF.
    CLEAR ZABS.
    WHEN 'MOD'.
    UPDATE ZABS.
    ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
    IF SY-DBCNT <> 0.
    MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
    'Modified Successfully'.
    ENDIF.
    CLEAR ZABS.
    *WHEN 'DEL'.
    *CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA'
    EXPORTING
       TEXTLINE1           = 'ARE YOU SURE'
       TEXTLINE2           = 'YOU WANT TO DELETE'
       TITEL               = 'CONFIRMATION'
       START_COLUMN        = 25
       START_ROW           = 6
       DEFAULTOPTION       = 'N'
    IMPORTING
       ANSWER              = V_ANS.
    *IF V_ANS = 'J'.
    *DELETE ZABS.
    *IF SY-DBCNT <> 0.
    *MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
    *'Deleted Successuflly'.
    *ELSE.
    *MESSAGE I000(Z00) with 'No Record to Delete'.
    ENDIF.
    *ENDIF.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  GET_REC  INPUT
          text
    MODULE GET_REC INPUT.
    SELECT SINGLE * FROM PA0001 INTO WA_PA0001
             WHERE PERNR = ZABS-PERNR.
    MOVE: WA_PA0001-PERNR TO ZABS-PERNR,
          WA_PA0001-ENAME TO ZABS-ENAME,
          WA_PA0001-GSBER TO ZABS-GSBER,
          WA_PA0001-WERKS TO ZABS-WERKS.
    ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
    ENDMODULE.                 " GET_REC  INPUT
    *&      Module  CHECK_AUTH_WERKS  INPUT
          text
    MODULE CHECK_AUTH_WERKS INPUT.
    *SELECT PERSA INTO TABLE _WERKS FROM T500P
            WHERE  PERSA = ZABS-WERKS.
    AUTHORITY-CHECK OBJECT 'Z_WERKS'
    ID 'PERSA' FIELD Z_WERKS-PERSA.

    You need to test the sy-subrc after the authority check - that will indicate whether the user has the authorisation or not.. you also often include the activity being tested e.g. generally 03 = Display, 02 = Update etc
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
      ID 'ACTVT'    FIELD '03'
      ID 'CUSTTYPE' FIELD 'B'.
    IF not SY-SUBRC is initial.
      MESSAGE E...   "put your exception here...
    ENDIF.
    see [Programming Authorization Checks  |http://help.sap.com/saphelp_nw04/helpdata/en/52/6712ac439b11d1896f0000e8322d00/content.htm] for more info.
    Jonathan

Maybe you are looking for