Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

function module for date

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

Use LAST_DAY_IN_PERIOD_GET.

Former Member
0 Kudos

Try function module LAST_DAY_IN_PERIOD_GET to get last day in a fiscal period.

Former Member
0 Kudos

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*