cancel
Showing results for 
Search instead for 
Did you mean: 

Error while executig reports

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

its answered...

thanks

Former Member
0 Kudos

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.