SELECT
--PAPF.PERSON_ID PERSON_ID,
(SELECT NAME
FROM HR_ORGANIZATION_UNITS
WHERE ORGANIZATION_ID =
(SELECT ORGANIZATION_ID
FROM APPS.PER_ALL_ASSIGNMENTS_F PAA
WHERE (NVL (SYSDATE, SYSDATE) BETWEEN PAA.EFFECTIVE_START_DATE
AND PAA.EFFECTIVE_END_DATE)
AND PERSON_ID = PAPF.PERSON_ID)) DEPARTMENT,
PAPF.EMPLOYEE_NUMBER EMPLOYEE_NUMBER,
PAPF.FULL_NAME EMPLOYEE_NAME,
trim(PAC.SEGMENT10) TELEPHONE_NUMBER
--to_char(PAPF.EFFECTIVE_START_DATE,'DD-MON-YY') JOINING_DATE
FROM
PER_ALL_PEOPLE_F PAPF,
PER_PERSON_ANALYSES PPA,
PER_ANALYSIS_CRITERIA PAC,
FND_ID_FLEX_STRUCTURES FIFL,
PER_ALL_ASSIGNMENTS_F PAAF,
PER_JOBS PJ
WHERE
PAPF.PERSON_ID = PPA.PERSON_ID
AND PAC.ANALYSIS_CRITERIA_ID = PPA.ANALYSIS_CRITERIA_ID
AND PAC.ID_FLEX_NUM = PPA.ID_FLEX_NUM
AND PAC.ID_FLEX_NUM = FIFL.ID_FLEX_NUM
AND PAPF.CURRENT_EMPLOYEE_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
AND FIFL.ID_FLEX_STRUCTURE_CODE = 'RAR_SPECIAL_INFORMATION'
AND PAPF.PERSON_ID=PAAF.PERSON_ID
AND PAAF.PRIMARY_FLAG='Y'
AND TRUNC(SYSDATE) BETWEEN PAAF.EFFECTIVE_START_DATE AND PAAF.EFFECTIVE_END_DATE
AND PJ.JOB_ID(+)=PAAF.JOB_ID
--GROUP by NAME , PAPF.PERSON_ID , PAPF.EMPLOYEE_NUMBER , PAPF.FULL_NAME , PAC.SEGMENT10 , PAPF.EFFECTIVE_START_DATE
order by 1
SELECT NAME
ReplyDeleteFROM PER_ALL_PEOPLE_F PAPF, PER_ALL_ASSIGNMENTS_F PAAF , PER_GRADES PG
WHERE PG.GRADE_ID = PAAF.GRADE_ID
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND TRUNC (SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE
AND PAPF.EFFECTIVE_END_DATE
AND TRUNC (SYSDATE) BETWEEN PAAF.EFFECTIVE_START_DATE
AND PAAF.EFFECTIVE_END_DATE
The main benefit of manually producing the employee payroll is the reduced cost although the time spent on the payroll function by the proprietor may be better spent running the business.
ReplyDeletepayrolling information