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