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 to get Fiscal year/week

Former Member
0 Likes
3,996

Hi,

I searched SAP forum but could not find specific answer to this question.

I want to find Fiscal year week (YYYYWW) for a date using Fiscal year variant.

Can you suggest some function module/method to get the info?

E.g., if todays date is 06/23/2010

then Fiscal year week should be 201034. (Depending on Fiscal year variant XX)

Calendar year week is 201025.

Thanks,

Chirag

Hi,

I searched SAP forum but could not find specific answer to this question.

I want to find Fiscal year week (YYYYWW) for a date using Fiscal year variant.

Can you suggest some function module/method to get the info?

E.g., if todays date is 06/23/2010

then Fiscal year week should be 201034. (Depending on Fiscal year variant XX)

Calendar year week is 201025.

Thanks,

Chirag

11 REPLIES 11
Read only

brad_bohn
Active Contributor
0 Likes
2,588

DATE_TO_PERIOD_CONVERT

Read only

Former Member
0 Likes
2,588

This one?: GET_CURRENT_YEAR

Read only

Former Member
0 Likes
2,588

HI Guys,

Thanks for the inputs.

I tried FMs, however it seems it only gives last fiscal week for current fiscal period.

I want to get a fiscal week for particular date.

- E.g.

For 06/23/2010, suppose Fiscal year week is 201034 then for 06/16/2010 it should be 201033.

THanks,

Chirag

Read only

Former Member
0 Likes
2,588

as pointed out by brad, DATE_TO_PERIOD_CONVERT works for what you want. Put in the date and the fiscal year variant, and it returns the period and the year. I just tested it, and it works perfectly.

sorry, i just noticed you are looking for the fiscal WEEK... disregard the above. i tried to delete the reply, but could not.

Edited by: David Knittle on Jun 24, 2010 10:04 AM

Edited by: David Knittle on Jun 24, 2010 10:05 AM

Read only

Former Member
0 Likes
2,588

Never mind, David.

Thanks for your time.

Read only

0 Likes
2,588

DATE_TO_PERIOD_CONVERT does work. Surely you have an FI calendar variant that identifies the fiscal weeks if you need to determine those values?

Read only

Former Member
0 Likes
2,588

HI All,

I think, this remains still a mystery.

I am still not able to find solution to get Fiscal Year-week for a date.

C'on guys, help me out!

Chirag

Read only

0 Likes
2,588

>

> C'on guys, help me out!

That's what the other's have been doing all along!

AT some point, you have to take responsibility yourself. The forum isn't here to provide people with complete packaged solutions. You have to do some work yourself.

You either have the fiscal year variant in your system as Brad has suggested, or you will have to develop some logic to figure out what week you are in based on the start date of your fiscal year and the date you are interested in.

Rob

Read only

Former Member
0 Likes
2,588

I agree with Rob, the forum wouldn't give you the whole package of the solution rather we are responsible to investigate/find for a certain solution. Anyways, the FM for you to check what FISCAL week for a certain date is "DATE_GET_WEEK" (format DD.MO.YEAR)

Cheers!

Read only

Former Member
0 Likes
2,588

GM_GET_FISCAL_YEAR

Read only

0 Likes
2,588

Hi Ashritha,

please see its an 4 yr old thread.

Please do not respond to it.