What is authorization object and how to create it for a table

Hi All,
What is authorization object and how to create it for a table?
Thanks

Hi
Authorization
For authorization checks, there are many ways of linking authorization objects with user actions in an SAP system. The following discusses three possibilities in the context of ABAP programming.
Authorization Check for Transactions
You can directly link authorization objects with transaction codes. You can enter values for the fields of an authorization object in the transaction maintenance. Before the transaction is executed, the system compares these values with the values in the user master record and only starts the transaction if the appropriate authorization exists.
Authorization Check for ABAP Programs
For ABAP programs, the two objects S_DEVELOP (program development and program execution) and S_PROGRAM (program maintenance) exist. They contains a field P_GROUP that is connected with the program attribute authorization group. Thus, you can assign users program-specific authorizations for individual ABAP programs.
Authorization Check in ABAP Programs
A more sophisticated, user-programmed authorization check is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.
AUTHORITY-CHECK OBJECT object
                        ID name1 FIELD f1
                        ID name2 FIELD f2
                        ID namen FIELD fn.
object is the name of an authorization object. With name1, name2 ... , and so on, you must list all fields of the authorization object object. With  f1, f2 ... , and so on, you must specify the values that the system is to check against the entries in the relevant authorization of the user master record. The AUTHORITY-CHECK statement searches for the specified object in the user profile and checks the useru2019s authorizations for all values of f1, f2 ... . You can avoid checking a field name1, name2 ... by replacing FIELD f1  FIELD f2 with DUMMY.
After the FIELD addition, you can only specify an elementary field, not a selection table. However, there are function modules available that execute the AUTHORITY-CHECK statement for all values of selection tables. The AUTHORITY-CHECK statement is supported by a statement pattern.
Only if the user has all authorizations, is the return value sy-subrc of the AUTHORITY-CHECK statement set to 0. The most important return values are:
·        0: The user has an authorization for all specified values.
·        4: The user does not have the authorization.
·        8: The number of specified fields is incorrect.
·        12: The specified authorization object does not exist.
A list of all possible return values is available in the ABAP keyword documentation. The content of sy-subrc has to be closely examined to ascertain the result of the authorization check and react accordingly.
REPORT demo_authorithy_check.
PARAMETERS pa_carr LIKE sflight-carrid.
DATA wa_flights LIKE demo_focc.
AT SELECTION-SCREEN.
  AUTHORITY-CHECK OBJECT 'S_CARRID'
                  ID 'CARRID' FIELD pa_carr
                  ID 'ACTVT' FIELD '03'.
  IF sy-subrc = 4.
    MESSAGE e045(sabapdocu) WITH pa_carr.
  ELSEIF sy-subrc <> 0.
    MESSAGE e184(sabapdocu) WITH text-010.
  ENDIF.
START-OF-SELECTION.
  SELECT  carrid connid fldate seatsmax seatsocc
    FROM  sflight
    INTO  CORRESPONDING FIELDS OF wa_flights
    WHERE carrid = pa_carr.
    WRITE: / wa_flights-carrid,
             wa_flights-connid,
             wa_flights-fldate,
             wa_flights-seatsmax,
             wa_flights-seatsocc.
  ENDSELECT.
Regards
Hitesh

Similar Messages

  • What are the uses of MVC, Extension and how to create it for begineers pls

    what are the uses of MVC, Extension and how to create it for begineers pls
    dont give link for tutorials please explain ,
    thank you,
    Regards,
    Jagrut BahratKumar Shukla

    Hi,
    Check out this link :
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/0f/ab3a3c9ca75402e10000000a114084/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/0f/ab3a3c9ca75402e10000000a114084/content.htm</a>
    It is the best possible explanation and documentation that you'll get.
    Thanks,
    Tatvagna.

  • About lock object and how to create it

    Hi ABAP gurus,
    Can any one explain about the Lock Objects and How to create Lock object step by step.
    Rgds,

    Hi Rangamma,
    Check this info.
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technically:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • How to create view for xmltype table in oracle

    hi:
    Can some one help me how to create view for xmltype table in oracle?
    XMLType do not have column
    Sem

    Thank you !!
    I read it and become very hard to implement what I want to do.
    Can you give me example please?
    My main goal to create view for xmltype table is to XQuery the XML data?
    Do you have any other suggestion?
    Please help
    Ali_2

  • What is matchcode objects and how can we create tthem

    hai to all.
         what is matchcode objects .
         and how can we create matchcode objects
         and how will it works

    Hi
    In which version of SAP are you working?
    Matchcodes are replaced by SEARCH HELPs in latest versions
    see the doc
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11 Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
    https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
    Collective search help Combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    A Collective search help provides alternative search
    Paths by combining elementary search helps.
    Only one search help can be attached to a field, table or data element. Several search paths are therefore attached with a collective search help.
    A collective search help also has interface parameters like
    an elementary search help.
    Like an elementary search help, a collective search help has an interface of IMPORT and EXPORT parameters with which the search help exchanges data. Using this interface, the collective search help can be attached to fields, tables and data elements exactly like an elementary search help.
    Parameter assignment needs to be done for each of the
    Included search helps.
    When you define a collective search help, there are no components for describing the dialog behavior and data selection; instead the included search helps are listed here. You must assign the parameters of the collective search help to the interface parameters of the included search help for each inclusion.
    User may choose the tab and thus the elementary
    search maethod.
    When we execute the search help SCUSTOM, we are confronted with a dialog which gives us an option of either restricting
    By 1)Search for customer according to booking
    2)Search for customer according to name.
    These are effectively the elementary search helps (SCUSTOM_BOOK and SCUSTOM_NAME) which have been included in the collective search help SCUSTOM.
    HOT KEY
    The hot key is used to select the elementary search help from the collective search help and to enter the restrictions in the dialog box for restricting values directly from the entry field. If the user often searches for values using the same search help, this procedure can save time.
    Steps to create a Collective Search Help
    1)Enter the search help name and click on create.
    2)Choose Collective search help radio button option as the search help type.
    3)Enter the search help parameters.
    4)Instead of the selection method, we enter the included
    search helps for the collective search help.
    5)We need to assign parameters for each of the included
    search helps.
    6)Complete the parameter assignment by clicking on the push button
    7)Collective search help offers the user to obtain F4 help
    using any of the included search helps.

  • How to create index for particular table in R3

    Hi
    My load is taking too much time and it leads to process over due error. Does creating indexes on table in r3 side will solve this issue? If so how can we find out on which table does this particular data source depend. I went to maintain extract structure and findout only one table is supplying data for this data source.
    Is there any other factors depend to solve this.
    Thanks
    kk

    Hi,
    it will depend on the table.... Having an index created will speed up the loading but slow down the insert therefore slowing some process perhaps...
    May I ask which table it is? And which fields would you need to index?
    Are you sure that bottleneck is located in R/3? Analyze your loading time in the monitor and see if this is really the case.
    Otherwise you can create index for a table in Tx SE11; first check if an index is not already created...
    hope this helps,
    Olivier.

  • Best IDE and how-to create HTML for a swing Applet

    Can you help me out? I've been using, and teaching with the old Symantec VisualCafe product from long, long, ago. It still works fine & I can even use it to build JFC/Swing Applets etc. But a few things have occurred. For one, a way back, Symantec sold VisualCafe to WEBGAIN - who now has gone out of business and sold it to a company called TOGETHERSOFT - who doesn't support it any longer.
    This isn't really a big deal to me, because I can still build and deploy applets that are pre-swing easily enough. (as can my students)
    HOWEVER... I'd like to be running with the LATEST Java (I think it's 1.4.01) and I'd LIKE to use whatever is the best development environment I can use - especially one I can recommend to my students. Do you know what that should be?
    What's more, I'd still like to take some JFC/Swing created applets (even if compiled with the older VisualCafe IDE) and generate the HTML to allow 1.4 enabled browsers to run them (this is the case for the schools versions of Explorer and Netscape). Now, the HTML I have INSTALLED for the students used the HTML converter - back in 1.2 to produce the HTML at the bottom of this. This code no longer works now with current browsers. Do you know HOW one makes a jfc/swing compiled applet run on the latest browsers?
    Any help or direction you can give would be appreciated.
    thanks,
    Bobby Berns
    [email protected]
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 756 HEIGHT = 396 codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
    <PARAM NAME = CODE VALUE = "lottery.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.2" java_CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 >
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->

    Bobby,
    It's been a while since I've used the HTML Converter, but if I had to guess I'd say you need a newer version than what you have. Also, doesn't the converter allow you to choose which JDK you want to use (in which case you could select 1.4)? Again it's been a while so bear with me. Another option would be to put all the Swing classes into a .jar file (typically called swingall.jar) on your server and include that file as an attribute in your applet tag like this:
    <APPLET CODE="yourApplet.class" ARCHIVE="swingall.jar">
    This way you don't have to use the Java Plug-in, however the initial download time of the .jar file can be significant.
    As for an IDE, I've always been happy using a text editor like UltraEdit. However, I've heard good things about Forte, and hey, it's free!
    Regarding Christina's post, that solution will only work if the Applet does not use Swing components (and Bobby specifically said it does). By using the <OBJECT> and <EMBED> tags, rather than the <APPLET> tag, you force the browser to use the Java Plug-in (rather than the browser's default JVM).
    Hope that helps,
    - Sheepy

  • Edit entity object and use the Create() method for generating ID's

    Hello,
    I have and InserPage.jsp and defined the datasoucre correctly.
    <jbo:InputText datasource="ds" dataitem="Clientid" /> gives me
    the unique ClientID from the FIRST client-record in my table ,
    although this page is for inserting a NEW Client, with a new
    ClientID.
    So, on the Clients Entity i made a create() method and put the
    following code in it:
    public Number getClientid() {
    return (Number)getAttributeInternal(CLIENTID);
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    Integer i=(Integer)seq.getData();
    setClientid(new Number(i.intValue()));
    super.create(attributeList);
    the getData() Returns a sequence value, but what sequence value?
    Do i have to create a sequence on the ClientID column in my
    Oracle Table in the DB too?
    The problem is, the first ClientID # is 819 and the current last
    one seems to be 2899, so how do i achieve that when opening the
    insert.jsp the new ClientID shows up (ie. 2900)?
    How can i achieve this?
    thx

    OK, managed to track down the HowTo on triggers? I created the
    trigger.
    create sequence client_seq
    start with 8900
    increment by 1
    nomaxvalue
    nocycle;
    I changed the create() method for the entity object to:
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    SequenceImpl s = new SequenceImpl("client_seq",
    getDBTransaction());
    Integer next = (Integer)s.getData();
    setClientid(new Number(next.intValue()));
    and running the tester for the module works fine. ;-)
    But...
    The Insert.jsp page has to insert/show this sequenced value!
    After i defined the datasource and let us say:
    <jbo:InputText datasource="ds" dataitem="Clientid" />
    ...the number 819 shows up, which is the FIRST record, so i do
    not get the new ClientID with the correct number.
    Any help is always nice. ;-)

  • How to create procedure for header table and  item table

    Hi,
    Can anyone help me to understand how to write SQLscript procedure for looping item table inside header table?
    I fetch records from sales header table ( order number ) and using that order number to loop sales item table,thereafter I need to perform business logic.
    Any example similar above requirement would be helpful
    thanks
    Sourav

    Hi Folks,
    This is my use case
    1) Select fact records from tables (say A,B,C,D ) with suitable Joins and certain Where conditions
        SELECT ordid FROM TABLES A,B,C,D on join condition where ....
    2) Using above header records , I have to select each and every item level data from different tables ( say X,Y,Z ) and perform calculation to derive new columns to update a new table ( Zreport )
    UPDATE TABLE ZREPORT
    SET col1 = ( Select qty  FROM TABLE X WHERE ordid = A.ordid
    UPDATE TABLE ZREPORT
    SET col2 = ( Select price FROM TABLE y WHERE ordid = B.ordid.
    and so on for other columns..
    3) Zreport table will be used for reporting.
    I would like to know the best way to achieve this to gain performance.
    Appreciate the help!
    Thanks
    Sourav

  • How to create events for Z table ?

    Hi Experts,
        Can anybody tell me how to create an event for Z table. I have a Z table in that a Particular filed is there as BELNR.
    This Table is being getting updated by various application & even with the User-Exits also. I want to sned an e-mail whenver this particular field is getting updated by any program.
    how to do this? which event to be used for a particular field?
    Pl. Help....
    Regards,
    Umesh

    Umesh,
    I hope below method will help solving the requirement:
    -Changes made to the keydocuments are recorded in the change document
    Header table i.e. CDHDR and Item table CDPOS, Additional change
    pointers are written in the BDCP and BDCPS tables. (BDCP and BDCPS in your case)
    -A standard program RBDMIDOC is sechuled to run on periodic basis to
    evaluate the change pointers for a message type and starts the ALE
    process for distributing the Masterdata to the appropriate destination.
    -'Object' is collection of fields of different database tables. T.code
    for creating an object is SCDO.
    Also:
    1. BD61 Active change pointers generally
    - Check the checkbox "Change pointers activated -generally"
    - Save it
    2. BD50 Active change pointers for Message Type
    - Message Type Active
    Thanks,
    Preyansh

  • How to create entity for the table which is not having the primary key

    Hi,
    Is it possible to create an entity for the table which is not having the primary key.
    I have to write a method in my session bean and that method must use this entity.
    any websites for this.

    If you are talking about processes launched from a JVM (running outside), Process is available.
    If you are talking about processes already running outside of a JVM, you could roll-your-own class to provide similar functionality as Process. This approach would be platform dependent, backed by the platform's I/O scripting and therefore limited to what the platform supports for process manipulation, e.g. Linux/Unix capabilities far exceed Windows.

  • How to create UI for detail table in BP-form

    Hi!
    It is necessary to store some data in the detail table for OCRD. How I can create the UI for such table (like Contact Person in BPMD form)? I can create matrix, but how to force SBO to process my table just as OCPR.
    SBO2004
    Sry for english
    Thanks

    Have a look at all the e-learning material
    e-learning material

  • What is context objects and how we can use it Receiver Determination

    hi,
    i have situation here a idoc is triggered into the xi and i need to use the conditions in the receiverdetermination in that condition i need to use  context object how i can use it? and what is the difference it makes and why i need to use it?
    thanks in advance
    Amaresh

    HI,
    Context objects are alternative to XPATH expressions. It is like macros in other programming langugage. If you define this , you can use this object in the receiver determination while doing conditional receiver determination
    For more-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Regards,
    Moorthy

  • What are the steps and how to run payroll for a person?

    Hi all,
    I have hired a person.  Hired with begda 01/01/2009.
    I have assigned the person to 0001, 0002, 0006, 0008.
    For this person how can I run payroll?
    Help me with the steps from begin of employee hiring to the employee payroll run.
    So that I can check the hired person payroll results in pc_payresult tcode.
    Thanks,
    Venkata

    Hi,
    Please check
    http://help.sap.com/saphelp_47x200/helpdata/en/69/317235acfa2b5ee10000009b38f839/frameset.htm
    Regards,
    Param

  • How to create statistics for a table, How to analyse statistics ?

    Hi Gurus,
    Can someone throw some light on the subject pls?[b]

    Did you have a look to the Database Performance Tuning Guide and Reference:
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/stats.htm#13547

Maybe you are looking for

  • Stock not getting updated after confirmation of order

    dear all In our scenario x is final product.x1( semifinished),x2(spare) are dependent materials for final product. x1 has bom r1 and r2 (raw materials).I put all x1,x2,r1,r2 stock available in storage. To get final product , only final assy of above

  • BPEL Console doesn't show any instances created

    Hi, We are using file protocol to read the files from trading partner into B2B. File is successfully processes by B2B. I can see that in reports. Then I have defined a BPEL process to Dequeue the messages from B2B using AQ Adapter, transforms and pla

  • Can't Change Scale in 1 Frame Without Artifacts

    I need to "cut" from a close up to a wide shot in After Effects. So at one frame the scene is scaled to 300% and at the next frame it is scaled to 100%. When I play the rendered avi in Premiere Pro, you can see a jump between frames. This is interlac

  • Parse a XML

    Hello, I'm parsing a xml-like file but I have few problems in using some method; for example: NodeList listOfStates = doc.getElementsByTagName("state"); //I have tags <state attr="value".........>; but what about if I had <State...> or <STATE>???? My

  • Update entity attribute, auto-refresh ViewObject

    Hi, I have an entity Emp and a ViewObject based on this entity with a where clause like "salary > 2000". I update the salary from 1900 to 2100 at entity level, but the viewObject is not "automatically-refreshed". So my Employee with his new salary 21