Do I need to do authority check for Logical Database?

Hi,
Just to check, do I need to code authority check into a Logical Database or Logical Database will do the check by itself without me coding?
This is because I have a user which does not have rights to infotypes 2000 and above and the logical database still show the user data which belongs to the infotypes 2000 and above.
If I have to code it, how do I go about to do the coding of authority check?
Thanks in advance.  Will reward points for good solutions.
Lawrence

Let me give an example
Tables : pernr.
infotypes: 0000, 0001, 2001.
Get pernr.
Do you mean that the 'get pernr' command will not return any data for users who do not have authorisation for infotype 2001?

Similar Messages

  • How to extend dynamic selection for Logical Database PNPCE

    Hi All,
    I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
    Thanks
    Ranjith

    Hi All,
    I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
    Thanks
    Ranjith

  • Authority-check for a particular company code

    Hi,
       I need to check authorization for a particular company code.In my bdc call transaction program i'm fetching mass data from excel file and for every record i've to check the company code field.If the company code is not the required one then that record should not be processed.
      So before filling the bdc data i wrote like
    LOOP AT gt_inrec INTO gs_inrec.
         AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
                   ID 'ACTVT' field '02'
                   ID 'BUKRS' field '2800'.
        IF NOT sy-subrc = 0.
          MESSAGE e058(zz) WITH gs_inrec-bukrs.
          EXIT.
        ENDIF.
         PERFORM fill_bdc.
      ENDLOOP.
    but it is not exiting for different company codes and is allowing records with all company codes.
    can anybody pls tell me how to rectify this?
    thanks in advance,
    poornima

    I need to perform authority check on the field NAME1 present in the standard screen - customer master ( T.Code-XD02). Only certain users should be allowed to edit the field and others should be restricted.
    I have created a field exit FIELD_EXIT_AD_NAME1 for the ADRC-NAME1 field.
    Now inside this field exit i need to write the authority-check code.
    I have created the authorisation object Z_KNA1_NAM for the field NAME1 using the SU20 and SU21.
    For this scenario how do i write the authority-check code in my field exit?
    Below is my field exit code,is that correct?
    FUNCTION FIELD_EXIT_AD_NAME1.
    ""Local Interface:
    *" IMPORTING
    *" REFERENCE(INPUT)
    *" EXPORTING
    *" REFERENCE(OUTPUT)
    AUTHORITY-CHECK OBJECT 'Z_KNA1_NAM'
    ID 'NAME1' FIELD SY-UNAME
    ID 'ACTVT' FIELD '03'.
    IF SY-SUBRC = 0.
    MESSAGE 'Not Allowed to Edit the Name 1 Field' TYPE 'E'.
    ENDIF.
    ENDFUNCTION.
    In the above code i have given SY-UNAME in the code line 2 - ID 'NAME1' FIELD SY-UNAME ,is that correct? what should i give there?
    Please help me on this issue.
    Cheers,
    P.S.Chitra

  • Need to Create a Check for Plant in WBS & Plant in Network

    Dear Guru's,
    While creating Project (CJ01) my users are creating in a Plant, and while creating network for the same project/WBS, they are using different Plant Code.
    Since my Profit center is related to the plant in CJ01,
    and because of wrong Plant in network, all my PR/ PO is going in a different Profit center, which is creating a huge problem while auditing.
    I need to Create a Check for Plant in WBS & Plant in Network...!!
    Kindly suggest me the ways to do it and how to do it...

    Hi Deepa,
    The Check you are trying to create between Plant defined at Project def and network level that should be same can be achieved through validation at the network level by using a user exit at network level.
                    While creating the network you can change the plant value not equal to the value at proj def/network profile may be one of the reason is since the network type is defined for more than one plant (OPUV).
                    While creating validations at network level we do not have the option of setting the prerequisite/check  using WBS or Proj def fields (i.e. PROJ-, PRPS- fields)    so we need to create a user exit at the network level.
    I am not sure but logically u can have a user exit for both prerequisite and check steps of the validation.
    You need to create the user exit in program ZGGBR000.
    Please take help from your Abaper for the same.
    OPSI-Network header-Validation- Step - Prerequisite u2013 Check u2013 Message.
    Prerequisite
    If Proj Profile = u2018XXXu2019 and Network Profile = u2018XXu2019 (or as per your logic if need be use a exit)
    CHECK.
    PROJ-WERKS = CAUFVD-WERKS   (This logic needs to be defined in user exit and set the same user exit at the check.)
    Once you define the user exit in ZGGBR000, it will be available in the tab u2018exitsu2019 at the Prerequisite and Check levels.
    The name of the form pool (e.g., ZGGBR000) that contains your user exit must be stored in table T80D.
    It is important that you make declare the code generation program for your user exit; how many and what type of parameters you are using for the user exit. You do this by entering your newly defined user exits in the form routine GET_EXIT_TITLES. Found in program ZGGBR000.
    Check with your Abaper to check on all the aboveu2026
    Message:
    Plant at Network level should be same as at Project def level.
    Hope it helps you,All the best..
    Regards
    Vinayak.

  • 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

  • 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

  • Need to do availability check for multiple materials (in bulk)

    HI Friends,
    I need to do availability check for multiple materials. Currently i am using function module AVAILABILITY_CHECK within a loop.For my purpose I could find this particular FM as well as BAPI "BAPI_MATERIAL_AVAILABILITY" however both of this options can not be used for more then one materials at a time.
    I want to take out the loop from the code and get multiple materials be ckecked at once for availability. If AVAILABILTY_CHECK FM can be used for multiple materials, please post the usage.
    Any other options are there?
    Any help or clue would be appreciated.
    Thanks in advance.

    Use the BAPI.  Even if such a function existed, it would still perform the relevant internal logic required for checking by material, so you wouldn't gain anything.

  • 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

  • Regarding Authority check for V_VTTK_SHT  in one exit

    Hi Experts
    1.For VT01N transaction , there is one customer exit : ZXV56U18.
    2.In this  we will get the shipment type value.
    3.I have to check the authority check for this shipment type (SHTYP) field.
    4.I have written the following statement :
       authority-check object 'V_VTTK_SHT'
                      ID 'SHTYP' field    I_XVTTK_TAB-SHTYP
                      ID 'ACTVT' field '07'.
    5. For my user id , i have check the user profile in SU01.
    6.For me this authorization object , field ACTVT does not contain 07 value.
    7.In debugging , the SY-SUBRC  giving the value 0.even the user profile does not contain the value '07' for ACTVT field
    Can u tell y it is happening like that ?
    Regards
    Ramakrishna L.

    Hi Experts
    1.For VT01N transaction , there is one customer exit : ZXV56U18.
    2.In this  we will get the shipment type value.
    3.I have to check the authority check for this shipment type (SHTYP) field.
    4.I have written the following statement :
       authority-check object 'V_VTTK_SHT'
                      ID 'SHTYP' field    I_XVTTK_TAB-SHTYP
                      ID 'ACTVT' field '07'.
    5. For my user id , i have check the user profile in SU01.
    6.For me this authorization object , field ACTVT does not contain 07 value.
    7.In debugging , the SY-SUBRC  giving the value 0.even the user profile does not contain the value '07' for ACTVT field
    Can u tell y it is happening like that ?
    Regards
    Ramakrishna L.

  • Modify selection screen for Logical Database 'SDF'

    Hi
    I need to make a section of the standard selection screen for logical database 'SDF' invisible. I have tried the differet selection screen options of the report attributes, but none of the provided ones give me what I want.
    How can I find the name of the screen group for the "Line Item Selection" block of the selection screen so that I can make it invisible when the selection screen is displayed?
    Thanks,
    Thomas

    I tried to do this:
    Loop at screen.
             if   screen-group4 = '026'
               or screen-group4 = '027'
               or screen-group4 = '028'.
                 screen-invisible = 1.
                 modify screen.
             endif.
    endloop.
    This removed the selection text for these fields, but the Line Item Selection block is still visible, and the actual input fields are also visible. They now look like password input fields with all ***** in them.
    What am I doing wrong?
    Thanks for your help!
    Thomas

  • Post some good examples for logical database

    Hi all,
    Can any one post some good examples for logical database.
    Regards,
    Lisa

    Hi lisa
    Example of a Logical Database
    Let us consider the logical database TEST_LDB.
    Selections in the Selection Include
       SELECT-OPTIONS: SLIFNR   FOR LFA1-LIFNR,
                       SBUKRS   FOR LFB1-BUKRS,
                       SGJAHR   FOR LFC1-GJAHR,
                       SBELNR   FOR BKPF-BELNR.
    Database Program
    DATABASE PROGRAM OF THE LOGICAL DATABASE TEST_LDB
    PROGRAM SAPDBTEST_LDB DEFINING DATABASE TEST_LDB.
    TABLES: LFA1,
            LFB1,
            LFC1,
            BKPF.
    Initialize selection screen (process before PBO)
    FORM INIT.
    ENDFORM.                                "INIT
    PBO of selection screen (always before selection
    screen
    FORM PBO.
    ENDFORM.                                "PBO
    PAI of selection screen (process always after ENTER)
    FORM PAI USING FNAME MARK.
      CASE FNAME.
        WHEN 'SLIFNR'.
        WHEN 'SBUKRS'.
        WHEN 'SGJAHR'.
        WHEN 'SBELNR'.
      ENDCASE.
    ENDFORM.                                "PAI
    Call event GET LFA1
    FORM PUT_LFA1.
      SELECT * FROM LFA1
    WHERE LIFNR IN SLIFNR.
        PUT LFA1.
      ENDSELECT.
    ENDFORM.                                "PUT_LFA1
    Call event GET LFB1
    FORM PUT_LFB1.
      SELECT * FROM LFB1
    WHERE LIFNR = LFA1-LIFNR
    AND BUKRS IN SBULRS.
        PUT LFB1.
      ENDSELECT.
    ENDFORM.                                "PUT_LFB1
    Call event GET LFC1
    FORM PUT_LFC1.
      SELECT * FROM LFC1
    WHERE LIFNR = LFA1-LIFNR
    AND BUKRS = LFB1-BUKRS
    AND GJAHR IN SGJAHR.
        PUT LFC1.
      ENDSELECT.
    ENDFORM.                                "PUT_LFC1
    Call event GET BKPF
    FORM PUT_BKPF.
      SELECT * FROM BKPF
    WHERE BUKRS = LFB1-BUKRS
    AND BELNR IN SBELNR
    AND GJAHR IN SGJAHR.
        PUT BKPF.
    ENDSELECT.
    ENDFORM.                                "PUT_BKPF 
    The PROGRAM statement has the addition DEFINING DATABASE TEST_LDB. This defines the database program as belonging to the logical database TEST_LDB.
    The nodes of the structure are declared with the TABLES statement which generates the appropriate table work areas. You can also use the NODES statement to define database tables as nodes. If a node of a logical database is not a database table, you must use the NODES statement. The interface work areas are shared by the database program and the user, and so act as an interface for passing data. The term "user" here can mean either an executable program to which the logical database is linked, or the function module LDB_PROCESS.
    The subroutines INIT and PBO initialize the selection screen.
    In the PAI subroutine, you can include an authorization check for the user input on the selection screen. Plausibility or value range checks are also possible. If a check fails, you can write an error dialog. The corresponding field on the selection screen is then made ready for input again.
    The PUT_<node> subroutines read the database tables according to the selection criteria entered by the user and trigger the relevant events in the executable program. This program is intended only to show the essential structure of a logical database. It does not contain any refinements to improve response times. The order in which the subroutines are called is determined by the structure of the logical database.
    regards,
    vijay

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • Transporting Views created for Logical Database in QAS

    Hello all,
    Can anybody let me know teh steps...
    How to transport views created for logical database from dev to QAS...
    kindly give the steps...
    thanks
    saurabh

    I don't think PNPCE does anything with HRP infotypes.  PNPCE is all about PA data since PERNR is the main key.  Logical DB PCH is the one that deals with HRP Infotypes.

  • 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.

Maybe you are looking for

  • XMP panels not showing up in CC

    We created custom XMP panels before. I now want them to show up in CC. I can get the tab open to show the file (this happens when I "Get Info" on the InDesign page), but it crashes InDesign and won't show the fields. Do I need to update the Flash fil

  • I WANT TO REMOVE BABYLON SEARCH WHICH APPEARS WHENEVER I START FIREFOX

    In addition to above I wish to inform you that Babylon addon is not available in my computer so that I may remove the same. I suspect some scam as I want Google as my default web browser & I want that whenever I start Firefox I should see startup pag

  • Import PO in Depot

    Hello, We have created the Import PO for Depot, In this case we are using the Inventrising conditions for CVD, ECess, and SECess for Depot and these conditions are defined in Import Pricing procedure ZCV1 IN CVD  ( INVENTRY ) ZECV Ecess on CVD( INVTR

  • Help in wriring an sql

    Hi gurus, just wondering whether this sql works fine. Insert into contact_history@demo (narrative) select substrb(narrative,1,4000) from CONTACT_HISTORY where I in (select i from missing_ivalue) where demo is a dblink for source and the target databa

  • Custom fields in Source of Supply screen - not getting saved

    Hello Experts, There is a requirement to create 2 customizing fields on Souce of Supply (SOS) screen of Shopping Cart in SRM7.0 and has to be updated in the Backend system (PR,PO etc). I have created CUST1 and CUST2 in the standard include - INCL_EEW