How to Restrict Custom BIP Report Business Unit Wise without using Secured Table View in Oracle Cloud Application.
We can create one parameter as BU and create a LOV with below query which will find the BU of Employee based on the Employee Assignment and Assign the LOV to BU Parameter.
Note : We have dynamically capture the Logged in global user .
you can make necessary change to below Query based on your Business requirement .
Select distinct papf.person_id,
HOU.organization_id,
PU.USERNAME,
HOU.NAME BU_NAME,
papf.business_group_id,
PAAF.Business_Unit_id,
PAAF.organization_id PAAF_Organization_ID,
PAAF.Effective_start_Date,
PAAF.Effective_end_Date
FROM
per_users PU,
per_all_people_f papf,
PER_ALL_ASSIGNMENTS_F PAAF,
hr_operating_units HOU
Where 1=1
AND PU.person_id=papf.person_id
--AND HOU.organization_id(+) = papf.business_group_id
AND papf.PERSON_ID=PAAF.PERSON_ID
AND HOU.organization_id=PAAF.Business_Unit_id
AND TRUNC(sysdate) BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
AND PU.USERNAME=(Select fnd_global.user_name from dual)
Thanks
Ghanshyam M
Comments
Post a Comment