2008 Aug 12 3:05 PM
2008 Aug 12 3:30 PM
hi
it will give u number of days int he month for that year
check the code
PARAMETER: p1_datum TYPE sy-datum.
DATA:
w_month LIKE t009b-bumon,
w_year LIKE t009b-bdatj,
w_DAYS LIKE T009B-BUTAG.
w_month = p1_datum+4(2).
w_year = p1_datum+0(4).
CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
EXPORTING
par_month = w_month
par_year = w_year
IMPORTING
par_days = w_days.
write:/ w_days.
Cheers
Snehi
2008 Aug 12 3:35 PM
Hi...
It will answer following questions...
1. How many days for month Feb' In the year 2008?
2. How many days for the month Feb' in the year 2007?
Analyze this program...
data: var3(2) type n.
PARAMETERS: var1(2) type n DEFAULT '2',
var2(4) type n DEFAULT '2008'.
call function 'NUMBER_OF_DAYS_PER_MONTH_GET'
exporting
PAR_MONTH = var1
PAR_YEAR = var2
IMPORTING
PAR_DAYS = var3.
write:/ 'No. of days in the given month:', var3.
Thanks,
Naveen.I
2008 Aug 12 3:36 PM
Use
call function 'NUMBER_OF_DAYS_PER_MONTH_GET'
exporting
PAR_MONTH = gf_mon
PAR_YEAR = gf_year
IMPORTING
PAR_DAYS = gf_days.
now, say gf_mon = 8 and gf_year = 2008
so FM returns gf_days as 31.
2008 Aug 12 3:43 PM
There are 2 input parameters
PAR_MONTH and PAR_YEAR
For PAR_MONTH pass the month eg. "08" for August
For PAR_YEAR pass the year eg. 2008 whichever year you want
The output would be the no. of days for that month in PAR_DAYS (here 31).
Hope this helps