Error : HR_51059_ABS_DUR_NOT_ENTERED in HRMS oracle apps on hr_person_absence_api


ORA-20001: HR_51059_ABS_DUR_NOT_ENTERED:

ORA-06512: at “APPS.HR_PERSON_ABSENCE_API”, line 1002

Oracle apps HRMS absence API error

HR Absence API error

Consider the Below coding which has errors(Go to the botton coding that works)

DECLARE

x_absence_days number;

x_absence_hours number;

x_absence_attendance_id number;

x_object_version_number number;

x_occurrence number;

x_dur_dys_less_warning boolean;

x_dur_hrs_less_warning boolean;

x_exceeds_pto_entit_warning boolean;

x_exceeds_run_total_warning boolean;

x_abs_overlap_warning boolean;

x_abs_day_after_warning boolean;

x_dur_overwritten_warning boolean;

BEGIN

hr_person_absence_api.create_person_absence (

p_validate =>FALSE,

p_effective_date =>SYSDATE5,

p_person_id =>31417,

p_business_group_id =>202,–101,

p_absence_attendance_type_id =>12,–71, —VACATION LEAVE

p_date_projected_start =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

p_time_projected_start =>’18:00′,

p_date_projected_end =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

p_time_projected_end =>’20:00′,

p_date_start =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

p_time_start =>’18:00′,

p_date_end =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

p_time_end =>’20:00′,

— p_date_start => sysdate,

— p_date_end => sysdate+1,

p_absence_days => x_absence_days,

p_absence_hours => x_absence_hours,

p_absence_attendance_id => x_absence_attendance_id,

p_object_version_number => x_object_version_number,

p_occurrence => x_occurrence,

p_dur_dys_less_warning => x_dur_dys_less_warning,

p_dur_hrs_less_warning => x_dur_hrs_less_warning,

p_exceeds_pto_entit_warning => x_exceeds_pto_entit_warning,

p_exceeds_run_total_warning => x_exceeds_run_total_warning,

p_abs_overlap_warning => x_abs_overlap_warning,

p_abs_day_after_warning => x_abs_day_after_warning,

p_dur_overwritten_warning => x_dur_overwritten_warning

);

ROLLBACK;

END;

When we execute the above coding we will get a error which is at the top. The Error says that ABS_DUR_NOT_ENTERED. As I was new to this Interface and API’s I struggled a lot to resolve this API. But I was not able to do that. My project manager did some changes and the API worked. After that I did a trial and error method to know what was the problem in the coding. One Golden rule for Interface or API is that we have to fully understand the Functionality of the front end part that is oracle forms

The Navigation is

Global HRMS Manager → People → Enter and Maintain → Others (Tab) → Absence

1.

Reason :

Here Just see that After entering the start date, then time is valid you cant specify the time without specifying the date. This is the reason for the error to occur. To have a Trial and error just comment and remove the fields and check for errors.

My test cases

CASE1:WhenNOstarttimeandENDTIME –and absence hours –> Error Occurs

CASE2:WhenstarttimeandENDTIME given – and absence hours not given –> Error Occurs

CASE3: Absence hour given – andstarttimeandENDTIMEnot given — Works

CASE4: Absence hour given – andstarttimeandENDTIME given — Works

CASE:startdateandenddatenot given — Error Occurs

CASE6 : IF projected datenot given but timeis given –Does not work

CASE:IF projected date given but timeisnot given –Does works

CASE8:When projected is commented – Works

By obeserving the test cases you have to pass the values to the API as it allows in the front End(Oracle apps).

By obeserving the test cases you have to pass the values to the API as it allows in the front End(Oracle apps).

Now check the below script which works

/* FORMATTED ON 1/8/2014 2:45:44 PM (QP5 V5.114.809.3010) */

DECLARE

X_ABSENCE_DAYS NUMBER;

X_ABSENCE_HOURS NUMBER:=2;

X_ABSENCE_ATTENDANCE_ID NUMBER;

X_OBJECT_VERSION_NUMBER NUMBER;

X_OCCURRENCE NUMBER;

X_DUR_DYS_LESS_WARNING BOOLEAN;

X_DUR_HRS_LESS_WARNING BOOLEAN;

X_EXCEEDS_PTO_ENTIT_WARNING BOOLEAN;

X_EXCEEDS_RUN_TOTAL_WARNING BOOLEAN;

X_ABS_OVERLAP_WARNING BOOLEAN;

X_ABS_DAY_AFTER_WARNING BOOLEAN;

X_DUR_OVERWRITTEN_WARNING BOOLEAN;

BEGIN

HR_PERSON_ABSENCE_API.CREATE_PERSON_ABSENCE (

P_VALIDATE =>FALSE,

P_EFFECTIVE_DATE =>SYSDATE5,

P_PERSON_ID =>31417,

P_BUSINESS_GROUP_ID =>202,–101,

P_ABSENCE_ATTENDANCE_TYPE_ID =>12,–71, —VACATION LEAVE

P_DATE_PROJECTED_START =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

P_TIME_PROJECTED_START =>’18:00′,

P_DATE_PROJECTED_END =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

P_TIME_PROJECTED_END =>’20:00′,

P_DATE_START =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

P_TIME_START =>’18:00′,

P_DATE_END =>TO_DATE(’08-JAN-2014′,‘DD-MON-YYYY’),

P_TIME_END =>’20:00′,

— P_DATE_START => SYSDATE,

— P_DATE_END => SYSDATE+1,

P_ABSENCE_DAYS => X_ABSENCE_DAYS,

P_ABSENCE_HOURS => X_ABSENCE_HOURS,

P_ABSENCE_ATTENDANCE_ID => X_ABSENCE_ATTENDANCE_ID,

P_OBJECT_VERSION_NUMBER => X_OBJECT_VERSION_NUMBER,

P_OCCURRENCE => X_OCCURRENCE,

P_DUR_DYS_LESS_WARNING => X_DUR_DYS_LESS_WARNING,

P_DUR_HRS_LESS_WARNING => X_DUR_HRS_LESS_WARNING,

P_EXCEEDS_PTO_ENTIT_WARNING => X_EXCEEDS_PTO_ENTIT_WARNING,

P_EXCEEDS_RUN_TOTAL_WARNING => X_EXCEEDS_RUN_TOTAL_WARNING,

P_ABS_OVERLAP_WARNING => X_ABS_OVERLAP_WARNING,

P_ABS_DAY_AFTER_WARNING => X_ABS_DAY_AFTER_WARNING,

P_DUR_OVERWRITTEN_WARNING => X_DUR_OVERWRITTEN_WARNING

);

COMMIT;

END;

Query to check whether the data is inserted or not
SELECT PAPF.person_id,
PAPF.EFFECTIVE_START_DATE,
PAPF.EFFECTIVE_END_DATE,
PAPF.LAST_NAME,
pav.CATEGORY_MEANING,
PAV.BUSINESS_GROUP_ID,
pav.ABSENCE_ATTENDANCE_TYPE_ID,
pav.date_start,
pav.date_end,
pav.absence_days,
pav.absence_hours,
pav.absence_attendance_id,
pav.object_version_number,
pav.occurrence
FROM PER_ALL_PEOPLE_F PAPF,
PER_ALL_ASSIGNMENTS_F PAAF,
PER_ABSENCE_ATTENDANCES_V pav
WHERE PAPF.EMPLOYEE_NUMBER = ‘2108’
AND PAPF.CURRENT_EMPLOYEE_FLAG = ‘Y’
AND PAPF.EMPLOYEE_NUMBER IS NOT NULL
AND PAAF.PERSON_ID = PAPF.PERSON_ID
AND SYSDATE BETWEEN PAAF.EFFECTIVE_START_DATE
AND PAAF.EFFECTIVE_END_DATE
AND pav.person_id = papf.person_id;

About pacesettergraam

A good and realistic person

Posted on January 8, 2014, in Oracle, oracle apps and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: