Skip to Content
author's profile photo
Former Member

Problem in Customer Exit code of varaible for YTD calculation

Dear Friends,

In my report I am taking Fiscal year /period range varible (ZFISPER) i.e. 002.2007 to 006.2007 as a user input. Now I need to calculate the YTD amount , i mean i need to get the data from 001.2007 to 006.2007 ,lower range should always be 001.2007 and the high range should be the high range of user input variable in our case its 006.2007. For acheiving this I have used following customer exit variable ZUPTOFISCPER and have written following customer exit code in CMOD.

WHEN 'ZUPTOFISCPER'.

IF I_STEP = 2.

READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE with key VNAM =

'ZFISPER'.

ZUPTOFISCPER_HIGH = LOC_VAR_RANGE-HIGH.

zfisyear = LOC_VAR_RANGE-HIGH+0(4).

concatenate zfisyear '001' into ZUPTOFISCPER_LOW.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = ZUPTOFISCPER_LOW.

*initializing low interval limit

L_S_RANGE-HIGH = ZUPTOFISCPER_HIGH.

*initializing high interval limit

L_S_RANGE-SIGN = 'I'.

*defining interval as inclusive

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDIF.

But the problem is that the data is not getting populated in report , can some one tell me is there any error in this code or i need to take a different logic.

looking for response

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 03:42 PM

    The low range is fine but I don't think you have the high range right, the high range should be whatever the user passed, which is VNAM, check that, it may be problem there.

    And the easiest way to debug is to pass the value to some characteristics and see what actually got returned from the custom exit in the report. And also debug one at a time, just return one value which is hight and see if that is fine, the change the code just to return low to see still the value is correct.

    thanks.

    Wond

    Add comment
    10|10000 characters needed characters exceeded