Message type: E = Error
Message class:  HRPAY99_HR_PAYROLL - Messages for the environment of HR_PAYROLL 
Message number: 004
Message text: Not all the copied infotype records belong to one personnel number
Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.
To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.
Unfortunately, there isn't any extra information in this error notice.
First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).
Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.
You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.
The SAP error message HRPAY99_HR_PAYROLL004 indicates that there is an issue with the infotype records being processed in the payroll system. Specifically, the error states that not all the copied infotype records belong to the same personnel number. This typically occurs when you are trying to copy or process infotype records that are associated with different employees or personnel numbers.
Cause: Multiple Personnel Numbers: The most common cause of this error is that the infotype records you are trying to copy or process are linked to different personnel numbers. This can happen if you inadvertently select records from different employees. Data Entry Errors: There may be a mistake in the data entry process where records from different personnel numbers were selected or copied.
Configuration Issues: There could be issues in the configuration of the payroll process that lead to this error when processing infotype records.
Solution: Check Personnel Numbers: Review the infotype records you are trying
 Get instant SAP help. Sign up for our Free Essentials Plan.
Get instant SAP help. Sign up for our Free Essentials Plan. 
HRPAY99_HR_PAYROLL003 The infotype number from the first infotype record is missing
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAY99_HR_PAYROLL002 The personnel number from the first infotype record is missing
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAY99_HR_PAYROLL005 Not all the copied infotype records belong to one infotype number
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
HRPAY99_HR_PAYROLL006 The personnel number is missing
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.