I got to work on customer exit where if user enters a date like 7th july 2015 , he should get the data of last 6 months. So i did I_STEP =2. I wrote a code, Syntax looks fine but when i execute, it is throwing an error. Screenshot attached.
I created a Manual entry variable on Creation Date. SAY "ZDATE_ENTRY"
I also created a Customer exit on same creation date. SAY "ZEXIT_DATE"
I added Customer exit variable to the Creation date and for manual entry i created a dummy selection and added a key figure and added the Creation date and Restricted it with Manual entry variable of Creation date.
DATA: Month (2) TYPE N,
Month1 (2) TYPE N,
day (2) type n,
l_s_range1 TYPE rrrangesid,
loc_var_range1 LIKE rrrangeexit,
LV_DATA1 TYPE SY-DATUM.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE1 WHERE vnam = 'ZDATE_ENTRY'.
Month = LOC_VAR_RANGE1+4(2).
Month1 = Month - 6.
Day = LOC_VAR_RANGE1+6(2).
CONCATENATE LOC_VAR_RANGE1+0(4) Month1 day INTO LV_DATA1.
l_s_range1-LOW = LV_DATA1.
l_s_range1-HIGH = LOC_VAR_RANGE1-LOW.
l_S_range1-SIGN = 'I'.
Append l_s_range1 to E_T_RANGE.