on 03-30-2010 3:06 PM
Note: Had to repost this message from yesterday. We are trying to create a BEX customer exit that will retrieve the last 90 days worth of data using the 0calday info object. We are getting this error:
Error in variable in customer enhancement - ZLAST90DAYS
Variables contain invalid values
Program error in class SAPMSSY1 method: UNCAUGHT_EXCEPTION
System error in program CL_RSR_OLAP_VAR and form INIT-02.
Here is the code we are using:
DATA: L_S_RANGE TYPE RSR_S_RANGESID,
PREV_MONTH type n length 2,
PREV_YEAR type n length 4,
CUR_YEAR type n length 4,
CUR_DATE like sy-datum,
CUR_DATE_NUM type n length 8,
BEG_DATE_NUM type n length 8,
BEG_DATE like sy-datum.
WHEN 'ZLAST90DAYS'.
CUR_DATE = sy-datum.
BEG_DATE = CUR_DATE - 90.
CUR_DATE_NUM = CUR_DATE.
BEG_DATE_NUM = BEG_DATE.
L_S_RANGE-LOW = BEG_DATE_NUM.
L_S_RANGE-HIGH = CUR_DATE_NUM.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
While debugging in RSRT everything seems correct as far as the values. CUR_DATE_NUM = 20090330 (today's date) and BEG_DATE_NUM = 20091230 (90 days before today's date). The error that it stops on in program SAPLRRS0 - LRRS0F01 is g_c_ue_invalid_range. I don't understand why it's not working, as the variables are populating correctly while in debug. Please help.
Thanks
Brett
try this
DATA: L_S_RANGE TYPE RSR_S_RANGESID,
PREV_MONTH type n length 2,
PREV_YEAR type n length 4,
CUR_YEAR type n length 4,
BEG_DATE like sy-datum.
WHEN 'ZLAST90DAYS'.
BEG_DATE = sy-datum - 90.
L_S_RANGE-LOW = BEG_DATE.
L_S_RANGE-HIGH = sy-datum.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
Edited by: Ananda Theerthan on Mar 30, 2010 6:16 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response. We have tried several different variations of the code already. The one you provided, we have already tried. One person yesterday on the forums (original post was locked by community admin) said to not use system fields in any calculations, which is why we have it the way we do now - removed the calculation from using sy-datum directly. Again, what I don't understand is why in debug, all variables are populated correctly, but it is still throwing this error.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
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.