cancel
Showing results for 
Search instead for 
Did you mean: 

Need customer Exit for user enter calyear dynamically displaying fiscal periods

Former Member
0 Kudos


Hi Experts,

How to write Customer Exit.

Example -- User enter year- 2013

Then I want to display fiscal period 001.2013 to 004.2014.

If user enter - 2012

Then I want to display fiscal period 001.2012 to 004.2013.

I want to write customer exit, where user enters year dynamically, then I want to display fiscal periods

Thanks

Sunil

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Suil ,

You can write below code :

When '<Your Customer Exit variable name>'

IF i_step = 2. 

       Read table i_t_var_range INTO loc_var_range

           WHERE vnam = 'Fiscal Year Input Variable'.

         l_year = loc_var_range-low.

          CONCATENATE l_year '001' INTO l_mmyy .

l_year = l_year + 1.

          CONCATENATE l_year '004' INTO l_mmmyy .

         l_s_range-high = l_mmmyy.

         l_s_range-low = l_mmyy.

         l_s_range-sign = 'I'.

         l_s_range-opt  = 'EQ'.

         APPEND l_s_range TO e_t_range.

     ENDIF.

Hope this will help you.

Arvind .

Former Member
0 Kudos

Hi Arvind,

Small Correction in your code

l_s_range-opt  = 'BT'.

Since we need to display interval of Fiscal Period

@ Sunil

Make sure to select variable represents as  "Interval" and Uncheck " Read for Input"

Regards,

Anil.

sakthi_ss
Active Participant
0 Kudos

Hi Sunil,

You can use following piece of code in CMOD for customer exit else achieve the same using filter if posting period is available in your data.

DATA: loc_var_range TYPE rrrangeexit,

            l_year(4)          TYPE c,

            l_mmyy(7)     TYPE c,

            l_mmmyy(4TYPE c.

.

WHEN 'customer exit variable'.

     IF i_step = 2.

       LOOP AT i_t_var_range INTO loc_var_range

           WHERE vnam = 'Fiscal year input variable'.

         l_year = loc_var_range-low.

          CONCATENATE l_year '001' INTO l_mmyy .

          CONCATENATE l_year '004' INTO l_mmmyy .

         l_s_range-high = l_mmmyy.

         l_s_range-low = l_mmyy.

         l_s_range-sign = 'I'.

         l_s_range-opt  = 'BT'.

         APPEND l_s_range TO e_t_range.

       ENDLOOP.

     ENDIF.


Regards,

Sakthi.



yasemin_kilinc
Active Contributor
0 Kudos

Hi Sakthi,

One correction for your code:

           l_year = loc_var_range-low. 

          CONCATENATE l_year '001' INTO l_mmyy .

          l_year = l_year + 1.

          CONCATENATE l_year '004' INTO l_mmmyy .

Since we need to show the next year as the high range.

Regards

Yasemin...

sakthi_ss
Active Participant
0 Kudos

Yes you are right. Thanks Yasemin.

Regards,

Sakthi.

former_member199945
Active Contributor
0 Kudos

Search in Google/SCN you wll get good documents  related to this .

U Can refer this also in SCN