25.2.11

SAP Note 23461 - Weekday for T554X with prev. day assignment VTKEN

Symptom:

A employee works night shift from Friday night to Saturday morning. He wants to take leave for the second half of the shift. To do this, an absence lasting less than one day is entered on Saturday from 01:00 to 05:00, the system also sets the indicator VTKEN for previous day assignment to do this automatically since the absence belongs to the day program of the Friday.
The public holiday class, day type and so on of the Friday are used for the evaluation of table T554X, but Saturday is used as the week day. This can lead to incorrect values during absence counting.
Possible error message:
"Quota/leave deduction for quota type 99 is zero", P2095.
Key words: P2001, I2001, P0005, I0005

Cause and prerequisites

Program error

Solution
You can correct the error as follows:
Edit Include MP200140 and find
FORM CHECK_HOLIDAY.
Insert the three lines marked below:

FORM CHECK_HOLIDAY USING CH_DATE CH_BEGUZ CH_ENDUZ CH_ABRST "QAFK84716
CH_ABRTG CH_KTART CH_CONTI. "QAFK84716
...
MOVE: CH_DATE TO PTABS-DATUM,
PSPAR-INFTY TO PTABS-INFTY,
* CH_STDAZ TO PTABS-STDAZ, "QAFK82390
ABS_STDAZ TO PTABS-STDAZ, "QAFK82390
550AO-SOLLZ TO PTABS-SOLLZ,
PTPRG-FTKLA TO PTABS-FTKLA,
I550AO-TPKLA TO PTABS-TPKLA,
PTPRG-TAGTY TO PTABS-TAGTY,
T001P-URLKL TO PTABS-URLKL,
T001P-MOZKO TO PTABS-MOZKO,
T503-ZEITY TO PTABS-ZEITY,
T503-KONTY TO PTABS-KONTY,
T554S-KTART TO PTABS-KTART,
T554S-RGMOD TO PTABS-RGMOD,
PTPRG-MOTPR TO PTABS-MOTPR,
PTPRG-ZMODN TO PTABS-ZMODN.
IF NOT PTPRG-VTKEN IS INITIAL. <<<< insert line
PTABS-DATUM = CH_DATE - 1. <<<< insert line
ENDIF. <<<< insert line
PERFORM RP_ABSENCE_CALCULATION USING PTABS.
...
Afterwards, please carry out a syntax check for program MP200000.

No comments:

Post a Comment