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: 

format fiscal year and fiscal variant

Former Member
0 Kudos
117

Hi Gurus,

What is the difference between calmonth, fiscal year and fiscal variant.

How to convert fiscal year to calmonth.

Sekhar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
62

Hi,

We have calendar month like format 20070101 YYYYMMDD that depends on the sap settings.While in India we calculate fiscal year from april to march for example its starts from april 2006 and ends at march 2007.And the format of it will be like 001/2006 to 012/2006.Here 012 stands for 12th month and 2006 counts as next year.I mean 012 here is march month and year 2007.Is this what ur looking for and for converstion of fiscal year to original date,month and year

data:

  • Period/Year

perio like cest1-perio value '2005005',

  • Fiscal Year Variant - Table T009

periv like tkel-periv value 'YT'.

data: date type sy-datum.

data: start_date type sy-datum.

data: end_date type sy-datum.

call function 'RKE_GET_FIRST_DAY_IN_PERIOD'

exporting

perflag = '1'

perio = perio

periv = periv

importing

date = date.

write:/ date.

start_date = date.

start_date+6(2) = '01'.

write:/ start_date.

call function 'LAST_DAY_OF_MONTHS'

exporting

day_in = date

importing

last_day_of_month = end_date.

write:/ end_date.

Reward points if useful.And please close the question and marked as Answered

2 REPLIES 2

Former Member
0 Kudos
62

calmonth is the present month been determined by the system. This depends on the fiscal year defined in the system.

fiscal variant is one wherein data of fiscal year is maintained.

based on fiscal year wherein various values are maintained, the calmonth is determined.

Former Member
0 Kudos
63

Hi,

We have calendar month like format 20070101 YYYYMMDD that depends on the sap settings.While in India we calculate fiscal year from april to march for example its starts from april 2006 and ends at march 2007.And the format of it will be like 001/2006 to 012/2006.Here 012 stands for 12th month and 2006 counts as next year.I mean 012 here is march month and year 2007.Is this what ur looking for and for converstion of fiscal year to original date,month and year

data:

  • Period/Year

perio like cest1-perio value '2005005',

  • Fiscal Year Variant - Table T009

periv like tkel-periv value 'YT'.

data: date type sy-datum.

data: start_date type sy-datum.

data: end_date type sy-datum.

call function 'RKE_GET_FIRST_DAY_IN_PERIOD'

exporting

perflag = '1'

perio = perio

periv = periv

importing

date = date.

write:/ date.

start_date = date.

start_date+6(2) = '01'.

write:/ start_date.

call function 'LAST_DAY_OF_MONTHS'

exporting

day_in = date

importing

last_day_of_month = end_date.

write:/ end_date.

Reward points if useful.And please close the question and marked as Answered