cancel
Showing results for 
Search instead for 
Did you mean: 

Variable and Key Figure for Fiscal Year Period

Former Member
0 Kudos

Hello Everyone,

I am trying to acheive a Key Figure that will show the actual and plan costs for current and prior year.

The Key Figure should include a timeframe of period 1 of current fiscal/year period and up to and including the current period/year.

So if the report is ran today 4/5/2006 the key figure should show 001.2006 - 004.2006 for Current and 001.2005 - 004.2005 for prior.

I see many variables delivered like 0I_FPER2, 0FPERT, 0F_CUFPE, 0I_PMAX, 0I_PCURR, 0I_CFYTD and 0I_PFYTD. Can't know for sure if these will work.

Now, if the report is ran on 3/6/2006 "Current" should show 001.2006 - 003.2006 and prior 001.2005 - 003.2005. So Current always means the fiscal year period the user enters. So it technically could be in the past.

Can someone tell me how to acheive the above.

Thank you,

Colleen

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188975
Active Contributor
0 Kudos

Hi Colleen,

Have you seen variable 0FYTCFP for Fiscal Period (Cumulated to Current Fiscal Year/Period)...if that gives you the 001.2006 - 004.2006 part of the data, you can try another column with an offset using this variable ( for the 001.2005 - 004.2005 part of data).

Hope this helps...

Former Member
0 Kudos

Hello Again Bhanu,

Yes, I have seen that variable. I was thinking just as you were below, but I believe this variable just picks up the current Fiscal Year/Period and gives 001.2006 to current fiscal year/period.

What I need is a variable entry the user enters and whatever fiscal year/period this is, get data from first fiscal year period to that date. So it's April now and user has a variable input for fiscal year/period. They enter 002.2006. So they only want to see Current as 001.2006 - 002.2006 and prior as 001.2005 - 002.2005. So the 2005 data would be the offset you mention, but the variable input is up to the user. They may want to just look at Jan '06 to Feb '06 even though it's April.

Can you please help me out.

Thanks so much.

Colleen

Former Member
0 Kudos

Hi,

Then you can go for exit I believe. Its a simple code.

Former Member
0 Kudos

Hi AVR-IGA:

can you please give that sample code.

u can email me at

kavi.sdn@gmail.com

Former Member
0 Kudos

Hi AVR - IGA,

Yes, can you update this thread with the code so everyone can have it?

Thanks,

Colleen

Former Member
0 Kudos

Hi Collen,

Following is the code sample that you can write to achieve your requirement.

WHEN 'ZFICALM1'.

IF i_step = 2.

LOOP AT i_t_var_range INTO loc_var_range

WHERE vnam = 'ZFICALMO'.

CLEAR l_s_range.

  • Month Greater than Oct.

IF loc_var_range-low+4(2) >= 10.

l_s_range-low0(4) = loc_var_range-low0(4).

l_s_range-low+4(2) = '10'.

  • Month from Jan to Sep

ELSE.

l_s_range-low0(4) = loc_var_range-low0(4) - 1.

l_s_range-low+4(2) = '10'.

ENDIF.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

EXIT.

ENDLOOP.

ENDIF.

Former Member
0 Kudos

Hello Sachdev,

Just a few quick questions since I'm not an abap'er.

1. This code will work and pull fiscal period 1 from whatever value is inputted in a single value fiscal period variable? Correct? Does anything need to be changed?

2. What is 'ZFICALM1'

3. What is 'ZFICALMO'

Are these the fiscal year/period and variable? Which is which?

Thanks and I will award full points.

Colleen