cancel
Showing results for 
Search instead for 
Did you mean: 

Need a query for Employee Master Data

Former Member
0 Kudos

Hi Experts

we required a query which shows the change done in Employee Master Data,,(OHEM) with an option to filter with FROM >TO   date

i need the following fields in the Query

SAP IDName                               Changed Field Name                          Current Basic SalaryOld Basic SalaryUpdate DateUpdated Person Name

i need the Updated person name, but when am trying am getting the created person name, instead of that i need Updated Person's Name

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Let me check and update query.

Thanks & Regards,

Nagarajan

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Use OHEM and AHEM table to get above information.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hi rajan

Thanks for the replay

we need the data which is coming in the Difference table in Change Log.

how can we get the data in a report from the diffence table for all employee,

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Right now I  don't have data to test and create query. But you have to link OHEM table with AHEM table.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

hi rajan

we try with this 2 tables,, but not able to get the correct data,,, means,,, some duplication is happening,,, is it possible to get in this weekend,,

could u tell in which table the "Difference" is stored

we are not able to see the difference  also

regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this:

SELECT T0.[UpdateDate],T0.[empID], T2.[salary] as Newvalue, T1.[salary] as oldvalue, t3.[U_Name] as CreatedUser, t4.[U_Name] FROM AHEM T0 left join AHEM T1 on T1.[empID] = T0.[empID] and t1.loginstanc= t0.loginstanc-1 left join OHEM T2 on T0.[empID] = T0.[empID] left join  OUSR t3 on t3.userid = t2.usersign left join OUSR t4 on t4.userid =t2.usersign2 WHERE  T2.[salary]  <> T1.[salary]   group by T0.[UpdateDate],T0.[empID], T2.[salary], T1.[salary],t3.[U_Name],t4.[U_Name] order by T0.[UpdateDate]

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hi rajan

Thnaks for the Query,, but the one employee is repeating more than 1 times in the report. with different user name,,but when we check it in the inter face the date show in some other date and the change is been done by one person. how could we avoid this

Regards