Query regarding Authority object

Hello Friends;
I just wanna know why we check authorization on selection screen and What do u mean by authority objects?, Who creates It? What is the purpose behind creating it?? What transactions are there relating authority objects in SAP??
And one more query is there
See when we call any function module there are several parameters that it contains such as importing ,exporting, tables and exceptions ?? What is the exact use of exception parameters in that? How to handle those exception ...Is it before calling that function module or after ?? What is the syntax for it??
Regards;
Parag

Exception are like errors so to use that in the FM we use raise command .
Authorization is required ,assume u in Quality department and you are trying to execute a SD dept report which is as per rules not allowed so for that in abap we use Authorization object .
Use this program for understanding DEMO_AUTHORITY_CHECK
Transaction SU21 .
PLease reward if useful.

Similar Messages

  • Query in  Authority object

    Is it possible to give multiple values to the field of the Authority object.
    For example
    AUTHORITY-CHECK OBJECT 'M_MATE_WRK'
    ID 'ACTVT' FIELD '03'
    ID 'WERKS' FIELD : '0002', '1030', 2700'.
    IF SY-SUBRC <> 0.
    WRITE : 'No authorization'.
    ENDIF.
    Is it possible to give mulitple values for the field WERKS.

    hi,
    it is possible to give authority for more than on field.
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object> 
       ID <authority field 1> FIELD <field value 1>. 
       ID <authority field 2> FIELD <field value 2>. 
       ID <authority-field n> FIELD <field value n>. 
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    regards,
    satish,
    reward points.

  • Query regarding Form Object

    Dear All,
    In my Add On, I have many forms and I am using only one form object for all the forms. Is it permissible or I have to use different form objects for each form. When I am navigating from One form to other I am getting error as Invalid Form. In one case I am opening another(child) form from the parent form, but when I close the child form and click anything on the parent form I am getting error as Invalid Form. Please help me.
    Regards,
    Noor hussain
    Edited by: noor_023 on Feb 25, 2010 10:41 AM

    Hi,
    the error "Invalid Form" refers to the attempt to take a reference to a not existing form, like this:
    oForm = oSboApplication.Forms.Item("ThisFormUIDNotExists")
    Or probably you use e not correct reference to a form in order to reach an item, like this:
    ' oForm is not set properly
    oItem = oForm.Items.Item("TheItemUID")
    Please, post relevant code if this not help you.
    Regards.
    Carmine

  • Query regarding Schema objects

    Hi All,
    I would like to know,
    is it possible to retrieve the Which Schema objects (Procedures/Packages/Functions) are using same table for Eg: "EMP" in all the schemas in any one of the instances (Eg : DEV/Test/PROD) ?
    If possible , could you please let me know the process.

    966949 wrote:
    Hi All,
    I would like to know,
    is it possible to retrieve the Which Schema objects (Procedures/Packages/Functions) are using same table for Eg: "EMP" in all the schemas in any one of the instances (Eg : DEV/Test/PROD) ?
    If possible , could you please let me know the process.Check DBA_DEPENDENCIES (but separately for all 3 environments)
    Also, a crude way would be to scan DBA_SOURCE and check where all the table is used.

  • A query regarding synchronised functions, using shared object

    Hi all.
    I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
    Ok, I will clear myself with the following example :
    class First
    int a;
    static int b;
    public void func_one()
    synchronized((Integer) a)
    { // function logic
    } // End of func_one
    public void func_two()
    synchronized((Integer) b)
    { / function logic
    } // End of func_two
    public static void func_three()
    synchronized((Integer) a)
    { // function logic
    } // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
    // just written here for completeness.
    public static void func_four()
    synchronized((Integer) b)
    { / function logic
    } // End of func_four
    First obj1 = new First();
    First obj2 = new First();
    Note that the four functions are different on the following criteria :
    a) Whether the function is static or non-static.
    b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
    Now, first my-thoughts; kindly correct me if I am wrong :
    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
    Kindly correct me I am wrong anywhere in the above.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
    Kindly correct me I am wrong anywhere in the above.
    c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
    d) In case 4, we have a static function, synchronized on a static object.
    Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
    First, Kindly correct me I am wrong anywhere in the above.
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
    Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
    Or am I being dumb ?
    Looking forward to replies..
    Ashutosh

    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
    d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
    Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
    and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
    which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
    Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
    However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
    You need:
    Object a = new Object();
    static Object b = new Object();

  • Query regarding Insurance of the objects in plant

    Dear Sir,
                In my Implemenatation project i have the query regarding the insurance of the fleet object(Transporting Vechle) and Life insurance.
         As th eprocedure is when the object's insurance is finished the Note is sent by the respective department head to MD and finance department.Later it is aproved by MD and request is forwarded to finance dept and later the  finance dept issue the cheque to the insurance Company.
                      even During Breakdown(Accident) of the Vechile the Note is sent and same procedure is followed as above please let me know the standard SAP Procedure that i have to use in SAP so that Transaction would be Easy for me and my client.
    Quick Asnwer/Valuable answer will be awarded  good point s
    hope the answer will reached very soon
    Regards
    Girish

    Hi,
    This should work:
    select table_name, owner from dba_tab_cols
      where table_name = 'EMP'
      and column_name = 'JOB'
      and column_id != 3;//Johan

  • Problem during creation of authority object

    Hi All,
    I am trying to do authority object of standart report RFASLDPC but when I am giving authorization object in authorization object field (Bcoz requirment is this transaction code for perticular company code)then it is following error/warning 'check object has not been maintained.'
    Could you please tell me what is the remedy for that?
    Regards,
    Amar.

    Hi,
      I think you should check if the authorty object that you are using has been created you can try to use transaction su21, i think the authority object that you are trying to use does not exist.
    Check the below link for more info
    LINK[ Auth Objects |http://help.sap.com/saphelp_nw04/helpdata/EN/80/1a6859e07211d2acb80000e829fbfe/content.htm]
    Regards,
    Himanshu

  • 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

  • JPA query by entity/object ?

    I am trying to write an abstract API which dynamically assigns any Entity Class that needs to be persisted and retrieved using the Entity Manager.
    Saving into the database is not a problem, I just do entityManager.save(Class) and it works for any class that needs to be persisted.
    However, when querying for the object based upon the attributes, I want to avoid naming particular attributes and want to use the Entity class's attributes against itself for querying.
    For example, the client program will say something like this to query by name and age of a Person:
    -------calling (client) program: ---
    Person p = << get from UI, not saved yet, no Id but has all other attributes like name and age etc. >>
    List<Person> persons = dao.getAllThatMatch(p);
    --- end client Program --
    --- DAO class ---
    List<T> getAllThatMatch(T t) {  //note that expectation is that returned is a list of Object which is the same as the querying object
    List<T> entityList = em.someFinderMethod(t);
    //the someFinderMethod method should automatically query for all Person objects that match the attributes provided by the object of Person supplied as criteria
    //NOTE: there is no attribute mentioned extensively like name, age etc.
    return entityList ;
    -- end DAO class --
    Edited by: user7626479 on Feb 6, 2013 3:55 PM
    Edited by: user7626479 on Feb 6, 2013 3:55 PM

    Query by example is not included in the JPA standard, but it is possible to do with EclipseLink.
    See http://wiki.eclipse.org/EclipseLink/Examples/JPA/ORMQueries#Query_By_Example
    for how to use query by example with native EclipseLink queries. To execute a native query through JPA, you will need to call createQuery(DatabaseQuery query) on the org.eclipse.persistence.jpa;JpaEntityManager obtained from the javax.persistence.EntityManager instance by calling getDelegate() or unwrap.
    Best Regards,
    Chris

  • Probem with CRM_ORD_OP authority object

    Hello friends,
    I facing a problem with CRM_ORD_OP authority object.
    I have set a pfcg profile as below, but I dont know why, CRM is not performing authority check for object CRM_ORD_OP, so user are able to create documents, but they could not find them.
    CRM_ORD_PR: PR_TYPE 'Z021',ACTVT '*'
    CRM_ACT: ACTVT u2018*u2019
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000021', PARTN_FCTT '0008'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000022', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000023', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000024', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000025', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000027', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000028', PARTN_FCTT 'Y030'
    CRM_ORD_OP: ACTVT '*', PARTN_FCT 'Z0000029', PARTN_FCTT 'Y030'
    CRM_ORD_OE: SERVICE_OR u2018u2019, DIS_CHANNE u2018u2019, SALES_OFFI u2018u2019, SALES_GROU u2018u2019, ACTVT = u2018*u2019
    What I want to do it is simple. I want that users can access only their own documents.
    Does anybody know what going on?
    Regards,
    Lalas

    problem resolved

  • Error "The Query Returned no Objects" while exporting Universe in UDT?

    Hi,
    I have created a Universe on top of BEx Query using UDT in SAP BO 4.1 and tried to Export the Universe to Repository the following error is appearing.
    "The Query Returned no Objects" so "The Universe couldn't be exported".
    Could you please suggest me what could be the issue and how to resolve this.
    Thanks & Regards,
    Ramana,
    +91 8008665199.

    What version of Oracle 9i are you using? Do you have a standard 'NLS_LANG' environment variable set on client's machines? Or do you set it to different values on different machines?
    Here is one of way you could get around it.
    Could you specify the export parameter 'STATISTICS=NONE' while exporting the table data?
    Try this and see.
    If this is successful, you could use the import utility as usual. You could always compute or estimate statistics on the table after import.

  • 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

  • Query on system object

    hi everyone ,
                         i have a query regarding this system object. I have created a system object and assigned it to a user to log on to sap R/3 .its working fine.now my question is i have another user on the R/3 side .now i want to log on to the R/3 from the portal using this second user can i use the same system object created for the first user or should i create a new system object."can a system object be assigned to 2 or more users?"
    Thanks in advance,
    regards,
    Tilak

    hi Arun ,
                thanks for ur reply,well i have done the user mapping in the same way as u told.but my doubt is like for suppose i have a user named p1 on my portal side & two users named r1 & r2 on the R/3 side .now i have created a system object named sys1 and assigned it to p1 specifying
    username:r1
    pwd:*******
    in the user mapping.
    now i want want the same p1 to connect from the portal to R/3 using
    username:r2
    pwd:*******
    now can i use the same system object or should i create another system object.
    regards,
    tilak.

  • View all the available authority object in any system!!

    Hi,
    Is tere any way i can see all the avaiable authority object in any system?
    Regards
    Gunjan

    Hi,
    Try transaction su21 .it should give you list.
    Thanks.
    Mark points if helpful.

  • Custom authority object

    Hallo guys,
    have you ever used a custom authority object within a standard transaction code?
    I need to use a custom authority check in VA01/02/03, is that possible?
    Thanx!

    Hi mike,
    1. Thats not directly possible.
    2. we have to Modify the original source code,
       (by taking access key)
    3. Only then its possible.
    regards,
    amit m.

Maybe you are looking for