Last week there was an interesting discussion on Cloud Customer Connect over is it possible to query the Legislative Data Group (LDG) to Legal Entity (LE).
Although I couldn’t contribute to the thread, I want to share the outcome of it as it will be helpful for wider audience. All credits to those who posted the question, helped to get to the final query (Rajesh, Amrit, MKG, Yaswanth).
We can only assign Legal Entity to Employees. However if there is a requirement to fetch the LDG assigned to an employee, there isn’t much direction available on how to fetch it.
Let’s first look at where we will tag the LDG to LE.
Navigate to Setup And Maintenance > Manage Legal Entity HCM Information > Search for LE and click on it > Payroll Statutory Unit tab

We can see that LDG has been associated with LE.
Query to fetch LE and LDG:
select ple.name legal_employer, pldgt.name legislative_data_group
from per_legislative_data_groups pldg
,per_legislative_data_groups_tl pldgt
,Hr_Organization_Information_F Psu_Inf
,per_legal_employers ple
where pldg.legislative_data_group_id = pldgt.legislative_data_group_id
and pldgt.language = 'US'
and psu_inf.Org_Information_Context = 'PER_PSU_PAYROLL_INFO'
and psu_inf.Org_Information1 = pldgt.legislative_data_group_id
and Psu_Inf.Organization_Id = ple.Organization_Id
and TRUNC(sysdate) BETWEEN ple.effective_start_date AND ple.effective_end_date
Query Output:

Hope this will be useful when you have to deal with getting LDG for an employee.