Code for user authorization

Hello All,
I have to implement a sample code which will filter out activities according to user authorization. Please help me in this regard.
Thanks in advance.
Paul.

Hi,See the below code and write as per your need.
INITIALIZATION.
  AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW'
           ID 'TCD' FIELD SY-TCODE
           ID 'BUKRS' DUMMY
           ID 'PRCTR' DUMMY
           ID 'SPART' DUMMY
           ID 'WERKS' DUMMY
           ID 'VKORG' DUMMY
           ID 'EKORG' DUMMY.
  IF SY-SUBRC NE 0.
    MESSAGE I000(VZ) WITH TEXT-002 SY-TCODE .
    LEAVE PROGRAM.
  ENDIF.
Regards
rajendra

Similar Messages

  • Where do I get all SAP WM transaction codes for user acceptance test ?

    Hello experts,
    Where do I get all SAP WM transaction codes for user acceptance test during cutover activities?
    I need the list of transactions.
    Thanks in advance

    Hi,
    You can download through Solution Manager also. If ASAP is installed in your computer, you can download all the standard transactions, otherwise let me know your id, i will send it to you.
    Aktar

  • Code for user-exits

    hey guys i want the code for user-exits for  inclusion of Excise Chapter ID mandatory in PO .....
    regards,
    Naveen

    which user exit u are using ?
    check the BADI for the same .
    SE15->Enhancements->BADI--->definations -
    >search on Package = ME.
    and see BADI definition called Process _cust.
    Regards
    Peram

  • How to config CDM for user Authorization

    Hi Sir,
    Can you tell me how to config CDM 4630 for user authorization with different privilege by using radius server
    Regards

    Here is a link on configuring user authentication on acns.
    http://www.cisco.com/en/US/products/sw/conntsw/ps491/products_configuration_guide_chapter09186a008008123f.html
    Not sure if there is one available for authorization too.

  • Authorisation roles and transaction codes for users(MTO--PPmodule)

    Hi !!!
    GURUS !!!!!!!!
    I am working here on live project for  make to order scenario.
    We are using only batch management.
    Could you give me transaction codes for users for authorisation roles.
    All codes from start to end scenario.
    Regards,
    Nitin

    Dear,
    You have to do the JRM - Job role mapping. The list of transactions cannot be decided commonly across all implementations, as per your Business process definition you have to list the transactions invovlved and which business roles are required for that.
    One example: PP_Planner is a Role, this is applicable for the planning person, he will be given transactions related to SOP, DM and MRP, he will not be given transactions related to SFC. Its vice versa for a operations person.
    Thanks & Regards,
    Vijaya Bhaskar A

  • Dummy code for user exit in COPA

    Hi,
    Can anybody provide me with a dummy code for the above, the requirement is as under ;
    While running profitability analysis report the system is valuating production and material cost even
    against sales order which are purely rate variation debit notes. The valuation for production and material
    cost in such cases should be nil.The rate variation sales orders have document type either as VI or VH
    For this the relevant user exit is  COPA0002 and the component is "EXIT_SAPLKEAB_004". What
    source code do we have to write in the user exit to fulfill the above requirement and how do we activate
    it?
    Regards
    Milind Nair

    User Exit is EXIT_SAPMV45A_005. Go to CMod, create a new project , under enhancement give V45A0004. In ZXVVAU11 ,
    data: WA_VBAP TYPE VBAP,
    lv_matnr type matnr,
          lv_matnr1 type matnr.
    sort t_vbap by matnr.
    IF  sy-tcode = 'VA01'
    AND ( sy-ucomm = 'SICH' ) .
    loop at t_vbap INTO WA_VBAP.
        lv_matnr = t_vbap-matnr.
    if lv_matnr = lv_matnr1.
    message 'Material number duplicated ' with type 'E'. (Pass the material number as parameter in message, so user can know which material number got ).
    else.
    continue.
    endif.
        lv_matnr1 =   lv_matnr.
    clear lv_matnr,WA_VBAP.
               endloop.
    endif.
    Message was edited by:
            DEBOPRIYO MALLICK

  • Code for user-exit in VA01

    Hi all!
    I need help regarding coding for the following:
    While creating sales order if the user repeates the same material no. again the system should give a warning. The warning should get triggered when user enters material no. , quantity and  presses ENTER button . 
    Please tell me how to write the code for the same.
    Thanks in advance.
    Regards,
    Pallavi.

    User Exit is EXIT_SAPMV45A_005. Go to CMod, create a new project , under enhancement give V45A0004. In ZXVVAU11 ,
    data: WA_VBAP TYPE VBAP,
    lv_matnr type matnr,
          lv_matnr1 type matnr.
    sort t_vbap by matnr.
    IF  sy-tcode = 'VA01'
    AND ( sy-ucomm = 'SICH' ) .
    loop at t_vbap INTO WA_VBAP.
        lv_matnr = t_vbap-matnr.
    if lv_matnr = lv_matnr1.
    message 'Material number duplicated ' with type 'E'. (Pass the material number as parameter in message, so user can know which material number got ).
    else.
    continue.
    endif.
        lv_matnr1 =   lv_matnr.
    clear lv_matnr,WA_VBAP.
               endloop.
    endif.
    Message was edited by:
            DEBOPRIYO MALLICK

  • Hi is there any code for user exits in bw

    can you help me out with user exits in bw reporting pls
    http://abapcode.blogspot.com

    Hi Amit,
      i have good document for user exits in bw. pls send me ur email i will send the document.
    hope that will help you to resolve.
    <b>Reward pts if found usefull:)</b>
    Regards
    Sathish

  • T code is not showing up in list of Executable T code for User.

    Friends,
    Role with the ZFITIC_P2P tcode has been assigned to user.
    But still user is getting the error message : " No authorization to exucute ZFITIC_P2P  Transaction code"
    Action Taken :
    Run PFUD job again.
    Refresh the user's buffer.
    Ran the User Compar for the Role also.
    Still if I go to SUIM ->> Transactions -> Executable by User -> List of T codes does not show ZFTIC_P2P Transaction.
    Any suggestions...
    Thanks,
    Pranav

    In addition to the transport order where the single role might be in a different composite, you should consider that changing the menu after having previously created a transport request will not add the new generated profile data to the TP request at the time when you release the transport - but it will add the menu items.
    Please take a read through this thread: T-code PFCG and CTS
    Did you make any further changes before releasing the transports?
    It is best to only create a transport when you are ready and release them without delay to to tested. If you are brave then you can regenerate in the target system, but you should ensure that your SU24 data is identical and the role was intact: only "old" authorizations and nothing new was introduced or deleted.
    Cheers,
    Julius

  • T code for User exits.

    hai all MM gurus,
    How to find out the user exits for any Tcodes or for any documents?.

    for this there is a user written program called "zuserexit" which will be available. Run the program & give Tcode as input u ll get all exits for that.
    http://www.sap-img.com/ab038.htm
    Finding the user-exits of a SAP transaction code
    Finding the user-exits of a SAP transaction code
    Enter the transaction code in which you are looking for the user-exit
    and it will list you the list of user-exits in the transaction code.
    Also a drill down is possible which will help you to branch to SMOD.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                 http://www.sap-img.com
    report zuserexit no standard page heading.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
             tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
       select single * from tadir where pgmid = 'R3TR'
                        and object = 'PROG'
                        and obj_name = tstc-pgmna.
       move : tadir-devclass to v_devclass.
          if sy-subrc ne 0.
             select single * from trdir where name = tstc-pgmna.
             if trdir-subc eq 'F'.
                select single * from tfdir where pname = tstc-pgmna.
                select single * from enlfdir where funcname =
                tfdir-funcname.
                select single * from tadir where pgmid = 'R3TR'
                                   and object = 'FUGR'
                                   and obj_name eq enlfdir-area.
                move : tadir-devclass to v_devclass.
              endif.
           endif.
           select * from tadir into table jtab
                         where pgmid = 'R3TR'
                           and object = 'SMOD'
                           and devclass = v_devclass.
            select single * from tstct where sprsl eq sy-langu and
                                             tcode eq p_tcode.
            format color col_positive intensified off.
            write:/(19) 'Transaction Code - ',
                 20(20) p_tcode,
                 45(50) tstct-ttext.
                        skip.
            if not jtab[] is initial.
               write:/(95) sy-uline.
               format color col_heading intensified on.
               write:/1 sy-vline,
                      2 'Exit Name',
                     21 sy-vline ,
                     22 'Description',
                     95 sy-vline.
               write:/(95) sy-uline.
               loop at jtab.
                  select single * from modsapt
                         where sprsl = sy-langu and
                                name = jtab-obj_name.
                       format color col_normal intensified off.
                       write:/1 sy-vline,
                              2 jtab-obj_name hotspot on,
                             21 sy-vline ,
                             22 modsapt-modtext,
                             95 sy-vline.
               endloop.
               write:/(95) sy-uline.
               describe table jtab.
               skip.
               format color col_total intensified on.
               write:/ 'No of Exits:' , sy-tfill.
            else.
               format color col_negative intensified on.
               write:/(95) 'No User Exit exists'.
            endif.
          else.
              format color col_negative intensified on.
              write:/(95) 'Transaction Code Does Not Exist'.
          endif.
    at line-selection.
       get cursor field field1.
       check field1(4) eq 'JTAB'.
       set parameter id 'MON' field sy-lisel+1(10).
       call transaction 'SMOD' and skip first   screen.
    *---End of Program

  • Transaction code for user menu, sap easy access

    Hi system experts!
    Does anybody know which transaction causes the user-specific menu within "SAP easy access" (the welcome screen after login, like /n does) ?
    I need it to be called from a portal iView, so that the usual sapgui-like screen with the user's menu appears in a portal screen, both for SAPGUI for windows and http.
    Trx. S000 or SESSION_MANAGER does not cause the user-specific menu when called from the portal. These work least of all for call via ITS.
    thanks
    Andreas

    hi ,
    The transaction code is SE41.. This is for creating Menus and tool bars.
    you can also try SMEN it will call the user menu as you described in your post.
    Regards,
    Krishna
    Message was edited by: Krishnakumar

  • T codes for user roles

    hi
    can any body help with  T code to create user roles in solution Manager and IMP T codes relating to this
    thanks
    padma

    Tcodes to create Roles in SAP is PFCG ...
    it shd be the same in SOLMAN...
    Sri

  • Table for user authorization roles

    Is there a table I can use to create a list via trxn se16 of all roles assigned to a user? 
    thanks,
    den

    Please see table AGR_USERS.
    Regard,
    Rich Heilman

  • Sample Code for CRM enhancement in BADI

    hi,
      can anybody please give me sample code for BADI for CRM enhancement.
    i have added couple of z field in a extract structure. now i have to write code in BADI to populate those fields.
    please do not send code for user exit.
    Regards
    Subrata

    Hi Aviral,
    Please consider below thread :
    http://scn.sap.com/thread/2069370
    Best regards - Christophe

  • How add Authorization check for user with assigened role for t.code-MIR4

    Hi All,
    Regarding authorization how to check authorizations check for user whith assigned roles for the t.code MIR4  using ABAP.
    In Detail:2)     All users are allowed to go to MIR4(invoice number), But ONLY for users with role: MM_RELEASE_INVOICE can proceed to do the posting.
    suggest me...
    Thanks,
    srii..

    Hi Sri ,
    first u need to find out  in which user rules u are using this object , after that if u want to restrict users then remove create/change values from that object values .
    make use of Tcode SUIM to find out all roles which are using this Object.
    or
    ask ur basis guy to remove authorizations to create/change....
    regards
    Prabhu

Maybe you are looking for

  • Is There a Special USB Flashdrive (or External Drive) or SD Card That Is Seen As An Internal Drive by Windows 7 or 8?

    Hi. Is there a USB flashdrive (or Firewire, Thunderbolt flashdrive or external drive) or SD card that the Windows 7 or Windows 8 64-bit so you could boot into windows without having to partition your Mac's drive? Thank you in advance. Have a great up

  • Annoying Finder window behaviour

    I find the behaviour of the new Finder windows when in cover flow a bit annoying. When I resize the window to see a longer list of the files the cover flow part of the window is resized rather than the list. This is despite the fact that I can increa

  • Importing directly from Dvcam didn't work

    I have a few cameras that go to a switcher, which is plugged into a Sony Dvcam (records to tapes).  I stopped using the tapes a while ago and recorded live to iMovie with Fire wire.  I recently got a new MacBook Pro with Final Cut Pro, so I connected

  • How to set up e-mail account on IPad

    Just got my IPad, how do I set up my e-mail account, so I can send & get mail?

  • Duplicating PDF content on 60 devices

    Help. I’ve searched hard and wide and can’t find a clear definition of what I need. This may have been asked before but perhaps not in terms I understand. For an intensive training course, my company is providing iPads to each student (60 iPads total