2007 Jul 06 7:47 AM
Hi all,
I am working on a conversion exit.i am able to convert value into desire value bt i am not able fetc the value in a table using select query where i am using this converted value in a where clause..
this is my piece of code:
<b>Conversion Exit</b>
FORM f_conversion_exit USING p_tabname
p_fname
p_convexit
CHANGING p_value.
FIELD-SYMBOLS: <fs_fld>.
ASSIGN COMPONENT p_field OF STRUCTURE <dyn_wa> TO <fs_fld>.
CALL FUNCTION p_convexit
EXPORTING
input = p_value
IMPORTING
output = <fs_fld>
EXCEPTIONS
length_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f_conversion_exit
<b>Select Query</b>
SELECT * INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
FROM (p_table) WHERE (it_where) .
When i m paasing 00000000000000003 in p_field its working bt if i paas 3 then it convert it in 00000000000000003 and this value get store in s_range(select-option) bt not fetch anything.St-subrc is 4.
Can anyone help me.
Points will b Rewarded.
2007 Jul 06 7:52 AM
Hi,
please use code as below :
data : a(10), b(10).
a = '3'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = a
IMPORTING
OUTPUT = b
.
write 😕 a.
write 😕 b.
Reward points, if helpful,
Sandeep Kaushik
2007 Jul 06 7:56 AM
Hi Swati,
Have you checked if select option also contains sign = 'I' and option = 'EQ'.
Regards,
Atish
2007 Jul 06 8:03 AM
yea.it contain sign I and option "eq'.
one point is there after converting, select option still showing low value as 3.bt if i check s_range-low then its show 000000000000000003.
2007 Jul 06 8:05 AM
so the problem is you need to modify the select option table
<b>MODIFY S_OPTION INDEX SY-TABIX.</b>