Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to update the Inactive status for a Benefit/Deduction in mass in Human Resources


View products that this article applies to.

Symptoms

When you run the HR Reconcile utility for 'Update Benefit Setup' and "Update Benefit Enrollment', the gets created on the HR side even for Benefit and Deduction codes that are Inactive on the Payroll side. If you want to also set them to be inactive on the HR side, the only current functionality is to mark the code inactive in the HR Enrollment window one employee at a time. The 'main' setup for the code does not have an Inactive field that to roll down, so there is not functionality to do this in mass.  How can you also set the Benefit/Deduction codes to be inactive on the HR side all at once?

↑ Back to the top


Cause

Current design to only update one employee/code at a time.

↑ Back to the top


Resolution

To inactivate the benefit and deduction codes in mass, run the below SQL scripts below against the company database in SQL Server Management Studio for the scenario that fits your needs:

*Before running any update script, it is always recommended to make a current backup copy of the company database first!


Scenario 1: DEDUCTIONS ONLY: The first script below will 'find' where the status code on the deduction on the HR side does not match the status code on the same code in the Payroll Deduction Master table, so you can view what codes do not match.  Then run the second script to 'update' the status on the HR side and the End Date, to match the status and End Date as stored on the Payroll side. Run these scripts against the company database to affect deduction codes only:
DEDUCTIONS:
---------------------------------------
Select a.EMPLOYID, a.deducton as 'Deduction', b.inactive as 'HR_Active',
a.inactive as 'Payroll_Active', a.DEDENDDT as 'DED End date'
from UPR00500 a
join BE010130 b
on a.EMPLOYID = b.EMPID_I
and a.DEDUCTON = b.BENEFIT
where a.INACTIVE <> b. inactive
---------------------------------------
update a set a.inactive = b.inactive, a.BNFENDDT = b.DEDENDDT
from BE010130 a
join UPR00500 b
on b.EMPLOYID = a.EMPID_I
and b.DEDUCTON = a.BENEFIT
where b.INACTIVE <> a.INACTIVE
-------------------------------
IMPORTANT NOTE: The benefit and deduction codes may have the same code ID, and are stored in two different tables on the Payroll side (UPR00500 and UPR00600), however, they are stored together as one record in only one table on the HR side (BE010130). So take note what script you ran last as it will overwrite the status and End Date on the record in HR, and will apply to both the benefit and deduction on the HR side. So if you have any instances where the deduction is inactive, but the benefit is active (or visa versa), you will need to pay attention to what script you ran last. It is recommended for these situations to view the code in the front-end and activate back the one needed in the front-end. 



Scenario 2: BENEFITS ONLY:  The first script below will 'find' where the status code on the benefit on the HR side does not match the status code on the same code in the Payroll Benefit Master table, so you can view what codes do not match. Then run the second script to 'update' the status on the HR side and the End Date, to match the status and End Date as stored on the Payroll side. Run these scripts against the company database to affect benefit codes only:
BENEFITS:
---------------------------------------
Select a.EMPLOYID, a.BENEFIT as 'Paycode', b.inactive as 'HR_inactive',
a.inactive as 'Payroll_inactive', a.BNFENDDT as 'BEN End date'
from UPR00600 a
join BE010130 b
on a.EMPLOYID = b.EMPID_I
and a. BENEFIT = b.BENEFIT
where a.INACTIVE <> b. inactive
---------------------------------------
update a set a.inactive = b.inactive, a.BNFENDDT = b.BNFENDDT
from BE010130 a
join UPR00600 b
on b.EMPLOYID = a.EMPID_I
and b.BENEFIT = a.BENEFIT
where b.INACTIVE <> a.INACTIVE
---------------------------------------
IMPORTANT NOTE: The benefit and deduction codes may have the same code ID, and are stored in two different tables on the Payroll side (UPR00500 and UPR00600), however, they are stored together as one record in only one table on the HR side (BE010130). So take note what script you ran last above as it will overwrite the status and End Date on the record in HR, and will apply to both the benefit and deduction on the HR side. So if you have any instances where the benefit is inactive, but the deduction is active (or visa versa), you will need to pay attention to what script you ran last. It is recommended for these situations to view the code in the front-end and activate back the one needed in the front-end.



Scenario 3: ALL: Use this script if you know a code (benefit and deduction) is inactive on the Payroll side for 'all' employees, and you just want to update the status for all the employees enrolled in it on the HR side too: (The first script will find all records for that code, whether a benefit or deduction, where it is not inactive on the HR side, and the second script will update the status for that code to be inactive for all employees enrolled in it on the HR side.)
Select * from BE010130 where BENEFITSTATUS_I <> '2' and BENEFIT = 'xxx'
---------------------------------------------------------------
update BE010130 set BENEFITSTATUS_I = '2' where BENEFIT = 'xxx'
--update the xxx placeholder for the benefit or deduction code that you would like to mark as inactive on the HR side. Note that this script just sets the INACTIVE status and does not update the Benefit/Deduction End Date on the HR side. Also refer to the note above in Scenario 2. 

Benefit Status values mean:
1=active
2=inactive
3=waived


↑ Back to the top


More Information

NOTE: Only the Payroll side for the Benefit or Deduction is used in the payrun, so having the code active on the HR side does not affect the payrun at all.

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 3055314
Revision : 1
Created on : 1/7/2017
Published on : 4/8/2015
Exists online : False
Views : 246