cancel
Showing results for 
Search instead for 
Did you mean: 

Checking child's age

Former Member
0 Kudos

Hi,

I am writing rule to check on child's age to get school fee allowance.The requirement is the child's age must be 4-18yrs old only.And the allowance amount must be multiplied by number of kids.Please help.

TQ

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi TQ,

I don't think you can achieve this via PCR.

Please try writing a custom function.

See the link below:

http://wiki.sdn.sap.com/wiki/display/ERPHCM/CreateaCustomPayrollFunctionUpdatingZL+Table

Your function should involve the following lines:

LOOP AT P0021 WHERE FAMSA EQ '02'(or whatever number is for your child subtype)

and begda le aper-begda

and endda ge aper-endda.

L_AGE = SY-DATUM - P0021-FGBDT.

IF L_AGE LT 18 AND L_AGE GT 4.

......

ENDıF.

ENDLOOP.

Regards,

Dilek