Learn how to automate the SAP employee self-services (ESS) portal to update tax records when employees update their home addresses in ESS. Here is a detailed technical solution designed to overcome the tax implications with tax records not maintained correctly with address changes when using a self-service system. Learn some great tips for automating this process.
Key Concept
BSI Tax Locator is an application provided by BSI, an SAP Partner, that provides payroll tax solutions. It validates the resident and work addresses of employees in accordance with the latest postal standards and automates tax assignment for payroll setup, eliminating manual tax look up.
As in many other companies, I had a standard requirement a few years ago from my business users to automate the process of updating residence tax records (infotype 207) when U.S. employees change their addresses in the SAP ERP HCM system’s employee self-services (ESS) portal. I started to do research, as this is a standard scenario and I figured there must be an easy solution. In my search, I learned that this functionality was available in the Internet Transaction Server (ITS) version of ESS but was stripped out of the Java Web Dynpro version. I wanted to understand how this was currently being handled in the back end and approached an Organizational Management (OM)/Personnel Administration (PA) functional colleague to find out. I was told that they used a dynamic action (table view V_T588Z) where the logic is hardcoded (Figure 1). This requires maintenance over time as tax authorities change.

Figure 1
View of table V_T588Z hardcoded logic
I was looking for a simple and dynamic solution that took into account the limitation that dynamic actions cannot be called in ESS. Initially, I was considering several options such as using the ZIP Code table in payroll configuration or creating a custom table. I started to think about how the SAP payroll driver calculates taxes for employees, and I learned about BSI Tax Factory. (Detailed information about BSI and its products and services can be found by following the link.)
Once I learned out more about BSI Tax Factory, I started searching for a solution and came across a forum discussion of BSI Tax Locator, which referenced SAP Note 1022656 and a couple of function modules. This forum and the SAP Note provide information about how to install and configure BSI Tax Locator for the backend PA30 and PA40 transaction codes.
This article assumes that you have reviewed the details and installed BSI Tax Locator for the backend and are now interested in extending the solution for your SAP Portal ESS service. Leveraging my technical background on ABAP and SAP NetWeaver Portal along with my functional expertise, I show you how to leverage the BSI Tax Locator function modules to implement this new solution.
The Existing Process
In the U.S., when employees change their home addresses via the SAP ESS portal, the system updates the address information in the back end in infotype 0006 without updating the tax records (infotype 0207). However, this creates a problem as it is critical that the taxes be deducted (updated) appropriately from the employee payroll tax record. The only way administrators are alerted to this issue is when (and if) employees review their pay statements and realize that their taxes are not being charged properly, or when the payroll team catches it through exception reporting (e.g., ad-hoc reports run manually). This causes problems for both the employee and the employer since the tax records would later have to be updated all the way back retroactively, once the error was discovered.
For example, if an employee is moving from one state (Texas) to another state (Kentucky), he or she logs into the ESS portal (Figure 2) and selects the Addresses and Emergency Contact link to change their address.

Figure 2
Access the ESS portal to change address
The Addresses and Emergency Contact screen opens in Overview mode (Figure 3) which displays the current address details. The employee is shown as being located in Texas.

Figure 3
ESS address service
You click the Edit or New Home address button in Figure 3 to edit or add a new address, which opens the screen in Figure 4. (If you are changing only one field for an employee, say the telephone number, you would use the Edit button to save time re-keying entries. If you are moving to a new address and many of the fields are changing, it’s preferable to use the New Home Address button, created specifically for that purpose.) Enter the new address (in Kentucky) with the new location details and click the Review button, which opens the screen in Figure 5.

Figure 4
Edit the employee’s information to reflect the new location

Figure 5
Check the new information and save it
Review your changes to make sure they’re entered correctly, and click the Save button (Figure 5). You receive a confirmation message showing that the new address has been updated (Figure 6).

Figure 6
ESS address service – Confirmation message
Once the change has been confirmed, the new address information can be viewed in the transaction PA30 address screen (infotype 0006), shown in Figure 7.

Figure 7
Transaction PA30 (infotype 0006)
However, this process does not update the tax records in infotype 0207. The employee’s payroll tax record still reflects the old tax authority (TX), not KY, which causes the taxes to be calculated incorrectly because the payroll system uses the wrong state’s tax code (Figure 8).

Figure 8
Transaction PA30 – Residence tax authority screen (infotype 0207) with the incorrect tax area
The New Process
In this new process, I propose to automatically update the tax records along with the address updates in the SAP ERP HCM system. This eliminates the need for a resource to regularly monitor and manually correct them. This automation comes with a simple logic to read the tax areas from the BSI Tax Locator and update residence tax records (infotype 0207). Using a functional perspective, I provide enough technical details in Table 1 for developers to code.
ESS Service |
Address (infotype 6) |
Country |
US (MOLGA 10) |
Address type |
Home address (subtype 0001) |
Change type |
Edit/New Home Address |
Field |
ZIP Code (PA0006-PSTLZ) |
Business Add-In (BAdI) |
HRPAD00INFTYDB (this is triggered when the address is changed in ESS)
|
Table 1
Technical details required for the customization
If (Current ZIP Code <> New ZIP Code)
Retrieve New Tax Authority
If (Current Tax Authority <> New Tax Authority)
Update 207 with New Tax Authority [Click here for a downloadable version of this code: Code 1.]
|
- Read the current ZIP Code value from the employee home address master data (PA0006-PSTLZ).
- Read the new ZIP Code value from the SAP ESS Address screen. It should be available in the BADI structure (ZHRPAD00INFTYDB) automatically when the address is changed.
- Use the function module to retrieve the new tax authority value. (Please note that I implemented this a few years ago with BSI Tax Locator version 9. Now you may have the new version [version 10], but it should be simple to replace it with a function module for the supported version.)
|
CALL FUNCTION 'HR_TAXLOCATOR_US_90'
EXPORTING
RFC_DESTINATION = 'BSI90-US-TXL'
EMP_INPUT = EMPLOYEE_INPUT
IMPORTING
EMP_OUTPUT = EMPLOYEE_INPUT
TABLES
LOCATION_INPUT = LOCATION_DATA
TAX_OUTPUT = TAX_DATA
MSG_OUTPUT = MESSAGE_DATA
EXCEPTIONS
COMMUNICATION_FAILURE = 1 [Click here for a downloadable version of this code: Code 2.]
|
- Read the current tax authority value from employee residence tax master data (PA0207-TAXAR).
- When a change in the tax authority is identified, call the below function module to update the tax records:
|
CALL FUNCTION 'HR_ECM_INSERT_INFOTYPE'
EXPORTING
PNNNN = IS_P0207
NO_AUTH_CHECK = 'X'
MESSAGE_HANDLER = PERNR_MESSAGE_HANDLER
IMPORTING
IS_OK = IS_OK. [Click here for a downloadable version of this code: Code 3.] |
Table 2
Pseudo-code for the Update DB method
With this enhancement, the Residence Tax Area record (infotype 0207) is automatically updated (Figure 9) with all the tax authorities depending on the new address details entered in ESS. The advantage of using the BSI Tax Locator tool is that it maintains all the applicable tax authorities as it changes without us having to manually maintain it elsewhere.

Figure 9
Transaction PA30 – Residence tax area screen (infotype 0207)
This was enough to fulfill the original requirement, but I also implemented an additional workflow step of informing the payroll team to review the new change and take action for errors. So far I have only discussed how to update residence tax records. However, this method can be very easily extended for updating the work tax area (infotype 0208) in the SAP manager self-services (MSS) portal for Personnel Change Requests (transfer personnel) when managers transfer employee from one location to another location.
Sujatha Vengaiah
Sujatha Vengaiah is an experienced HCM Consultant with over 13 years of SAP experience and more than seven years of SAP ERP HCM experience. She began her career as an ABAP Developer and progressed to lead roles managing several SAP system implementations, including ECC, SRM, SCM, SEM, and HCM. Sujatha is currently the Business Solution Manager for HR Business Function supporting the Operations and Talent Management group for a leading chemical company.
You may contact the author at Sujatha.Vengaiah@celanese.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.