Skip to Content
avatar image
Former Member

Is it any way to delete the some Tcode(1000) in one role ?

I tried via Secatt but I am getting below error. I run foreground also but tcodes were not deleted, Can we add any manual comment to insert in the flow ?

xavdj.png (30.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 19, 2018 at 10:39 AM

    try downloading the role, remove agr_tcodes entries in excel then upload. After that go to auth tab in complex mode and reread su24.

    If you need to test then copy role and try with a test

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 23, 2018 at 07:55 AM

    I also thought of another way you can do this depending on how many transactions remain in the role

    1. Build a new role with the transactions you want to keep and save the role (menu only, don't worry about auth tab)

    2. Edit your current role and delete all entries out of it

    3. Copy from menu role and choose the role that you built to import the menu

    4. Save the menu and then go maintain authorisations

    same concept can work if you are copying from a sap menu or multiple roles.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Rajan

      Did you try editing the file in notepad then? You won't lose menu structure

      Out of curiosity, how many transactions are in the role and how many do you need to remove? You can always copy menu from the same role to select just want you want to keep and then delete the old structure

  • Apr 23, 2018 at 07:52 AM

    Step 0 – I have a role and let’s pretend there’s 1000s of transaction codes in the menu

    Step 1 – Download Roles and save as .SAP extension

    Step 2 – go to explorer to right-click and open file in notepad (or copy file first so you have backup to revert changes)

    Step 3 – make sure Format Word Wrap is switched off so you will see all of the table entries on left side: AGR_TCODES is the menu items

    Step 4 – delete entire line for each transaction you want to remove (Find AGR_TCODES to get to the first entry)

    • (a)Delete line entry for AGR_TCODES
    • (b)Delete line entry for AGR_HIER (note ignore the AGR_HIERT entries for descriptions)

    Step 4a – you can copy this into Microsoft Excel if the transactions are not close together. Delete the entries you need in Excel and then copy the data back to notepad before saving. I think the spacing is field length for AGR_TCODES so text to columns might not be a good idea unless you are going to put the padding back in

    In my example, I’ve removed the entry for TRFB00 (transaction FB00)

    Step 5 > Choose Role > Upload > Upload the .SAP file and say yes to overwriting the role

    Step 6 – Role Menu is updated and authorisation tab is in yellow. You now need to go maintain the authorisation tab in PFCG to regenerate the profile but all the transactions you need to remove are now gone

    Step 6b – how to get rid of the AGR_HIERT entries that remained when you deleted AGR_HIER…. Add on item such as a folder to the men then press save. It will clean up the entries. Remove the dummy entry and press save. If you then download the role you will not see the orphan AGR_HIERT entries in the role anymore.

    It still takes a little bit of time to go through and delete each entry but it is faster than pfcg delete one at a time

    Add comment
    10|10000 characters needed characters exceeded