Authorization-check and Match code

Hi
How do we declare authorization check?Plase provide me  syntax?
does match code relates to it?
Thanks in advance.

Hi RK,
The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
AUTHORITY – CHECK OBJECT <object name>
              ID <name1> FIELD <f1>
              ID <name2> FIELD <f2>
              IF SY-SUBRC NE 0.
For Matchcode (which is now called Search help) go to the link
http://help.sap.com/saphelp_nw04s/helpdata/en/c9/83eb02be4c11d1950200a0c929b3c3/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ee93446011d189700000e8322d00/content.htm
Reward points if this helps.
Manish

Similar Messages

  • Search help and Match code oject

    How to create the search help in version 5.0 and 6.0 ? what is elementary search help,collective search help? what is the use of these search helps? where we use elementary and collective searsc helps? what is the difference between searc help and match code object? how to use in reports?where we use search help and F4IF_INT_TABLE_VALUE_REQUEST function module? what is the diffference between them?

    Hi Rk,
    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
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    Thanks,
    Reward If Helpful.

  • Diff b/n search help and match code

    hi all,
    can i know the differece between search help and match code object in terms of functionality?
    is there possibility to provide matchcode object for select-options?if yes how can we provide?

    <b>same thread again.</b>
    hi,
    Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.
    Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.
    A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:
    You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.
    You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.
    Search Help
    Use
    With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
    Prerequisites
    You can call this function by:
    · Selecting Object ® Search... () in the main menu bar of the Integration Builder
    · Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
    In this case the software component version is defined as the search criteria.
    Features
    Defining the Object Type
    You can select the object type in a dropdown list in field Object Type.
    In the design (Integration Repository) you can
    · Select an object type (for example Message Interface)
    · Select a cross-object category (for example Interface Objects)
    In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
    CHECK THIS LINK TO CREATE A SEARCH HELP.
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
    CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
    more details...
    Here is the code to attach a search help to a select-options
    SELECT-OPTIONS S_MATNR FOR MARA-MATNR MATCHCODE OBJECT MAT1_A.
    Rgds
    Anver

  • Difference between Search Helps and Match Codes?

    Difference between Search Helps and Match Codes?

    Serch help
    Search Helps
    The input help (F4 help) is a standard function of the R/3 System. The user can display the list of all possible input values for a screen field with the input help. The possible input values can be enhanced with further information. This is meaningful especially when the field requires the input of a formal key.
    Standard Input Help Process
    A user calls an input help with the following steps (some steps can be omitted, depending on the definition of the input help):
    The user starts the input help to display the possible input values for a field (search field) in a screen template.
    The system offers the user a number of possible search paths. The user selects one of these search paths. Each search path offers a number of restrictions to limit the number of possible input values. These values are offered in a Dialog box for value restriction when the search path is selected.
    The user enters restrictions if required and then starts the search.
    The system determines the values that satisfy the entered restrictions (hits) and displays them as a list (hit list).
    The user selects the most suitable line from the hit list by double-clicking.
    The value of the search field is returned to the screen template (possibly together with other values).
    Steps 2 and 3 are omitted if there is only a single search path available. In this case the dialog box for the value selection is offered immediately. You can also output the hit list directly after starting the input help. Steps 2 to 4 are omitted in this case.
    Function of a Search Help
    This standard process can be completely defined by creating a search help in the ABAP Dictionary. This search help only has to be assigned to the screen fields in which they should be available (see Attaching Search Helps to Screen Fields).
    There are two types of search help:
    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).
    Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    See also:
    Example for Search Helps
    Creating Elementary Search Helps
    Creating Collective Search Helps
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Match code
    Match code is nothing but the Search help in Higher versions
    It is same way from SE11 you have to create.
    so from SE11 create it and use it.
    Matchcode objects are being replaced by search helps. This is good as search helps are easy to create. However, it has caused some confusion on how best to add search helps to a selection field.
    The trick that I found is to keep your newly created search helps to a 4-character name. The Matchcode object name has this old 4-character limit. This trick is not documented anywhere in the system but it has been a great time saver for me. You can expand this concept by finding existing SAP search helps that are more than 4-characters, copy them to a 4-character name and presto, you have a new matchcode object available for use
    Check this thread to get detailed info
    Match Code Objects
    Match code
    match code
    match code
    Match code
    http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef46446011d189700000e8322d00/content.htm
    Rewards if useful.................
    Minal
    http://web.mit.edu/sapr3/docs/webdocs/dontindex/pdf/mcqc.pdf

  • HT204406 My iMatch is crashing every time is reaches the end of step #2 - checking all the songs in my iTunes library.  There are 4,389 songs to match, and when it reaches 4,388 songs checked and matched, it crashes and shuts downs iTunes altogether.

    My iMatch is crashing every time is reaches the end of step #2 - checking all the songs in my iTunes library.  There are 4,389 songs to match, and when it reaches 4,388 songs checked and matched, it crashes and shuts downs iTunes altogether.

    hi i had the same problem today when i updated my itunes to latest version. however, i have just found my songs in the 'itunes media' folder. this was accessed through 'my music'  then keep clicking through until you find itunes media and all my library songs were in there and i then just added these files to my library and all were restored however, i have lost all my playlists but at least my 700 songs are back. very dissapointed with apple that they have let this happen with their latest update, the previous version was miles better than this one . hope you find them. stevo

  • Authorization check For T code

    Hi everyone,
    Can anybody guide to set a  authorization check  for a particular Tcode.
    I have ztable where users are assigned particular numbers.
    I want the users who are assigned some numbers should be able to use this particular t code
    Thanks in advance

    hi
    chk this out
    AUTHORITY-CHECK
    Basic form
    AUTHORITY-CHECK OBJECT object
        ID name1  FIELD f1
        ID name2  FIELD f2
        ID name10 FIELD f10.
    Effect
    Explanation of IDs:
    object
    Field which contains the name of the object for which the authorization is to be checked.
    name1 ...
    Fields which contain the names of the
    name10
    authorization fields defined in the object.
    f1 ...
    Fields which contain the values for which the
    f10
    authorization is to be checked.
    AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept).
    You must specify all authorizations for an object and a also a value for each ID (or DUMMY).
    The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.
    If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected.
    If the return code value in SY-SUBRC is 0, the user has the required authorization and may continue.
    The return code value changes according to the different error scenarios. The return code values have the following meaning:
    4
    User has no authorization in the SAP System for such an action. If necessary, change the user master record.
    8
    Too many parameters (fields, values). Maximum allowed is 10.
    12
    Specified object not maintained in the user master record.
    16
    No profile entered in the user master record.
    24
    The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.
    28
    Incorrect structure for user master record.
    32
    Incorrect structure for user master record.
    36
    Incorrect structure for user master record.
    If the return code value is 8 or 24, inform the person responsible for the program. If the return code value is 4, 12, 16 or 24, consult your system administrator if you think you should have the relevant authorization. In the case of errors 28 to 36, contact SAP because authorizations have probably been destroyed.
    Individual authorizations are assigned to users in their respective user profiles, i.e. they are grouped together in profiles which are stored in the user master record.
    Note
    Instead of ID name FIELD f, you can also write ID name DUMMY. This means that no check is performed for the field concerned.
    The check can only be performed on CHAR fields. All other field types result in 'unauthorized'.
    Example
    Check whether the user is authorized for a particular plant. In this case, the following authorization object applies:
    Table OBJ: Definition of authorization object
    M_EINF_WRK
       ACTVT
       WERKS
    Here, M_EINF_WRK is the object name, whilst ACTVT and WERKS are authorization fields. For example, a user with the authorizations
    M_EINF_WRK_BERECH1
       ACTVT 01-03
       WERKS 0001-0003 .
    can display and change plants within the Purchasing and Materials Management areas.
    Such a user would thus pass the checks
    AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
        ID 'WERKS' FIELD '0002'
        ID 'ACTVT' FIELD '02'.
    AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
        ID 'WERKS' DUMMY
        ID 'ACTVT' FIELD '01':
    but would fail the check
    AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
        ID 'WERKS' FIELD '0005'
        ID 'ACTVT' FIELD '04'.
    To suppress unnecessary authorization checks or to carry out checks before the user has entered all the values, use DUMMY - as in this example. You can confirm the authorization later with another AUTHORITY-CHECK

  • Authorization checks and objects

    Do you have a tutorial for this topic for dummies? thanx in advance

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    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.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Thanks
    Seshu

  • CUP - custom field and match code

    Hi,
    is it possible to have a custom field in CUP with a match code to help searching ?
    the only two way that i found are dropdown lists for a table from a backend system and free field ( varchar, date, numeric)
    thanks
    Regards
    Aurelien

    Hi Aurelien,
    You can create custom fields in CUP for the following types.
    1  Text type
    2 Numeric type
    3 Date type
    4 Drop down
       a) drop down data define in CUP
       b) Drop down data coming from backend table.
    If you want a request to be associated with a match code that helps you seaching the request later.
    Than create an text type custom field and use in a workflow.
    While a creating the request define the value of custom field.
    Now you can serch request on the basis of the value define in the custom field.
    Kind Regards,
    Srinivasan

  • Authorization-check in company code for GR55 reports

    Hi to all!
    Created User: ZTESTUSER
    The scenario is this.
    We created a report in GR55(Report Painter) and we want users (ex. ZTESTUSER) to access only company codes 7000 to 7999. How will I be able to do that?
    I am thinking of creating a role or profile then assign it to the user, but I was not be able to locate an authorization object for GR55 reports.
    The authorization object in GR51 is not doing what we want. It only control the create/change/display and execution transactions.
    I tried using validation in GGB0 but I can't find a parameters where the GR55 reports will be checked so the users will be limited by company code.
    Can somebody help me?
    Thanks a lot.

    I programmed a company code check for a report like this.
    ===========================================================
    data: lv_text(4) type c.
      if p_bukrs is not initial.
        select single * from T001
                      where bukrs = p_bukrs.
        if sy-subrc <> 0.
          message e321(FR) with p_bukrs.
        endif.
        AUTHORITY-CHECK OBJECT 'F_SKA1_BUK'
        ID 'BUKRS' field T001-BUKRS
        ID 'ACTVT' field '03'.
        if sy-subrc <> 0.
          clear lv_text.
          lv_text = p_bukrs.
          message e800(FR) with p_bukrs.
        endif.
      endif.
    ============================================================
    but I was not able to do that in GR55 reports because the program is automatically generated by SAP named GPXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

  • Search help and match code

    we have a search help created called z_zvalue(matchcode). we created it for va42. when we were search the contract number using the z_zvalue, able to see the the contracct number, but the contract number is not passing to the va42 contract field. anybody can tell me how can I pass teh value to the vbeln filed in va42. I don't have that much idea about match code

    hi
    can u please explain me the problem clearly and the solution also.
    thanks in advance.

  • Can anybody suggest me how to creat match code id and object

    hi Gurus,
    can any body suggest me how to create match code object and match code id..
    in my program i need specific values in search help..
    to avoid confusion in selecting the values.
    i need only selcted values..
    thanks in advance.
    vijay chavan

    Hi
    In Older SAP versions Match codes are used, now they are replaced by SEARCH HELPs
    there 2 types of search helps
    Elementary and Collective
    see the doc and create accordingly
    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.
    Regards
    Anji

  • What authorizations and transaction codes needed to do transports?

    I would like to find out what authorization objects and transaction codes are needed to perform transports in r/3 v4.6? 
    Are transaction codes SE06, SE09, SE10 or authorization objects S_TRANSPRT, S_CTS_ADMI needed?
    Thanks
    Wade

    Hi,
    Yes you would need the following Tcodes to do the transports. In R3, usually when you create or change, you get prompted for a transport request and then all your changes are captured in there, till such time as you release the request.
    You can create, view and release requests using tcodes SE01, SE09 or SE10.
    You'll need the auth objects you specfied and the activites assoiciated with creating, viewing and carrying out other activites with transports via these autho objects. These need to be assigned to a role and the role assigned to the user.
    Cheers,
    Kedar

  • Transaction code KO88 need to be check at company code leval

    Dear Experts,
    I need maintain authorization check at company code level for the transaction code KO88
    Can you suggest what are the better approaches/solutions to meet this requirement
    Thanks in Advance
    Guru Prasad

    Hi,
    it does not look like you can use standard authorization objects assigned to this transaction. This transaction is from CO module and this module does not use company codes directly. It uses controlling areas instead. You can see it in authorization object K_VRGNG which is checked in KO88.
    It does not look like there is a suitable BADI either. So if you are on Netweaver you can try to use enhancement framework. In program KO71 which corresponds to transaction KO88 is subroutine ACTIVITY_AUTHORITY_CHECK where FM K_VRGNG_AUTHORITY_CHECK is used to check authorization for object K_VRGNG. It looks to me that it's a good point to use implicit enhancement point of this subroutine to add additional authorization check. In your case check for company code attached to internal order. But you need to test it properly and it might work only for this transaction. So if user can start settlement from somewhere else that your additional check might not be performed.
    Cheers.

  • 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

  • How to find which custom program uses authorization checks

    Hi all,
    I have been asked to find out which custom ABAP program in our organization is using Authorizations checks and which is not.
    Since there are thousands of custom programs I will need to automatize this process somehow.  But I am not an ABAP expert and I will need some help.
    Could any of you give me an idea of what would be the best strategy to find out if authorization objects/checks exist in a number of ABAP programs?  (would a simple text search do?).
    Many thanks,
    Aldo

    If you are looking out for Authorization related to Execution of any program, then look for entries in table TRDIR where field SECU (Authorization Group) is not blank.
    Below SAP documentation may help you:
    Authorization Group
    Authorization group to which the program is assigned.
    The assignment of a program to an authorization group plays a role when the system checks whether the user is authorized to:
    Execute a program
    --> Authorization object S_PROGRAM
    Edit a program (-Include) in the ABAP Workbench
    --> Authorization object S_DEVELOP
    Programs that are not assigned to an authorization group are not protected against display and execution.
    Security-related programs should, therefore, always be assigned to an authorization group.
    Report RSCSAUTH can also be used to assign programs to authorization groups. This report is documented in detail.

Maybe you are looking for

  • Adobe PC CC started flickering on Macbook Pro Retina

    Hi, I started noticing flickering on my Macbook Pro Retina on PhotoShop CC. The screen inside the PS work window flickers. I heared there were some reports earlier and were fixed. It seems latest Adobe PS update has caused the issue again. My Macbook

  • File-to-soap synchronous

    Hi I have a scenario where i have to create the file-soap synchronous   how we achieve that 1. Do i have to create the outbound message syn for file venkat

  • What's the maximum ram for G4 1Ghz?

    Can someone please tell me what's the maximum ram I can install in my PowerBook G4.  It currently has 1 Gb Ram. Thank you.

  • Deleting pages in a signed PDF

    How do I delete pages from a digitally signed PDF? I am using Acrobat Pro X. The only option not grayed out on the tools/pages menu is extract. I believe I could do this before the latest Adobe Pro update was pushed to my computer last month.

  • No audio with iSight and Macpro and 10.6.4...

    I'm trying to get this iSight firewire unit to work with my Macpro running 10.6.4 for a skype video conference. I get video in skype but no audio. I've tried searching, but haven't found anything. There is an isight updater, but it doesn't work on 10