Routine maintenance of Personnel Development (PD) objects can become complicated if one or more of the objects involved has been improperly deleted from R/3 or has become invalid. In some instances, you may be unable to proceed with the maintenance on these objects because of this inconsistent state. This article shows you what report to use to solve the problem.
Routine maintenance of Personnel Development (PD) objects can become complicated if one or more of the objects involved has been improperly deleted from R/3 or has become invalid. In some instances, you may be unable to proceed with the maintenance on these objects because of this inconsistent state.
For example, when you try to delete a relationship between a valid position object and a personnel number that no longer exists in the R/3 database, the process terminates with the error message Personnel number does not exist. What has occurred is that either the source or target object in the table that stores Xobject relationships, HRP1001, still exists as an entry in that table. However, the actual object has already been removed from the R/3 database.
The dilemma you face is that while you are prohibited from deleting this invalid relationship in your object maintenance, you cannot remove the invalid object from R/3 because it no longer exists. This article shows you how to use the report RHCHECKRELATIONS to delete relationships between valid objects and these so-called “ghost” objects.
Using RHCHECKRELATIONS
If invalid position-oriented relationships exist, they are visible through Maintain Position transaction PO13. From PO13, enter the position number that contains the invalid relationship, select the Relationships infotype, and click on the overview icon (or press shift + F8). This takes you to a screen that gives you an overview of relationships, as seen in Figure 1. The invalid object is indicated by question marks where the description (in Figure 1, the name of the person) would normally be.

Figure 1
Overview of object relationships (including invalid object) using transaction PO13
Once you have identified the objects that contain invalid relationships, you can run program RHCHECKRELATIONS to remove the relationships that you were unable to remove through normal object maintenance. The following steps show you how to use this program.
1. Before attempting to remove the invalid relationships, first use transaction PO13 to review the affected positions and identify the invalid relationships that need to be removed. Make note of the object numbers and types that are in question, because you will need to enter them as selection criteria in Step 3.
2. From transaction SA38 or SE38, execute program RHCHECKRELATIONS. SA38 or SE38 are recommended for program execution because there is no standard transaction code assigned to the program RHCHECKRELATIONS in R/3.
3. At the RHCHECKRELATIONS selection screen (Figure 2), enter any appropriate selection parameters (see Table 1 for selection parameter options).

Figure 2
Selection screen for report RHCHECKRELATIONS
Note!
If you enter very broad selection criteria or none at all before executing RHCHECKRELATIONS, the program may take a long time to run. If you want to execute the program without indicating specific selection criteria, you should do it in the background to avoid termination because of excessive runtime.
Plan version: Enter the organizational management plan version you wish
to search. |
|
Object type: Indicate the type of object you wish to search (S = position, C = job, P = person, etc.). |
|
Object ID / Personnel No.: If you know the specific object ID in question, enter it here. If you leave this blank, R/3 searches all objects in the plan version and object type you indicated above. |
|
User name: You may also search for objects created by specific users. |
|
Direct delete (X=yes): If you insert an “X” here before executing the program, R/3 deletes all inconsistent object relationships that meet your selection criteria without displaying them first. If you leave this checkbox blank, you are presented with a list of all inconsistent relationships. Then you are allowed to choose the relationships you wish to delete. |
|
|
Table 1 |
Available selection options for program RHCHECKRELATIONS |
4. When you are ready to execute, click on the execute icon or press the F8 key.
5. If you choose the Direct delete option, the program performs the deletion(s) immediately. If you do not choose to directly delete, you are presented with an output screen of the inconsistent relationship records that match your selection criteria (Figure 3). The output is presented in standard ALV format, so you can choose individual entries to delete, select blocks of entries to delete, or select all entries to delete.

Figure 3
Search results of inconsistent object relationships in program RHCHECKRELATIONS
6. After selecting which entries are to be removed, delete them by using the delete icon or by pressing shift + F12.
Once you have successfully completed running this program, no further steps are required. The invalid object relationships are removed from the database, and they no longer appear in your object maintenance or in table HRP1001.
A.J. Whalen
A.J. Whalen has successfully combined more than two decades of global business expertise with in-depth experience in the strategic development, management, and delivery of large-scale projects and education for SAP ERP HCM. Prior to his current role as SAP Marketing Director at Velocity Technology Solutions, he served as lead consultant for several global SAP implementations and engagements as well as an SAP Conference Producer for Wellesley Information Services. A.J. has been invited to speak at nine annual SAP educational events and holds an MBA degree from the Stern School of Business at New York University.
You may contact the author at whalen.aj@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.