on 2006 Jul 27 5:45 PM
Hi Guys,
I need your urgent help. I have a requirement where I need to create a variable (on CALDAY) in a report which should use the input value given for another variable (created on CALMONTH). To put in words more clearly, CALMONTH is a variable that is mandatory for input but the CALDAY variable should not appear on the selection screen. I was told that I should write a customer exit to make this happen. So can someone please explain me the process of creating a customer exit and give me the code.
WHEN CALMONTH values are selected to be 07/2006 - 08/2006... CALDAY values should be 07/01/2006 to 08/31/2006.
CALMONTH is user entry, mandatory, range and multiple selection variable.
Early reply is highly appreciated and duely rewarded. Please let me know if I am not clear about the requirement. Thanks a bunch in advance.
Request clarification before answering.
Let us say, user enters multiple ranges for the month, you would want corresponding date ranges for the same, right?
data : w_date like sy-datum.
case I_VNAM.
when 'ZCALDAY'. " Calday var
loop at i_t_var_range into LOC_VAR_RANGE
where iobjnm = 'ZCALMONTH'.
WA_RANGE-SIGN = 'I'.
wa_date+2(6) = loc_var_Range-low.
wa_date+0(2) = '01'.
wa_range-low = wa_date.
if loc_var_range-high eq space.
WA_RANGE-OPT = 'EQ'.
else.
wa_range-opt = 'BT'.
wa_date+2(6) = loc_var_range-high.
wa_date+0(2) = '01'.
wa_date = wa_date + 31.
wa_date+0(2) = '01'.
wa_date = wa_date - 1.
wa_range-high = wa_date.
endif.
append wa_range to e_t_range. clear wa_range.
endloop.
endcase.
This should do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should work for all.
This needs to be added to the user-exit for variables. For an example of user-exit implementation, see the document https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/462fe790-0201-0010-3ca4-adf...
It is for something else, only part relevant for you is where the document talks of implementing variable exit RSR00001 (page 10 on)
But, do verify what AHP has said. It should select all the days of the month, if you just specify the month(s).
hi Joseph,
how are you doing ?
think you have no need to write variable exit for this,
you can include 0calday in your query, and it should automatically have values accordingly.
anyway, please provide your email, will send you how to derive variable doc.
hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
30 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.