Application Development and Automation 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: 
Read only

Function Module

Former Member
0 Likes
1,018

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
Read only

Former Member
0 Likes
948

Hi,

Please check this FM.

LAST_WEEK

LAST_DAY_OF_MONTHS

Regards,

Ferry Lianto

7 REPLIES 7
Read only

Former Member
0 Likes
948

Hi,

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

Thanks,

Naren

Read only

0 Likes
948

Thanks Naren.

ANy Idea for the month stuff.

MAdhu.

Read only

0 Likes
948

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

Read only

0 Likes
948

Month -

HR_JP_MONTH_BEGIN_END_DATE

Regards,

Amit

Read only

0 Likes
948

Thanks Everyone.

Madhu.

Read only

Former Member
0 Likes
949

Hi,

Please check this FM.

LAST_WEEK

LAST_DAY_OF_MONTHS

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
948

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