Hi,
FM "NUMBER_OF_DAYS_PER_MONTH_GET".
Best regards,
Prashant
Hi,
You can use this FM LAST_DAY_OF_MONTHS.
data: last_day type sy-datum. data: num type i. call function 'LAST_DAY_OF_MONTHS' exporting day_in = sy-datum importing last_day_of_month = last_day. num = last_day+6(2). write:/ num.
Regards,
Ferry Lianto
Hi IFF,
The codes below are the sample codes to get number of days .
If you're about to count the working days, consider to subtract number of public holidays from table THOC .
GET NUMBER OF DAYS IN SPECIFIED MONTH
parameters :
P_MONTH(2),
P_YEAR(4) .
tables T009B.
data :
DAYS like T009B-BUTAG,
MONTH like T009B-BUMON,
YEARS like T009B-BDATJ.
start-of-selection.
Get number of days
MONTH = P_MONTH.
YEARS = P_YEAR.
call function 'NUMBER_OF_DAYS_PER_MONTH_GET'
exporting
PAR_MONTH = MONTH
PAR_YEAR = YEARS
importing
PAR_DAYS = DAYS.
.
write : /1(10) 'Month : ', (10) MONTH .
write : /1(10) 'Year : ', (10) YEARS .
write : /1(10) 'Days : ', (10) DAYS .
----- END OF PROGRAM
Rgds,
TSW
You can try yo use Function Module K_ABC_WORKDAYS_FOR_PERIODS_GET and then count the records returned.
Regards
Add a comment