Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

conversion exit.

Former Member
0 Kudos

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.

4 REPLIES 4

former_member208856
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Swati,

Have you checked if select option also contains sign = 'I' and option = 'EQ'.

Regards,

Atish

0 Kudos

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.

0 Kudos

so the problem is you need to modify the select option table

<b>MODIFY S_OPTION INDEX SY-TABIX.</b>