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

Direct function module to convert YEARWEEK to YEARMONTH

Former Member
0 Likes
763

Hi Experts ,

I have been googling to finad a direct function module to convert given yearweek (201104) to yearmonth(201101) . But i couldn't find anywhere i hope some body can surely help me regarding this .

currently i am using VELO03_WEEK_OR_MONTH_TO_DATE to get the date from the given year,week and then calculating the month. but There is a risk that i may not get the correct YEARMONTH from this.

Please give me the solution for this problem . the best solution will be greeted with the best.

thanks in advance .

Hi Experts ,

I have been googling to finad a direct function module to convert given yearweek (201104) to yearmonth(201101) . But i couldn't find anywhere i hope some body can surely help me regarding this .

currently i am using VELO03_WEEK_OR_MONTH_TO_DATE to get the date from the given year,week and then calculating the month. but There is a risk that i may not get the correct YEARMONTH from this.

Please give me the solution for this problem . the best solution will be greeted with the best.

thanks in advance .

3 REPLIES 3
Read only

Former Member
0 Likes
669

Hi,

maybe fm WEEK_GET_FIRST_DAY can help you to get your month.

For emaple pass 201117 for week 17 to it, and you get the 25th of April, so your month of the 1st day will be April, but note, that the month of the week's last day will be May.

Regards,

Klaus

Read only

0 Likes
669

Thank you Klaus.

That is the problem here Klaus ,see for the week 17 we are getting two months APRIL & MAY here which one to select. Is there any function module to calculate directly from YYYYWW to YYYYMM .

Read only

0 Likes
669

see for the week 17 we are getting two months APRIL & MAY here which one to select. Is there any function module to calculate directly from YYYYWW to YYYYMM .

Generally the start date of the week is considered in the industries i worked for. You have to confirm with your people.

Kesav