How to make Authority Check for ALVGrid?!

Hey mates,
i got the problem which is mentioned in the headline. How can i make an authority check for my ALVGrid? I mean i want to restrict special functions to the matching users ( Display, Edit, Delete mode ).
Would be cool if someone can help
Regards Basti

Hello Bastian
A simple approach would be to define three different transactions (e.g. Z_MYALV01, Z_MYALV02, Z_MYALV03) for editing/deleting, editing only and displaying only. Add the following coding to the report displaying your ALV grid:
  CASE syst-tcode.
    WHEN gc_tcode_create.    " 01
      " Allow all grid functions
    WHEN gc_tcode_change.  " 02
      " Suppress grid functions for deleting rows
    WHEN gc_tcode_display.  " 03
      " Suppress grid functions for editing/deleting
    WHEN others.
      RETURN.
   ENDCASE.
Regards
  Uwe

Similar Messages

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

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

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

  • AUTHORITY-CHECK for KUNNR

    Hi,
    I am new in core abap. For my report i have to do AUTHORITY-CHECK for kunnr. I am not finding any suitable object to use. kIndly suggest.
    Currently i am using the following code.
      UNPACK p_kunnr TO ws_werks.
      AUTHORITY-CHECK OBJECT 'M_MSEG_WWE'
               ID 'ACTVT' FIELD '01'
               ID 'WERKS' FIELD ws_werks.
    But this is giving dump in case KUNNR contains some alphabets because of type mismatch. Kindly suggest how can i achieve the same.
    Regards,
    Pankaj Aggarwal

    Don't use a WERKS authorization for KUNNR, did you foresee the problems that may will arise when you will manage the user authorisations and roles, this authorization is checked in many standard programs on WERKS fields.
    - SU20 - Create an authorization field with data element KUNNR and check table KNA1 (or use template KNDNR, look via SE16 at table AUTHX look for authorization fields using KNA1 as a control table)
    - SU21 - Create an authorization object in a Z-customer class which use this field and the ACTVT field (template W_AUFT_RMB)
    - Use the new object in your program
    - Give the object name to those who manage roles via PFCG
    Perform some search on subject like [Creating a Customer-Specific Authorization Object|http://help.sap.com/saphelp_ish471/helpdata/EN/9e/74ba3bd14a6a6ae10000000a114084/frameset.htm]
    Look also at some authorization objects like BRGRU which were intended to manage groups of customers.
    Regards,
    Raymond

  • AUTHORITY-CHECK for an defined USER

    Hi,
    i write a abap (protokol) which shell be started every hour. In this report i will use
    an AUTHORITY-CHECK for an defined user, because i will send the protokol via email, but i have
    to check if this user is allowed to see the data.
    I will use this:
    AUTHORITY-CHECK OBJECT 'F_LFA1_BEK'
    ID 'BRGRU' FIELD '__________'
    ID 'ACTVT' FIELD '__________'.
    for an defined user.
    Is this possible, or how can i check this in another way?
    Thanks.
    Regards, Dieter

    Hi Eric,
    i tried it like this:
    UTHORITY-CHECK OBJECT 'F_LFA1_BEK'
             ID 'BRGRU' FIELD 'KRED'
             ID 'ACTVT' FIELD '03'.
    BREAK-POINT.
    CALL FUNCTION 'AUTHORITY_CHECK'
      EXPORTING
      NEW_BUFFERING             = 3
      USER                      = SY-UNAME
        OBJECT                    = 'F_LFA1_BEK'
        FIELD1                    = 'BRGRU'
        VALUE1                    = 'KRED'
        FIELD2                    = 'ACTVT'
        VALUE2                    = '03'
    EXCEPTIONS
       USER_DONT_EXIST           = 1
       USER_IS_AUTHORIZED        = 2
       USER_NOT_AUTHORIZED       = 3
       USER_IS_LOCKED            = 4
       OTHERS                    = 5.
    BREAK-POINT.
    at first breakt-point sy-subrc = 0 at second sy-subrc = 2. Can you tell why i get another sy-subrc?
    is my FM-Call correct?
    thanks.
    Regards, Dieter

  • Authority Check for a selection condition/Range

    I am relatively new to ABAP and still learning.
    I am trying to create an authorisation check as part of a custom badi implementation.
    i have amended the code, but i am just trying to figure out how to take the selection condition table to get the specific value to check.
    i know the parameter - p_tplnr
    this code is pulled back into the Badi..
    * Import selection result
      IMPORT sel_tab = lt_nodes selcond = t_selcond          
        FROM MEMORY ID 'DIACL_SELECTION_NEW'.
    the table is t_selcond . so i do a loop round table into structure based upon this parameter.
    it could have single or multiple objects, and i am just unsure which object needs to be auth checked....
    my code...
    *--- Defect # 96 - Add Authorisation Check to filter out all Functional Locations.
      DATA: s_selcond TYPE rsparams.
      DATA: tplnr     TYPE diacl_lbk_sel_ds-tplnr.
    *--- Read table where selection name is Functional Location
      LOOP AT t_selcond INTO s_selcond
      WHERE   selname = 'P_TPLNR'.
        IF sy-subrc = 0.
    *--- Check the authorisation object for functional location
          AUTHORITY-CHECK OBJECT 'P_TPLNR'
          ID 'TPLNR' FIELD tplnr
          ID 'ACTVT' FIELD '03'.
        ENDIF.
      ENDLOOP.
    My question is how do i Authority Check the values within s_selcond when it could have single or multiple entries and could have conditions to include/exclude and have selection options?

    Hi ,
    LOOP AT t_selcond INTO s_selcond
      WHERE   selname = 'P_TPLNR'.
    endloop.
    -----------------This code can be replaced by
    READ TABLE T_SELCOND INTO S_SELCOND WITH KEY SELNAME = 'P_TPLNR'. "binary search after sort ..
    CHECK SY-SUBRC EQ 0
    auth-check  object...
    some basic code to get an idea ...
    tables /BIC/SPLANTGRP.
    select-options: so_basin for /bic/splantgrp-/bic/plantgrp no-display.
    so_basin-low = '1'. append so_basin.
    so_basin-low = '2'. append so_basin.
    so_basin-low = '3'. append so_basin.
    so_basin-low = '4'. append so_basin.
    loop at so_basin.
      write:/ so_basin-low.
    endloop.
    read table so_basin with key low = '4'.
    if sy-subrc eq 0 .
      write:/ 'found hit', so_basin-low.
    else.
      write:/ 'found NO hit'.
    endif.
    read table so_basin with key low = '5'.
    if sy-subrc eq 0 .
      write:/ 'found hit', so_basin-low.
    else.
      write:/ 'found NO hit'.
    endif.
    vijay

  • How to create Authority check object

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

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

  • How to create authority check

    how to create authority check and how to apply for kunnr field near at selection-screen for validating this field, i mean is there any tcode for it becoz when i click on pattern button it ask authority check objectname (der r some inbuilt object already existing like s_carrid for airlines)

    You can find out the authority objects from transaction SU21.
    E.g. you can use the object V_KNA1_VKO to check the authority for given Sales Organizations.
    You can find this object under the category SD.
    Regards,
    Naimesh Patel

  • How often does mozilla check for mail?

    I simply want to know how often Mozilla Thunderbird checks for new mail. Can I change this time period to more or less often?

    As often as you tell it to check. Note, some email providers limit the frequency with which one is allowed to check for new mail. An interval of less than 10 min doesn't really make sense.
    Tools (Alt-T) - Account Settings - Server Settings
    Check for new messages every x minutes.

  • Authority-Check for Sales Document Type

    Hi All...
    I would like to incorporate Authority-Chack for the field Sales Document Type "TVAK-AURT"...
    Can any one give me the sample code or exact code..?
    I have written Authority-check for Sales Organization as follows...
    authority-check object 'V_VBAK_VKO'
                     id 'VKORG' field i_sales-vkorg
                     id 'VTWEG' field '00'
                     id 'SPART' field '00'
                     id 'ACTVT' field '03'.
            if sy-subrc ne 0.
            delete i_sales.
    BUT HOW TO WRITE FOR V_VBAK_AAT..??

    Please check object: <b>V_VBAK_AAT</b> for the same.
    EG:
    authority-check object 'V_VBAK_AAT'
    id 'AUART' field L_AUART
    id 'ACTVT' field '03'.
    Kind Regards
    Eswar
    Message was edited by: Eswar Rao  Boddeti

  • How to make a form for input in web interface builder

    Hi expert:
        How to make a form for input in web interface builder?I have already used it to do PS planning, but I don't know how to  draw lines and checkboxes . Thanks in advance.
    Allen

    WAD:
    Open the WAD and create a new template. On the left hand navigation you will have several Web Items available. Under 'Standard' you have 'Analysis' item. Pull that into your template to the right. Under the Properties tab you need to pick the query [form/layout] that you have built in Query Designer.
    You will also find other items such as Button group, Checkbox, drop down, list box etc available. Pick and drag into the template whatever it is you require. Lets say you want a button. Under the Properties tab select the 'Command' that you require. You could use standard commands that are available there. You could also define functions and commands that you require.
    Query Designer:
    Open the QD and drag the characteristics and key figures that you require into the rows and columns of the QD. You would need to specify restrictions under the Filter tab of the QD based on the granularity of data that you require. You would need to remember that the key figures need to be made Input Ready [do this by clicking on KF and on the planning tab select "change by user and planning functions"].
    This shouldgive you a start. After you've explored it yourself a bit we can discuss further and I can certainly provide you additional details/material on these areas.
    Srikant

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

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

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

  • How to make a group for selectd Object javascript

    How to make a group for selectd Object javascript

    There is currently no native way to email groups from iPad.
    The only way to do this is if your recipients are already members a a distribution group controlled elsewhere such as a Google Group or an  Exchange Organisation, then you can email the distribution group address which will then in turn forward to the individual email address of the members.
    Does it have to be email as currently you would have to add each recipient to the email manually.
    iOS to my knowledge doesn't support contact groups in context other than organisation.

  • How to make S-Curve for Primavear P6 by using BI publisher?

    Hi,
    Anyone knows how to make S-Curve for Primavear P6 by using BI publisher? I can display colunm such as planned unit, but not cumulative value. So I can't plot S-curve.
    Thanks
    Wang Xin
    Edited by: 957906 on 09-Sep-2012 03:26

    The problem with the datagridview is that it can only show one table.
    For more tables 3th party datagrid's are better. 
    Although you can start with using the old datagrid. Despite what is written on MSDN is it a complete different control then the datagridview. You can add in to your toolbox by right clicking on it and then add it.
    The datasource of a DataGrid can be a complete dataset which is showed with all its relations.
    Success
    Cor

  • How to make a CheckBox for a report parameter?

    Hi,
    How to make a CheckBox for a report parameter?
    thanx

    design ur parameters forms using forms and call ur report form there

  • How to make a installer for iphone application

    hi, dear all, I have made a iphone application by XCode , it can running perfect on emulator . I want it can be install on real device , how to do it ? how to make a installer for my iphone application ?
    thanks to your response .

    If you go to the iPhone DEV area on Apple.com you can get a installer app once you are a developer. This installer will let you use apps for your own use. This installer app also supports up to X amount of phones you can install the application on. I thought it was set at 100 but could be now up to 500.

Maybe you are looking for

  • Can't drag mail to trash or other files in Mail in OS X 10.6.1

    I just set my Mail up to connect to my company's outlook server. The problem is when i have to drag mail to a folder under the outlook inbox I get "an error occurred while moving messages to mailbox"

  • Export Settings for HERO3 2.7k format

    What is the best option for exporting my video so I can burn it to a DVD. There doesn't seem to be options for my video format.

  • Subtracting DATETIME in OBIEE 11g

    hi Experts, I have a requirement in which it will calculate the total number of days delayed: The scenario is: Planned End Date = 11/11/2012 Actual End Date = 11/15/2012 So the expected output will be = 4. how can I do this aggregation if the Data Ty

  • Ios 6 for ipad

    Ok I have a major question and this bothers me. The ipad 1 came out after the iphone 3gs, Why does the iphone 3gs get ios6 but not ipad1? The ipad 1 can do EVERYTHING the 2 and 3 can do but no camera.

  • Input form

    How can I make the input form empty? Follow the sample I drop the viewobject as input form from data control palette to jsp page. When I run this data-bound page, it always display the last row data in table. How can I make the input empty? because I