To provide an external table that already contains user-specific data for user or role maintenance, you must implement a class that in turn implements interface IF_PERS_EXTERNAL_TABLE. Class CL_SUPER_PERS_ACCESS, from which all the necessary methods can be inherited (0), can be used to implement the interface. For compatibility reasons you should always derive your implementation from this class. This improves stability if the interface is enhanced.
The methods contained will be described briefly below.
Method USER_COPY | ||
P_USER_SOURCE |
UNAME |
Name of the source user |
P_USER_TARGET |
UNAME |
Name of the target user |
P_PERS_KEY |
SPERS_KEY |
Key for the personalization object |
P_NO_BUFFER |
CHAR1 |
Flag for avoiding buffering |
Method USER_DELETE | ||
P_USER |
UNAME |
Name of the user whose personalization data should be deleted |
P_PERS_KEY |
SPERS_KEY |
Key for the personalization object |
Method USER_RENAME | ||
P_USER_SOURCE |
UNAME |
Old user name |
P_USER_TARGET |
UNAME |
New user name |
P_PERS_KEY |
SPERS_KEY |
Key for the personalization object |
Method USER_COPY | ||
P_UNAME |
UNAME |
Name of the source user |
P_PERS_KEY |
SPERS_KEY |
Key for the personalization object |
P_COMMIT |
CHAR1 |
Flag for buffering: If the flag is 'X', the data is not buffered. |
Dialog, Deleting, Copying and Renaming Roles
The methods for the dialog and for deleting, copying and renaming roles must be implemented in the same way.
Method USER_COPY | ||
P_ROLE_NAME |
AGR_NAME |
Name of the role to be transported |
P_PERS_KEY |
SPERS_KEY |
Key for the personalization object |
P_ORDER |
TRKORR |
Transport request with which the data is transported. |
The dialog method for system data can be implemented analogously to that for users and roles.
Transporting Data to the System
The method for transporting data to the system can be implemented analogously to that for roles.
With this method, all the data is written from the buffer to the database.
The SAVE_BUFFER method should be implemented. The data must be buffered if it is to be integrated in the user or role maintenance.
Deriving your own Interface Implementation
You can implement your own access methods with inheritance.
Class CL_SUPER_PERS_ACCESS can be used here. Only the Constructor needs to be implemented in your own derived class. The names of the table and the field containing the user and role names must be assigned in the Constructor. A header line and an internal table must also be created dynamically for the access.
SAP R/3 Release 4.6C does not yet have a generic method for buffering or a generic dialog. The method for buffering is implemented, but not yet with the full functionality.
This is implemented in example class SPERSD_REUSE_EXTERNAL for table SPERS_FAV.
In the example, the table types for the user-specific and role-specific data is defined and the corresponding buffer tables are created. The names of the table fields that should not be displayed when the generic dialog is used are also specified.