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

Former Member
0 Kudos

Hello all,

Is there any FM that would return me the start date and end date of a week given the week number and also the start date and end date of the month given the month number.

Madhu.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check this FM.

LAST_WEEK

LAST_DAY_OF_MONTHS

Regards,

Ferry Lianto

7 REPLIES 7

Former Member
0 Kudos

Hi,

Use the FM LAST_WEEK to get the MONDAY & SUNDAY for the given week..

Thanks,

Naren

0 Kudos

Thanks Naren.

ANy Idea for the month stuff.

MAdhu.

0 Kudos

hi madhu,

check the FM 'RP_LAST_DAY_OF_MONTHS'..

also check this thread.......

https://forums.sdn.sap.com/click.jspa?searchID=1653780&messageID=2908686

regards,

priya

0 Kudos

Month -

HR_JP_MONTH_BEGIN_END_DATE

Regards,

Amit

0 Kudos

Thanks Everyone.

Madhu.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check this FM.

LAST_WEEK

LAST_DAY_OF_MONTHS

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi,

If you know the month...Then you can easily calculate the first day of the month..Just by concatenating the month and the year..

Then use the FM MM_LAST_DAY_OF_MONTHS to get the last day of the month for that date..

Ex.

V_MONTH = '02'.

CONCATENATE SY-DATUM(4) V_MONTH '01' INTO V_DATE.

CALL FUNCTION 'MM_LAST_DAY_OF_MONTHS'

EXPORTING

DAY_IN = V_DATE

IMPORTING

LAST_DAY_OF_MONTH = V_LAST_DATE.

Thanks,

Naren