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 to get dates of week

Former Member
0 Kudos

hi,

i required to find first and last date of the week,

i have year(2008) and week(22) as input '200822'

i know this function modules:

DATE_GET_WEEK

WEEK_GET_FIRST_DAY

GET_WEEK_INFO_BASED_ON_DATE

LAST_WEEK

NEXT_WEEK

but my requirement, to get week's first and last date.

regards,

rajyalaxmi.

7 REPLIES 7

Former Member

hi,

Use FM WEEK_GET_FIRST_DAY and pass '200822' as input to get the first day ...based on this you can calculate the last day ...i.e, + 5 days of that week will return the same

Regards,

Santosh

Edited by: Santosh Kumar Patha on Jul 24, 2008 3:46 PM

Former Member
0 Kudos

i know this FM it returns only first day, i required last date also

Former Member
0 Kudos

Hi Merugu,

Try the FM:

DAY_ATTRIBUTES_GET

Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuedsay), whether the day is a holiday, and more.

With luck,

Pritam.

Former Member
0 Kudos

hi,

try these fm

FM LIST WITH RESPECT TO DAY, WEEK, AND MONTH.

CALCULATE_DATE : Calculates the future date based on the input .

DATE_TO_DAY : Returns the Day for the entered date.

DATE_COMPUTE_DAY : Returns weekday for a date

DATE_GET_WEEK : Returns week for a date

RP_CALC_DATE_IN_INTERVAL : Add days / months to a date

MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.

END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.

HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.

FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.

MONTH_NAMES_GET : Get the names of the month

WEEK_GET_FIRST_DAY : Get the first day of the week

HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format

SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours

L_MC_TIME_DIFFERENCE : Find the time difference between two date/time

HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months

LAST_DAY_OF_MONTHS : Returns the last day of the month

DATE_CHECK_PLAUSIBILITY :Check for the invalid date.

reward points if useful,

siri

Former Member
0 Kudos

hi,

Refer to the link.

Regards

Sumit Agarwal

Former Member
0 Kudos

Can you check the following FM's

HR_GBSSP_GET_WEEK_DATES

HRWPC_BL_DATES_WEEK_INTERVAL

Yes your requirement is different on year and week no you need to first and last dates of that week,..

May you can find some useful info in the above function modules and will be useful to design some code to get the dates

Thanks and regards

Pushkar

Former Member
0 Kudos

Hi Rajyalaxmi.

I would like to suggest a few,

First day -

WEEK_GET_FIRST_DAY - Calendar function: Return first day for a week

BWSO_DATE_GET_FIRST_WEEKDAY

HRIQ_WEEK_GET_FIRST_DAY

WEEKDAY_GET - Calendar: Get day of the week

Last Day -

TIME_GET_LAST_WEEK

BKK_GET_DAY_OF_WEEK

WEEKDAY_GET - Calendar: Get day of the week

Hope that's usefull.

Good Luck & Regards.

Harsh Dave