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: 

Fiscal year breakdown calculation

Former Member
0 Kudos


Hi,

I have a requirement where in given two dates and variant are given ( start date and end date ), I have to convert the dates to fiscal periods based on variant, and then break down the dates to fiscal years .

For Ex if startdate is 08-2014  and  enddate is 09-2017  with variant V3 [ as in fiscal year will be 04-2014 to 03-2015 , 04-2015 to 03-2016 and so on. ]

so my start and end dates  08-2014  and 09-2017  would be converted to

period start date 05-2014      and period end date as 06-2017

then it has to be broken down to fiscal years as

05-2014    to      03-2015

04-2015    to      03-2016

04.2016    to      03-2017

04-2017    to      06.2017

I have implemented the logic in a Z function module and calling it in my program to get the breakdown in an internal table when start and end dates and variant are given as input parameters using standard function modules

DATE_TO_PERIOD_CONVERT    to convert input date to period date

FCOM_POSTING_DATE_OF_YEAR_GET     get fiscal year start and end dates

and it is working fine.

I am just wondering is this functionality is already implemented in some standard function module as this is a normal requirement for breakdown of costs for fiscal years.

I have searched in SAP and in forums and blogs but could not get any such FM implementing this functionality.

Please let me know if at all anyone has encountered any standard FM implementing this functionality so that I would not be using my code.

Thanks

2 REPLIES 2

former_member201275
Active Contributor
0 Kudos

To be honest I cannot understand your question at all.

0 Kudos

Hi Glen ,

Sorry that I was not able to put the question properly.

I have two date fields: startdate  (GSTRP )and enddate ( GLTRP )and fiscal year variant PERIV

Now I have to convert the actual dates to period dates using Fiscal Year Variant ( which can be done using the FM DATE_TO_PERIOD_CONVERT )

Once we get the two fiscal period dates, I have to break down duration of those period start and end dates to fiscal years.

For Example

if startdate is 08-2014  and  enddate is 09-2017  with variant V3 (configured as April to March )

When I run the FM DATE_TO_PERIOD_CONVERT I get the period start and end dates as

period start date 05-2014      and period end date as 06-2017

If I run the FM FCOM_POSTING_DATE_OF_YEAR_GET  and   get fiscal year start and end dates, it gives the result as

April 2014 to March 2015 ( for fiscal year 2014 )

April 2015 to March 2016 ( for fiscal year 2014 )

Now for the range 05-2014 to 06-2015 it has to be split to fiscal years range using above data as

05-2014 (period start date) to 03-2015 (fiscal year end date for 2014)

04-2015 to 03-2016 ( fiscal year start and end dates for year 2015 as this is with in range of period

                                  startand end dates)

04-2016 to 03-2017  ( fiscal year start and end dates for year 2016 as this is with in range of period

                                  startand end dates)

04-2017 to 06-2017 ( the end date is period end date as it ends in 06-2017 )

I am still not sure if I put it in an understandable way .

Just wanted to check if this functionality is already implemented by any standard FM so that I don't have to use my code.

Thanks