Ansicht
Dokumentation

EXIT_SAPLHRGPBS_OSP_OMP_MIN - Customer Exit to process Derive Day Fraction in Minutes

EXIT_SAPLHRGPBS_OSP_OMP_MIN - Customer Exit to process Derive Day Fraction in Minutes

ABAP Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Why it may be necessary;

If the Scheme allows Part Days to be processed then this Customer Exit is processed if the Part Day Calculation is 'C' for Customer Specific. The other options are as follows;
' ' (space),,Part Days Not Allowed
'E',,,,Exact Calculation (AB [Inc. Breaks])
'1',,,,Half Day ,,if AB [Inc. Breaks] >= (PSP [Inc. Breaks] / 2)
'2',,,,Half Day ,,if AB [Inc. Breaks] >= (PSP [Exc. Breaks] / 2)
'3',,,,Half Day ,,if AB [Exc. Breaks] >= (PSP [Inc. Breaks] / 2)
'4',,,,Half Day ,,if AB [Exc. Breaks] >= (PSP [Exc. Breaks] / 2)

Options 1 - 4 either make the absence count as reducing a half day of entitlement or do not reduce the employee's entitlements at all.

Option E reduces the employee's entitlements EXACTLY, i.e. The absence is calculated in minutes and deduced from the total left (i.e. Days x 1440). However, this does imply that a whole day's absence could be split due to an entitlement running out part way through the day!

When this is processed;

As each day of an absence is processed, the employee's applicable Scheme Rules are derived and processed through one by one. For the current Scheme Rule being processed, the Check Window, Entitlement, Absence Grouping and Payment Band are derived. Then the day is processed and if there are any Entitlement days for the Absence Grouping and Payment Band that have not been used up in the Check Window, then the day will be 'marked' using the 'Valuation Rule' associated with this Payment Band.

Just before this routine is called;

The previous marks for this day (previous part day absences) are derived and the previous number of Entitlement Minutes are totalled.

The Elaspsed Time in MINUTES has been derived for this Part Day absence. The elapsed time is derived between Start and End time regardless of breaks. [Because there is no simple rule that could deriveevery eventuality for this none has been provided]

Just after this routine is called;

The total number of Entitlement Minutes in this day is checked.

Example

A possible 'Part Day Absence' rule could be:
1) absences < 4 hrs implies No entitlement.
2) absences >= 4 hrs implies Half a day's entitlement.
3) More than two 4 hr absences in one day should NOT be allowed,
so process the Absence Collision message.

So the code would look like;

if p_ab_mins < 240. "COMPARISON IN MINUTES
p_ab_mins = 0. "None of a day's entitlement.
else.
p_ab_mins = 720. "Half of a day's entitlement.
endif.

Notes

This "Customer Exit" is one of seven available as part of the Absence Evaluation & Payment Scheme functionality. They are ordered from the most likely to be used to the least likely.

1) EXIT_SAPLHRGPBS_OSP_OMP_CVR
Derive an employee's scheme based on client specific rules.

2) EXIT_SAPLHRGPBS_OSP_OMP_MIN
Define a part day absence as entitlement in MINUTES.

3) EXIT_SAPLHRGPBS_OSP_OMP_SEN
Define the Seniority Time Units parameters.

4) EXIT_SAPLHRGPBS_OSP_OMP_ENT
Adjust the employee's ENTITLEMENT.

5) EXIT_SAPLHRGPBS_OSP_OMP_LEN
Define a time unit LENGTH in days.

6) EXIT_SAPLHRGPBS_OSP_OMP_MTD
Define a rollback METHOD.

7) EXIT_SAPLHRGPBS_OSP_OMP_MAN
Perform CUSTOMER SPECIFIC processing for Manual Splitting.

These are the only "Customer Exits" provided to supplement the GB functionality. Before using any of the "Customer Exits" make sure you have consulted with SAP. This will ensure the changes you need are necessary (cannot be fulfilled elsewhere in customising) and that the changes you are about to make will have the desired results with little impact on performance.

General Information About Interfaced Data

All seven "Customer Exits" have the following fields;
IMPORTING
VALUE(P_PERNR) LIKE PERNR-PERNR
VALUE(P_CHECK_DATE) LIKE SY-DATUM
TABLES
P_P0000 STRUCTURE P0000
P_P0001 STRUCTURE P0001
P_P0002 STRUCTURE P0002
P_P0004 STRUCTURE P0004
P_P0007 STRUCTURE P0007
P_P0008 STRUCTURE P0008
P_P0016 STRUCTURE P0016
P_P0041 STRUCTURE P0041
P_P2001 STRUCTURE P2001
P_ERROR STRUCTURE EDIMESSAGE

DO NOT CHANGE THE DATA IN THE INFOTYPE TABLES.

"P_ERROR" has the fields msgid, msgty, msgno, msgv1, msgv2, msgv3 & msgv4. This table should not be refreshed as it may contain "warning" messages that have not halted processing previously.

If an error happens in this function, then fill the record "P_ERROR" and append the record to the table. DO NOT perform any ERROR handling in this function as it is used in Payroll, Dialog & Reporting. (i.e. Statement "MESSAGE" etc.)

Further information

There is error handling provided. Passing back a value between 0 and 1440 minutes is valid. If two part day absence in the same day cause more than 1440 minutes of entitlement in a day (due to this Customer Exit) the error message 'Absence Collision' (HRPSGB_ABS 060) will be issued by the second absence.

The following is a simple demonstration of the coding that may or may not be necessary. Note that the type statements are necessary because the 'MOVE' statement is NOT as useful as it first seems.

DATA: ,,start_time ,,,,TYPE p,
,,,,end_time ,,,,TYPE p,
,,,,start_hhmmss ,,TYPE t,
,,,,end_hhmmss ,,TYPE t,
,,,,elapsed_time ,,TYPE p.
*
CLEAR ab_mins.
*
MOVE ab-beguz ,,,,TO start_hhmmss. ,,"time in 00:00:00 format
MOVE ab-enduz ,,,,TO end_hhmmss. ,,"time in 00:00:00 format
MOVE start_hhmmss ,,TO start_time. ,,,,"time in seconds past midnight
MOVE end_hhmmss ,,TO end_time. ,,,,"time in seconds past midnight


elapsed_time = ( end_time - start_time ) / 60. ,,,,"time in minutes with decimal places kept





Parameters

P_AB
P_AB_EXC_BRKS
P_AB_INC_BRKS
P_AB_MINS
P_CHECK_DATE
P_ERROR
P_P0000
P_P0001
P_P0002
P_P0004
P_P0007
P_P0008
P_P0016
P_P0041
P_P2001
P_PERNR
P_PSP
P_PSP_EXC_BRKS
P_PSP_INC_BRKS

Exceptions

Function Group

XP08P13

BAL_S_LOG - Application Log: Log header data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 6820 Date: 20240523 Time: 051043     sap01-206 ( 100 ms )