cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO GET FISCALYEAR PERIOD WISE DATA BY GIVING FISCAL YEAR AS INPUT

former_member638921
Participant
0 Kudos

Hi All,

  I have to display data for customer balances on fiscper by giving the Fiscal year as the input parameter.

Fiscal Year variant is J3 i.e; April to March.

For ex1: if i give the Fiscal year as 2015(now as we are August,report should display data from April to July).

Fiscal year/period    Customer Balance

007.2015                   100

006.2015                   300

005.2015                   50

004.2015                   500

Ex2: Suppose we are in April 2015, If i execute the report in April month it should display the data for the previous finacial year that is from April 2014 to March2015.

I want to show above two scenario's in single report.


All your suggestions and assistance are highly appreciable.

Many Thanks

--Naveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Naveen,

As suggested by Loed, you can create Customer exit variable to get the periods from start of fiscal month to current month as well as to get the previous fiscal year value.

More over I see that you have requested for the ourput that too period wise.

For that i suggest you to create another structure in Row for diffrent periods. In this structure you can categorize your data or say Key figure value (customer balance) . this is going to be your cell Structure. so it will geive you fix ouput report, Its just that your values gets changed according to the input you are giving.

Hope this helps.

Thanks & Regards,

Maunank Patel.

Answers (1)

Answers (1)

Loed
Active Contributor
0 Kudos

Hi,

Create a variable with CUSTOMER EXIT as it's processing by and with INTERVAL option, let's call this ZFISCPERIOD_RANGE..

Let's call your input variable as ZINPUT_FISCYEAR..

Do this in CMOD:

data: zstart(7) type c,
       zend(7) type c,
       zyear(4) type c,

       zmonth(2) type c.


   WHEN 'ZINPUT_FISCYEAR'.                    

     if i_step = 2.

       LOOP AT I_T_VAR_RANGE INTO FISC_VAR_RANGE
             WHERE VNAM = 'ZFISCPERIOD_RANGE'

      zyear = FISC_VAR_RANGE-LOW(4).

      zmonth = sy-datum+4(2).
     
        if zmonth >= '05' and zmonth <= '12'.
          CONCATENATE zyear '004' into zstart.

          zmonth = zmonth - 1.         

          CONCATENATE zyear '0' zmonth into zend.

        elseif zmonth >= '02' and zmonth <= '04'.
          zmonth = zmonth - 1.

          CONCATENATE zyear '0' zmonth into zend.

          zyear = zyear - 1.
          CONCATENATE zyear '004' into zstart.
        elseif zmonth = '01'.

          zyear = zyear - 1.
          CONCATENATE zyear '004' into zstart.
          CONCATENATE zyear '012' into zend.
        endif.

         L_S_RANGE-LOW      = zstart.  
         L_S_RANGE-HIGH      = zend.  
         L_S_RANGE-SIGN        = 'I'.
         L_S_RANGE-OPT         = 'BT'.
         APPEND L_S_RANGE TO E_T_RANGE.
         EXIT.
       ENDLOOP.
     endif.

Just post here for questions..

Regards,

Loed

former_member638921
Participant
0 Kudos

  
Hi Loed,

  Thank you for your reply.

Best Regards,

Naveen

Loed
Active Contributor
0 Kudos

Hi,

Was your problem solved?

Regards,

Loed