Skip to Content
author's profile photo
Former Member

Customer Exit Var for YTD

Hi Friends I have this YRD Customer Exit Variable with the Range option

and Code is as below. Can u tell why this is always showing the current period balance instead of YTD

WHEN 'ZVR_YTDBUD'.

if i_step = 2 or i_step = 3.

clear loc_var_range.

loop at i_t_var_range into loc_var_range.

if loc_var_range-VNAM = 'ZVMFISCPER'.

if sy-subrc = 0.

YTD_YEAR = loc_var_range-low(4).

YTD_YEARH = loc_var_range-low(7).

concatenate YTD_YEAR '001' into YTD_CURRENTYEAR.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = YTD_CURRENTYEAR.

L_S_RANGE-HIGH = YTD_YEARH.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

append l_s_range to e_t_range.

exit.

endif.

endif.

endloop.

endif.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 04:02 PM

    Hi,

    you can remove the OR I_STEP = 3, doesn't do anything....

    . make sure that 'ZVR_YTDBUD' is an interval var, <b>NOT</b> ready for input

    . make sure that 'ZVMFISCPER' is mandatory

    . I guess that you have filetered FISCPER with both variables thus it will be filtered with the signle value of 'ZVMFISCPER'; if this is the case, try the following:

    Include a restricted key figure in your report filtered on 'ZVMFISCPER'; hide it

    Remove 'ZVMFISCPER' from the 0FISCPER filter in order to keep only the 'ZVR_YTDBUD' for the filter on the characteristic.

    Otherwise the code looks good except that we don't see how YTD_CURRENTYEAR and YTD_YEARH are declared...

    hope this helps...

    Olivier.

    Message was edited by:

    Olivier Cora

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      could please let me know the following:

      - how do you know that the FROM and TO values are the same?

      - are you restricting your KeyFigs with 0FISCPER? If yes, are you using 0FICSPER as a characteristic in your query? Is it filtered?

      please let us know so we can fix this issue

      Olivier.