on 03-25-2008 4:21 AM
Hello All,
I had posted a thread yesterday to create a characteristic value to populate current calendar month/year.. i received a reply for the same and have written the following code for it...
data: l_s_range like E_T_RANGE,
mo type i,
moc(2),
I type i.
CLEAR L_S_RANGE.*
if i_step = 1.
mo = sy-datum+4(2).
moc = mo.
if sy-datum+4(2) = 1.
l_s_range-low = '01'.
l_s_range-high = '01'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
else.
if mo < 10.
concatenate '0' moc into moc.
endif.
l_s_range-low = moc.
l_s_range-high = moc.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
endif.
endif.
ENDFUNCTION.
On executing the report i got the following errors:
Messages:
Value "03" for user-exit variable ZCURMNTH is invalid
Variables contain invalid values.
System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
Please help me ASAP...
Sneha
its answered...
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sneha,
Create a single value characteristic value variable with processing type as customer exit for 0calmonth(calendar year/month) characteristic, and if you want to display that variable as user input then check ready for input option and write the following code .You can use this variable in the aprropriate place in your report.
data: year(4) type n,
mon(2) type n,
zcalmon(6) type n.
when 'test1'.
year = sy-datum(4).
mon = sy-datum+4(2).
concatenate year mon into zcalmon.
clear l_s_range.
l_s_range-low = zcalmon.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
i guess this code will work for you.
regards,
karthik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.