10-18-2007 4:15 PM
Hello experts.
my requirement is , I am having a fiscial year ( gjahr) and period ie month (monart) . Now i need afunction module that gives the last date of the month. say if it is january it should give 31 - month-year. I want to populate this date to the budat field. so please tell me how to solve this issue. i want to pass as date-month-year to budat. but i am having year as seperate field and month as seperate field. so please tell me the function module that gives all the three or any other solution to this.
thanks for all the replies
10-18-2007 4:16 PM
10-18-2007 4:18 PM
Try function module LAST_DAY_IN_PERIOD_GET to get last day in a fiscal period.
10-18-2007 4:23 PM
populate month, year u have and 01 into w_datum in and it should always give day1 of that month like this.
concatenate l_year l_month '01' into w_datum_in.
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
day_in = w_datum_in
IMPORTING
last_day_of_month = w_datum_out
EXCEPTIONS
day_in_not_valid = 1
OTHERS = 2.
*reward if solved*