HRMS Attended Establishment API
Hi guys today we will explain HRMS Attended Establishment API
DECLARE V_ERROR VARCHAR2(400); P_VALIDATE BOOLEAN; P_EFFECTIVE_DATE DATE; P_FULLTIME VARCHAR2(200); P_ATTENDED_START_DATE DATE; P_ATTENDED_END_DATE DATE; P_ESTABLISHMENT VARCHAR2(200); P_BUSINESS_GROUP_ID NUMBER; P_PERSON_ID NUMBER; P_PARTY_ID NUMBER; P_ADDRESS VARCHAR2(200); P_ESTABLISHMENT_ID NUMBER; P_ATTRIBUTE_CATEGORY VARCHAR2(200); P_ATTRIBUTE1 VARCHAR2(200); P_ATTRIBUTE2 VARCHAR2(200); P_ATTRIBUTE3 VARCHAR2(200); P_ATTRIBUTE4 VARCHAR2(200); P_ATTRIBUTE5 VARCHAR2(200); P_ATTRIBUTE6 VARCHAR2(200); P_ATTRIBUTE7 VARCHAR2(200); P_ATTRIBUTE8 VARCHAR2(200); P_ATTRIBUTE9 VARCHAR2(200); P_ATTRIBUTE10 VARCHAR2(200); P_ATTRIBUTE11 VARCHAR2(200); P_ATTRIBUTE12 VARCHAR2(200); P_ATTRIBUTE13 VARCHAR2(200); P_ATTRIBUTE14 VARCHAR2(200); P_ATTRIBUTE15 VARCHAR2(200); P_ATTRIBUTE16 VARCHAR2(200); P_ATTRIBUTE17 VARCHAR2(200); P_ATTRIBUTE18 VARCHAR2(200); P_ATTRIBUTE19 VARCHAR2(200); P_ATTRIBUTE20 VARCHAR2(200); P_ATTENDANCE_ID NUMBER; P_OBJECT_VERSION_NUMBER NUMBER; CURSOR C1 IS SELECT * FROM XX_Q2 WHERE NVL(VALID_FLAG,'ERROR') 'DONE' AND PERSON_ID 91 AND PERSON_ID IS NOT NULL; BEGIN FOR C1_REC IN C1 LOOP P_VALIDATE := FALSE; P_EFFECTIVE_DATE := SYSDATE; P_FULLTIME := 'N'; P_ATTENDED_START_DATE := NULL; P_ATTENDED_END_DATE := NULL; P_ESTABLISHMENT := NULL; P_BUSINESS_GROUP_ID := 103; P_PERSON_ID := c1_REC.PERSON_ID; P_PARTY_ID := NULL; P_ADDRESS := NULL; BEGIN SELECT DISTINCT ESTABLISHMENT_ID INTO P_ESTABLISHMENT_ID FROM per_establishments WHERE UPPER(NAME) = UPPER(C1_REC.ESTABLISHMENT); EXCEPTION WHEN OTHERS THEN NULL; END; P_ATTRIBUTE_CATEGORY := NULL; P_ATTRIBUTE1 := NULL; P_ATTRIBUTE2 := NULL; P_ATTRIBUTE3 := NULL; P_ATTRIBUTE4 := NULL; P_ATTRIBUTE5 := NULL; P_ATTRIBUTE6 := NULL; P_ATTRIBUTE7 := NULL; P_ATTRIBUTE8 := NULL; P_ATTRIBUTE9 := NULL; P_ATTRIBUTE10 := NULL; P_ATTRIBUTE11 := NULL; P_ATTRIBUTE12 := NULL; P_ATTRIBUTE13 := NULL; P_ATTRIBUTE14 := NULL; P_ATTRIBUTE15 := NULL; P_ATTRIBUTE16 := NULL; P_ATTRIBUTE17 := NULL; P_ATTRIBUTE18 := NULL; P_ATTRIBUTE19 := NULL; P_ATTRIBUTE20 := NULL; P_ATTENDANCE_ID := NULL; P_OBJECT_VERSION_NUMBER := NULL; BEGIN APPS.PER_ESTAB_ATTENDANCES_API.CREATE_ATTENDED_ESTAB ( P_VALIDATE, P_EFFECTIVE_DATE, P_FULLTIME, P_ATTENDED_START_DATE, P_ATTENDED_END_DATE, P_ESTABLISHMENT, P_BUSINESS_GROUP_ID, P_PERSON_ID, P_PARTY_ID, P_ADDRESS, P_ESTABLISHMENT_ID, P_ATTRIBUTE_CATEGORY, P_ATTRIBUTE1, P_ATTRIBUTE2, P_ATTRIBUTE3, P_ATTRIBUTE4, P_ATTRIBUTE5, P_ATTRIBUTE6, P_ATTRIBUTE7, P_ATTRIBUTE8, P_ATTRIBUTE9, P_ATTRIBUTE10, P_ATTRIBUTE11, P_ATTRIBUTE12, P_ATTRIBUTE13, P_ATTRIBUTE14, P_ATTRIBUTE15, P_ATTRIBUTE16, P_ATTRIBUTE17, P_ATTRIBUTE18, P_ATTRIBUTE19, P_ATTRIBUTE20, P_ATTENDANCE_ID, P_OBJECT_VERSION_NUMBER ); UPDATE XX_Q2 SET VALID_FLAG = 'DONE', ERROR_MSG = 'NO ERROR' WHERE PERSON_ID = C1_REC.PERSON_ID; COMMIT; EXCEPTION WHEN OTHERS THEN V_ERROR := SQLERRM; UPDATE XX_Q2 SET VALID_FLAG = 'ERROR', ERROR_MSG = V_ERROR WHERE PERSON_ID = C1_REC.PERSON_ID; COMMIT; END; END LOOP; END;