Fonction SAP BAPI_TIMEAVAILSCHEDULE_BUILD - Generate List of Employee Availability

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ENDDATE BAPI7002_3-ENDDATE D 8 End Date
STARTDATE BAPI7002_3-STARTDATE D 8 Start Date

Paramètre Reférence Long. Facultatif Description
PERSNO BAPI7002_2 8 Personnel Numbers Table
RETURN BAPIRET2 548 Error Messages
TIMEAVAILSCHEDULE BAPI7002_1 38 Availability Table

Functionality
This method determines employees' availability on the basis of theirpersonal work schedule and any time data that represents a deviation inthe schedule.
An employee's personal work schedule is determined from the long-termwork schedule in the Planned Working Time infotype (2003), andfrom the short- and medium-term changes to the planned working time inthe Substitutions infotype (2003). This results in a valid dailywork schedule for each day that contains detail specifications onplanned working times, break times, and overtime. An employee'savailability can depend on these planned times, or on deviations in thedaily work schedules from the Absences (2001), Attendances (2002),Overtime (2005), and Availability (2004) infotypes.
A list of specific times provides information on an employee'savailability. Each entry indicates the valid availability informationfrom one point in time (date and time) to the next point in time.
The first entry for a personnel number is always for 00:00 on the startdate of the selection period, and the last entry for 24:00 on the enddate.
A distinction is made between the following availability statuses
:

  • Status 0: Employee not available

  • This status is determined from
    Breaks
    Recorded absences (infotype 2001)
    Special attendances (for example, attending a training course)
    You can determine the availability status in Customizing forattendances and absences.
    • Status 1: Employee available

    • Applies during the skeleton time (fill time, core time) without breaks.
      • Status 2: Overtime exists for the employee

      • Time is not documented for the employee and is outside of his or herplanned working time (skeleton time). The employee is not at workduring this time and any work performed is usually overtime.
        • Status 3: Employee is available by telephone

        • Employee has an availablity with this indicator set when Customizingthe reporting types.
          Background information on the daily work schedule and therecorded time data is output along with the availability status.
          • Time description for the daily work schedule

          • 01 - Overtime
            02 - Fill time / Skeleton time
            03 - Core time
            • Break indicator

            • " " - No break
              1 - Paid break
              2 - Unpaid break
              • Origin indicator

              • A - Absences infotype (2001)
                P - Attendances infotype (2002)
                O - Overtime infotype (2005)
                • Subtype of the infotype record (attendance/absence type)

                • If the information is changed, a new time point is inserted in theavailability table.
                  Note:
                  • For full-day absences and attendances, the times are determined so that
                  • the start time is either at 0 hours or, if there is a record from theprevious day that extends into the day, at the end of the relevantrecord. The end time is either 24 hours or the end time of the previousday's record that extends into the next day.
                    For absence or attendances lasting several days, the work schedule isonly displayed for the last day. The relevant periods are compressed -that is, the start and end dates are displayed.
                    • Due to public holidays, there may be days off (days with day type > 0)
                    • although the actual daily work schedule says that the employee shouldwork. In this case, the availability status 2 (overtime) is set for thefull day.
                      • If there are several parallel infotype records, the system always
                      • outputs the record means the employee not being available.
                        • Based on the time-based list of times, records of less than one day
                        • that do not indicate clock times (time recording without clock times)are not taken into account.

                          Description
                          ENDDATE

                          Description
                          STARTDATE

                          Description
                          PERSNO
                          Type,,ID,,Number,,Message
                          E ,,P2,,341 ,,There are several substitutions
                          ,, ,, ,,on the same day
                          E ,,P2,,518 ,,Error while accessing
                          ,, ,, ,,holiday calendar on &
                          E ,,P2,,564 ,,Error when determining
                          ,, ,, ,,work schedule
                          E ,,P2,,565 ,,Error in break
                          ,, ,, ,,calculation
                          E ,,P2,,566 ,,Error when reading
                          ,, ,, ,,Time Management infotypes
                          E ,,P2,,567 ,,Not authorized to read
                          ,, ,, ,,Time Management infotypes
                          E ,,P2,,568 ,,Other error
                          E ,,P2,,579 ,,Customizing error in
                          ,, ,, ,,WS rule & & & &
                          E ,,P2,,580 ,,Customizing error in
                          ,, ,, ,,definition rules for day types,
                          ,, ,, ,,rule &
                          E ,,P2,,583 ,,Customizing error in
                          ,, ,, ,,work break schedule & &
                          E ,,P2,,584 ,,Customizing error in
                          ,, ,, ,,period work schedule & & &
                          E ,,P2,,638 ,,There are two public holidays
                          ,, ,, ,,on &1 (holiday calendar &2)
                          E ,,P2,,842 ,,Date & is before start
                          ,, ,, ,,of public holiday calendar &

                          Description

                          • PERSNO

                          • STARTDATE

                          • STARTTIME

                          • WORKSCHEDULETYPE

                          • BREAK

                          • TIMEDATATYPE

                          • SUBTYPE

                          • AVAILABILITY

                          • HOURS