Skip to Content
Author's profile photo Former Member

Restoring a single role out of a multiple role backup file

We have seen situations in different projects where we are supposed to take backup (bulk download) of many roles before a Go-Live of a Project. After Go-Live, if there is a requirement to restore only 1 or 2 roles out of the multiple role backup file, then there will be problem because restoring the backup file will mean restoring all the roles which are there in the backup file. This document is an attempt to help security consultants in solving this problem.

As an example, 10 roles are selected for backup (bulk download), and only one role will be restored out of it.

Role Backup

1. 10 test roles are selected for download. Roles are downloaded through bulk role download of PFCG. Path: PFCG -> Utilities -> Mass Download


2. Save the file on your desktop in XLS format (or XLSX format).

Please note that if in case you are not able to save the file in Excel, or not able to open the excel file properly, or if the number of rows in your download exceeds the limit of xls (or xlsx) file, then break your bulk role download into smaller parts so that you can easily open the excel file. For example if there are 1000 roles, create 4 sets of role downloads of 250 roles each. The number of rows in your role download file should be within the limits of Excel file. The size of your download file depends not only on the number of roles. It depends on how heavy your roles are and also on the number of roles. Based on this you can select your roles per download file.


This will complete the Role Backup process.

Restoration of one Role only (TEST+FI04) out of the 10 roles backup file

1. First create an exact copy of your backup file.


Rename it: “Sample_1_Test_Role_To_Restore.XLS” , because we don’t want to damage the original backup file.

2. Open the copied Excel file (“Sample_1_Test_Role_To_Restore.XLS”). In the Excel File, Select Column A, Go to: Conditional Formatting -> Highlight Cells Rules -> Text that Contains


3. Enter the Role Name: TEST+FI04 and click on “OK”.


4. Filter Column A by colour –“No Fill”.


5. Except for the first 2 rows, select the rest of the rows and delete them. Please do not delete row no. 1 and 2.


6. Click on Save. You will get a pop up message.Click on “Yes”.


7. Close the Excel file. While closing the file you will get a pop up message. Click on “No”.


Now, the file to upload one role “TEST_FI04” is ready.

8. For Role Upload, Go to transaction code PFCG, and choose your excel file for uploading.

Path: PFCG -> Role -> Upload.

Choose your Excel file:  Sample_1_Test_Role_To_Restore.XLS


9. Click on continue (the Green Tick Mark Button) and this will complete your role upload process.


Please note that if the Status is in Red colour then it means the role exists in the SAP system. So, in this case, restoring means taking the role to its previous
state, as it was when the role backup was taken.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo J. Heeck
      J. Heeck

      Nice one. One pitfall here, make sure the codepage for the file download is unicode (I always pick UTF16BE) to preserve all special characters in the role menu elements (transaction descriptions & folder names).

      Also make sure you save the Excel output in a unicode format. So if you get the pop-up shown in 6, you're on a slippery slope as this is not a unicode file format. Save as "unicode text" instead of "Text (Tab delimited)" or you may ruin your menu texts.

      Another warning: if the role is a derived role you'll need to bring along the parent as well and preferably all other roles derived from that same parent to keep the set consistent.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Dear Heeck,

      Thank you very much.

      Actually, I was facing the issues described by you when I was not saving the role download file in Excel. But, when I started saving the download file as XLSX, the issues were gone.

      But, anyways thanks for pointing it out. I will take care of the file format.