cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent! FY Field change from CALMONTH

Former Member
0 Kudos

Hi All,

  As our company changed the Fiscal Year from Calendar Year to V3 Apr-Mar.

Now when I create new reports for FY using the FY fields for Profit and Loss Report, when I use the filter with FY PER interval, I dont see the data for LAST YEAR COLUMN, whereas when I use FISCAL YEAR in filter selection, I can see the LAST YEAR COLUMN..

any idea why the last year column doesn't retrieve data using FY PERIOD.

Also, with FY fields like Fiscal year and Fiscal Year/Period, how to do YTD calculation based on FY filter input...is it possible? I think unless we have FY period selection in Filter, we can atleast try to get YTD calculation based on NEW VARIANT APR-MAR..

For Example, Say I am now in Dec 2012, but I run the report for SEP 2012, my report shld fetch data only FOR APR- SEP 2012 for YTD columns..

Anyone can give me a suggestion how to retrieve? if only thru customer exit, can anyone provide CUSTOMER EXIT CODE to fetch based on input DATE??

Accepted Solutions (0)

Answers (2)

Answers (2)

anshu_lilhori
Active Contributor
0 Kudos

Hi, 

Please check out the below blog it will give you insight on your requirement. 

http://scn.sap.com/people/durgesh.gandewar/blog/2012/02/14/financial-reporting-in-bi-over-various-ti... 

Hope this helps.

Regards, AL

Former Member
0 Kudos

Hi

Thanks a lot for yout indeed help. But it is of different time calculations like MTD, ytd, LAST YR etc..

But my problem now is ...2010, our FY Variant K4 ie JAN -DEC,

2011 was also K4 but due to change in 2012 FY, it was temporarily changed 15months with new custom variant Z1, and

now 2012, it is FYV V3 ie APR2012 -MAR 2013...if I use Fiscal Year, to run the report, would I be able retrieve the Last year column or not as my Variant changing every year and I am thinking if I use FY, the system will retrieve based on current variant i,e APR-MAR 2012..correct me if I am wrong..Urgent ASAP.

Former Member
0 Kudos

For Example, Say I am now in Dec 2012, but I run the report for SEP 2012, my report shld fetch data only FOR APR- SEP 2012 for YTD columns..

Anyone can give me a suggestion how to retrieve? if only thru customer exit, can anyone provide CUSTOMER EXIT CODE to fetch based on input DATE??

--------------------------------------------------------------------

You can use the following code if the input variable is calday(YYYYMMDD) based and in the report you want the data to be displayed for starting of the corresponding fiscal year till the entered date.

VAR_X_YTD - Customer Exit Variable(Interval,variable not ready for input)

0P_CSDAT -Posting Date(YYYYMMDD) Variable (Optional, Variable ready for input)

------------

   DATA: ZDATE1 TYPE SY-DATUM,
              ZDATE2 TYPE SY-DATUM.

   WHEN 'VAR_X_YTD'.
      READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
      WITH KEY VNAM = '0P_CSDAT'.
      CLEAR L_S_RANGE.
      L_S_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4).
      L_S_RANGE-LOW+4(4) = '0401'.
      L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT = 'BT'.
      IF L_S_RANGE-HIGH+4(2) = '01' OR L_S_RANGE-HIGH+4(2) = '02' OR L_S_RANGE-HIGH+4(2) = '03'.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4) - 1.
      ELSE.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4).
      ENDIF.
      ZDATE1 = L_S_RANGE-LOW.
      ZDATE2 = L_S_RANGE-HIGH.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          I_DATE         = ZDATE1
          I_PERIV        = 'V3'
        IMPORTING
          E_BUPER        = PER
          E_GJAHR        = YR
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      CONCATENATE YR PER INTO LOC_VAR_RANGE-LOW.
      IF SY-SUBRC = 0.
        CLEAR L_S_RANGE.
        L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPT = 'BT'.
      ENDIF.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          I_DATE         = ZDATE2
          I_PERIV        = 'V3'
        IMPORTING
          E_BUPER        = PER
          E_GJAHR        = YR
        EXCEPTIONS
          INPUT_FALSE    = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS         = 4.
      CONCATENATE YR PER INTO LOC_VAR_RANGE-HIGH.
      IF SY-SUBRC = 0.
        L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPT = 'BT'.
        APPEND L_S_RANGE TO E_T_RANGE.
        CLEAR L_S_RANGE.
      ENDIF.

Former Member
0 Kudos

Hi

I wanted to run based on Fiscal Year..

Also do I need to use CALDAY as my FILTER INPUT variable?? will I be able to retrieve based on current FISCAL YEAR?

I didn't understand the logic, you provided  as below...what the coding actually does...Also I am not an expert in ABAP...

WHEN 'VAR_X_YTD'.
      READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
      WITH KEY VNAM = '0P_CSDAT'.
      CLEAR L_S_RANGE.
      L_S_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4).
      L_S_RANGE-LOW+4(4) = '0401'.
      L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT = 'BT'.
      IF L_S_RANGE-HIGH+4(2) = '01' OR L_S_RANGE-HIGH+4(2) = '02' OR L_S_RANGE-HIGH+4(2) = '03'.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4) - 1.
      ELSE.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4).
      ENDIF.


Thanks a lot for your help.

Former Member
0 Kudos

Hi

I wanted to run based on Fiscal Year..

Also do I need to use CALDAY as my FILTER INPUT variable?? will I be able to retrieve based on current FISCAL YEAR?

I didn't understand the logic, you provided  as below...what the coding actually does...Also I am not an expert in ABAP...

WHEN 'VAR_X_YTD'.
      READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
      WITH KEY VNAM = '0P_CSDAT'.
      CLEAR L_S_RANGE.
      L_S_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4).
      L_S_RANGE-LOW+4(4) = '0401'.
      L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT = 'BT'.
      IF L_S_RANGE-HIGH+4(2) = '01' OR L_S_RANGE-HIGH+4(2) = '02' OR L_S_RANGE-HIGH+4(2) = '03'.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4) - 1.
      ELSE.
        L_S_RANGE-LOW+0(4) = L_S_RANGE-LOW+0(4).
      ENDIF.


Thanks a lot for your help.

Former Member
0 Kudos

Hi Bhagavat,

  I have one more clarification...as our system has been affected by many variants each year since implementation...when I am retrieving FISCAL PER based on SY-DATUM, what should be my EXPORTING

I_PERIV = "K4" or "Z1" or V3????

as 2010 was CALENDAR YEAR, 2011 was also CALENDAR YEAR but with 15months so changed to K4+Z1 and now APR 2012 is V3 i,e APR-MAR 2013.

any idea or help. Thanks and expecting your favorable reply.

Former Member
0 Kudos

Hi,

What is the input you are entering? You said that the report should fetch the data till SEP only, in that case you are entering either calmonth or fiscal period in the input. You can't fetch the data till a particular month by just entering Fiscal Year.

The code provided above works if you are entering the input in the calday format, it will fetch the data for the starting of financial year till the month entered.

I don't know about the question you asked for Fiscal Variant change.

Regards, Dilip.

Former Member
0 Kudos

hi

I don't have the CALDAY field in COPA cube and as well if I use FiscalYear/Period, don't why my last year column is not working?? Any idea, why last year column not working? I tried many codes with FY/Per, but I face lot of issues..

I clearly say what is my requirement..currently my reports runs based on 0CALMONTH and since APR 2012, We change our FISCALYEAR and I wanted to changes all 0calmonth to FISCAL fields...even if I can use the 0CALMONTH, can you let me know how to retrieve the first period  of FISCAL YEAR in the CALMONTH field???suggest what I need to do?

Former Member
0 Kudos

Hi Experts ,

  can anyone help me regard to my issue? Looks like I see no one has ideas when there is a FISCAL YEAR CHANGE?

former_member209702
Active Participant
0 Kudos

Hi,

For the following requirement:

For Example, Say I am now in Dec 2012, but I run the report for SEP 2012, my report shld fetch data only FOR APR- SEP 2012 for YTD columns..

Solution:

Create a restricted KF with following setting: (This restricted KF will show YTD value)

1) In area "Details of selections" drag characteristic fiscal year period

2) right click on it and select "Restrict"

3) For "Show" select "Value Ranges"

4) Here select "Less Than or equal to"

5) and in below drop down select Variable used for user input selection for fiscal year period

3) Add fiscal year characteristic in "Details of selections" to restrict this KF for fiscal year

4) Restrict fiscal year characteristic with variable used for user input selection for fiscal year

With this, the KF will be restricted to display data summarized till prev fiscal year period for selected year.

For example: if user has selected fiscal year period as Sept 12 then this KF will display data for Apr-Spt 12

Former Member
0 Kudos

Hi Geeta,

Are you sure that your suggestions will work..? Look very different..Also this is the P&L report which has Row structure with Key Figures and column structure with MONTH DISPLAY.

As per your suggestion, do I need to drag the key figure as well,?? that is not possible..as I have my structure differently..

.Also I have my YTD column  in my COLUMN STRUCTURE..Is it possible or not...??

Forgot to tell you...actually i am following the same...but not as RESTRICTED KF but as a formula in my COLUMN STRUCTURE which is not working..not sure why. If I have FYPER selection ..then my LAST YEAR column doesn't work..so confused...

Also after i create as you said,then I create formula and use that RKF in that..is it right?

Expecting your favorable reply ASAP. THANKS FOR YOUR HELP...