6 Replies Latest reply: May 7, 2014 4:58 AM by Vigneswar Battu RSS

    How to approve leaves in Oracle apps absence management via api or pl/sql package?

    2668011

      Hi,

       

      I've written a package which has HR_PERSON_ABSENCE_API.CREATE_PERSON_ABSENCE to create leaves.

      it's working fine but the leaves are getting auto approved instead of going for approval.

      I'm using API as shown below.

       

      HR_PERSON_ABSENCE_API.CREATE_PERSON_ABSENCE (

                      P_VALIDATE =>FALSE,

                      P_EFFECTIVE_DATE =>SYSDATE-5,

                      P_PERSON_ID => X_PERSON_ID,

                      P_BUSINESS_GROUP_ID =>X_BUSINESS_GROUP_ID,

                      P_ABSENCE_ATTENDANCE_TYPE_ID =>X_ABSENCE_ID,  

                      --P_DATE_PROJECTED_START =>TO_DATE('22-MAY-2014','DD-MON-YYYY'),

                      --P_TIME_PROJECTED_START =>'08:00',

                      --P_DATE_PROJECTED_END =>TO_DATE('22-MAY-2014','DD-MON-YYYY'),

                      --P_TIME_PROJECTED_END =>'18:00',

                      P_DATE_START =>X_START_DATE,--TO_DATE('01-JUN-2014','DD-MON-YYYY'),

                      -- P_TIME_START =>'08:00',

                      P_DATE_END =>X_END_DATE,--TO_DATE('02-JUN-2014','DD-MON-YYYY'),

                      --P_TIME_END =>'18: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

                     );     

       

      is parameter P_VALIDATE has any effects?

      if i make it TRUE, leaves are not getting created.