How to test Authority Object

Hello freinds,
I have inserted authority object in z program, how can I test the program whether the user is authorized to carry out the transaction or not???

Hi Amar,
Please place a brreak-point at the statement "AUTHORITY-CHECK" and execute the program.
If you have authrization then sy-subrc will be set to zero else some different value.
Regards,
Babul.

Similar Messages

  • How to find Authority Object before it is checked.

    Hi All,
    Is there a table or FM that I can use to read authority object for user?
    Thanks
    Edited by: Julius Bussche on Jan 1, 2009 1:33 PM

    For some object (particularly those checked automatically by the kernel) there are function modules available to check the authority of the user in your program, before the system does it anyway (and usually dumps if the authority is missing at runtime anyway).
    Take a look at the FM's starting with AUTHORITY_CHECK* --> F4 in SE37.
    Eg. AUTHORITY_CHECK_TCODE, AUTHORITY_CHECK_DATASET, etc. There might also be an AUTHORITY_CHECK_USERSTAT... not sure though...
    Cheers,
    Julius

  • How to test the object is base 64 encoded or not.

    Hi,
    MimeUtility is which I am using for base 64 encoding of object.
    but while decoding I want to test whether the object is base 64 encoded and then only I want to decode it. actually while encoding I will be encoding it based on some criteria. If that criteria is satisfied then I will be encoding the object else I will not do so but I cant test it same way again so I have to explicitly test whether its encoded at base 64 encoding then only decode it.
    Sorry it seems to a long story :)
    Thanks in advance.

    If that criteria is satisfied then I will be encoding the object else I will not do soSo, you're not saying what that criteria is, but you're asking if there is some way (and I suspect asking for some way) of determining, after the fact, whether that criteria was met.
    Depending on the criteria, and the method of encoding, I would have thought it quite possible for some object which was not encoded to be in every respect identical to the encoding of some other object. In this case it would not be possible to determine whether some arbitrary object was the result of an encoding.
    But then, as already pointed out, you know if you encoded something or not.

  • How to test if object is a byte array?

    hi,
    does anyone know if there is a way for getting the Class constant for a byte[] that can be used with instanceof? like in below?
    for the primitive boolean type there is Boolean.TYPE, which gives a Class object for a primtive type? but a boolean is not an object? I don't know if this is related to the above though??
    thanks,
    asjf
    public class isByteArray
         public static void main(String [] arg) throws Exception {
              Object [] os = new Object [] { new byte [10],
                   new java.awt.datatransfer.UnsupportedFlavorException(new java.awt.datatransfer.DataFlavor())
              for(int i=0; i<os.length; i++)
                   System.out.println(os.getClass().getName()+" is byte [] ? "+isByteArray(os[i]));
         static byte [] b = new byte [0];
         public static boolean isByteArray(Object o) {
              return b.getClass().isInstance(o);
         /* would like */
         public static boolean isByteArray(Object o) {
              return o instanceof (byte[]).class;

    thanks..
    (I'd been trying
    o instanceof (byte[])
    and lots of other variations..)

  • OpenScript: How do you test for object/text existance programmatically?

    Hi, All;
    I hope someone can help me; kind of new to OATS. I can’t figure out how to test for object/text existence and return results back to the script. There are methods for verifying text and objects; i.e.
    Web.verifyText
    Web.assertText
    These methods just report pass or fail to the test. I need to get the data back programmatically so I can use it logically. I know you can do this pretty easily in Selenium and QTP so there must be a way in OATS.
    Thanks,
    Eric

    Hi Eric,
    You can use the Object Explorer to find the xpath of the object you are interested and check for its existence, and then grab some attribute of that object for use elsewhere.
    if (web.element(6,"/web:window[@index='0' or @title='Software and Services - SCL']/web:document[@index='0']/web:span[@text='Services' or @index='14']")
                             .exists()){
              System.out.println("OBJECT EXISTS");
    // get an attribute of object here ,e.g
    String myval = web.element(41,"/web:window[@index='0' or @title='Software and Services - SCL']/web:document[@index='0']/web::span[@text='Services' or @index='14'].getAttribute("innerText");
    // use myval elsewhere
    Hope it helps.
    Jamie

  • Usage of AUTHORITY OBJECT

    Hi,
    Could you please help out how to create AUTHORITY OBJECT and usage in reports with sample code and transaction codes.
    Thanks,
    Madhu

    Hi Madhu,
    DATA:wa_flight TYPE t_flight,
    it_flights TYPE t_flighttab.
    SELECT-OPTIONS so_carr FOR wa_flight-carrid.
    for authority-check:
    DATA:
    allowed_carriers TYPE RANGE OF t_flight-carrid,
    wa_allowed_carr LIKE LINE OF allowed_carriers.
    START-OF-SELECTION.
    fill a range table with the allowed carriers:
    SELECT carrid
    FROM scarr
    INTO wa_allowed_carr-low
    WHERE carrid IN so_carr.
    AUTHORITY-CHECK OBJECT 'S_CARRID'
    ID 'CARRID' FIELD wa_allowed_carr-low
    ID 'ACTVT' FIELD '03'. " display
    IF sy-subrc <> 0.
    CLEAR wa_allowed_carr.
    ELSE.
    wa_allowed_carr-sign = 'I'.
    wa_allowed_carr-option = 'EQ'.
    APPEND wa_allowed_carr TO allowed_carriers.
    ENDIF.
    ENDSELECT.
    check this link
    http://techrepublic.com.com/5100-6329_11-5110893.html#
    http://www.sap-img.com/ab035.htm
    Regards,
    Sridhar

  • How to create Authority check object

    Hello Gurus,
    How to create Authority-check object 'ZABC'
                                                             ID 'TABLE' FIELD 'ZTABLE'.
    Please tell me detailed procedure.
    Thanks in advance.
    Best Regards,
    zubera

    Dear Zubera,
    Creating Authorization Fields
    In authorization objects, authorization fields represent the values to be tested during authorization checks.
    To create authorization fields, choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects ® Fields.
    To create a authorization field:
    1. Choose Create authorization field.
    2. On the next screen, enter the name of the field. Field names    must be unique and must begin with the letter Y or Z.
    3. Assign a data element from the ABAP Dictionary to the field.
    4. If desired, enter a check table for the possible entries. For    more information about check tables.
    For more information about AUTHORITY-CHECK, see the keyword documentation of the ABAP Editor.
    You can often use the fields defined by SAP in your own authorization objects. If you create a new authorization object, you do not need to define your own fields. For example, you can use the SAP field ACTVT in your own authorization objects to represent a wide variety of actions in the system.
    Assigning an Authorization Object to an Object Class
    Each authorization object must be assigned to an object class when it is created.
    Choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects --> Objects.
    You can also create authorization objects in the Object Navigator (SE80).
    Creating / Choosing Object Classes
    The system displays a list of existing object classes.
    Object classes are organized according to the components of the system.
    Before you can create a new object, you must define the object class for the component in which you are working. The objects are not overwritten when you install new releases.
    You can also define your own object classes. If you do so, select class names that begin with Y or Z to avoid conflicts with SAP names.
    Creating an Object
    Enter a unique object name and the fields that belong to the object. Object names must begin with the letter Y or Z in accordance with the naming convention for customer-specific objects.
    You can enter up to ten authorization fields in an object definition. You must also enter a description of the object and create documentation for it.
    Ensure that the object definition matches the AUTHORITY-CHECK calls that refer to the object.
    Do not change or delete authorization objects defined by SAP. This disables SAP programs that use the objects.
    You can regenerate the profile SAP_ALL after creating an authorization object.
    Best Regards,
    Rajesh
    Please reward points if found helpful.

  • How to find out in which role an authority object is included

    Hi,
    I need to call web services by an external application. Therefore the authorization object S_SERVICE is needed to call services.
    Now I want to add this object to a specific sap user, but how can I find out in which role this object is included? I don't want to create a new role for just only this standard SAP authority object.
    Thank you!

    >
    Torben Larsen wrote:
    > Hey!
    >
    > Thank you for your answer. I have now found roles, which include this object. But I still have the authorization problems and can see that the object S_SERVICE is the problem, when tracing with ST01.
    >
    > I'm not that much into authorization stuff. So do I need also a profile? I only could call the web services by using profile SAP_ALL.
    >
    > thank you!
    Now that you have required role with you .. simple assign that role to user id from transaction SU01 (Roles tabs).
    Sap standard roles will already have profile in it. You might have to generate the profile. Goto transaction PFCG enter role name hit display button , goto Authorisation tab, hit Display Authorisation button and on next screen press generate button (Shift+f5).
    By the way you can use SUIM to find role and profile for given authority object

  • How to create authority check object and assign to  ztcode which is of modu

    Dear ,
             how to create authority check object and assign to  ztcode which is of custom module pool program.its urgent kindly help points rewarded.

    Manoj,
    You can check with your Basis team to create authorisation object and assigining tcodes to the user profiles.
    K.Kiran.

  • Plz tell me how to create authority check objects and how to usein prg

    dear sir,
    plz tell me how to create authority check objects and how to usein prg

    http://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
    Create custom authorization – Customer specific object
    If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
    Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
    After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
              Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
    AUTHORITY CHECK OBJECT Object_name
                ID fieldname1 FIELD fieldvalue1
                ID fieldname2 FIELD fieldvalue2
                ID fieldname3 FIELD fieldvalue3.
                 If sy-subrc eq 0.   "Authorization exists
                 Endif.
    http://articles.techrepublic.com.com/5100-6329_11-5110893.html
    Edited by: JackandJay on Jan 16, 2008 10:21 AM

  • How to use custom authority object to execute certain code?

    Hi Gurus,
    I'm trying to use an authority-check just to execute certain ABAP code for some roles only, but I don't get to make it work as every user gets to exectute the code. I'm also not sure of which field(s) I should add to my authorization object when I'm checking it.
    Does anyone know if there's a way of making it? Thanks in advance.
    Edited by: Jorge Gonzalez on Jun 25, 2010 11:42 AM

    Hi.
    If the authority object is already created then you can view in transaction SU21, Select the custom object and double click on it.
    You can see the Authorization fields that need to be passed to the authorization object while using.
    For eg: If you see BUKRS, then you need to pass the company codes relevant so the authority check is performed
    All Authority object has activity which informs the operation to be performed. for eg:
    ACTVT: Activities.
    01 = Create
    02 = Change
    03 = Display
    06 = Delete
    07 = Activate
    10 = Post
    Also check for documentation if it is available, if so it makes life easy.
    Hope this helps
    Regards
    Shiva

  • How to test the extended controller and AM Object

    I added a button in a OAF page and extended the CO and AM. When we click this button, an XML Publisher concurrent program should be called and the PO will be displayed in PDF format.
    What is the best way to test this. Should I copy all the libraries from oracle/apps/... to my pc and attach or can I test without doing this. If so, what is the best approach.
    I am new to this.
    Thanks for your Help.
    HP

    I got the code ready for with extended Co java file. How can test this. How to generate the class file. Once I gerenarate the class file, if I ftp the file to cust/oracle/apps/pos/changeorder/webui and in the personalization if I attach this CO and run the page and click the button will this call the new CO? Yes after FTP the Contorller class file to appropriate path and attach the extended controller through personalization New Controller will get called.
    But DO REMEMBER TO BOUNCE THE APPACHE SERVER then only the extended Controller file get called.
    here is the link having steps to bounce it for Apps 11i.
    http://oracleanil.blogspot.com/2009/04/ncrimmessageproc.html
    Please let me know if these steps are correct..
    1. New OAWorkSpace
    2. New Project
    3. right click on project and click New class to generate the extended CO Class.Yes, It is right..
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • How to synchronize test schema objects with the prod schema objects.

    Hi,
    I have a requirement of synchronizing test schema objects with the production schema objects. Please let me know the below
    1. if there is a standardized method for such activity,
    2. if there are oracle utilities for this task.
    3. If i had to do this job manually, can you let me know the check list if any.
    Thanks
    Purushotham M

    http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52sqldev-1735911.html
    You could try database diff tool in sql developer(but there are some licence restrictions).
    I don't know your database version, you could try DBMS_COMPARISON package also.
    Look at this link http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_comparison.htm
    Other solution is to create db link between test and production database, and then you can try different types of queries like
    select table_name from user_tables
    minus
    select table_name from user_tables@db_link_to_other_database
    And you can do this for columns, indexes and so on.
    But you must have proper DDL scripts for this, to generate sync script.
    Also there is a question about work process, you are doing sync in reverse order(from production to test). Test db is for test, after test you go to production db with proper ddl and dml scripts, so these schemas shouldn't be different in the first place(talking about schema, not data here).

  • Authority Objects to read HR FM BAPI_ORGUNITEXT_DATA_GET

    Hello gurus,
       i want to run only FM BAPI_ORGUNITEXT_DATA_GET  through a SAP User ID, i assigned some Authority Objects to it but its not returining anything if i run it through other user using same parameters its showing me the data. i assigned S_DEVELOP the FM and Function group of the FM, it has access to all the infotypes P_ORGIN-all, S_DEVELOP - All tables, P_PERNR - all, S_RFC-the selected FUGR and SYST function group, P_ABAP -all.
    Do you guys think i am still missing something, to view the FM output.
    In the same user I am getting output from FM BAPI_EMPLOYEE_GETDATA. using these objects.
    NOTE: the user dont have any other objects assigned to it, apart from the specified here. (Though i assigned se37 for testing purpose).
    i will really appreciate your reply on the same.
    thanks in advance
    Mani

    Sorry - meant PLOG.  I haven't checked the FM in any depths,  but you if you pass object type O to the FM, this is the object type you will need to assign. 
    The PLOG could look like this:
    Infotype               1000, 1002 (you could put * here)
    Planning status    1 (presuming this is what you use)
    Object type          O
    Plan version         01 (or whatever is your active plan version)
    Function code      DISP, LISD (assuming you only want to see)
    Subtype              *
    You may need other obejct types in the authorization object.  If you use structural authorizations, they have to be in place as well. Consider that the authorization object defines what data your are allowed to read. Structural Authorizations decides where in the org.structure you can read those data.
    Your best way forward may be to got to SE37 and test the FM.  Then directly after (if it fails to deliver) go to SU53 and check the authorizations.
    No - you should not have to assign the transaction codes.
    Hope this helps.
    I may have misunderstood the usage of the FM. I am basing my answer on the fact that it reads OM.

  • How to create Activex object for my Visual C++ object

    Hi,
    I am working on development on Acrobat 9.0 SDK. I am facing problem is that I can compiled Visual C++ source code to an api. I can test functions on this api on Acrobat 9.0 windows, but I could not test it on IE web browser, because I don't know how to create Activex object from my Visual C++ source code or its api.
    I read Acrobat 9 SDK document and found under C:\Acrobat 9 SDK\Version 1\PluginSupport\Tools\Visual Studio App Wizard has two files: Acro9PIWizInstaller.msi and setup.exe. I am not very sure those file are the key to help me to create Activex objects for my api.  Are they the one I need to create Activex object? If not, could you please advise me how to create Activex object for my api or C++ codes.
    Thanks a lot for any of your comments or advices.
    Thai

    Hi lrosenth,
    Thanks a lot for your information.
    My question is, on Javascript how do I call a function from .api. Below is my very simple test.
    I got a function on BasicPlugin.cpp under C:\Acrobat 9 SDK\Version 1\PluginSupport\Samples\BasicPlugin. See below.
    I added BasicPlugin.api on C:\Program Files\Adobe\Acrobat 9.0\Acrobat\plug_ins
         ACCB1 int ACCB2 MyPluginCommand() {
              int num = 5;
              return num;
    On my HTML file, I create an <Object> below:
        <OBJECT id="acrobatapp"
                classid="clsid:85DE1C45-2C66-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT id="acrobatpdf"
                classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"   >
            <Param name="SRC" value="http://www.adobe.com/devnet/acrobat/pdfs/acrobat_digital_signature_appearances_v9.pdf">
       </OBJECT>
    On my Javascript. I call function MyPluginCommand() as below, but it is not working. How do I call function MyPluginCommand() on Javascript?
         var acrobatapp= document.getElementById("acrobatapp");
         var num= acrobatapp.MyPluginCommand();
         alert(num);
    Thanks for your support,
    Thai

Maybe you are looking for

  • CAD Log out due to CTI failed connection Failover UCCX 8.5

    Hi guys, I have a  issue with CAD running  CCX 8.5.SU4 every day maybe on the morning or afternoon i have issue connectivy with CTI manager "UCCX", i found the following  discussion and i follow all the step : https://supportforums.cisco.com/thread/2

  • Automatic start is gone

    In the past when I opened my imac I was at the applications without a key word. Now all the time it is asked before I can have access. In "automatic opening" my name is written there.

  • Selectlist with redirect

    Hallo reader, I need some help with a form with say 10 items. There are two selectlist(with redirect). After selecting (choice) clears all other items. Do you have a solution? If I change the selectlist from redirect to submit than it hold the values

  • EDI 812/820 implementation

    I have succesfully implemented the EDI payment orders (820) using standard PAYEXT and PEXR2002 via program RFFOEDI1.  However, I now need to produce an 812 that has the detail on the adjustments made to a payment order (CREADV).  The issue...I don't

  • Unable to watch any videos - you tube etc

    since the latest version of firefox was installed, when I go to sites that have any video commentaries, I get a message that the plugins are not working or I need adobe flash. I have enable the plugins and installed adobe flash, still no luck