on 09-22-2014 11:44 AM
HI Expert ,
I am writting customer Exit Variable to get Records from user entered Dates .
Eg. In Variable Screen of Bex report i have 2 Variable LYDate & TY Date both of them are As "Mutiple Single Value" & "Mendetory".
If we give LYDATE and TYDATE Date range as,
LYDate - 01/2013 - 06/2013
TYDate - 01/2014 - 12/2014
So I need ABAP Code which will get Value Range from 01/2013 from LYDATE and 12/2014 From TY DATE . So Query will Get data for 01/2013 TO 12/2014 (2 Years Data).
ZCALYEAR (Cusomer Exit) = LYDATE (01/2013) TO TY DATE(12/2104).
Please provide step by step ABAP Code to Achiev above issue. Points for Sure...
Thanks,
GB
Hi,
Some code like this will solve your issue:
CASE I_VNAM.
WHEN 'NEWVARIABLE'.
IF I_STEP = 2.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'LYDate'.
If sy-subrc =0.
CONCATENATE LOC_VAR_RANGE-LOW(4) INTO L_S_RANGE-LOW.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'TYDate'.
If sy-subrc =0.
CONCATENATE LOC_VAR_RANGE-HIGH(4) INTO L_S_RANGE-HIGH.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
endif.
endif.
endif.
endcase.
Regards
Yasemin...
Just realized that you need the year. Message was edited by: Yasemin ULUTURK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This requirement doesn't require any user exit. You can simply achieve with replacement path. I have made an exclusive blog on this concept.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear GB,
As per my understanding for the given CALMONTH (Input: 09.2014) you need to pick the data from beginning of the previous year (01.2013) to date (09.2014). If this is correct why do you need two dates? You can achieve using one input variable.
If my understanding is wrong kindly explain with your scenario for my understanding to help you.
Regards,
Ragunathan.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.