Logic to know the Insert/Update/Delete as Audit Action in Audit Salary Report for HCM
We want to build an HCM audit report in OTBI.
HRDirect needs an audit report to see when a salary change was added, updated or removed an individual.
Filters: Employee ID, Employee Name, Date Range (date range refers to the when the changes were made)
Fields: Employee ID, Employee Name, Jobcode, Job Title, Department, Supervisor Name, Type of change (Add, Update, Delete), Date/Time of Change, Changed by Name.
For add & update /deletion we used the below mentioned logic to capture the audit action :
CASE
WHEN "Salary Details"."Salary Last Update Date" = "Salary Details"."Salary Creation Date"
AND "Salary Details"."To Date" = date '4712-12-31' THEN 'Insert'