Do you have any question about this error?
Message type: E = Error
Message class: PG - Error Messages for Master Data Programs
Message number: 166
Message text: No company code assigned to employee
The system could not determine the company code from the
organizational unit assigned to the position in Personnel Planning
(infotype 1008) or from the personnel area (T500P). You must assign a
company code to the employee.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Error message extract from SAP system. Copyright SAP SE.
PG166
- No company code assigned to employee ?The SAP error message PG166 "No company code assigned to employee" typically occurs when you are trying to perform an action related to an employee in the Human Capital Management (HCM) module, but the system cannot find a company code associated with that employee. This can happen in various scenarios, such as when creating or modifying employee records, processing payroll, or generating reports.
Cause:
- Missing Company Code Assignment: The employee record does not have a company code assigned in the infotype 0001 (Organizational Assignment).
- Incorrect Data Entry: The employee's organizational assignment may have been entered incorrectly or not at all.
- Data Migration Issues: If data was migrated from another system, the company code might not have been properly assigned during the migration process.
- Employee Status: The employee might be in a status that does not allow for company code assignment (e.g., inactive or terminated).
Solution:
Check Employee Record:
- Go to the employee's master data using transaction code PA30 (Maintain HR Master Data).
- Check infotype 0001 (Organizational Assignment) to ensure that a valid company code is assigned.
Assign Company Code:
- If the company code is missing, you can assign it by editing the infotype 0001. Make sure to enter the correct company code and other relevant details.
Review Data Migration:
- If the issue arose after a data migration, review the migration process to ensure that all necessary data, including company codes, was transferred correctly.
Check Employee Status:
- Ensure that the employee is in an active status. If the employee is inactive or terminated, you may need to reactivate or create a new record.
Consult with HR or IT:
- If you are unsure about making changes or if the issue persists, consult with your HR department or IT support team for further assistance.
Related Information:
By following these steps, you should be able to resolve the PG166 error and ensure that the employee has the correct company code assigned.
Get instant SAP help. Start your 7-day free trial now.
PG165
Person and position have different personnel areas
What causes this issue? The personnel area you have entered does not match the position (infotype 1008).System Response The system issues an error m...
PG164
Person and position have different employee groups/subgroups
What causes this issue? Employee group and subgroup data does not match the data that has been entered for the position (infotype 1013).System Respon...
PG167
Enter a personnel area
What causes this issue? You have not entered a personnel area. The personnel area is a required entry. Note: With active integration with personnel p...
PG168
Could not find Controlling area for company code &
What causes this issue? The system could not find a controlling area for the company code. The system issues an error message and will not allow you ...
Click on this link to search all SAP messages.