Removal of tcode from role

Hi Experts,
I need to remove tcode from role menu, my requirement is as below
I need to go in a role, search tcode in role menu and if tcode is present in role n times then remove that tcode.
For example tcode SU01 is present in role menu 5 times then I need to remove all these 5 occurenses.
As of now I have developed script using SECATT to remove tcode from role but it is static one,  means I already know that tcode is present 3 times then script will search tcode three times and delete and generate profile and come out.
I want this functionality to be dynamic, i.e. I need to enter tcode only once in data input and then script should remove all occurence of that tcode from role.
Looking forward for expert advice and comments, please let me know if my requirement is not clear.
Thanks,
Ashish Mistry

Hello,
1. Check the data base by writing ABAP Query.
2. Get the length of the received data eg. number of record is present in the data base for your Query.
3. Now you know exact number of T-Code so you can delete them.
Regards,
Bhavesh

Similar Messages

  • Mass deletion of TCode from roles

    Hi
    I would like to remove a certain Tcode from a list of roles. I would not like to do this manually (PFCG'ing every role). Is there another way by which this requirement can be taken care of?
    Can a ABAP program be created for this (thru table AGR_TCODES)
    best regards
    Ravi

    Hi
    From what I understand Tcode removal is a manual process (at the most what one can do is to search through the binoculars in the Menu tab to see if the Tcode is present and then manually scroll down to identify the Tcode and then delete the same)
    How can a CATT script search for a Tcode to be removed?
    best regards
    Ravi

  • Removing single transactions from roles

    I hope this is the right forum... having problems finding a better one.
    Here is my question: If I have a role that includes wide open authorizations (like SAP_ALL) what would be a good way to exclude certain transactions, like SE10 for example?
    Many thanks in advance.
    Edit -- nevermind, found my answer.
    Edited by: MMPP on Jan 29, 2010 5:13 PM
    Edited by: MMPP on Jan 29, 2010 5:13 PM

    I hope this is the right forum... having problems finding a better one.
    Here is my question: If I have a role that includes wide open authorizations (like SAP_ALL) what would be a good way to exclude certain transactions, like SE10 for example?
    Many thanks in advance.
    Edit -- nevermind, found my answer.
    Edited by: MMPP on Jan 29, 2010 5:13 PM
    Edited by: MMPP on Jan 29, 2010 5:13 PM

  • Unable to remove tcode from PFCG

    I deleted the tcode from Menu tab, saved the change. Went to Authorization tab>Change Authorization Data> S_TCODE. The tcode still listed under it.
    I tried again by adding tcode in the Menu and generate the role thru PFCG. I went back again and deleted the tcode from menu, went to Authorization > tabAuthorization tab>Change Authorization Data--> S_TCODE. The tcode still listed under it.
    Can anyone please help me to resolve this ?
    Thank you
    Madhu

    Hi Madhu,
    When you say the tcode is under S_TCODE in Authorization Data do you see 2 instances of S_TCODE?
    As it is possible that someone has previously 'Manually' added the object S_TCODE and manually written the transaction into that object instance, therefore when you delete from the menu it only deletes the S_TCODE entry it knows about, not any manual entries.
    Try removing the tcode from the menu, open change authorization data and try delete the tcode from S_TCODE.
    Generate and all should be well.
    Regards
    Ashley

  • BDC to PFCG (Delete Authority Objects from Roles.)

    When we try to change an authority object it gives an error message saying that 'This authority object is used in roles XXX'.
    To remove Authority Ojects from roles, transaction PFCG is used. But the problem is that BDC is almost impossible to PFCG.
    Is there any way you can suggest us to change an authority object when it is assigned to a role or how we can BDC delete authority object from a role or a function/badi we can call to achieve this.
    This is a very high level question.

    Hi
    U should consider PFCG trx is enjoy trx so it's not suitable for BDC, what doesn't mean you can't do a BDC program for that trx but it won't be easy.
    Anyway you can know the users assigned to certain profile reading table AGR_USERS. I believe PFCG shows them sorted alphabetical, so you can know the position where an user should be, after u should use PAGE UP and PAGE DOWN command to scroll the table control.
    Max

  • PFCG issue - removing transaction codes from menu and not clearing up the authorization tab

    I’m using SAP ERP version ECC6 and EHP5 and also we have updated our system with the PSCD FI module.
    I’m having the following issue in PFCG transaction code - I have created a new single role by copied other or from scratch and added few  transaction codes into the menu.  After that, I went in the authorization tab using the "Change Authorization Data" and I felled all the missing information until the role was green out.  I generated the role then I totally went out.  I come back to the same role that I created earlier and I did removed all the transaction codes from the menu and I did find the following:
    - the Authorization tab light didn't change from green to red
    - I went into the Authorization tab by "Change Authorization Data" and a part of the objects were still in.
    Normally behave should be:
    - when we remove one transaction code from the menu the light from Authorization tab should change from green to red.  When you empty the menu then the light color should change also, but the authorization tab should be also empty.
    Could please give me some idea how to do it next?

    Hi Gabriela,
    Most of the times standard roles contains manually added authorization objects. When ever you are creating a new role by copying the existing standard role so by default, these objects will come in to new role.
    Now, coming to your role. After removing t code from role if nothing has changed in Authorization tab means.
    Here are the possible reasons.
    1.  The t code which you have removed might not have any checked and maintained authorization objects, that's why your Authorization tab still in unchanged.
    2. Rememeber, when ever you are adding or removing t code from menu always use expert mode for profile generation option along with "Read old status and merge with new data" Option.
    This will bring the all checked and maintained data for each t code.
    3. After removing the t codes from menu and if you generate the Authorization tab by using expert mode option still if you find authorization objects means, those are manually added authorization objects that's why those were not removed.
    I hope this will give some clue to your issue.
    Thanks,
    Siva

  • Remove tcodes from profile

    Dear Expert,
    Please let me know how to remove a particular tcode from a profile, like it is easily done from role.
    Sanjay

    Hi
    Hope below example will hep you. how to remove t-code SPRO
    Ex:-
    1. Goto SUIM and select USER node, then select USERS BY COMPLEX SELECTION CRITERIA node then execute BY TRANSACTION AUTHORIZATION report then give the Tran. code and it will return you the number of users having that trans with relevatn details.
    Follows these steps :-
    - Go to SUIM .
    - Choose Roles --> By Transaction assignment.
    - Enter Transaction : "SPRO"
    - Choose execute.
    - Double click on a role in which you want to remove "SPRO" authorisation.
    - Click on pen mark to change into change mode.
    - Go to tab "Authorization"
    - Choose change authorization data.
    - Choose Utilities --> Technical names on .
    - Choose > cross application authorization objects>
    - Expand the selection for Object "s_tcode" , under the corresponding profile look the values maintained for "TCD" and remove value "SPRO" from the list to eliminate the authorization.
    - Don't forget to regenerate profiles.
    2. You should able to find this via menu tab otherwise try to do this in authorization tab --> change authorization data by search.

  • Users are not removed from role using UME API

    Hello,
    I am using this code to remove users from a batch of roles that I have.
    Everything is running OK, no exception is thrown and at the System.out I see all the actions that needs to be taken correctly. The problem is that if I'll go later to one of the roles the users are still assigned to it. Any idea what I'm doing wrong here?
    try
    IRoleFactory roles = UMFactory.getRoleFactory();
    IUserFactory users = UMFactory.getUserFactory();
    IRoleSearchFilter filter = roles.getRoleSearchFilter();
    filter.setUniqueName("<My_filter>", ISearchAttribute.LIKE_OPERATOR, false);
    ISearchResult sresult = roles.searchRoles(filter);
    if ( sresult.getState() == ISearchResult.SEARCH_RESULT_OK )
         while(sresult.hasNext())
         String id = (String)sresult.next();
         IRole role = UMFactory.getRoleFactory().getMutableRole(id);
         Iterator i = role.getUserMembers(false);
         while (i.hasNext())
                         String uid = (String)i.next();
              IUser user = users.getUser(uid);
              role.removeUserMember(user.getUniqueName());
              System.out.println("Removed user: " + user.getUniqueName() + " from role: " + role.getDisplayName());
         role.save();
         role.commit();
    catch (Exception e)
         manager.reportException(new WDNonFatalException(e), false);

    Solved it!
    It needs the FQDN User ID...

  • How to remove the worksets from the Top level navigation for the ESS role.

    Hi All,
    I am working on enabling and disabling certain services in the ESS worksets.
    we are using EP 7.0, ECC 6.0 (NW2004s).
    When I login as a user with ESS role, I can view the changes in the overview pages. However, the worksets are still visible in the TOP Level navigation of th poral. can anyone please explain me how to remove the workset from the Top level navigation.
    Thanks for your help
    Regards
    SM

    Hi,
    Go to the ESS role via Content Admin, then double click the workset (or page or iview) and in the drop down select navigation. Then click the <i>Yes</i> radio button of the "<i>Invisible in Navigation</i>" property.

  • Removal of T.Code from role

    Hi all,
    i have to remove a t.code FBRA from all the plants users, there are 40 single roles, with T.Code FBRA,  how can i remove it at a time, without deleting individually in each roles. Is there any method , plz let me know.
    Thanks & Regards
    Syed..

    Hi Syed,
                 Are you using a role which is created by using the standard role.
                 Copy the role to a new role then delete the transaction from the role
                 and assign the user with the newly created role. I think this would be one of the possible way. After that remove the users from the previous role.
    Please reward points if helpfull.
    Regards,
    Vamshi

  • Remove transaction codes from multiple roles at a time

    Hello,
    how to remove transaction codes from multiple roles at at time?
    Thank you in Advance.

    Hi Vanita,
             Why do you want to remove a t-code from all the roles. Are you no longer going to use the t-code. If this is the case then you can lock the transaction code in T-code SM01 so that no one can use it. But this would effect other users as well, it should only be locked if no one should use the particular T-code.
    Another alternative is to write a program to remove the particular T-Code from the table AGR_TCODES where the relation ship between the role and t-code is stored.
    Thanks.

  • Hyper-v cannot be installed: A hypervisor is already running: VMware Workstation and Hyper-v are not compatible. Remove the Hyper-V role from the system before running Vmware Workstation

    When I try to go to Control Panel\Programs and click on turn windows features on/off and , it shows ticks on hyper-v is removed.
    Hyper-v platform Is grayed out and When i move the mouse point to  Hyper-v platform it shows a message.
    "Hyper-v cannot be installed: A  hypervisor is already running"
    When I try to install vmware it says..
    VMware Workstation and Hyper-v are not compatible. Remove the Hyper-V role from the system before running Vmware Workstation..

    I dont feel you can do this. I have also tried what you tried and ended up with a failure.. So had to stick with vmware in one instance and for other instance hyper v... 
    For further details raise your question here http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverhyperv
    and
    https://communities.vmware.com/community/vmtn/developer/forums
    Good luck.. 

  • How can we call Tcode from the Portal?

    Senario:
    2 BAPI’s are developed:
    1. The information say... ABC is stored into the table from the portal using the Create BAPI.
    2. The change in this ABC information is done using a particular <b>Tcode</b> …say xyz. This is a report that calls the change BAPI inside.
    The ABC information change will be done either through the Tcode in ECC or through the EP.
    3. The Tcode has been created in ECC.
    Please let me know who will be responsible to call this tcode from the Portal and how?
    I am very very new to EP field so please help...

    Hi Jignesh,
    If you have already performed these steps and are able to see the iview that you have created. Then I think your issue has been sorted out.
    To explain it to you in detail.
    Let us suppose, you have created a SAP Transactional iview to access the TCODE-SE38.
    Now, as soon as the user clicks on the iview, it will authenticate by asking for the username and password for the backend system...if your SSO is not in place.
    Now, if your asking me how to make the iview visible.
    You can add assign this SAP transactional iview to a page,a workset or a role and add the corresponding page, workset or role to the user in USER ADMINISTARTION by making it an entry point.
    Or to make the iview as an entry point, right click on the iview that you have created and open the properties, then for the option that says entry point choose yes.
    I guess that answers your question.
    Let me know if you have need any further clarifications on the same.
    Regards,
    Sandeep

  • How to remove Queries in menu roles?

    Hi,
    I am removing unneccessary quries added in menu roles!
    How to remove those queries from the roles?
    Raj

    Hi,
       Open your role in PFCG with edit mode -> you can see list of reports assigned here, right click on delete which is not required.

  • Removing Exchange 2007 from SBS 2008 (In an Exchange 2010 Coexistance Scenario) - In order to remove 2007 Mailbox Objects from Active Directory and remove the SBS2008 server completely

    I'm trying to remove Exchange 2007 from an SBS 2008 server
    (Server 2008 Standard FE).  My ultimate goal is to completely remove the SBS 2008 Server from the network environment.
    We have an Exchange 2010 Coexistence Scenario and Mailboxes/Public Folders/etc have been moved over to the 2010 mail server, on Server 2008 R2.
    I have moved all Shares, FSMO roles, DHCP, DNS, etc over to their respective servers.  We have two full blown DC's in the environment.
    I'm ready to remove Exchange 2007 from SBS 2008 and DCPROMO the server.  I can NOT seem to find a TechNet article that shows me how
    to proceed in this kind of scenario.  I am trying to use the TechNet article:
    http://technet.microsoft.com/en-us/library/dd728003(v=ws.10).aspx
    This article references Disabling Mailboxes, Removing OAB, Removing Public Folder Databases, then uninstalling Exchange using the Setup Wizard. 
    When I go to Disable Mailboxes I get the following error:
    Microsoft Exchange Error
    Action 'Disable' could not be performed on object 'Username (edited)'.
    Username (edited)
    Failed
    Error:
    Object cannot be saved because its ExchangeVersion property is 0.10 (14.0.100.0), which is not supported by the current version 0.1 (8.0.535.0). You will need a later version of Exchange.
    OK
    I really don't see why I need to Disable Mailboxes, Remove OAB and Public Folder Databases since they have been moved to 2010.  I just want
    to remove Exchange 2007 and DCPROMO this server (actually I just want to remove any lingering Exchange AD Objects referring to the SBS 2008 Server, using the easiest and cleanest method possible).
    Can someone point me in the right direction?
    Thanks!

    Hi,
    Based on your description, it seems that you are in a migration process (migrate SBS 2008 to Windows Server
    2008 R2). Now, you want to remove Exchange Server and demote server. If anything I misunderstand, please don’t hesitate to let me know.
    On current situation, please refer to following articles and check if can help you.
    Transition
    from Small Business Server to Standard Windows Server
    Removing SBS 2008 –
    Step 1: Exchange 2007
    Removing SBS 2008 – Step 2:
    ADCS
    Removing
    SBS 2008 – Step 3: remove from domain / DCPROMO
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft
    does not guarantee the accuracy of this information.
    Hope this helps.
    Best regards,
    Justin Gu

Maybe you are looking for