on 04-23-2015 2:31 PM
Hi experts,
i created a variable using a custom exit.
i'v added to my query, but when launch debug mode, i can't see it in I_T_VAR_RANGE table;
but i can see others created previously.
is that normal? do i have to do something else?
Thanks.
Amine
Hi Amine,
How did you launch the debug mode and where did you launch it? What do you want to do? Did you try your customer exit if it's working for your query?
Regards,
Loed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amine,
There are a few points in your code:
1. You are not catching the excetiion when you call the FM.
2. It appears that your value of LOC_VAR_RANGE-LOW is not of type sy-datum. Please check what value you are getting in this value and passing it to FM. Ideally the exception says that day_in_not_valid i.e. your input value is not value. Check the format of LOW_VAR_RANGE-LOW and convert it to sy-datum type by using a conversion exit. Then you should be good.
The Code should be:
-------
DATA: day_in TYPE sy-datum, "declare this variable for input to FM
zdate TYPE sy-datum.
day_in = LOW_VAR_RANGE-LOW. "assign value
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
day_in = day_in
IMPORTING
last_day_of_month = zdate
EXCEPTIONS
day_in_not_valid = 1 "catch exception here
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
-------
Please let me know if you face any issues.
Thanks
Amit
Hi,
have you saved the query in the query desigenr? if not plesae save it and test it.
then check the I_T_VAR_RANGE internale table you will find the variables.
check the variable - I_STEP 1 or 2 or 3 .- check the step variable.
Thanks,
Phani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phani,
Thanks for your answer.
i think that i have an issue in y code, i got the following error:
The function call of SLS_MISC_GET_LAST_DAY_OF_MONTH failed; a field may have been assigned to the parameter DAY_IN whose"
here is my code:
Can you tell me what's wrong please?
DATA: temp_date like sy-datum.
WHEN 'ZLASTDAYMONTH'.
if i_step = 2.
LOOP AT I_T_VAR_RANGE INTO FISC_VAR_RANGE
WHERE VNAM = 'ZTODAYDATE2'.
CLEAR L_S_RANGE.
call function'SLS_MISC_GET_LAST_DAY_OF_MONTH'
exporting
day_in = FISC_VAR_RANGE-LOW "this is the user entry date based on ZTODAYDATE2
importing
last_day_of_month = temp_date.
L_S_RANGE-LOW = temp_date.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
endif.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.