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: 

FM for week/date/time

Former Member
0 Kudos

Hi ,

Is there any FM for to get a week from date and time. I am looking for a function module which gives a week starts from SUN 6PM and week ends

SUN 6PM by passing a date.

Thanks,

Vind.

4 REPLIES 4

Former Member
0 Kudos

did u check the fm <b>GET_WEEK_INFO_BASED_ON_DATE</b>

also check these fm's

WEEKDAY_GET Calendar: Get day of the week

WEEKNR_GET Calendar: Fetch Week Number

DATE_GET_WEEK Returns week for a date

WEEK_GET_FIRST_DAY Return first day for a week

Message was edited by:

Rajesh

Former Member
0 Kudos

hi,

Use GET_WEEK_INFO_BASED_ON_DATE.or

HR_IE_NUM_PRSI_WEEKS- Will return the number of weeks between two dates.


 CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
DATE = I_EKET-EINDT
IMPORTING
WEEK = OUTWEEK
* MONDAY =
SUNDAY = I_EKET-EINDT.

IF YOU PASS THE DAY (I_EKET-EINDT) IT WILL GIVE THE WEEK INFORMATION AND SUNDAY(1ST DAY).

Regards,

Santosh

former_member181962
Active Contributor
0 Kudos

The FM WEEK_GET_FIRST_DAY wil get the first day of the week if you pass the date.

add 7 to the today's date and use the same FM to get the first day of the next week.

Subtract 1 from that date. YOu would get the last day of the week.

Use WEEKNR_GET to get the week number for the current date

Regards,

Ravi

0 Kudos

Hi ,

I am looking for a function module which gives a <b>week starts from SUN 6PM</b> and <b>week ends SUN 6PM</b> by passing a date.

Thanks,

Vind.