Skip to Content
0
Former Member
Aug 10, 2010 at 06:16 PM

Query: Customer Exit variable not getting populated

38 Views

Hello Experts, I created a Customer Exit variable (ZPREV_MTH_OPS) in the query designer (7.0). I also put the necessary code in the function module "Z_BWFI_QUERY_CELL_MANIPULTN", but the query variable is not getting populated when I run the query using RSRT. The boxes for "Variable is ready for input" and "variable is without context" boxes when defining the variable.

This is my code in the exit:

case i_vnam.
    when 'ZPREV_MTH_OPS'.
     break-point.
      if i_step = 2.
        clear l_s_range.
        if sy-datum+4(2) = '01'.
          wa_prev_month = '12'.
          wa_prev_year = sy-datum+0(4).
          wa_prev_year = wa_prev_year - 1.
        else.
          wa_prev_month = sy-datum+4(2) - 1.
          wa_prev_year = sy-datum+0(4).
        endif.
        concatenate wa_prev_year wa_prev_month '01' into wa_datum.
        call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
          exporting
            day_in            = wa_datum
          importing
            last_day_of_month = wa_datum2.

        concatenate wa_prev_year wa_prev_month '01' into wa_datum.

*        l_s_range-low = wa_datum.
*        l_s_range-sign = 'I'.
*        l_s_range-opt = 'BT'.
*        l_s_range-high = wa_datum2.
*        l_s_range-sign = 'I'.
*        append l_s_range to e_t_range.
        l_s_range-low = '20080901'.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'BT'.
        l_s_range-high = '20080930'.
        l_s_range-sign = 'I'.
        append l_s_range to e_t_range.
      endif.
  endcase.

I also put a break point the exit, but it's not coming to the breakpoint.

Any suggestions?

Thanks.