cancel
Showing results for 
Search instead for 
Did you mean: 

hr-abap payroll (payslip problem)

Former Member
0 Kudos

Hi,

I am modifying the payslip.

Here in input screen we r using plant option.

my problem is if the person shifts from one plant to another plant then the payslip of that person must be latest plant payslip.

but if the end user takes payslip of the persons according to plant wise then that particular persons payslip is comming in both the plants.

I am using the following FM.

CALL FUNCTION 'LAST_DAY_OF_MONTHS'

EXPORTING

DAY_IN = W_BEGDA

IMPORTING

LAST_DAY_OF_MONTH = W_ENDDA.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

is there any function module like a person joining the middle of the month

for example:

he joins on 15 th of the month and it has to calculate the last day ofthe month.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Eg:

parameters: s_date type sy-datum,

e_date type sy-datum.

s_date = sy-datum.

call function 'RP_LAST_DAY_OF_MONTHS'

exporting

day_in = s_date

importing

last_day_of_month = e_date.

write : e_date.

Regards

Raj

Former Member
0 Kudos

The FM which you has written will give you the last date of month. Then what is the issue?

Regards,

Atish

Message was edited by:

Atish Sarda

Former Member
0 Kudos

Hi,

thanks for responding.

my issue is if a person joins in the middle of the month i.e not on first of the month

then which function module will allow me to catch the last day of the month.

from middle of the month to last day of the month.