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

Get calendarweek for a given timerange

Former Member
0 Likes
705

Hello experts,

i´ve the following problem.

I have for especially a start-date 12.03.2008 and an end-date 29.07.2008.

For this interval i need the calenderweeks.

For example: Input start-date 12.03.2008 / end-date 29.07.2008

Return: Weeks 20,21,22,23,24,25,26 2008

I do i get this?

I´ve found no fuba which can do this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
674

Hello

Look at FM DATE_GET_WEEK.

This not quite that you it is necessary.

But founding on this you may to create own function.

Hello experts,

i´ve the following problem.

I have for especially a start-date 12.03.2008 and an end-date 29.07.2008.

For this interval i need the calenderweeks.

For example: Input start-date 12.03.2008 / end-date 29.07.2008

Return: Weeks 20,21,22,23,24,25,26 2008

I do i get this?

I´ve found no fuba which can do this?

4 REPLIES 4
Read only

Former Member
0 Likes
675

Hello

Look at FM DATE_GET_WEEK.

This not quite that you it is necessary.

But founding on this you may to create own function.

Read only

0 Likes
674

hi,

check the function modules.

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

hope this is useful.

reward points if helpful,

siri

Read only

Former Member
0 Likes
674

Create a while loop and start with your first date. Use FM DATE_GET_WEEK to get the weeknumber of this date. Than add 7 to the date and repeat this action until you have reached or passed the end date.

Regards,

John.

Read only

Former Member
0 Likes
674

hi,

GET_WEEK_INFO_BASED_ON_DATE,

regards,

sandeep