Include authority check in PM User exit

Dear all,
Is there any user exit for adding an authority check object in IW31 transaction program?
Kindly advise.
Thanks.

Hi,
There is a Function module AUTHORITY-CHECK to check the authrization, here you can give the trnasaction code as well as the user name .. look at the function module in SE37..
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.
<b>Reward points if useful</b>
Regards
Ashu

Similar Messages

  • ATC not checking code in user exit includes

    Dear Friends,
    I'm not sure if you have faced this issue, but I have not found anyone or any post or any document or any OSS note talking about it.
    I've recently have realized than when using ATC for checking the custom code of an Z include it was finding cero errors when it was actually full of them.
    In fact using code inspector, the errors where found. It was not an issue of using a different variant, this was checked, CI and ATC are using the same,
    The issue itself was clear: When the ATC checks a parent object its checks the code of its includes. If you try to check an include directly with ATC, it is ignored with message "No checks are available for the objects types", giving the chance to "add master program" so it will be checked when the master program is checked with all its includes. Last, ATC neither Code Inspector checks custom code.
    The end result is that when trying to check the code in a user exit include with ATC it does not find any error.
    I can think about encapsulating the code found in a user exits but this is a titanic task.
    The main problem is that the jobs for getting in CCLM the quality required massive ATC runs that will not catch the errors in these kind of objects.
    Have you face this issue? do you have any recommendation?
    I would like your opinion before raising this as customer message, as from my point of this this may require a SAP correction.
    Thanks
    Aubin

    Hello Aubin,
    to be perfectely honest I have not started with the indeep analysis yet. One reason is that the behaviour regarding exit techniques has got improoved recently so it is important to do the analysis on a SP level close / identical to yours.
    If I am not mistaken CMOD function exits yield into 2 TADIR keys:
    - 'R3TR' 'FUGX' .... - referring to the definition of the function group - typically provided by SAP - residing in a SAP package
    - 'R3TR' 'FUGS' .... - referring to the implementation - typically custom code - residing in a Z-Package
    My initial assumpution was that mapping partobjects always return FUGX but shall return FUGS. And also I was assuming the custom package shall contain the 'FUGS' implementation which shall enable checking out of the box.
    But it seems these assumptions are not valid. I am not sure wether I would be able to analyse this issue this week. In any case I will update this thread as soon as the analysis has been done.
    Best Regards
      Klaus

  • How to open include ZX... of User exit.?

    Hi experts,
    Please help me how to open an include zxvvfu01 of Function module "EXIT_SAPLV60B_001" of  User exit "SDVFX001"
    I want  to change some code in include Zxvvfu01 but I open  transaction SE37 and enter "EXIT_SAPLV60B_001" and then double click on Zxvvfu01 but the message is "Program names ZX... are reserved for includes of exit function groups"
    Thank you so much.
    abaper

    Hi,
    As suggested by expert is absolutly correct.
    Just try t.code cmod -.> project name -> component -> display -> double click on  function exit -> incude -> double click.
    It should work.
    Regards,
    Anand Mehrotra.

  • Authority Check for the User

    Hi,
         In how many ways can we set authorizations? I mean, in how many levels? My requirement is, to check the Authorization for a specific user to see if he is authorized to execute a Specific Z-Transaction (Report) for a specific Plant. How do I do that? I assume I need to code the AUTHORITY-CHECK OBJECT.... in my report. If yes, in which event? Please let me know.
    Thanks and Regards,
    Venkat.

    Hi Venkat,
    You can put in the AUTHORITY-CHECK at a number of points, after initialisation, during selection, prior to output - it depends on what the program is doing and how the rest of it is coded.
    For example, doing a big select and then only outputting based on the authority check may not efficient with large volumes of data.

  • User include structure and routines/program/user exits

    Hello Gurus,
         following is the step for modify the field catalog in material determination .
    Modify the field catalog (OV26)
    1.     Add the new field to the user include structure:
    o     Header data KOMKDZ
    o     Item data KOMPDZ.
    2.     Add coding to the routines for assigning values to the new fields in order processing in program MV45AFZA. Use user exits:
    o     USEREXIT_MOVE_FIELD_TO_KOMKD (header fields)
    o     USEREXIT_MOVE_FIELD_TO_KOMPD (item fields)
    3.     Add the new field to the field catalog (Customizing activity Basic Functions &#61614; Material Determination &#61614; Maintain prerequisites for material determination &#61614; Maintain field catalog).
    Will you please tell me what the step 1 and step 2 mean ?  and what 's the user include structure and USEREXIT_MOVE_FIELD_TO_KOMKD/USEREXIT_MOVE_FIELD_TO_KOMPD and program MV45AFZA ?
    thanks very much!

    Hi,
    KOMKD is cummunication header and KOMPD is communication item which are actually contained in KOMGD structure. So automatically when you add a field to either of header or item it becomes a part of KOMGD. And moreover KOMGD contains all the fields of KOMKD and KOMPD which are required for materail determination.
    USEREXIT_MOVE_FIELD_TO_KOMKD
    Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination" .
    USEREXIT_MOVE_FIELD_TO_KOMPD
    Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination ".
    regards
    sadhu kishore

  • Tcode for see AUTHORITY-CHECK asignement for User ?

    Hi everybody
    1. Does somebody knows a TCode for see an Authorization Object directly, that is i know to see them using SU21, then selecting an Authorization Class and then i see the corresponding Auth.Objetcs.  But, is there a Tcode for see the Auth.Objects without see first the Auth.Classes ?
    2, Is there a Tcode for see the Auth.Objects and values assigned for a user , that is, a Tcode for evaluate if an AUTHORITY-CHECK is going to be passed by an specific user-object-activity ?
    For example, i have the Auth.Object  'M_MATE_WRK' wich uses the Plant (WERKS) object.  Is there a Tcode wich allow me to know if a user has asigned this Auth.Object for specified Plant (WERKS) Value, and wich activities does the user has permited ?
    Thanks..
    Frank

    Hello Frank
    Call transaction <b>SUIM</b> (User Information System) and check the available reports there. I am sure you will find a report fulfilling your requirement.
    Regards
      Uwe

  • Include or sub-routine in user-exit

    Hi all,
    i want to put  a sub-routine in my customer user-exit (CMOD).but i can not put the subroutine.
    can i put a subroutine or include statement in a user exit?
    correct answers will be rewarded.
    Thanks
    pabi

    You can make subroutine calls inside a User exit, only if the exit is part of a function pool. All the subroutines can be placed in an include in the function pool & can be called with a Perform Statement from the User Exit.
    ~Suresh

  • User exit to modify likp-vsbed  during the creation of the delivery

    Hi ,
    I need to find an exit to modify LIKP-VSBED while I am trying to create a delivery(VL01N) from a sales order . I did not find any exits . Also when I referred to the OSS notes , I found this note elevant 396378 .  From the note I guess it is not possible to modify the above said field .
    Can anyone help me out with this .
    Regards ,
    Varun .
    Message was edited by:
            varun sonu

    Hi,
    In the include MV50AFZ1 check the following user exit
          FORM USEREXIT_MOVE_FIELD_TO_LIKP                              *
          This userexit can be used to move some fields into the        *
          delivery header workaerea LIKP.                               *
          This form is called, when a header is created                 *
          This form is called at the end of form LIKP_FUELLEN.          *
    FORM USEREXIT_MOVE_FIELD_TO_LIKP.
    Thanks,
    Naren

  • User exit in MV45AFZB include

    Hi experts,
    I got a requirement like this .
    To develop user exit to check if the sales order item is within warranty or not,
    And then display a message for user action.
    Background information and requirement:
    When a lift is installed, the Warranty Period is stored in the material master characteristic. If there is a replacement, then the SAP Notification will trigger a Sales Order where the user will create the sale item. During this item creation, a user exit is required to check whether this new replacement should be covered by an existing sales order item warranty (i.e whether the same part has been replaced before and within the warranty period), and the search is by the sales code (ie. The sale order item eg.DEIN material), equipment number ( as represented by the Equipment number in the technical object section in the Sales order header) and subcode (as defined in the characteristic of the item) combination. If an existing item is found and the warranty is still valid (ie.Today -  Sales Order items’s Service Rendered Date(that is manually entered by user)< Warranty Period), Then the system should display a message indicating that the sales order item should be crated in service order instead. Otherwise, prompt a message indicating that the user can continue to create the sales order item.
    Basic Logic:
    User Exit 1:
    USEREXIT_MOVE_FIELD_TO _VBKD
    1. Develop this user exit to get the Equipment Number from the Notification. The Notification number is retrieved from the Sales Order document flow.
    2. Assign the Equipment number to the Sales Order Item’s Technical Information Equipment number field.
    User Exit 2: USEREXIT_CHECK_ABAP
    After user enters Sales Order Item, It triggers the user exit USEREXIT_CHECK_ABAP that the performs the following actions.
    1. Get the current characteristic, Subcode, value, possibly using USEREXIT_GET_FIELD_FROM _SDCOM.
    2. Using the same material number, retrieve the characteristic Warranty Period in the material master classification.
    3. Using current sales order item material number and Equipment Number, get all sales order tiem in VBAP and VERIS02 where VBAP-MATNR = material number (which will retrieve the historical sales with same sales code) and EQUINO = Equipment Number.
    4. Sort list found by Sales order item’s Service Rendered Date in descending order.
    5. Repeat through this list of items until same Sub code is found.
    · Get item characteristic Subcode.
    · If Subcode = current Subcode and Today <(Service Rendered Date + Warranty Period)
    o “part is within warranty. Sales order: NNNNNN. Please create this item in Service Order as non-chargeable.
    I got these USEREXITS in MV45AFZB and MV45AFZZ includes.
    Can any one tell me what is the purpose of USEREXIT_MOVE_FIELD_TO_VBKD in MV45AFZB include
    and USEREXIT_CHECK_VBAP in MV45AFZZ include? . 
    If i write code in above includes is it work out? OR is there any other way to achieve above requirement?
    Can any one tell me Step by step process to achieve this.
    Iam new to USEREXITs.
    Points guaranteed
    cheers
    kaki

    1. You have to get a key from SAP to modify the two includes in which the user exits are present.
    2. You have to enter statement 'INCLUDE z**. ' in both user exits in the MV45* includes. Then save and activate the MV45** includes.
    3. You have to figure out the code that carries out the functionality described in your specifications.
    3. Write the code in includes Z** .
    4. Now the code written by you will be executed when you run the relevant SD transaction
    Message was edited by: Sudhir Bhate

  • User exit to check the consistency of filled fields before saving

    Hi,
    I am looking for a User Exit which can be executed when a user click on "Save" button.
    In this User Exit, I would like to implement some controls to check the consistency of filled fields.
    I have an example to better understand : I work on transaction code ME11 and ME12 (create and modify Info Record). When all mandatory fields are filled, the user can save its. When the user click on "Save" button, I want that a checking (with a user exit, or anything else) verify the consistency of some fields (for example, the consistency between the Tax code of the country and the country of the supplier).
    If it's not clear, I could precise...
    Thanks in advance for you help...

    Hi,
    I am looking for a User Exit which can be executed when a user click on "Save" button.
    In this User Exit, I would like to implement some controls to check the consistency of filled fields.
    I have an example to better understand : I work on transaction code ME11 and ME12 (create and modify Info Record). When all mandatory fields are filled, the user can save its. When the user click on "Save" button, I want that a checking (with a user exit, or anything else) verify the consistency of some fields (for example, the consistency between the Tax code of the country and the country of the supplier).
    If it's not clear, I could precise...
    Thanks in advance for you help...

  • Execute Authority Check With an different User then the logged on one

    Hello,
    is there any possibilty to make the command "AUTHORITY-CHECK" with another user then the user which is actually logged in into the system.
    For Example: my Username "USER1".
    Login with user "USER1".
    Run ABAP Pogramm to check if user "USER2" has the autority for an auth. object per command "AUTHORITY-CHECK".
    Thanks for all Ideas.
    Best Regards
    Marcus

    Try the FM AUTHORITY_CHECK!
    Cheers,
    Ramki.

  • User role and Authority-check ?

    Hello,
    Could you please let me know how are the differences between User role and Authority-check. In a program I do not use Authority-check , And The user is not assigned to user role which contain this transaction ( for this program), Can the user execute this transaction OR he must be assigned to user role which contain this transaction to execute it . Supposing that we do not use any Authority-check in then program.
    Thanks in advance

    Hello Martin,
    I think this answers the OP's question about user not being assigned the role which contains the trxn code. As you have explained in this case the default auth. check for S_TCODE will fail & user cannot execute the trxv. (If i remember correctly the tables for this are AGR_USERS & AGR_TCODES)
    Anyways just to add to the OP's query. Auth. objects are added to profiles which in turn assigned to roles. So if you implement the auth. object in your program the user must also subscribe to the role containing the auth. obj. profile to be able to execute it.
    @OP:
    The transactions PFCG & SUIM might interest you. Also the tables dealing with these stuffs begin with AGR*. You can check the tables for better understanding.
    BR,
    Suhas

  • Error for customer specific Authorization check (User Exit)

    Dear Experts,
    I am facing a problem in PM.
    I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
    I have released the order and got the inspection lot number.
    While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
    "Error for customer specific Authorization check (User Exit)"
    Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
    If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
    I have checked the following user exits:
    QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
    QQMA0026: PM/SM: Auth. check when accessing notification transaction.
    The above 2 User Exits are not active.
    I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
    Please some one help me on this issue.
    Thanks and Regards,
    Praveen.

    Dear Pete,
    I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
    Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
    At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
    Regards,
    Praveen

  • User exit in availability check of Sales Order

    Hi,
    Our requirement is to exclude a storage location for availability check. Certain user exits are listed under programs FV45VFZZ / FV45VFZY / RV03VFZZ. Can any of them be used to block a storage location. If so what is the code to be written.
    Regards,
    KC

    Hello,
    I would suggest you to go for BADI's.
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    Regs,
    Venkat Ramanan N

  • User exit for checking the vendor emailid in me22n or me21n

    hi all,
         can anybody suggest me a user exit for checking the email id of the vendor in me21n or me22n or me29n.
       plz suggest me a solution its urgent.

    hi yaan,
           i checked with the user exit that u suggested me, it is getting triggered, i am able to check whether the vendor email id is present or not, but this is happening all the time that is even when the user dont want to send a email to the vendor i.e. he just wants to print the purchase order, even at that time this user exit is getting triggered and giving a message that the vendor email id is not maintained.
      the reson why this is happening is there is no import parameter to this user exit which gives the "medium of data transfer"  the user has entered. if i get this parameter visible inside the user exit, then i can check this parameter inside the user exit and do the required operation.   i checked up with all the user exits in "me" package and even the other related packages but none of them is getting triggered,
      do u know a user exit or badi which imports this parameter and also gets triggered at the time of creation of purchase order.
      plz give me a solution.
    regards,
    santosh.

Maybe you are looking for

  • Itunes says ipod touch has the latets version but i know it doesnt

    Itunes says my ipod touch has the latest software version 4.3.2 when i know it doesnt as latest version is 4.3.3. how can i update it?

  • [JS] How do you set change GREP preferences to a custom color swatch?

    Hi All I am having difficulty with setting the 'changeGrepPreferences' to a specific color swatch in an InDesign CS3 document. The code below is meant to search within text styled with the Character Style "Hyperlink" and change any spaces (which impo

  • "There are no playable episodes for Alteration"

    iTunes doesn't seem to be able to pull a podcast that I want to upload. I have the blog setup, I have a feed, and I have a file but I keep getting this message when I try to download the podcast from iTunes: "The URL might point to text-only episodes

  • Flash & https: Security Warning

    Hi, We are implementing a small flash site. This flash site is placed on a secure server environment (HTTPS) when the site is launched it shows up a security warning message saying "This webpage contains content that will not be delivered using secur

  • Using Muse for professional designing?

    hi everyone i'm new to the web design world, and i've came across Muse just this week while browsing for web design apps. Seems like its a good place to start. My question is, would it be really 'ok' if someone made website professionally with the he